Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
I'm working up a system that will have something similar to the Pathfinder CharCalc.? and ChargeAttr.? tags that are used for calculating trkMax and I was wondering if it would be possible to see some of the component script that is used for that.
|
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633
|
Andrew,
Typically I think when you are using this kind of thing you need something like this, where you if ... then ... elseif .... through the available tags to apply the correct values to the tracker via an eval script. Code:
field[whatever].value += tagvalue[thetag.?] ~for ChargeCalc I think its something like if (tagis[ChargeAttr.Strength] <> 0) then field[trkMax].value += #attrmod[aSTR] elseif ... repeat for other attributes if (tagis[ChargeAttr.Minimum1) then field[trkMax].value = maximum(1,field[trkMax].value) RavenX Pronouns: She/Her Please do not PM me to inquire about datafiles I coded "for personal use" such as Exalted, World of Darkness, AD&D, or Warhammer 40K Roleplaying. I appreciate your interest, but I do not own the Intellectual Property rights to these game systems. Nor do I have permission from any of the Publishers to distribute the data files. As such, I cannot distribute the work I have done with community on these files. They are "for personal use" only. Thank you. I am far too busy these days to answer emails. If you message me here there is no guarantee I will get back to you at all. |
#2 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
Oh I have something worked out, I just wanted to see the logic they used. It's a lot simpler than a ton of if/then/else statements. You can do a lot of just if (tagis[????]) then, especially if you use tagvalue[] because for example
Code:
if (tagis[ChargeCalc.Minimum?] <> 0) then field[trkMax].value = maximum(field[trxMax].value, tagvalue[ChargeCalc.Minimum?]) endif What I'm most interested in is their order of operation. |
#3 |
|
|