Member
Join Date: Sep 2007
Location: Salinas, CA
Posts: 67
|
I'm trying to implement the Steadfast Determination feat, from PH2 (the 3.5e PH2); it allows the character to use their Con modifier instead of their Wis modifier for Will saves. Is there any way or function that will allow me to easily replace the Wis modifier with the Con mod (if it's larger)?
I tried this, in the Eval Scripts section: ~ If we're disabled, do nothing doneif (tagis[Helper.FtDisable] <> 0) container.child[vWill].field[Bonus].value += hero.child[aCON].field[Bonus].value - hero.child[aWIS].field[Bonus].value But it doesn't do anything. I tried setting the Phase to Final, Post-Attributes, & Pre-Attributes, but it didn't make any difference. The Will save bonus doesn't change. I also tried using hero.child[vWill]..., but didn't work. What am I missing? |
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245
|
From the Tactile Trapsmith feat I wrote, which lets you use Dex rather than Int for Disable Device and Search. Change as needed
It runs at Post Attributes 10000 var bonus as number var minus as number bonus = hero.child[aDEX].field[aModBonus].value minus = hero.child[aINT].field[aModBonus].value if (minus >= bonus) then done endif ~ Since our dexterity is higher and we passed, subtract intelligence from our Disable Device and Search checks and add dexterity instead. hero.childfound[kSearch].field[Bonus].value = hero.childfound[kSearch].field[Bonus].value - minus + bonus hero.childfound[kDisable].field[Bonus].value = hero.childfound[kDisable].field[Bonus].value - minus + bonus |
#2 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
The attribute bonus for a save is stored in vAttr. The Bonus field is for generic bonuses added by external things, for example, the Halfling's racial save bonus.
vAttr is calculated at PostAttr/10000, and incorporated into vTotal at Final/7500, so you'll have to put your script inbetween those two points. PostAttr/11000: Code:
~ If we're disabled, do nothing doneif (tagis[Helper.FtDisable] <> 0) hero.child[vWill].field[vAttr].value = maximum(hero.child[vWill].field[vAttr].value, hero.child[aCON].field[aModBonus].value) For future reference, I got those fields from the editor manual. Select the help menu in the editor, then scroll down a tad to the "Reference Information" link. The exact timing is something you had to ask me for. Since the attribute bonus to a save is something that happens after attributes are calculated, you could guess that the value would be calculated sometime in the Post Attributes phase. For things like saving throws, that depend on many other things, but aren't incorporated into anything else, they'll generally be calculated in the Final phase. So from that, you might guess that late in the Post Attributes phase might be the time to check the existing bonus, and then modify it before it was used by something else. container.child[vWill] will take you to the same thing as hero.child[vWill] in 99% of cases. It's that 1% that's a problem. Where'd you see container.child[] being used? I'll switch that over to hero.child[] so it's a better example. For those who are curious, if a container transition was used from an item power, it would take you to the item, and from there, the child[vWill] transition would fail, so it would return an error. From most anywhere else, the container is the hero. |
#3 |
Member
Join Date: Sep 2007
Location: Salinas, CA
Posts: 67
|
That did it! Thanks.
Quote:
Quote:
I think I actually tried hero.child[] at one point, but it didn't work, and I went back to what Iron Will used, on the theory that the core feat might've done it for a reason. Didn't think about "old code" as the reason. |
||
#4 |
|
|