• 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

Help with Fighter Weapon Training, Please

Maidhc O Casain

Well-known member
I'm trying to make a Gestalt Inquisitor/Fighter. I've got it almost completely finished, but one hang up is giving me fits. I can't seem to get the Fighter's Weapon Training to work correctly.

I made my own versions of each of the Weapon Groups, set them to Secondary Abilities and assigned them to my new class. They show up appropriately - at level 5 HL is giving the new class the option to choose one, and they all appear in his list. At level 9 he gets to choose another, and the appropriate list appears. But his bonus for the first group doesn't increase, and his bonus for the second is listed as +0. Leveling up further gives the same results - he's allowed to choose another weapon group, but none of the bonuses increase with his level.
 
Last edited:
Unfortunately, fighter weapon training is currently only set up to look at the primary abilities of the class. There's no way a user will be able to make use of them unless they're in the primary slot.
 
So to make this Gestalt class, would it be possible to make the primary Inquisitor abilities secondary (or tertiary, or quaternary) while still leaving it as an Inquisitor archetype?

Or should I completely redo it as a Fighter archetype? Much more difficult that way, since the Inquisitor isn't open book it'll be all copy/pastes.

(I'm guessing it would be a complicated task to make the weapon training look at secondary/etc. abilities in a future update, but it would be nice if this were a possibility!).
 
Last edited:
Would making the Fighter Weapon Training available as a secondary (or other) ability be a possibility for an update? It would sure make developing archetypes of other classes that incorporate it a lot easier.
 
Here is the script. You can add this script to your class and modify it to look for the table you want, and you should be able to keep this one and the normal one from crossing paths as long as you're specific about looking for secondary/tertiary/quaternary abilities.

Phase: PostLevel, priority: 10500
Code:
      ~build up a tag expression to identify all weapon training abilities for
      ~this class
      var expr as string
      expr = "wFtrGroup.? & CustTaken." & 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)
~debug "Weapon training is being calculated for " & field[name].text
      ~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 = field[cGiveSpec].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 sortas _CompSeq_
        ~if our net bonus is 0 because we're run out of weapon types, we're
        ~done
        doneif (bonus <= 0)
        ~set the bonus for this ability
        eachpick.field[abValue].value += bonus
        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
            nexteach
          endif
        ~our next ability has a bonus of 1 lower
        bonus -= 1
        nexteach
 
Mathias, you are awesome! Thanks a million!

(BTW, I talk this program up all the time to my friends - and one of the things I always mention is the fact that you guys take the time to do stuff like this for your customers.)
 
I am trying to use the above script but I am getting this error

Syntax error in 'eval' script on line 18
-> Non-existent sortset '_CompSeq_' referenced by script
 
I would like to add this to an Archetype, I tried to copy the Weapon training, but it will not add correctly. The above script also gives errors. Any idea?

BTW - Thank you!
 
I did get this script to work for Mowgli as it appears that it was made for a class not a Archtype. So a few changes to get it to work correctly. Plus the first Weapon Training does work which makes later logic strange as you need to apply adjustments to everything but the first one.

Also note this was specifically changed to have a Fighter/Inquisitor work together. So the CustTaken.cHelpInq would need to be changed to what ever is the non-fighter base class.

Another note cUsedSp2nd is being set also to this archetypes specific use of having the fighter weapon training be the secondary ability.
Code:
      ~build up a tag expression to identify all weapon training abilities for
      ~this class
      var expr as string
      ~Change cHelpInq to be the class
      expr = "wFtrGroup.? & CustTaken.cHelpInq"
      ~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
      ~ Set to the number of secondary Abilities actually taken
      bonus = hero.child[cHelpInq].field[cUsedSp2nd].value
      debug bonus
      var tagbonus as number
      ~We need to decrease the bonus to the 1st thing only as the first one
      ~is always calculating at least a value of 1.
      var nX as number
      nX = 1
      doneif (bonus = 0)
      ~go through all of our weapon training abilities in ascending order,
      ~giving a decreasing bonus to each.
      ~This removed as _CompSeq_ causes errors
      ~foreach pick in hero from BaseCustSp where expr sortas _CompSeq_
      foreach pick in hero from BaseCustSp where expr
        ~if our net bonus is 0 because we're run out of weapon types, we're
        ~done
        doneif (bonus <= 0)
        ~Decrease the first one bonus
        bonus -= nX
        ~set the bonus for this ability
        eachpick.field[abValue].value = bonus
        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
            nexteach
          endif
        ~Add one back to bonus so other Things are correct
        bonus += nX
        ~Set to 0 so that we no longer remove one from the bonus value
        nX = 0
        ~our next ability has a bonus of 1 lower
        bonus -= 1
        nexteach
 
Well the script works, but at 20th level there is a +10 to the first one, then a +9 and keeps going down with each one added.
 
Well now the numbers go up, cool, but I get a bonus every other level. lol IDK, it seems like it just will not work with any other class. Well here is the script, maybe I am missing something.

~build up a tag expression to identify all weapon training abilities for
~this class
var expr as string
~Change cHelpInq to be the class
expr = "wFtrGroup.? & CustTaken.cHelpMdH"
~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
~ Set to the number of secondary Abilities actually taken
bonus = hero.child[cHelpMdH].field[cUsedSp4th].value
debug bonus
var tagbonus as number
~We need to decrease the bonus to the 1st thing only as the first one
~is always calculating at least a value of 1.
var nX as number
nX = 1
doneif (bonus = 0)
~go through all of our weapon training abilities in ascending order,
~giving a decreasing bonus to each.
~This removed as _CompSeq_ causes errors
~foreach pick in hero from BaseCustSp where expr sortas _CompSeq_
foreach pick in hero from BaseCustSp where expr
~if our net bonus is 0 because we're run out of weapon types, we're
~done
doneif (bonus <= 0)
~Decrease the first one bonus
bonus -= nX
~set the bonus for this ability
eachpick.field[abValue].value = bonus
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
nexteach
endif
~Add one back to bonus so other Things are correct
bonus += nX
~Set to 0 so that we no longer remove one from the bonus value
nX = 0
~our next ability has a bonus of 1 lower
bonus -= 1
nexteach
 
Last edited:
Early on, when you set the expr variable, I think (in both your script and ShadowChemosh's), you want to set that to look for Helper.Quaternary (Helper.Secondary for ShadowChemosh) - without that, it's searching through all the custom abilities on the class, not just the Quaternaries.

Remember that primary abilities are defined as the absence of Helper.Secondary, Helper.Tertiary, and Helper.Quaternary tags (yes, I would change that if I had it to do over - a tag for everything).

expr = "wFtrGroup.? & CustTaken.cHelpMdH & Helper.Quaternary"
 
Trying to add weapon training to a bard with an archetype. For some reason it wants to increase the bonus too soon. At level 5 it is +1, at levels 6-8 it is +2. At level 9 when you select another category of weapons it stays at +2 and the new on is +1. It increases by 1 at level 10 and repeats this pattern.
Code:
Post Levels    10500
~build up a tag expression to identify all weapon training abilities for
      ~this class
      var expr as string
      expr = "wFtrGroup.? & CustTaken.cHelpBrd & Helper.Tertiary"  & 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)
~debug "Weapon training is being calculated for " & field[name].text

      ~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[cGiveSp3rd].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
            nexteach
          endif

        nexteach
I tried looking at sohei and here but nothing I do seems to matter. I changed it from secondary to tertiary to see if that was why but nothing... Wasn't sure if something about the bard's class makeup was causing this or if I was missing something.

This is the code I have to allow the groups to be chosen
Code:
Final Phase 999999
~our tertiary abilities table uses the fighter's primary abilities

linkage[varies].field[cCstS3Expr].text = "(SpecSource.cHelpFtr & !Helper.Secondary & !Helper.Tertiary & !Helper.Quaternary) & (thingid.cFtrWAxes | thingid.cFtrWLgtBl | thingid.cFtrWHvyBl | thingid.cFtrWBows | thingid.cFtrWClose | thingid.cFtrWCrsb | thingid.cFtrWDbl | thingid.cFtrWFirea | thingid.cFtrWFlail | thingid.cFtrWHamm |thingid.cFtrWMonk | thingid.cFtrWNatur | thingid.cFtrWPoleA | thingid.cFtrWSiege | thingid.cFtrWSpear | thingid.cFtrWThrow)"
 
Last edited:
I just noticed a problem - in your expression, you're tacking on the linkage[varies].idstring directly to the rest of the string. That should be creating this string:

"wFtrGroup.? & CustTaken.cHelpBrd & Helper.TertiarycHelpBrd"

But I don't understand why that isn't returning an error message - there are now more than 10 characters used in the Helper tag.

I'd recommend using

Code:
debug expr

to take a look at the expr variable, and make sure it's being set to what you want it to be. You can look at the debug information by going to the Develop menu...floating info windows...Show Debug Output.
 
I found the Show Debug output, but where do I execute the 'debug expr' code? I tried the eval script, but no dice.

Edit: I've been playing with the bonus variable...
Does bonus = linkage[varies].field[cGiveSp3rd].value look right to you? Something is giving the first weapon group selection a higher bonus than it should have.
 
Last edited:
Back
Top