I am trying to create a new feat that allows a character to use their DEX mod instead of their STR mod for damage, as well as for attack rolls.
I found out that the Weapon Finesse feat does not seem to have any Eval Scripts, so I am not sure how it works, but I could not use it. I decided to use Brutal Throw (use STR mod for attack instead of DEX with thrown weapons) as the template.
I had some issues with that, but managed to get a feat that works for main-hand weapons. However it does not apply the correct damage bonus for the off-hand weapon. One of my players uses two short swords. But instead of applying half his DEX mod for damage, rounded down, it added the difference between his STR and DEX mod.
I need help with the code so that it substitutes the STR mod for the DEX mod, and applies the bonuses correctly for each weapon when he two-weapon attacks.
Here is the code I have so far:
~ If our STR bonus is higher than our DEX bonus exit.
doneif (hero.child[aSTR].field[aModBonus].value >= hero.child[aDEX].field[aModBonus].value)
~ Create variable to hold new Bonus value.
var XBonus as number
~Calc the bonus to apply to Melee attacks
XBonus = hero.child[aDEX].field[aModBonus].value - hero.child[aSTR].field[aModBonus].value
~ Apply bonus to all "Finesse" weapons.
foreach pick in hero where "wCategory.Melee & wClass.Light <>wCategory.RangeThrow"
~ (I had to exclude the RangeThrow weapons because it was calculating the STR bonus mod oddly to his hand axe. I might just limit it to the weapon that he has Weapon Focus for.)
each.field[wAttBonus].value += XBonus
each.field[wDamBonus].value += XBonus
nexteach
I found out that the Weapon Finesse feat does not seem to have any Eval Scripts, so I am not sure how it works, but I could not use it. I decided to use Brutal Throw (use STR mod for attack instead of DEX with thrown weapons) as the template.
I had some issues with that, but managed to get a feat that works for main-hand weapons. However it does not apply the correct damage bonus for the off-hand weapon. One of my players uses two short swords. But instead of applying half his DEX mod for damage, rounded down, it added the difference between his STR and DEX mod.
I need help with the code so that it substitutes the STR mod for the DEX mod, and applies the bonuses correctly for each weapon when he two-weapon attacks.
Here is the code I have so far:
~ If our STR bonus is higher than our DEX bonus exit.
doneif (hero.child[aSTR].field[aModBonus].value >= hero.child[aDEX].field[aModBonus].value)
~ Create variable to hold new Bonus value.
var XBonus as number
~Calc the bonus to apply to Melee attacks
XBonus = hero.child[aDEX].field[aModBonus].value - hero.child[aSTR].field[aModBonus].value
~ Apply bonus to all "Finesse" weapons.
foreach pick in hero where "wCategory.Melee & wClass.Light <>wCategory.RangeThrow"
~ (I had to exclude the RangeThrow weapons because it was calculating the STR bonus mod oddly to his hand axe. I might just limit it to the weapon that he has Weapon Focus for.)
each.field[wAttBonus].value += XBonus
each.field[wDamBonus].value += XBonus
nexteach