Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,337
|
Hi all!
I'm playing around with a custom dataset that has a "Mental Initiative" stat. 1) I created this and it appears to be under the Miscellaneous Stats on the Abilities Tab, even though it's not visibe (see Misc Stat.jpg; the gap after Initiative is the MentalInit) Code:
<thing id="MentalInit" name="Mental Initiative" compset="Initiative"> <!-- Automatically add the resource to every actor --> <tag group="explicit" tag="11"/> <!-- Use the starting ability slots as our initial maximum --> <eval index="1" phase="PostAttr" priority="1000"><![CDATA[ if ( #attrmod[aINT] > #attrmod[aCHA] ) then field[tInitAttr].value = #attrmod[aINT] else field[tInitAttr].value = #attrmod[aCHA] endif ]]></eval> <eval index="2" phase="Render" priority="15000"><![CDATA[ if ( #attrmod[aINT] > #attrmod[aCHA] ) then field[tInitAtNm].value = hero.childfound[aINT].field[name].text else field[tInitAtNm].value = hero.childfound[aCHA].field[name].text endif ]]></eval> </thing> ANy help or suggestions? Thanks! TC Working on - |
#1 |
Senior Member
Join Date: Sep 2017
Posts: 602
|
Going to be honest...this is way above what most of our scripting does. One of the pros is going to have to take an interest for you to get any answer.
Found an issue with or have a suggestion for the 5e Community Pack? Please post it here at our GitHub. Feel free to stop by the Lone Wolf Development Subreddit, for discussion of any and all LWD products and community efforts! |
#3 |
Senior Member
Join Date: May 2016
Posts: 608
|
Have you tried adding debug statements to help evaluate your logic statements?
Create some variables to see what your #attrmod[] is actually returning and push it to your debug window. It might be something like those macros are both returning 0 values in this thing and you will have to figure out how to do it without a macro. It might also be that the scripts just aren't running at all. Is there another place or file that needs to make sure this thing is loaded correctly? Like people have mentioned, we 5e guys don't have a ton of modification work under our belts - Pathfinder authors probably have the most knowledge. People like ShadowChemosh from the Pathfinder group sometimes bless us with greater wisdom but you have to sacrifice some cookies and milk, like for Santa.... |
#5 |
Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,337
|
The first script isn't having any issues at all, working fine. The second one, where trying to change the name of the attribute used for the Initiative doesn't work, and I confirmed that it also doesn't work for the standard Initiative (same in Pathfinder system too).
It would be fine if I could get it to appear on the Abilities tab... Working on - |
#6 |
Senior Member
Join Date: Sep 2017
Posts: 602
|
Random thought, might be a dumb one, but have you tried changing field[tInitAtNm].value to field[tInitAtNm].text?
Found an issue with or have a suggestion for the 5e Community Pack? Please post it here at our GitHub. Feel free to stop by the Lone Wolf Development Subreddit, for discussion of any and all LWD products and community efforts! |
#8 |
Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,337
|
Actually, I did. I got the error about accessing a value-based field as text..
Working on - |
#9 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633
|
To be honest I think you're running the script in post attr might be the problem. Switch it to Final and have it do it as late as possible in priority, 99999999
You have it set so early that something is likely overwriting it in Final that you are not catching... Post Att 1000 is wayyyyyyyyyyyyyyyyy to early for a custom script dude. 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. |
#10 |
Thread Tools | |
Display Modes | |
|
|