Senior Member
Volunteer Data File Contributor
Join Date: Jan 2007
Posts: 591
|
How do I script the feat Speed of Thought?
The feat makes Intelligence the sat that modifies Initiative. Like how Grappling Finesse works. |
#1 |
Senior Member
Lone Wolf Staff
Join Date: Dec 2008
Posts: 4,690
|
dartnet wrote:
> > > How do I script the feat Speed of Thought? > > The feat makes Intelligence the sat that modifies Initiative. > > Like how Grappling Finesse works. Easiest way would be to subtract out your dexterity bonus, and add your Intelligence bonus. Like so: ~ Subtract dex bonus from initiative hero.child[Initiative].field[Permanent].value -= hero.child[aDEX].field[aBonus].value ~ Add int bonus to initiative hero.child[Initiative].field[Permanent].value += hero.child[aINT].field[aBonus].value You'd need to do this after attributes are finished, but before initiative is finished. Hope this helps! |
#2 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2007
Posts: 591
|
The Script doesn't seem to work.
|
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,207
|
If it doesn't give error messages but doesn't function, check the phase you've put it in. I'm not familiar with the M&M datafiles specifically, but in the d20 files, there's a list of phases in the help file - as Colen said, find something that's inbetween attributes and initiative.
|
#4 |
Senior Member
Volunteer Data File Contributor
Join Date: Apr 2006
Posts: 649
|
What phase do you have it set to evaluate in? Attributes are evaluated at 5000, and initiative is calculated at 20000, so any phase in between the should be okay. Try 10000.
|
#5 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2007
Posts: 591
|
I get a spelling error in line 2.
|
#6 |
Senior Member
Lone Wolf Staff
Join Date: Dec 2008
Posts: 4,690
|
Hmm, it looks like a couple of line breaks got added where they shouldn't have. Try this:
Code:
~ Subtract dex bonus from initiative hero.child[Initiative].field[Permanent].value -= hero.child[aDEX].field[aBonus].value ~ Add int bonus to initiative hero.child[Initiative].field[Permanent].value += hero.child[aINT].field[aBonus].value |
#7 |
Member
Join Date: Jun 2008
Posts: 62
|
I haven't been able to get it to work. What am I missing?
|
#8 |
Senior Member
Lone Wolf Staff
Join Date: Dec 2008
Posts: 4,690
|
thorfin wrote:
> > > I haven't been able to get it to work. What am I missing? It worked fine when I try it in the Traits phase at Priority 10000. What phase and priority is the script set to run at? And are you still getting an error? If so, please post the error here. |
#9 |
Member
Join Date: Jun 2008
Posts: 62
|
That did it. I had been setting my Priority somewhere below 10000. So, that did it.
|
#10 |
Thread Tools | |
Display Modes | |
|
|