• 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

Code:
var expr as string
expr = "wFtrGroup.? & CustTaken.cHelpBrd & Helper.Tertiary"  & linkage[varies].idstring
debug expr
 
********** Start Evaluation Cycle **********

wFtrGroup.? & CustTaken.cHelpBrd & Helper.TertiarycHelpBrd
is all I get.



If I remove linkage[varies].idstring and use
expr = "wFtrGroup.? & CustTaken.cHelpBrd & Helper.Tertiary"

it increases the first weapon group chosen by 1. Which puts it 2 higher than it should be. (Making it +3 at level 6 and +2 at level 5 etc.... It is even + 1 at level 4 or lower at this point, which would be right if it were selectable at those levels.)

If I have debug on and I use
expr = "wFtrGroup.? & CustTaken.cHelpBrd & Helper.TertiarycHelpBrd"

or

expr = "wFtrGroup.? & CustTaken.cHelpBrd & Helper.Tertiary" & linkage[varies].idstring

then,

it appear it doesn't like
doneif (hero.haschild[BaseCustSp,expr] = 0)

it says invalid tag expression specified for 'haschild' after it compiles. If I turn off debug nothing happens and it compiles without the message.
 
Code:
eachpick.field[abValue].value += bonus + 1 - eachpick.field[xIndex].value

Let's take a 10th level character - they'll have 2 weapon training abilities.

bonus = 2 in this case.

So, it comes to ability #1:

+= 2 + 1 - 1 = +2

and then ability #2:

+= 2 + 1 - 2 = +1

I'd put in more debug expressions - see if you can track the changing values.

For example:

Code:
debug eachpick.field[name].value & " is ability #" & eachpick.field[xIndex].value & ", and is at " & eachpick.field[abValue].value

(put that immediately after the eachpick.field[abValue].value line)
 
Last edited:
it says invalid tag expression specified for 'haschild' after it compiles. If I turn off debug nothing happens and it compiles without the message.

Like I said, I was surprised that it wasn't reporting error messages, because it didn't look like expr was going to be a valid string.

Leave out the linkage[varies].idstring.
 
Code:
eachpick.field[abValue].value += bonus + 1 - eachpick.field[xIndex].value

Let's take a 10th level character - they'll have 2 weapon training abilities.

bonus = 2 in this case.

So, it comes to ability #1:

+= 2 + 1 - 1 = +2

and then ability #2:

+= 2 + 1 - 2 = +1

I'd put in more debug expressions - see if you can track the changing values.

For example:

Code:
debug eachpick.field[name].value & " is ability #" & eachpick.field[xIndex].value & ", and is at " & eachpick.field[abValue].value

(put that immediately after the eachpick.field[abValue].value line)

Code:
~set the bonus for this ability
        eachpick.field[abValue].value += bonus + 1 - eachpick.field[xIndex].value
debug eachpick.field[name].text & " is ability #" & eachpick.field[xIndex].value & ", and is at " & eachpick.field[abValue].value
        tagbonus = eachpick.field[abValue].value

If I debug that at level 6 with two weapon Training abilities, (Even though I should have 1) it shows up as Close being +3
and Heavy blades being +1 on the character but the debug shows the values correctly. Something is causing it to display improperly. Also it adds the bonus improperly to the weapons.

Edit: Actually it is saying +3 on the class tab for weapon training but actually adding 4 to hit and damge on the weapons tab....



********** Start Evaluation Cycle **********

wFtrGroup.? & CustTaken.cHelpBrd & Helper.Tertiary
Weapon Training: Blades, Heavy is ability #2, and is at 0
Weapon Training: Close is ability #1, and is at 1
 
Last edited:
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


********** Start Evaluation Cycle **********

wFtrGroup.? & CustTaken.cHelpBrd & Helper.Tertiary
Weapon Training: Pole Arms is ability #1, and is at 1
wepexpr is wFtrGroup.PoleArms
bonus tag is TrainBonus.cFtrWPoleA
i = 1 to tagbonus is 1
perform eachpick.assignstr[bonustag] is 0
 
Sorry, I don't see how post #26 fits into things. Could you tell me what context that's in? What its purpose is?
 
Look around everything you've created that's on your test character. I think you have another script somewhere that's also adding to the abValue fields, and the combination of the two is making it hard to track down the problem here.
 
Sorry, I don't see how post #26 fits into things. Could you tell me what context that's in? What its purpose is?

I was just checking to see if anything changed. It appears to all work correctly, but something is causing it to change.

Look around everything you've created that's on your test character. I think you have another script somewhere that's also adding to
the abValue fields, and the combination of the two is making it hard to track down the problem here.

The only other script in the archetype is

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)"
 
Try right-clicking on the weapon training abilities you've added. Choose "Show Debug fields for XXXXX", and find the abValue field on that list. Do they agree with what the debug statements were reporting?

Also try "Show Debug Tags for XXXXX" on one of your weapons - are the number of TrainBonus tags there what they should be?
 
This script you're working on is on the archetype itself, not on a class special, right?

Yeah on the Archetype itself.

I moved it to a Quintenary ability but still nothing. But now weapon bonus and damage displayed on class and weapon tabs are both the same at least (Still +3 when it should be 1)

Try right-clicking on the weapon training abilities you've added. Choose "Show Debug fields for XXXXX", and find the abValue field on that list. Do they agree with what the debug statements were reporting?

Also try "Show Debug Tags for XXXXX" on one of your weapons - are the number of TrainBonus tags there what they should be?

The weapon training ability shows an abvalue of 3
For the weapon it is adding 3 trainbonus tags.
 
Last edited:
Try adding

Code:
debug eachpick.field[name].text & ": added a training tag"

immediately below

Code:
perform eachpick.assignstr[bonustag]

That'll let you double-check how many times this script is adding the TrainBonus tags.
 
The weapon training ability shows an abvalue of 3
For the weapon it is adding 3 trainbonus tags.

So the final abValue is 3, but according to the debug statements you added earlier, it's only 0 or 1 during the execution of that script

See - there's something else going on here that's interfering with the function of this script - keep looking for other scripts or other things that could be causing this.
 
So the final abValue is 3, but according to the debug statements you added earlier, it's only 0 or 1 during the execution of that script

See - there's something else going on here that's interfering with the function of this script - keep looking for other scripts or other things that could be causing this.

I changed the timing to pre-levels 1000 and now it is only 2, which isn't right but it's closer...I don't think it needs to be post levels since it should just count each one taken. I may be wrong on that though.


If I run this it will show once in the output as:
Weapon Training: Pole Arms: added a training tag.

Code:
foreach pick in hero from BaseWep where wepexpr
            for i = 1 to tagbonus
              perform eachpick.assignstr[bonustag]
            next
          nexteach
debug eachpick.field[name].text & ": added a training tag"



If I try it directly under it doesn't show anything at all.
Such as:
Code:
foreach pick in hero from BaseWep where wepexpr
            for i = 1 to tagbonus
              perform eachpick.assignstr[bonustag]
debug eachpick.field[name].text & ": added a training tag"
            next
          nexteach
 
Last edited:
field[cGiveSp3rd].value isn't calculated until Post-Levels/10000 - that's why this is at Post-Levels/10500.
 
Weird...this EXACT same code when switched to a monk archetype works just fine. I know I copied it from the sohei... But it doesn't work on the Bard or Inquisitor. Does it maybe have something to do with those classes having spells? I've tried different ability slots (Secondary, Tertiary, Quintenary) on the bard, and something is throwing it off.

Another thing, I have the Archetype replace the class name, This wouldn't do anything to the base class helper would it?

Also...with a Bard, I have weapon training in the quintenary custom ability. If I add an optional quaternary ability it shows up under both weapon training and Quatenary abilities...disabling quatenary abilities doesn't do anything to the weapon training value though.
Here is a picture.
 

Attachments

  • Weapon Training Blues.jpg
    Weapon Training Blues.jpg
    182.5 KB · Views: 8
Last edited:
I'm trying to make a Gestalt Inquisitor/Fighter.

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.
 
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.
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.
 
Back
Top