Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
nlmacdonald
Junior Member
 
Join Date: Oct 2018
Posts: 29

Old November 28th, 2018, 05:20 PM
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
nlmacdonald is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old November 28th, 2018, 06:04 PM
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.
Mathias is offline   #2 Reply With Quote
nlmacdonald
Junior Member
 
Join Date: Oct 2018
Posts: 29

Old November 28th, 2018, 06:15 PM
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
nlmacdonald is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old November 28th, 2018, 10:37 PM
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.
Mathias is offline   #4 Reply With Quote
nlmacdonald
Junior Member
 
Join Date: Oct 2018
Posts: 29

Old November 29th, 2018, 06:28 PM
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.
nlmacdonald is offline   #5 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 12:22 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.