Hi All,
I'm working on the Intuitive Strike feat. What this feat does is replace your STR modifier with your WIS modifier when using melee weapons. For some reason, I just can't seem to get my script to evaluate correctly.
Looking through the task list, tAtkMelee is calculated Post-Attribute, order 200.
I've set my script to run Final Phase, order 250 in the hopes of getting the calculations to work right. Some interesting things are happening that I could use some advice on...
First, the scripts:
Index 1
var stbonus as number
stbonus = hero.child[aSTR].field[aNormMod].value
hero.child[Attack].field[tAtkMelee].value = hero.child[Attack].field[tAtkMelee].value - stbonus
Index 2
var wisbonus as number
wisbonus = hero.child[aWIS].field[aNormMod].value
hero.child[Attack].field[tAtkMelee].value = hero.child[Attack].field[tAtkMelee].value + wisbonus
First issue - neither script evaluates correctly. If I take out the variables and put in constants they seem to evaluate correctly. So the following would work:
hero.... = hero... + 4
but if I use
stbonus = hero....
hero.... = hero.... + strbonus
it breaks, or more correctly, everything compiles fine, splices but no changes are made to the tags.
The second issue is order of operations. The scripts should evaluate as:
tAtkMelee = BAP + (STmod - STmod) + WImod
tAtkMelee = BAP + WImod
what I end up getting is:
tAtkMelee = BAP + STmod + (-STmod + WImod)
The net effect should be a substitution, but it isn't working out that way. Any help is appreciated.
Thanks,
Subfunk
I'm working on the Intuitive Strike feat. What this feat does is replace your STR modifier with your WIS modifier when using melee weapons. For some reason, I just can't seem to get my script to evaluate correctly.
Looking through the task list, tAtkMelee is calculated Post-Attribute, order 200.
I've set my script to run Final Phase, order 250 in the hopes of getting the calculations to work right. Some interesting things are happening that I could use some advice on...
First, the scripts:
Index 1
var stbonus as number
stbonus = hero.child[aSTR].field[aNormMod].value
hero.child[Attack].field[tAtkMelee].value = hero.child[Attack].field[tAtkMelee].value - stbonus
Index 2
var wisbonus as number
wisbonus = hero.child[aWIS].field[aNormMod].value
hero.child[Attack].field[tAtkMelee].value = hero.child[Attack].field[tAtkMelee].value + wisbonus
First issue - neither script evaluates correctly. If I take out the variables and put in constants they seem to evaluate correctly. So the following would work:
hero.... = hero... + 4
but if I use
stbonus = hero....
hero.... = hero.... + strbonus
it breaks, or more correctly, everything compiles fine, splices but no changes are made to the tags.
The second issue is order of operations. The scripts should evaluate as:
tAtkMelee = BAP + (STmod - STmod) + WImod
tAtkMelee = BAP + WImod
what I end up getting is:
tAtkMelee = BAP + STmod + (-STmod + WImod)
The net effect should be a substitution, but it isn't working out that way. Any help is appreciated.
Thanks,
Subfunk