Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - D&D 5th Edition SRD (http://forums.wolflair.com/forumdisplay.php?f=89)
-   -   Bootstrap Conitional (http://forums.wolflair.com/showthread.php?t=55152)

Mergon February 25th, 2016 10:49 AM

Bootstrap Conitional
 
I am currently trying to create a Class Ability.

This ability has a Custom expression that permits a selection of a necrotic cantrip from any class.

I have added all (2) necrotic cantrips to the Ability's bootstraps.

What I need is a condition for these bootstraps that checks to see if the selected cantrip matches the bootstrapped cantrip.

i.e.: The spChilTouc (Chill Touch) bootstrap needs to check and see if selected from the Custom Expression menu.

I've tried several ideas but Bootstrap conditionals are still giving me issues figuring out. :)

Aaron February 25th, 2016 11:06 AM

In an eval script running before the bootstrap condition, check to see which spell is selected, and then set a field value (like abValue) based on that. Then have the bootstrap condition check for the value of abValue.

Mergon February 25th, 2016 11:08 AM

Quote:

Originally Posted by Aaron (Post 224944)
In an eval script running before the bootstrap condition, check to see which spell is selected, and then set a field value (like abValue) based on that. Then have the bootstrap condition check for the value of abValue.

That is so simple, and makes so much sense, that I am ashamed I didn't think of it. I always look at the most complicated way of doign something first . . . :eek:

Mergon February 25th, 2016 11:50 AM

Now I have a different problem related to the same issue.

On the bootstraps I added a conditional 'fieldval:abValue5 = #' where # is based on the number of cantrips I have available (2 currently, so the first is 1 and the 2nd is 2).
Phase: First, Priority: 2500.

I have an Eval Script which sets abValue5 to an integer based on which spell I select via the menu.

This works to the point it sets abValue5 to 1 for Chill Touch and 2 for Spare the Dying when I check the fields on the ability.

I've tried a variety of Phases and timings, but the bootstrap never becomes active . . .

Mathias February 25th, 2016 12:24 PM

You left out the phase & priority of your eval script. Seeing that eval script would also be best.

Mergon February 25th, 2016 12:28 PM

Phase: Post-levels, Priority: 2499


Quote:

doneif (tagis[Helper.ShowSpec] = 0)

doneif (tagis[Helper.Disable] <> 0)

perform field[usrChosen1].chosen.pulltags[thingid.?]
if (field[usrChosen1].chosen.tagis[thingid.spChilTouc] <> 0) then
field[abValue5].value = 1
endif

if (field[usrChosen1].chosen.tagis[thingid.sp5CSpareD] <> 0) then
field[abValue5].value = 2
endif
I'm still playing with Phases and Priorities on the Eval script . . .

I'm probably doing something stupidly simple wrong. :)

Mergon February 25th, 2016 12:30 PM

Btw, the abValue5 is showing up on the Show Debug Fields when I select a cantrip.

Also, the cantrip activates fine if I remove the conditional.

Something interesting; if I remove the eval script and set the abValue5 manually, on the ability, the bootstrap appropriate to the abValue5 becomes active. :/

Mathias February 25th, 2016 12:50 PM

Helper.ShowSpec won't be added until Post-Levels/300 or so, meaning this script will always exit at the first line if you're running it early.

Also, why pull the thingid tag, and then look it up on the chooser, not on the pick? You're looking for the tag in its original location, not the location you just pulled it to, so what's the pulltags intended to do?

Also, never move thingid tags anywhere. thingid means "this is what we are", so you never want to change them or copy them (like pulling the ones from another pick, which creates a copy).

Mergon February 25th, 2016 12:51 PM

The pull thingid was a leftover from a previous method I was try. I removed it sicne I posted . . .

Aaron February 25th, 2016 02:15 PM

Is this a class ability which is gained at higher than 1st level? If so, it's good that you are checking for ShowSpec, since that indicates you are high enough level to get the bootstrap activated. Unfortunately, as Mathias says, you can't rely on ShowSpec when messing around with bootstrap conditions, because ShowSpec is assigned in early Post Levels, and bootstrap conditions have to execute in early First. So, there is a workaround I sometimes use.

The Class Level field on the actual class helper (cTotalLev) is set way earlier than the Class Level fields on Custom Abilities (xTotalLev) and Class Abilities (xAllLev). So, first call the "foctoclass" procedure, which navigates from a class special to the class helper it is associated with, and sets the focus to that class helper. Then, instead of looking for Helper.ShowSpec, compare the value of cTotalLev to the tag value of the ClSpecWhen tag on this class special.

For example, say you have your bootstrap conditions at First 500, add the following eval script:

First 400
Code:

call foctoclass

doneif (state.isfocus = 0)

doneif (focus.field[cTotalLev].value < tagvalue[ClSpecWhen.?])

doneif (tagis[Helper.Disable] <> 0)

if (field[usrChosen1].chosen.tagis[thingid.spChilTouc] <> 0) then
  field[abValue5].value = 1
  endif

if (field[usrChosen1].chosen.tagis[thingid.sp5CSpareD] <> 0) then
  field[abValue5].value = 2
  endif



All times are GMT -8. The time now is 05:28 AM.

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