• 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

You may wish to check out THIS older thread its about Fighter and Gestalt and a script I had to write to get it to work. Sounds like it may help you.

Did you get the values to display properly Shadow? I can't for the life of me get it to display as the proper value on a Bard or Inquisitor. It wants to show as 2 higher than it should be. The script I have works on a monk just fine though.
 
My email address is my user name here @wolflair.com. Go ahead and send me the .user file. I still think there's something hidden in another script that's interfering with what you're trying to do, and if not, I'll be able to study things more directly and figure out where this is going wrong.
 
My email address is my user name here @wolflair.com. Go ahead and send me the .user file. I still think there's something hidden in another script that's interfering with what you're trying to do, and if not, I'll be able to study things more directly and figure out where this is going wrong.

Ok sent. Thanks!
 
I've figured out what's causing the problem - the normal weapon training script is running for this class. The totals you're seeing are calculated by running through the list of weapon training abilities, using the number of versatile performance abilities (cGiveSpec - the field that would be used to calculate the bonus to give them for a fighter) as the bonus to give the first one, then the script you're using runs through it again, using the number of quintenary abilities as the number to assign - leaving the totals too high. The reason you found that it works fine on a monk, but not an inquisitor or bard is that the monk has no primary abilities, but the bard and inquisitor do, so for those classes, you're having to move them to a different table.

For the next update, I've modified the weapon training script that's in the structural files so that it will only look for weapon training abilities that were added to the primary abilities table - that way, it won't find the quintenary ones you're adding for this archetype, and only your script will be applied to them.
 
I've figured out what's causing the problem - the normal weapon training script is running for this class. The totals you're seeing are calculated by running through the list of weapon training abilities, using the number of versatile performance abilities (cGiveSpec - the field that would be used to calculate the bonus to give them for a fighter) as the bonus to give the first one, then the script you're using runs through it again, using the number of quintenary abilities as the number to assign - leaving the totals too high. The reason you found that it works fine on a monk, but not an inquisitor or bard is that the monk has no primary abilities, but the bard and inquisitor do, so for those classes, you're having to move them to a different table.

For the next update, I've modified the weapon training script that's in the structural files so that it will only look for weapon training abilities that were added to the primary abilities table - that way, it won't find the quintenary ones you're adding for this archetype, and only your script will be applied to them.
Ok thanks Mathias! I appreciate the work you do!
 
ok, what is the best way to get this to work as a custom ability. I have tried everything here and I can't get the weapon training abilities to show up.
Any ideas?
 
Is Mathis still watching this thread? I'm attempting to make a fighter/barbarian gestalt character and am having issues with the Weapon Training ability as well, but I've tried Mathis' script he posted a year ago, but I receive a parse error when testing it out. Has anyone had luck with that script or have a different one to try?

I need to learn about this scripting language.. are there any good resources as well?
 
I have no idea if anyone is still watching this thread but I'm attempting to create a Magus archetype that has weapon training abilities as a secondary ability. Simply copy-pasting the script in for the OP into an eval script on my Archetype but it didn't do anything and my attempts to make it work have failed. I'm obviously missing a few steps somewhere but I have no idea where. If I add a second Weapon Training feat it treats both feats as being +1 instead of +2 and +1.../confused? I have one Weapon Training and it's +0...add another and they both become +1...I don't get it :(

Any help would be appreciated.
 
Last edited:
Nevermind, I actually managed to figure out how to make it work. Since the original sorting method that existed a couple years ago seems to have been phased out the easiest way was to have it handle the list in the order it started at, descending. Once decided on that it was a fairly simple matter of adjusting the way the bonus was calculated and moving code bits around (also deleted some unnecessarily confusing parts)

So no guarantees that this will work with ALL weapon training archetypes but as long as you have a Weapon Training Custom Ability set as secondary for whatever archetype you're working with this code should work if you set cHelpMag to cHelp[Class] of whatever you're using.

(for anyone that cares, here's the code I got to work)
Code:
~build up a tag expression to identify all weapon training abilities for
      ~this class
      var expr as string
      ~Change cHelpMag to be the class
      expr = "wFtrGroup.? & CustTaken.cHelpMag & Helper.Secondary"
      ~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[cHelpMag].field[cUsedSp2nd].value
      var tagbonus as number
      ~if no weapon training selected, done
      doneif (bonus = 0)
      ~go through all of our weapon training abilities in descending 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
 
Last edited:
Back
Top