• 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

Adding Class Abilities as Feat Prereqs

Johnny Scott

New member
Hi Guys!

Can someone provide me with the code I should use to apply class abilities (specifically, Animal Companion class feature and Wild Empathy class feature) as a Prerequisite for a feat? I have tried creating a feat by copying a similar existing feat (Natural Spell) and changing the ability, but keep receiving an error when I test it.

Thanks in advance for your help!
 
Natural spell uses a special mechanism.

The #hasability[] macro can be used just like the #hasfeat macro. The Extra Ki and Extra Lay on Hands feats make use of it.
 
@Mathias I am working on something similar

I have a class special that increases initiative (working fine) but needs to check if another class special ability is active (a tracked point list like KiPool points?) must be > 0 for the initiative modifier to come into play.

using this script, but get a syntax error
~ Check to see if Psionic Focus is present
@valid = #hasability[cPsiFoc]
 
if (hero.childfound[cPsiFoc].field[trkLeft].value > 0) then
~apply the initiative modifier
endif
 
Last edited:
weird

that doesnt work. changed it to the actual trracked feature, and still doesnt
~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)

if (hero.childfound[cPwPow].field[trkLeft].value > 0) then
~apply the initiative modifier

field[abValue].value += #attrmod[aWIS]

hero.child[Initiative].field[Bonus].value += field[abValue].value
field[abSumm].text = signed(field[abValue].value) & " to Initiative."

endif
 
In the develop menu, make sure that "Enable Data File Debugging" is enabled.

Now, go to your cPwPow thing on the in-play tab, right-click, and select "Show Debug Tasks for XXX" - look at the list of scripts that pops up, and you'll see that one labeled "[Calc trkLeft] Field Calculate - field "Quantity Remaining" (trkLeft)", at Final/1000. Looks like trkLeft will be zero until Final/1000.

Now go to the develop menu, floating info windows, and select "Show Debug Tasks" - select "Initiative" from that list. You'll see that it only has one script - at Final/10000.

So, your window for this script is from Final/1000 to Final/10000 - Final/5000 should be good.
 
Back
Top