• 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

Selectable spell attribute

Help with Selectable spell attribute

Greetings. I've just gotten Hero Lab recently (for pathfinder) and I've started to play with it.

In my search for help with this following thing, I searched this site, hlkitwiki, and the provided documentation. Either I didn't search for the right thing, or it's not their, but I couldn't find the answers I needed.

I'm trying to allow a custom class the ability to select their spell casting attribute.
My plan was to create a class special, that had the user could select from attributes. Then that would modify the spell casting attribute.
Making the class special and the drop down attributes box worked fine.
Then I started on the evalscript and I things failed to make sense.

I looked at the adjustment code

Code:
   ~ If we're not enabled, get out now
      doneif (field[pIsOn].value = 0)

      ~ Add to our chosen attribute
      field[pChosen].chosen.field[aStartMod].value += field[pAdjust].value

But when I tried to use that straight, it threw errors telling me pIsOn and pchosen didn't exist.
So First. where do those come from? what do I need to replace them with? How do I figure that out?

It was then my plan to use the dropdown result in some sort of If statement (select case type thing) to set the 'SplAttr' tag to the appropriate attribute.

Is that possible? any good pointers for things doing that already? Or other help?

Finally, is this all pointless, and is there some easier/better way already done?

Thanks in advance.
 
Last edited:
You're on the right track, but instead of looking at the adjustments to figure out how to do this, try looking at a class special that needs to select an attribute - the Transmuter's Physical Enhancement ability, for example.

The fields that are used differ between adjustments and class specials, which is why you're getting the errors about pIsOn and pChosen.

Once you get the attribute selected, you can pull the SplAttr tag from it to the class special:

Code:
perform field[usrChosen1].chosen.pulltags[SplAttr.?]

Then replace the attribute that was already there for the class:

Code:
perform root.delete[SplAttr.?]
perform root.pushtags[SplAttr.?]

(You'll probably have to enter a default attribute for the class, for the period between when the user adds the class and when they set the new attribute).
 
Thank you!

I wasn't sure how the '?' fit in. If I was supposed to replace those with a tag or something, but I just tried this exactly

Code:
perform field[usrChosen1].chosen.pulltags[SplAttr.?]
perform root.delete[SplAttr.?]
perform root.pushtags[SplAttr.?]

in my evalscript. and it worked just like I needed to.
 
This is the script I am using: its post attributes, priority 20500

perform field[usrChosen1].chosen.pulltags[SplAttr.?]
perform root.delete[SplAttr.?]
perform root.pushtags[SplAttr.?]

It will assign the chosen attribute correctly, but the class will not recognize the attribute is above 10.
 
Back
Top