• 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

Intuitive Strike feat eval script

subfunk

Member
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
 
This one is going to require Colen's assistance. He is the guru of all things related to the d20 data files. I'll flag this one to his attention and he'll hopefully get back to you soon.

-Rob


At 08:34 PM 1/9/2007, you wrote:

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