• 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

Changing save ability score

AndrewD2

Well-known member
I've got 3 feats that allow the PC to temporarily change the ability score a save is based on to their primary spellcasting attribute. I setup a selector for attributes. I tried setting up a string variable that was the SaveAbil.[whatever the selected ID is] but it didn't like that and then I tried just putting the id into the statement like so and that didn't work either

Code:
perform hero.child[svFort].tagreplace[SaveAbil.?,SaveAbil.field[usrChosen1].chosen.idstring]

Any ideas how to accomplish this, I didn't have much luck looking for examples.
 
idstring doesn't return a tag ID - it only returns a text string.

field[usrChosen1].chosen.tagids[SaveAbil.?]
 
@Aaron: It's currently running at Post-Attr/10,000. Since it won't compile I haven't been able to see if that's appropriate or not.

@Mathias: I've tried a few different things with that and still get either tag syntax is invalid or tag not defined.

I've tried:

Code:
perform hero.child[svFort].tagreplace[SaveAbil.?,SaveAbil.field[usrChosen1].chosen.tagids[SaveAbil.?]]

Code:
perform hero.child[svFort].tagreplace[SaveAbil.?,field[usrChosen1].chosen.tagids[SaveAbil.?]]

Code:
var attr as string
attr = field[usrChosen1].chosen.tagids[SaveAbil.?]
perform hero.child[svFort].tagreplace[SaveAbil.?,attr]

Not really sure what to do with it.

Andrew
 
Code:
perform hero.child[svFort].tagreplace[SaveAbil.?,[B]SaveAbil.[/B]field[usrChosen1].chosen.tagids[SaveAbil.?]]
The bolded part is your issue. HL has no idea what that is as its not part of normal script transitions. You just want "field[usrChosen1].chosen.tagids[SaveAbil.?]" which will return the value of "SaveAbil.XXXX" where XXXX is the tag on the Pick Chosen.
 
Code is now:

Code:
perform hero.child[svFort].tagreplace[SaveAbil.?,field[usrChosen1].chosen.tagids[SaveAbil.?]]

Still get the invalid tag template error.

I had actually tried that one but I must have copied and pasted the wrong line when I was posting my code.
 
Do you have an ischosen test before this line of code?

Because if you were to let this line of code run before selecting anything, it would fail.
 
Yes I do.

The entire code is as follows:

Code:
field[abValue].value += herofield[tMaxSpLev].value

field[trkMax].value += field[abValue].value

doneif (field[usrChosen1].ischosen = 0)

perform hero.child[svFort].delete[SaveAbil.?]

perform hero.child[svFort].assign[field[usrChosen1].chosen.tagids[SaveAbil.?]]

The exact error is:

Hero Lab was forced to stop compilation after the following errors were detected:

Syntax error in 'eval' script for Thing 'fRPMystFor' (Eval Script '#1') on line 9
-> Invalid syntax for tag template
 
Okay, looking some more, tagreplace must be specific about which tag it is assigning. You can't look up the tag within the tagreplace.

So:

Code:
perform field[usrChosen1].chosen.pulltags[SaveAbil.?]
perform hero.child[svFort].delete[SaveAbil.?]
perform hero.child[svFort].pushtags[SaveAbil.?]
 
Back
Top