Page 1 of 1

Passive Skill that Sets Dummy Property

Posted: Sun Mar 10, 2019 3:59 pm
by ectorzage
So I am either moving forward or backwards on this personal challenge to recreate the Elixirs of Diablo. I am able to get Strength and Dex working, but keep running into issues with Vitality and Energy. So far, I have seven "passive" skills that are loading for each of the seven classes. In each skill, I am attempting to set values to unused183, unused184, and unused185 that match the life,stamina, and mana per point respectively. Thanks a "fireresist x" stat/calc that I'm adding to each of the skills, I know that the states and skills are loading properly. For some reason, Diablo 2 either does not want to read or set the dummy properties when the vitality and energy elixirs call for them. Is this some limitation of passive skills? Do I need to make these passives into auras? Are unused183, unused184, and unused185 actually being used or overwritten in some fashion? I can't figure out what is preventing it from working.

Re: Passive Skill that Sets Dummy Property

Posted: Sun Mar 10, 2019 4:54 pm
by Necrolis
What does your calc look like? If the resist is showing up, its likely a calc problem. Make sure you are using 256ths and integer maths for the setting of the life/mana/stam else you'll barely change the value.

Re: Passive Skill that Sets Dummy Property

Posted: Sun Mar 10, 2019 6:08 pm
by ectorzage
So currently I have the stats inflated hoping to see some change. Here is what I have currently on skills.txt for the Barbarian Innate Passive

unused183 16000 unused184 4000 unused185 4000 fireresist 20

The Fire Resist 20 is showing up with newly created characters, so that should mean they have the skill, right?

For misc.txt where the elixirs are stored, I am using these for the calc fields with a pSpell 4 to increment.
vitality 1 maxhp stat('unused183'.accr) maxstamina stat('unused184'.accr)
energy 1 maxmana stat('unused185'.accr)

Any thoughts?

Re: Passive Skill that Sets Dummy Property

Posted: Sun Mar 10, 2019 10:18 pm
by Necrolis
Those values for the pspell need to be multipled by 256, cause those stats are stored with a fixed precision of 256. So in other words, 1 ingame is equal to 256 in the files.

Re: Passive Skill that Sets Dummy Property

Posted: Sun Mar 10, 2019 10:38 pm
by ectorzage
I must still not be getting something because I've tried multiplying by 256 with no success. Here is what I've tested on:

vitality 1 maxhp stat('unused183'.accr*256) maxstamina stat('unused184'.accr*256)
energy 1 maxmana stat('unused185'.accr*256)

vitality 1 maxhp stat('unused183'.accr)*256 maxstamina stat('unused184'.accr)*256
energy 1 maxmana stat('unused185'.accr)*256

vitality 1 maxhp stat('unused183'.accr*256.0) maxstamina stat('unused184'.accr*256.0)
energy 1 maxmana stat('unused185'.accr*256.0)

vitality 1 maxhp stat('unused183'.accr)*256.0 maxstamina stat('unused184'.accr)*256.0
energy 1 maxmana stat('unused185'.accr)*256.0

The only one that gives any life, mana, or stamina is the third and it is the wrong amount (giving 30 for each instead of the amount used in the stats).