Formula problem in skills.txt

Post here about all aspects of D2 mod making whether it's information, problems or whatever. Please specify whether your post is relating to Classic D2 or the Expansion.

Moderator: Nizari

Post Reply
Wuldreg
Posts: 9
Joined: Tue Nov 12, 2019 4:20 am

Formula problem in skills.txt

Post by Wuldreg » Thu Nov 14, 2019 7:16 pm

I have recently been trying to experiment with formulas for skills but I have run into an impediment. I can enter skills related formula just fine but stat formula for some reason just don't work and I end up with impossibly large positive/negative numbers. For example I tried this simple formula: 1 + Stat(‘maxmana’.accr) for the Wearbear damage bonus (Param1) and I ended up with -1990237823. I have tried different stats and formula with the same result and I tried looking around for an answer but couldn't find one. I am using patch 1.3 for reference. Any help I can get would be much appreciated and I apologize if the answer was already out there.

User avatar
Burn
Posts: 42
Joined: Sat Aug 31, 2019 3:51 pm
South Africa

Re: Formula problem in skills.txt

Post by Burn » Fri Nov 15, 2019 11:29 am

Can you make a print screen of you formulas here? Would help a lot.

User avatar
k0r3l1k
Moderator
Angel
Posts: 631
Joined: Sun Sep 09, 2007 3:11 am
Location: Arizona, Prescott
United States of America

Re: Formula problem in skills.txt

Post by k0r3l1k » Fri Nov 15, 2019 5:01 pm

Param fields do not recognize formulas. Only positive or negative integers.

You can only use calcs in fields labeled calc, like aurastatcalc etc. ( with some exception like tohit, delay, etc)
Image

Wuldreg
Posts: 9
Joined: Tue Nov 12, 2019 4:20 am

Re: Formula problem in skills.txt

Post by Wuldreg » Sun Nov 17, 2019 11:26 am

Thanks for the info on where to put the formula but unfortunately I am still having problems. I tried putting stat(‘maxmana’.accr)/2 in aurastatcalc1 for Wearbear and the damage on my character went blue but the numbers did not change. I included a screenshot as requested.

User avatar
k0r3l1k
Moderator
Angel
Posts: 631
Joined: Sun Sep 09, 2007 3:11 am
Location: Arizona, Prescott
United States of America

Re: Formula problem in skills.txt

Post by k0r3l1k » Sun Nov 17, 2019 3:20 pm

What are you using to modify the files?

your formula here is technically erronious, due to the ' marks being open and close variations, which some text editors will do automatically.
see?

stat(‘maxmana’.accr)/2

try copy paste

stat('maxmana'.accr) / 2

see the difference in the ' symbols?
Image

Wuldreg
Posts: 9
Joined: Tue Nov 12, 2019 4:20 am

Re: Formula problem in skills.txt

Post by Wuldreg » Sun Nov 17, 2019 4:40 pm

Okay that worked. So my program works fine. I think I simply made a series of errors (like entering the formula in param and not calc) that led me to be paranoid that I must have entered some minor detail in wrong. So I copied a stat formula from kb/viewarticle?a=371 and entered in maxmana just to make sure I wasn't getting something wrong. But that guide uses those open and closed variations. Which is kinda funny when you think of it.

Thanks a lot for bearing with me and helping me figure it out.

Post Reply

Return to “General Mod Making”