• 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

Coding question regarding enhancement to Natural weapons.

Pezmerga

Well-known member
ok I have a form that toggles on and off and the form grants 1/4 char level to attack bonus and damage with natural weapons. This particular form has a bite and 2 claws. Now the claws are getting the bonus just fine, but the bite doesnt appear to be....


Post Levels, Priority - 10000
Code:
~only run the rest for the first copy
doneif (tagis[Helper.FirstCopy] = 0)

~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)

if (#levelcount[Druid2] >= 4) then
field[abSumm].text = "+8 Str, +8 natural armor, +4 Fort Save, bite attack (Magic) - 1d8, 2 Claws - 1d6 (Magic)"
endif

~only run the rest if we're activated
doneif (field[abilActive].value = 0)

hero.child[aSTR].field[aNormMod].value += 8

hero.child[ArmorClass].field[tACNatural].value += 8

hero.child[svFort].field[Bonus].value += 4

[I][B]field[abValue].value += round(field[xAllLev].value/4,0,-1)

#applybonus[BonEnhance, hero.childfound[wBite], field[abValue].value]
#applybonus[BonEnhance, hero.childfound[wClaw], field[abValue].value][/B][/I]


~if we're active, tell that to the hero, so we can enforce the
~restriction on the number of forms active at once
perform forward[Custom.ActiveForm]endif

focus.field[rSpeed].value = 40

The Secndary Claw attacks are showing up correctly (1d6 + 1/2 str mod + 1/4 level)
But the bite is just showing the damage plus normal str mod, no enhancements.

I have the Bite and Claws as bootstraps.
here are the tags for each

Bite
Group ID: wMain Tag ID:1d6_5
Group ID: Helper Tag ID: NatSizeDmg
Group ID: Helper Tag ID: NatPrimary

Claws
Group ID: Value Tag ID: 2
Group ID: Helper Tag ID: NatSizeDmg
Group ID: Helper Tag ID: NatOverSec
Group ID: wMain Tag ID: 1d4_4
 
Last edited:
Just curious, could there be anything else on this character that could be adding another claw attack?

Unfortunately, if that's the case, there's not a great way to distinguish one natural attack from another, and it could be that childfound[wClaw] is not finding the Claw copy you want, but childfound[wBite] is finding the correct copy (random chance in each case).

(P.S. I presume this cut-and-paste is incomplete - the last few lines shouldn't compile - there's a stray endif with no corresponding if, and a focus transition with nothing establishing the focus)
 
Just curious, could there be anything else on this character that could be adding another claw attack?

Unfortunately, if that's the case, there's not a great way to distinguish one natural attack from another, and it could be that childfound[wClaw] is not finding the Claw copy you want, but childfound[wBite] is finding the correct copy (random chance in each case).

(P.S. I presume this cut-and-paste is incomplete - the last few lines shouldn't compile - there's a stray endif with no corresponding if, and a focus transition with nothing establishing the focus)

No this is the only Claw attack granted. But, there is one other bite in a different form. But I have it so they have to activate it in the inplay tab for the bite attack to be granted, not sure if that would interfere with the other bite...and actually that bite is receiving the bonus so it must be.

The Claws work fine though :)

and as for the endif, I am not sure why that is there lol its not in my code. I mustve accidently picked it up or something when copying and pasting.

edit: yep I just changed the bite to a gore and it shows up fine on it in that form. so the two bites arent playing nice together... would there be a way to just have this show up as a gore in code but display as a bite in the character display?
 
Last edited:
Is there a way to make use of a single bite for both applications? If they have the same damage, it's pretty easy - just bootstrap it from the class, rather than the class specials.

If not, you may be able to use:

Code:
perform hero.child[wBite].assign[wMain.1d6_5]

in this script to assign the appropriate damage, and assign a different tag in the other thing's script.

P.S. Helper.NatPrimary is redundant on the bite attack - Bites have that by default (see the Bestiary, pg. 302 for the default Primary/Secondary state for natural attacks in Pathfinder). Some existing things in the files didn't have those tags deleted when the proper defaults were set up.
 
Is there a way to make use of a single bite for both applications? If they have the same damage, it's pretty easy - just bootstrap it from the class, rather than the class specials.

If not, you may be able to use:

Code:
perform hero.child[wBite].assign[wMain.1d6_5]

in this script to assign the appropriate damage, and assign a different tag in the other thing's script.

P.S. Helper.NatPrimary is redundant on the bite attack - Bites have that by default (see the Bestiary, pg. 302 for the default Primary/Secondary state for natural attacks in Pathfinder). Some existing things in the files didn't have those tags deleted when the proper defaults were set up.

Hmm not getting perform hero.child[wBite].assign[wMain.1d6_5] to work...what phase does it need to happen in?

I could bootstrap it to class if I could get it to activate when either of two forms are activated in the inplay tab.

in the conditions tab for class bootstraps, could I check to see if the ability is active?
fieldval:abilActive <> 0
works in the ability itself but how would i specify which ability in the class bootstrap condition?
 
Last edited:
Let's back up - this approach obviously isn't working - could you describe the overall problem? What is all this working towards?
 
Let's back up - this approach obviously isn't working - could you describe the overall problem? What is all this working towards?

Ok I created a custom druid with forms based on the 3.5 shapeshifter variant druid. Each of these forms once gained can be assumed at will and provide natural attacks and ability adjustments etc.

I made them all Class Special abilties and set it up so they have to be activated to display any change to the base character. The natural attacks each get an enhancement equal to 1/4 the characters class level to attack and damage. This is only for natural attacks in this form, not racial natural attacks (such as the half orc bite feat, which probably at this point would interfere.).

These forms are supposed to cause all worn equiptment to cease functioning (except wild armor, which Im gonna allow) , but im not sure if that is possible.

Now here is a typical code for a form with a bite.

Post Levels 10,000 index - 1
Code:
~only run the rest for the first copy
doneif (tagis[Helper.FirstCopy] = 0)

~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)

if (#levelcount[Druid2] >= 4) then
field[abSumm].text = "+8 Str, +8 natural armor, +4 Fort Save, Bite(Magic), 2 Claws (Magic)"
endif

~only run the rest if we're activated
doneif (field[abilActive].value = 0)

~only run the rest if we're activated
doneif (field[abilActive].value = 0)

perform hero.child[wBite].assign[wMain.1d6_5]

hero.child[aSTR].field[aNormMod].value += 8

hero.child[ArmorClass].field[tACNatural].value += 8

hero.child[svFort].field[Bonus].value += 4

field[abValue].value = round(field[xAllLev].value/4,0,-1)

#applybonus[BonEnhance, hero.childfound[wBite], field[abValue].value]

#applybonus[BonEnhance, hero.childfound[wClaw], field[abValue].value]

~if we're active, tell that to the hero, so we can enforce the
~restriction on the number of forms active at once
perform forward[Custom.ActiveForm]

First 550 index 2
Code:
~only run the rest if we're activated
doneif (field[abilActive].value = 0)

~set our focus to the hero's race
perform hero.findchild[BaseRace].setfocus

focus.field[rSizeMod].value += 1

if (focus.field[rSizeMod].value = 1) then
focus.field[rReach].value = 5
elseif (focus.field[rSizeMod].value = 2) then
focus.field[rReach].value = 10
elseif (focus.field[rSizeMod].value = 3) then
focus.field[rReach].value = 15
elseif (focus.field[rSizeMod].value >= 4) then
focus.field[rReach].value = 20
endif

if (focus.field[rSizeMod].value > 4) then
focus.field[rSizeMod].value = 4
endif

focus.field[rSpeed].value = 40

the natural attacks are allowed via bootstraps
Bite
Group ID: wMain Tag ID:1d6_5
Group ID: Helper Tag ID: NatSizeDmg
Group ID: Helper Tag ID: NatPrimary
condition = fieldval:abilActive <> 0 (Phase: First - 500)

Claws
Group ID: Value Tag ID: 2
Group ID: Helper Tag ID: NatSizeDmg
Group ID: Helper Tag ID: NatOverSec
Group ID: wMain Tag ID: 1d4_4
condition = fieldval:abilActive <> 0 (Phase: First - 500)

I take it there is no way to distinguish between the 2 different bites gained from each form, and other bites from other sources regarding the enhancement bonus to the forms natural attacks? (1/4 class level bonus)
 
Last edited:
Sorry I wasn't clear - you have multiple things adding a bite - what does each one want to do? How do they differ?
 
Sorry I wasn't clear - you have multiple things adding a bite - what does each one want to do? How do they differ?

Basically I want all the bites from different forms to recive the adjustment for 1/4 the class level.

The first form with a bite attack has only the single bite attack (wolf form basically) the second form is a bear form with a bite and 2 claws.

Now when either form is active the bites should both recieve a +1/4 class level enhancement to attack and damage. Currently only one of the form's bite is receiving this enhancement (even after changing which one is activated, which disables the first forms bite granted), and if the original form has a bite attack, this bite interferes as well (as it should lose its base forms bite attack, a half orc turns into a wolf, it doesnt still have its tusks for the razor tusk feat).

Is there a way to either distinguish between these bites (for allowing the enhancement on both forms with bites), and/or replace an existing bite attack with a new bite attack (in the case of the orc feat or another racial bite) while still giving a new bite attack to other races without a racial bite (humans etc.) while in the form?

Sorry I hope thats not too confusing. Should I post my data file? it might be easier to see it then read my explanation.
 
Okay, a single bite is probably the best way to go about this.

In answer to an earlier question, it looks like wMain needs to be in place before Post-Levels/10000 in order to be used.

If you create the same Custom tag on each of your specials, you can add a script to your class at First/450:
Code:
if (hero.child[First Ability].field[abilActive].value + hero.child[Second Ability].field[abilActive].value <> 0) then
  perform hero.assign[Custom.XXXXX]
  endif

Then, bootstrap the bite to the class, with the following condition:

Phase: First, Priority: 500
Code:
hero#Custom.XXXXX

That should let you use only one bite for both class abilities, so that there's only one for the scripts to find.
 
Ok I did that and it doesn't work...

I now am trying this...

first 450
if (hero.child[cDr2Pred].field[abilActive].value + hero.child[cDr2Slayer].field[abilActive].value <> 0) then
perform hero.child[wBite].assign[wMain.1d6_5]
endif

and i took out the bite bootstraps in the special abilities. but the bite isnt rendering that way when i activate one of the forms....

Could I bootstrap the bite to the class, then put in the conditions of one of those two abilities being activated maybe?
 
Last edited:
Shouldn't this work if either of the abilities are active? I am confused to why the bite will not render...
Code:
Phase:first   Priority:450
if (hero.child[cDr2Pred].field[abilActive].value + hero.child[cDr2Slayer].field[abilActive].value <> 0) then
perform hero.child[wBite].assign[wMain.1d6_5] 
endif
 
Back
Top