Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
coyote6
Member
 
Join Date: Sep 2007
Location: Salinas, CA
Posts: 67

Old November 22nd, 2009, 08:36 PM
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?
coyote6 is offline   #1 Reply With Quote
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old November 23rd, 2009, 05:42 AM
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
Lawful_g is offline   #2 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old November 23rd, 2009, 08:27 AM
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)
That ought to get you what you want. It sets the attribute bonus for the will save to the maximum of the attribute bonus for the will save, and the constitution modifier.

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.
Mathias is offline   #3 Reply With Quote
coyote6
Member
 
Join Date: Sep 2007
Location: Salinas, CA
Posts: 67

Old November 23rd, 2009, 07:03 PM
That did it! Thanks.

Quote:
Originally Posted by Mathias View Post
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.
Yeah, I skimmed the help file, but flat missed the vAttr. I blame the football game. The timing stuff was just guesses, thinking maybe things were being evaluated at the wrong time.

Quote:
Originally Posted by Mathias View Post
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?
Iron Will feat; I copied a few feats over to look at how they were set up, and Iron Will was amongst the first. FWIW, I just checked & Great Fortitude and Lightning Reflexes also use container.child[].

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.
coyote6 is offline   #4 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 03:13 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.