• 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

Bootstrapped conditional

nlmacdonald

Active member
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

By this means, I was hoping to conditionally add an ability to the hero depending on the choice made with usrChosen1. Each of the abilities has [x] Show in Specials List? checked and also [x] Show in Activated Abilities List? is checked.

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
 
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.
 
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
 
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.
 
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.
 
Back
Top