Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Pathfinder Roleplaying Game (http://forums.wolflair.com/forumdisplay.php?f=62)
-   -   Adding Class Abilities as Feat Prereqs (http://forums.wolflair.com/showthread.php?t=10069)

Johnny Scott April 2nd, 2010 05:47 PM

Adding Class Abilities as Feat Prereqs
 
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!

Mathias April 3rd, 2010 10:21 AM

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.

westcpw April 10th, 2010 08:46 PM

@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]

Mathias April 11th, 2010 08:57 AM

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

westcpw April 11th, 2010 07:56 PM

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

Mathias April 12th, 2010 08:29 AM

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.


All times are GMT -8. The time now is 07:50 AM.

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