View Full Version: Item making

ivan >>Programming >>Item making


<< Prev | Next >>

Atomic- 04-12-2005

For reference: a cloak of resist foo has 25. A ring has 15. Both would be *far* more common than these... although I suppose it oculd be toned down to resist 20. Note that acid and poison are special in the resistances. A resist acid 15 ring would be enormously powerful, considering currently a resist acid ring has 2. Cloaks give resist 4, IIRC. I'm not sure what the resist numbers are for poison. EDIT: In addition these items would not be handled as a pair (unless you cloned one of them). I kinda designed them to be worn one on one hand, the other on the other, and hence, being different items, would be handled seperately. So if you wanted to enchant them both to +1, you would need to spend 2 enchant scrolls.

blob- 04-12-2005

Note that acid and poison are special in the resistances. A resist acid 15 ring would be enormously powerful, considering currently a resist acid ring has 2. Cloaks give resist 4, IIRC. I'm not sure what the resist numbers are for poison. You're right. My mistake.I had read about resistance number on another thread and forgot it was different for acid and fire.

TheFallenOne222- 04-12-2005

...No offense meant, but those are WAY too powerful. Storms is essentially two Resist Electricity rings, a thunder hammer, and TWO gauntlets of dexterity all combined into one, not to mention that it adds an EXTRA lightning attack that nothing else has. The AC might be overpowered too, not sure, you didn't list that. DEFINATELY needs to have a negative effect of some kind, or needs to be toned down a lot. The Flames one is essentially the same.

Atomic- 04-13-2005

Hmm. I'll think some, post some revisions tomorrow or so...

Atomic- 04-13-2005

OK, new versions of the fists: Fist of *foo* Artifact Resist *foo* 10 Add a little *foo* damage to melee attacks with that arm (e.g. 1-3) Add a little more *foo* damage to melee attacks w/ that arm if unarmed (e.g. another 1-3, for a net of 2-6 leaning to the middle) If you have both worn, gain +1 ASTR and +1 DEX in each arm If you have both worn, the *foo* damage added by each is increased (becomes, say, 2-4, for max 4-8 if unarmed) Also if you have both worn, low low chance to trigger a small (radius 2-3) explosion with high damage and/or a lightning bolt. Again, made of the red/white steel. Note, they don't spawn together, you'd have to find each one seperately.

Atomic- 04-14-2005

I've got the code compiling, and think I've almost got the acid shield going as well... but, I'm having some problems. Mainly I don't know what I'm doing really. I followed Holy's advice, but I'm not sure how any of the functions work. Mostly SpillFluid(). I'm sure if I stared long enough, and read enough of the code, I coudl figure it out... but... I looked at the rain code, and found this line: LSquareUnder->SpillFluid(Team == PLAYER_TEAM ? PLAYER : 0, Liquid->SpawnMoreLiquid(DropVolume), true, OwnLiquid); I'm uncertain, however, where/how I get the fluid to spill, what the LSquareUnder is referring to, or much else of it. Looking at the actual code itself for SpillFluid (both teh items and the character ones) didn't give me much of a clue either as to how to implement or work the coding. I geuss it's just been so long since I did any coding, and never really did much fancy... All of the -> stuff, I can make sense of it, but it's rather unfamiliar to me. Also all the functions and everything else is a lot more complex than I'm used to working with... I've got everything I've added in commented out so that nothing is really changed, just so I can compile. Here's the changes I've done so far: in Item.dat: /* Config ACID_SHIELD; //Working on { Possibility = 10; DefaultSize = 70; StrengthModifier = 165; MainMaterialConfig = { 5, IRON, STEEL, METEORIC_STEEL, ADAMANT, MITHRIL; } MaterialConfigChances = { 5, 200, 300, 150, 30, 30; } EnchantmentPlusChance = 0; AcidResistance = 1; PreFix = "Acid"; }*/ Gear.h: ITEM(shield, armor) { public: virtual long GetPrice() const; virtual truth IsShield(const character*) const { return true; } virtual void AddInventoryEntry(const character*, festring&, int, truth) const; /* virtual void BlockEffect(character*, character*, item*);*/ //Working on }; Item.h, under class item : public object, public: /*virtual void BlockEffect(character*, character*, item*) { }*/ //Working on Gear.cpp: /*void acidshield::BlockEffect(character* Blocker, character* Attacker, character* Weapon) //Working on { LSquareUnder->SpillFluid(Team == PLAYER_TEAM ? PLAYER : 0, Liquid->SpawnMoreLiquid(DropVolume), true, OwnLiquid); }*/ Hmm, I though there was another change but I can't remember where I did it.

TheFallenOne222- 04-14-2005

There are a few areas you'll have to add defines for every item you add, as well as a few other things. I'll post a more helpful post tomorrow, as, right now, I'm studying for an exam. Stupid exams.

Atomic- 04-14-2005

I knew I had to add defines, just couldn't figure out where. Take your time with the response; I won't be able to code again until Tuesday.

Ighalli- 04-18-2005

So I finally finished two new weapons. The first is the dagger of venom, which coats itself with poison and the second is the weeping blade, which splashes acid on enemies. At first, I was going to recycle the code to make both of them, but I found acid resistance doesn't save items. It seemed fairly challenging to coat the blade in enough acid to hurt things and not enough to destroy it in the first place. In the end I left the weeping blade with a hit effect instead of actually coating it in acid. I made the weeping blade out of crystal, which would be naturally resistant to it's acid (although it's not yet coded that way) and the dagger out of typical materials except iron, because I thought it would rust. The frequencies of materials are inversely proportional to their hardness. In gear.h ITEM(weepblade, meleeweapon) { public: virtual truth HitEffect(character*, character*, v2, int, int, truth); }; ITEM(daggerofvenom, meleeweapon) { public: daggerofvenom() { Enable(); } virtual void Be(); protected: virtual truth CalculateHasBe() const { return true; } }; in item.dat daggerofvenom { DefaultSize = 40; Possibility = 15; WeaponCategory = SMALL_SWORDS; DefaultMainVolume = 25; DefaultSecondaryVolume = 25; BitmapPos = 48, 256; FormModifier = 75; StrengthModifier = 60; NameSingular = "dagger"; PostFix = "of venom"; MainMaterialConfig = {7, OMMEL_BONE, OMMEL_TOOTH, ILLITHIUM, BRONZE, STEEL, ARCANITE, MITHRIL; } SecondaryMaterialConfig = {7, OMMEL_BONE, OMMEL_TOOTH, ILLITHIUM, BRONZE, STEEL, ARCANITE, MITHRIL; } MaterialConfigChances = {7, 72, 48, 80, 225, 144, 100, 90; } Roundness = 20; Price = 150; AttachedGod = CLEPTIA; WieldedBitmapPos = 160, 288; EnchantmentPlusChance = 2; DamageFlags = SLASH|PIERCE; Config BROKEN; { Possibility = 10; BitmapPos = 48, 288; WieldedBitmapPos = 176, 288; EnchantmentPlusChance = 4; } } weepblade { DefaultSize = 70; Possibility = 10; WeaponCategory = SMALL_SWORDS; DefaultMainVolume = 70; DefaultSecondaryVolume = 30; BitmapPos = 48, 240; FormModifier = 80; StrengthModifier = 90; NameSingular = "blade"; Adjective = "weeping"; MainMaterialConfig = {6, MILKY_QUARTZ, QUARTZITE, ROSE_QUARTZ, PURPLE_CRYSTAL, BLUE_CRYSTAL, GREEN_CRYSTAL; } SecondaryMaterialConfig = {6, MILKY_QUARTZ, QUARTZITE, ROSE_QUARTZ, PURPLE_CRYSTAL, BLUE_CRYSTAL, GREEN_CRYSTAL; } MaterialConfigChances = {6, 420, 390, 364, 210, 195, 182; } Roundness = 10; Price = 250; AttachedGod = SCABIES; WieldedBitmapPos = 160, 16; EnchantmentPlusChance = 2; DamageFlags = SLASH|PIERCE; Config BROKEN; { Possibility = 10; BitmapPos = 48, 272; WieldedBitmapPos = 176, 208; EnchantmentPlusChance = 4; } } and in gear.cpp void daggerofvenom::Be() { meleeweapon::Be(); static int update = 0; update = (update+1)%25; if(!IsBroken() && (*Slot)->IsGearSlot() && !update) { fluidvector FluidVector; FillFluidVector(FluidVector); uint volume=0; for(uint c = 0; c < FluidVector.size(); ++c) { liquid* L = FluidVector[c]->GetLiquid(); volume+=L->GetVolume(); //I imagine that there is a function I don't know to do this... } if (volume < 90) SpillFluid(0, liquid::Spawn(POISON_LIQUID, 10)); } } truth weepblade::HitEffect(character* Enemy, character* Hitter, v2 HitPos, int BodyPartIndex, int Direction, truth BlockedByArmour) { truth BaseSuccess = meleeweapon::HitEffect(Enemy, Hitter, HitPos, BodyPartIndex, Direction, BlockedByArmour); if(Enemy->IsEnabled() && !RAND() % 3) //THIS LINE HAD A MISTAKE { if(Enemy->IsPlayer() || Hitter->IsPlayer() || Enemy->CanBeSeenByPlayer() || Hitter->CanBeSeenByPlayer()) ADD_MESSAGE("%s weeping blade spills acid on %s.", Hitter->CHAR_POSSESSIVE_PRONOUN, Enemy->CHAR_DESCRIPTION(DEFINITE)); Enemy->SpillFluid(PLAYER, liquid::Spawn(SULPHURIC_ACID, 25+RAND()%25)); return BaseSuccess; } else return BaseSuccess; } Edited: the weeping blade worked on if (RAND()%3) instead of (!RAND()%3).

Atomic- 04-19-2005

I finished working out some code for the acid shield, though it still needs some severe balancing. Here's how it works right now: If attacker has a weapon, splash acid on it. Then, 1 in 5, splash acid on the attacker. If attacker has no weapon, do neither of the above, just splash acid on the attacker. It's severely unbalanced however. I took a couple of them into New Attnam to test them in Wizard Mode. The guards couldn't do *anything*. They'd swing once and I'd block, and their weapons would almost immediately corrode completely. Then in their second attack their armor would corrode, and maybe their shield too, and then they'd start disolving and panic. However the encourager and Decos himself, and also the shopkeeper, were very dangerous. The encourager and Decos both use whips, which would get coated in acid, but can't be broken and hence, destroyed. Then they'd hit me and I'd get acidified. Also, the shopkeeper got knocked unconcious a few times from acid disolving his head, but eventually I had to kick him to death, and when i looked at his corpse only his leather helm was broken: the leather armor and boots were unharmed. Is leather particularly resistant to acid? In any case, I also made them very rare. About as rare as some artifacts, in fact. If/when they get implemented, if you find one, I highly suggest you only use them when you've got mad acid resistance and aren't fighting e.g. mistresses, or anyone else with a whip. Whips really need to be breakable/destroyable. They're a bit cheap in that regard. Make them tough, sure, but I'm pretty sure a whip coated in sulpheric acid wouldnt last long.

Ighalli- 04-19-2005

Just how much acid are you spilling here?? My weeping blade does this: Enemy->SpillFluid(PLAYER, liquid::Spawn(SULPHURIC_ACID, 25+RAND()%25)); I think that the shield should do a little less (except on that 1 in 5 chance) because weapons are considerably more fragile than monsters. I'd say between.. ohh.. 10 and 30 per strike plus that 1 in 5 of something like 25-50 or so.

Atomic- 04-19-2005

Yeah... I went way overboard on it. At first it was only 25-30 splashed on them each time, but that didn't seem to be doing anything to the puppy. So... I uh... jacked it up. Now it's... erm... 125-200 on weapon, 25-100 on person if it was a weapon block, and 100-200 on person if it wasn't a weapon block. I went a bit crazy with it. Here's what I think I'll change it to: If(weapon) splash(20-40 on weapon) If(weapon && 1 in 5) splash(5-15 on person) If(unarmed) splash(25-50 on person) Am I still going overboard here? BTW Ig, doing (25 + RAND() % 25) is going to land you 25-49 points. If you're going for 25-50, you need to do (25 + RAND() % 26). Thats why whenever the Devs used a Rand call, they went 1 over (e.g. RAND() % 101 to get 0-100). You do understand modulo, right?

Ighalli- 04-19-2005

Yeah, I know that it's actually 25-49, but since I don't really understand exactly how the acid works yet I didn't think it was important to get any specific value. I think that the shield should only acidify the striker about half the time instead of every time. The flaming sword works half the time while others work less often IIRC. My acid weapon works one time in three (I just noticed a typo in my code! it's edited now), but then again hitting people happens more than blocking a blow I think.

Atomic- 04-19-2005

Depends on how often they swing... if you're using two shields you can block nearly every attack. Hmm... perhaps your'e right on the frequency thing. I'll tone it down to, say, 2 out of 3 times? Hmm. No, better make it less frequent than that. Still want it somewhat frequent though. How about 2 out of 5, or 3 out of 5?

TheFallenOne222- 04-19-2005

Depends on how often they swing... if you're using two shields you can block nearly every attack. Hmm... perhaps your'e right on the frequency thing. I'll tone it down to, say, 2 out of 3 times? Hmm. No, better make it less frequent than that. Still want it somewhat frequent though. How about 2 out of 5, or 3 out of 5? Don't tone 'em down too much. Just make it simple, do 50% of the time. Or you could even base it off of the enchantment of the shield. Once it gets perfected I'm gonna throw your acid shields in and see what I can do with a kicking character dualwielding those shields. :D

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