• 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

Another Custom Expression Question

I am adding a custom ability that will ask the user to select Fort, Reflex, or Will and then apply a +1 Resistance bonus to the corresponding save.

I have the customer expression showing correctly
"Select From = None" "Restrict First List To = None"
Under Custom Expression:
Code:
thingid.svFort|thingid.svRef|thingid.svWill
Field ID = usrCandid1

This is what I am trying for the eval script.
Code:
#applybonus[svResist,hero.child[field[usrCandid1].value],1]

The problem I'm running into is how to reference the field in the eval script.
If I hard code a save id (ie hero.child[svFort]) it works just fine, so I know the expression is correct. I just can't reference the choice in the field.

When I run the Test Now I get the error on line 1 (the line for the #applybonus) "Non-existent thing 'field' used by the script.

Every other ability that I can find that uses a selection like this uses the field['FieldID'].something
 
field[usrChosen1].chosen is what you should use usrCandid1 is the field holding the expression

so I believe it should look something like

Code:
#applybonus[svResist, field[usrChosen1].chosen, 1]

also you don't have to use a hero.child[xxx] transition when accessing a field on the current thing
 
Back
Top