Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245
|
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? Last edited by Lawful_g; October 22nd, 2010 at 09:06 PM. Reason: More Information |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Could you tell me about the overall problem? What are you trying to accomplish with all this?
|
#2 |
Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245
|
The item has slots for other magic items and also spell like abilities. If you fill the slots (which have selections through a Custom Expression) then it draws power away from the spell like abilities and you can no longer cast those. I am trying to make the spell like abilities bootstrap conditionally on whether the slots have been occupied.
For example, the Item has 2 slots, and can cast Bless 1/day and Magic Missile 3/day. If you select something for 1 of the slots then it loses the ability to cast magic missile, if you fill both slots it can't cast Bless either. |
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
I think that's better handled with disabling - Helper.SpcDisable, rather than controlling whether the abilities are live - that way, the user sees that they have the possibility of getting those powers back.
|
#4 |
Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245
|
Ok. Will do. Thanks.
|
#5 |
|
|