• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

2 Questions about Initiative stat

TCArknight

Well-known member
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>

2) it appears that no matter the timing, the second script doesn't change the "Dexterity" which appears in the tInitAtNm field to either other stat Name.

ANy help or suggestions?

Thanks!
TC
 

Attachments

  • Misc Stat.JPG
    Misc Stat.JPG
    22.2 KB · Views: 8
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.
 
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....
 
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...
 
Random thought, might be a dumb one, but have you tried changing field[tInitAtNm].value to field[tInitAtNm].text?
 
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.
 
Back
Top