Junior Member
Join Date: Jul 2007
Posts: 21
|
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. |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
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. |
#2 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
I gave it a quick test, and the script functions at Phase: Post-Attributes, priority: 100.
Last edited by Mathias; April 30th, 2009 at 09:05 AM. |
#3 |
Junior Member
Join Date: Jul 2007
Posts: 21
|
I put that in there and it worked liked a champ. Many thanks for your help.
|
#4 |
|
|