I'm having an Eval script run at First 497 on a Wonderous Item with 2 custom expressions:
~ Is the thing equipped?
if (hero.child[ioBlah].field[gIsEquip].value <> 0) then
if (field[usrChosen1].ischosen = 0) then
perform assign[User.BlahBlah]
elseif (field[usrChosen1].chosen.tagis[thingid.siNone] <> 0) then
perform assign[User.BlahBlah]
endif
if (field[usrChosen2].ischosen = 0) then
perform assign[User.BlahBlah]
elseif (field[usrChosen2].chosen.tagis[thingid.siNone] <> 0) then
perform assign[User.BlahBlah]
endif
endif
Then I have bootstrapped on the Item several Spell Like Abilities that require some number of User.BlahBlah tags via a Condition at First 500:
count:User.BlahBlah >= X
This way if the user has chosen something other than None, they will not have the User tags on the item and the spell like ability will not be bootstrapped. Unfortunately, that isn't working, the abilities are never being bootstrapped. I know the tags are being assigned, I can see them on the item, and the Condition runs later than the Eval, so I don't understand why it isn't working.
Taking a different track I tried to add to the trkUser field instead of assigning a tag, and then having the condition be a fieldval >= X, but then I get the following error message:
Hero Lab was forced to stop compilation after the following errors were detected:
Syntax error in 'eval' script for Thing 'ioBlah' (Eval Script '#1') on line 6
-> Only derived fields can generally be modified via scripts (field 'trkUser')
Which I don't understand. Get the same error though when I try and modify other fields (spcPromote, because I don't know what it does, and gUserSel because it is marked as obsolete are the ones I have tried) for the same purpose.
Can somebody give me some pointers or a good idea on why neither method works?
~ Is the thing equipped?
if (hero.child[ioBlah].field[gIsEquip].value <> 0) then
if (field[usrChosen1].ischosen = 0) then
perform assign[User.BlahBlah]
elseif (field[usrChosen1].chosen.tagis[thingid.siNone] <> 0) then
perform assign[User.BlahBlah]
endif
if (field[usrChosen2].ischosen = 0) then
perform assign[User.BlahBlah]
elseif (field[usrChosen2].chosen.tagis[thingid.siNone] <> 0) then
perform assign[User.BlahBlah]
endif
endif
Then I have bootstrapped on the Item several Spell Like Abilities that require some number of User.BlahBlah tags via a Condition at First 500:
count:User.BlahBlah >= X
This way if the user has chosen something other than None, they will not have the User tags on the item and the spell like ability will not be bootstrapped. Unfortunately, that isn't working, the abilities are never being bootstrapped. I know the tags are being assigned, I can see them on the item, and the Condition runs later than the Eval, so I don't understand why it isn't working.
Taking a different track I tried to add to the trkUser field instead of assigning a tag, and then having the condition be a fieldval >= X, but then I get the following error message:
Hero Lab was forced to stop compilation after the following errors were detected:
Syntax error in 'eval' script for Thing 'ioBlah' (Eval Script '#1') on line 6
-> Only derived fields can generally be modified via scripts (field 'trkUser')
Which I don't understand. Get the same error though when I try and modify other fields (spcPromote, because I don't know what it does, and gUserSel because it is marked as obsolete are the ones I have tried) for the same purpose.
Can somebody give me some pointers or a good idea on why neither method works?
Last edited: