Junior Member
Join Date: Apr 2010
Posts: 2
|
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! |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
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. |
#2 |
Member
Join Date: Jan 2010
Posts: 42
|
@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] SEO Blog By Christopher West PPC Advertising by PPC Matters |
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
if (hero.childfound[cPsiFoc].field[trkLeft].value > 0) then
~apply the initiative modifier endif Last edited by Mathias; April 11th, 2010 at 12:34 PM. Reason: trkLeft instead of trkUser |
#4 |
Member
Join Date: Jan 2010
Posts: 42
|
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 SEO Blog By Christopher West PPC Advertising by PPC Matters |
#5 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
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. |
#6 |
Thread Tools | |
Display Modes | |
|
|