• 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

Scripting attack bonus

pazuzu

Member
I'm trying to make a feat that allows a character to add their INT mod as a bonus to their ranged attacks. Using the macro list from the tutorial, I came up with the script below and put it in the Eval Scripts section of the feat. When I hit the test button, it says it is ready for use, but when I look at the character sheet, the bonus doesn't show up. The script is

hero.child[Attack].field[tAtkRanged].value = hero.child[Attack].field[tAtkRanged].value + hero.child[aINT].field[aModBonus].value

I'd appreciate any pointers on what I'm messng up.

Thanks.
 
What's the timing on your script? Since you want to affect the attacks, you'll need to run it before the PostAttr phase, since you need the value of an attribute, you need to run it after the attributes phase. That's a very narrow window (actually, it isn't a window).

So, I know there are other things that affect attack rolls based on attributes. I'll be looking for one, but you should also be thinking of other classes, feats, etc. that do something similar to what you're doing. Find one of them, and see what timing it uses.
 
I gave it a quick test, and the script functions at Phase: Post-Attributes, priority: 100.
 
Last edited:
Back
Top