Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - D&D 5th Edition SRD

Notices

Reply
 
Thread Tools Display Modes
Mergon
Senior Member
 
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 787

Old February 25th, 2016, 10:49 AM
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.

Watch your back, Conserve your ammo,
and NEVER cut a deal with a dragon!
Mergon is offline   #1 Reply With Quote
Aaron
Senior Member
Lone Wolf Staff
 
Join Date: Oct 2011
Posts: 6,792

Old 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.
Aaron is offline   #2 Reply With Quote
Mergon
Senior Member
 
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 787

Old February 25th, 2016, 11:08 AM
Quote:
Originally Posted by Aaron View Post
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 . . .

Watch your back, Conserve your ammo,
and NEVER cut a deal with a dragon!
Mergon is offline   #3 Reply With Quote
Mergon
Senior Member
 
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 787

Old 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 . . .

Watch your back, Conserve your ammo,
and NEVER cut a deal with a dragon!
Mergon is offline   #4 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 12,793

Old February 25th, 2016, 12:24 PM
You left out the phase & priority of your eval script. Seeing that eval script would also be best.
Mathias is offline   #5 Reply With Quote
Mergon
Senior Member
 
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 787

Old 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.

Watch your back, Conserve your ammo,
and NEVER cut a deal with a dragon!
Mergon is offline   #6 Reply With Quote
Mergon
Senior Member
 
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 787

Old 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. :/

Watch your back, Conserve your ammo,
and NEVER cut a deal with a dragon!

Last edited by Mergon; February 25th, 2016 at 12:37 PM.
Mergon is offline   #7 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 12,793

Old 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).
Mathias is offline   #8 Reply With Quote
Mergon
Senior Member
 
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 787

Old 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 . . .

Watch your back, Conserve your ammo,
and NEVER cut a deal with a dragon!
Mergon is offline   #9 Reply With Quote
Aaron
Senior Member
Lone Wolf Staff
 
Join Date: Oct 2011
Posts: 6,792

Old 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
Aaron is offline   #10 Reply With Quote
Reply

Thread Tools
Display Modes

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 02:04 AM.


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