Thank you for the link Synchronicity! Downloading now.
On another note, I took the liberty of adding in the Double Slice feat, just to see how it would be done. I hope I got all the places that it would be needed. For those that are curious, here's what I did.
I had to modify two of the macros in Lib:libDnd35Pathfinder. editMain (CharacterSheet, yellow) and LibAttack (Combat, grey)
With editMain, there were three locations where I needed to add some script. I just looked for some other Pathfinder feat, and duplicated the lines. I chose AgileManuevers.
The first occurrence was near line 140.
Existing lines
Code: Select all
[H: tAgileManeuvers = getStrProp(Feats, "AgileManeuvers")]
[H: tAgileManeuvers = if(tAgileManeuvers == "", getStrProp(getPropertyDefault("Feats"), "AgileManeuvers"), tAgileManeuvers)]
[H: sysFeats = sysFeats + ' AgileManeuvers| ' + tAgileManeuvers +' |Agile Maneuvers Feat?|CHECK ##']
New lines, created immediately after
Code: Select all
[H: tDoubleSlice = getStrProp(Feats, "DoubleSlice")]
[H: tDoubleSlice = if(tDoubleSlice == "", getStrProp(getPropertyDefault("Feats"), "DoubleSlice"), tDoubleSlice)]
[H: sysFeats = sysFeats + ' DoubleSlice| ' + tDoubleSlice +' |Double Slice Feat?|CHECK ##']
The next was around line 250.
Before.
Code: Select all
[H, IF(system == "Pathfinder"), CODE: {
[H: Feats = setStrProp(Feats, "CriticalFocus", CriticalFocus)]
[H: Feats = setStrProp(Feats, "AgileManeuvers", AgileManeuvers)]
[H: Feats = setStrProp(Feats, "ImprovedChanneling", ImprovedChanneling)]
}]
After.
Code: Select all
[H, IF(system == "Pathfinder"), CODE: {
[H: Feats = setStrProp(Feats, "CriticalFocus", CriticalFocus)]
[H: Feats = setStrProp(Feats, "AgileManeuvers", AgileManeuvers)]
[H: Feats = setStrProp(Feats, "DoubleSlice", DoubleSlice)]
[H: Feats = setStrProp(Feats, "ImprovedChanneling", ImprovedChanneling)]
}]
The last place was near line 335.
Existing.
Code: Select all
[H: output = output + if(tAgileManeuvers == AgileManeuvers, "", " AgileManeuvers= " + AgileManeuvers + " (" + tAgileManeuvers + ") ")]
New.
Code: Select all
[H: output = output + if(tDoubleSlice == DoubleSlice, "", " DoubleSlice= " + DoubleSlice + " (" + tDoubleSlice + ") ")]
That took care of adding the feat itself. Next came adding the the functionality.
The feat allows two-weapon fighters to add in their full strength bonus for their off-hand weapon instead of half. So, I looked for the section where the damage bonus was calculated and changed it. But don't forget to add in a line that checks to see if the token HAS the feat, those are near the top.
Checking for the DoubleSlice feat on the token:
Existing.
Code: Select all
[H: tManyShot = getStrProp(Feats, "ManyShot")]
[H: tManyShot = if(tManyShot == "", 0, tManyShot)]
[H: tCriticalFocus = getStrProp(Feats, "CriticalFocus")]
[H: tCriticalFocus = if(tCriticalFocus == "", 0, tCriticalFocus)]
[H: jCombat = json.get(PrivateJSON, "Combat")]
[H, IF( json.isEmpty( jCombat ) ): tMagicExtraAttack = 0; tMagicExtraAttack = json.get( jCombat, "magicExtraAttack" ) ]
[H, IF( !isNumber( tMagicExtraAttack ) ): tMagicExtraAttack = 0 ]
Modified.
Code: Select all
[H: tManyShot = getStrProp(Feats, "ManyShot")]
[H: tManyShot = if(tManyShot == "", 0, tManyShot)]
[H: tCriticalFocus = getStrProp(Feats, "CriticalFocus")]
[H: tCriticalFocus = if(tCriticalFocus == "", 0, tCriticalFocus)]
[H, IF(system == "Pathfinder"), CODE: {
[H: tDoubleSlice = getStrProp(Feats, "DoubleSlice")]
[H: tDoubleSlice = if(tDoubleSlice == "", 0, tDoubleSlice)]
}]
[H: jCombat = json.get(PrivateJSON, "Combat")]
[H, IF( json.isEmpty( jCombat ) ): tMagicExtraAttack = 0; tMagicExtraAttack = json.get( jCombat, "magicExtraAttack" ) ]
[H, IF( !isNumber( tMagicExtraAttack ) ): tMagicExtraAttack = 0 ]
Giving full bonus, if so.
Before.
Code: Select all
[H: dmgStatB = min(DmgBonusCap, if(TwoHanded == 1, Str2hB + if( Ranged == 1, 0, floor(paDMG*pa2H)), if(Primary == 2,floor( StrSecB + if( Ranged == 1, 0,(paDMG*paOffhand))),StrB + if( Ranged == 1, 0, paDMG))))]
After.
Code: Select all
[H: dmgStatB = min(DmgBonusCap, if(TwoHanded == 1, Str2hB + if( Ranged == 1, 0, floor(paDMG*pa2H)), if(Primary == 2,floor( if(tDoubleSlice == 1,StrB,StrSecB) + if( Ranged == 1, 0,(paDMG*paOffhand))),StrB + if( Ranged == 1, 0, paDMG))))]
Works great!
If the token has the DoubleSlice feat, they get full strength bonus on each weapon, if they don't they get the normal full bonus on primary, and half on secondary.
My only concern is about non-Pathfinder campaigns... will the if(Doubleslice==1) section cause issue since it wouldn't be defined? If so, a test for system="Pathfinder" would have to be performed. Of course, would anyone NOT running Pathfinder add these lines?