View Full Version: Item making

ivan >>Programming >>Item making


Atomic- 04-19-2005

I have a gut feeling you're going to kick a lot of ass. :P Good luck finding two of them though...

TheFallenOne222- 04-20-2005

I have a gut feeling you're going to kick a lot of ass. :P Good luck finding two of them though... Is it going to be wishable? If so, *jacked*. :P

Atomic- 04-21-2005

Acid shield is, I believe, done -- some of the messages are a little odd and might need some changing though, and it might use a touch of balancing. With two of them I was still able to "kill" everything I met up until UT3, where the plants were immune to the acid. The code: item.dat: acidshield /*armor ->*/ { Possibility = 10; DefaultSize = 70; StrengthModifier = 165; DefaultMainVolume = 350; Category = SHIELD; FormModifier = 15; MainMaterialConfig = { 5, IRON, STEEL, METEORIC_STEEL, ADAMANT, ARCANITE; } MaterialConfigChances = { 5, 200, 300, 150, 30, 30; } EnchantmentPlusChance = 0; AcidResistance = 1; NameSingular = "acid shield"; BitmapPos = 32, 336; WeaponCategory = SHIELDS; CanBeBroken = true; WieldedBitmapPos = 128, 32; AttachedGod = SCABIES; Config BROKEN; { Possibility = 3; DefaultSize = 45; FormModifier = 20; BitmapPos = 48, 224; WieldedBitmapPos = 128, 48; MainMaterialConfig = { 6, IRON, STEEL, METEORIC_STEEL, ADAMANT, ARCANITE, MITHRIL; } MaterialConfigChances = { 6, 150, 250, 200, 60, 40, 20; } EnchantmentPlusChance = 1; } } gear.h: ITEM(acidshield, armor) { public: virtual truth IsShield(const character*) const { return true; } virtual void BlockEffect(character*, character*, item*, int Type); }; item.h (under class item : public object): virtual void BlockEffect(character*, character*, item*, int type) { } char.h (under function int character::CheckForBlockWithArm(...)): Blocker->BlockEffect(this, Enemy, Weapon, Type); gear.cpp: void acidshield::BlockEffect(character* Blocker, character* Attacker, item* Weapon, int Type) //Working on { int CheckAttackType = 0; if(!IsBroken()) { if(RAND() % 5000 == 17) { Weapon->SpillFluid(Blocker, liquid::Spawn(SULPHURIC_ACID, 200 + RAND() % 51)); ADD_MESSAGE("%s is completely doused in sulpheric acid!", Attacker->CHAR_DESCRIPTION(DEFINITE)); } else { if(Type == WEAPON_ATTACK) { Weapon->SpillFluid(Blocker, liquid::Spawn(SULPHURIC_ACID, 20 + RAND() % 41)); ADD_MESSAGE("%s weapon is splashed with acid from the shield!", Attacker->CHAR_POSSESSIVE_PRONOUN); } else CheckAttackType = 1; if(RAND() % 5 == 0 && CheckAttackType == 0) { Attacker->SpillFluid(Blocker, liquid::Spawn(SULPHURIC_ACID, 5 + RAND() % 11)); ADD_MESSAGE("%s is also splashed with acid!", Attacker->CHAR_DESCRIPTION(DEFINITE)); } if(CheckAttackType == 1) { Attacker->SpillFluid(Blocker, liquid::Spawn(SULPHURIC_ACID, 25 + RAND() % 26)); ADD_MESSAGE("%s is splashed with acid from the shield!", Attacker->CHAR_DESCRIPTION(DEFINITE)); } } } } I also coded another item really quick: in item.dat (under AMULET): Config AMULET_OF_WARDING; { Possibility = 4; PostFix = "of elemental protection"; MainMaterialConfig == ILLITHIUM; CanBeCloned = false; Price = 4000; AttachedGod = LEGIFER; FireResistance = 30; ElectricityResistance = 30; AcidResistance = 5; PoisonResistance = 5; }

TheFallenOne222- 04-21-2005

Speaking of item creation... Has anyone else noticed or run into trouble with the fact that enchantments and/or "stat upping" doesn't work on Amulets? :x I think I'm gonna code in a new item definition that will allow it to add a set amount of stats without being based off of enchantment levels or anything like that. If anyone else would be interested, I can post the code here. (If you're wondering, I need to add it for the emblems in my forging system)

Atomic- 04-21-2005

Oh, I forgot: on my amulet of warding, you need to add it to define.dat. You don't need to add the acid shield, however.

Ighalli- 04-21-2005

Fallen one, I say post every scrap of code that you add or change (as long as t works :wink:) You never know when someone will find it useful or inspiring. Do resistances from amulets even work right now? I know that rings and cloaks work, but I don't think all equipment is checked for resistances currently.

TheFallenOne222- 04-21-2005

I kinda doubt it. Most stuff is only coded to work for things that it was intended to be on.

Atomic- 04-22-2005

Well if it doesn't then my amulets pretty useless. Maybe it should be a ring. You get the idea behind it though: basically an uber-powered resistance ring, super rare, and really powerful. I'm sure you can write your own resistance ring. It's not terribly complex to code in simple items like that...

hexi- 04-23-2005

Okay I integrated most of Atomic's code last night and added it to CVS. I didn't really have time to test it, but I'll try to do that too at some point... So far looks great!

Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.