Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - D&D 5th Edition SRD (http://forums.wolflair.com/forumdisplay.php?f=89)
-   -   2 Questions about Initiative stat (http://forums.wolflair.com/showthread.php?t=64007)

TCArknight March 6th, 2020 03:02 PM

2 Questions about Initiative stat
 
1 Attachment(s)
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

TCArknight March 10th, 2020 01:46 PM

Anyone? :)

Fenris447 March 10th, 2020 01:52 PM

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.

TCArknight March 19th, 2020 08:09 PM

still hoping.... :)

dungeonguru March 20th, 2020 06:26 AM

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....

TCArknight March 20th, 2020 07:44 AM

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...

TCArknight October 18th, 2020 09:24 AM

Bump - Could still use help on this. :)

Fenris447 October 20th, 2020 09:18 AM

Random thought, might be a dumb one, but have you tried changing field[tInitAtNm].value to field[tInitAtNm].text?

TCArknight October 30th, 2020 04:11 PM

Quote:

Originally Posted by Fenris447 (Post 291483)
Random thought, might be a dumb one, but have you tried changing field[tInitAtNm].value to field[tInitAtNm].text?

Actually, I did. :) I got the error about accessing a value-based field as text.. :(

RavenX November 5th, 2020 12:26 PM

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.


All times are GMT -8. The time now is 09:46 PM.

Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.