Junior Member
Join Date: Oct 2018
Posts: 29
|
I'm having some trouble with a feat I'm creating. The feat allows the user to select from a number of optional powers. The powers were developed as Abilities and they have been bootstrapped to the feat. I've created conditional on each bootstrapped ability to check the abValue5 field for a particular value. So ability one might have the conditional fieldval:abValue5 = 2.
I have an eval script on the feat that runs on phase: Post-levels, Priority: 10000. The script resembles: Code:
if (field[usrChosen1].chosen.tagexpr[thingid.Power1] <> 0) then field[abValue5].value = 1 elseif (field[usrChosen1].chosen.tagexpr[thingid.Power2] <> 0) then field[abValue5].value = 2 elseif (field[usrChosen1].chosen.tagexpr[thingid.Power3] <> 0) then field[abValue5].value = 3 elseif (field[usrChosen1].chosen.tagexpr[thingid.Power4] <> 0) then field[abValue5].value = 4 endif When selecting an option with usrChosen1, the ability doesn't appear in Special or under Activated Abilities. In reviewing tags on the hero, I can see Group Name * Tag Name * Tag Id Thing Identity * Power1 * thingid.Power1 When I remove the conditional from the bootstrapping on the feat. I get: Group Name * Tag Name * Tag Id Ability * Power1 * Ability.Power1 Activated * Power1 * Activated.Power1 ActiveList * Power1 * ActiveList.Power1 HasAbility * Power1 * HasAbility.Power1 I'm guessing that this means that when the conditional is present that the ability hasn't been bootstrapped to the hero. I will confirm that in reviewing the debugging for the feat that the abValue5 does have the value that I expect so I would assume that the conditional is met. I've tried playing around with the timing, but I haven't had any success. Does anyone have some insight on what might be the problem? Thanks |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Please add an example of the specific condition you're using in one example, along with the phase & priority of that condition.
P.S. This is what we designed configurables for - so that the user can make selections for the sub-abilities granted by an ability while being able to read their description text, and so that we don't have to hassle with conditional bootstraps of a dozen different sub-abilities. |
#2 |
Junior Member
Join Date: Oct 2018
Posts: 29
|
Hi Mathias,
The condition on the bootstrap is fieldval:abValue5 = #. I have 10 Abilities bootstrapped to the feat, so the conditions would use values 1-10 for the abValue5 field. The phase and priority of the bootstraps are First, 5000. Thanks |
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
So, your script that sets the value runs at post-levels/10000. The conditional that's looking up that value runs at First/5000. Which of those will currently happen first, and what order should they be in? Remember, a derived field's value is 0 until it has been set by something else.
10 abilities - definitely use a configrable, not a selector that chooses between conditional bootstraps. It's iffy at 3-4, but beyond that, a configurable is much easier, and makes future expansions when a new book adds new options for this much easier to add. |
#4 |
Junior Member
Join Date: Oct 2018
Posts: 29
|
Thanks. I found the problem. It was a timing issue.
Are there any good posting discussing the usage of configurables? I've only been using the scripting environment for about month and have been slowing exploring each section. This is one I don't know much about. |
#5 |
|
|