Actually, looks like I made another error in Weapon Training too.
I tried using the scripts I found in the Sohei archetype:
~ our secondary abilities table uses the fighter's primary abilities
linkage[varies].field[cCstS2Expr].text = "(SpecSource.cHelpFtr & !Helper.Secondary & !Helper.Tertiary & !Helper.Quaternary) & (thingid.cFtrWBows | thingid.cFtrWCrsb | thingid.cFtrWMonk | thingid.cFtrWPoleA | thingid.cFtrWSpear | thingid.cFtrWThrow)"
~build up a tag expression to identify all weapon training abilities for
~this class
var expr as string
expr = "wFtrGroup.? & CustTaken." & linkage[varies].idstring
~first, make sure we have any weapon training abilities for this class.
~If we don't, there's nothing to do here.
doneif (hero.haschild[BaseCustSp,expr] = 0)
~the best bonus available to all weapon training abilities is 1 at 5th level,
~+1 per 4 levels after that. If we don't have a bonus, we're done.
var bonus as number
bonus = linkage[varies].field[cGiveSp2nd].value
var tagbonus as number
doneif (bonus = 0)
~go through all of our weapon training abilities in ascending order,
~giving a decreasing bonus to each.
foreach pick in hero from BaseCustSp where expr
~set the bonus for this ability
eachpick.field[abValue].value += bonus + 1 - eachpick.field[xIndex].value
tagbonus = eachpick.field[abValue].value
~forward the weapon group tag we're assigned to the class a number of
~times equal to the bonus we're receiving
if (eachpick.field[abValue].value >= 1) then
var i as number
var wepexpr as string
var bonustag as string
wepexpr = eachpick.tagids[wFtrGroup.?," | "]
bonustag = eachpick.tagids[TrainBonus.?, ""]
foreach pick in hero from BaseWep where wepexpr
for i = 1 to tagbonus
perform eachpick.assignstr[bonustag]
next
perform eachpick.assign[Helper.ShowFlurry]
nexteach
endif
nexteach
Then I put Weapon Training as a Quintenary Ability at rows 5, 11, and 17. Weapon Training first shows up at level 6 as it should, but I get an error saying there is nothing to select. Do I need to change the tagging in the above to Tertiary, Quaternary, Quintenary?