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
Nalerenn
Junior Member
 
Join Date: Dec 2009
Posts: 3

Old December 14th, 2009, 08:49 AM
To cut a long story short, one of the classes I'm attempting to code in has a feature that uses its Con bonus to add to its Natural Armor, with a minimum of 1. I've tried bootstrapping it with the code below, but I can't seem to get it to change at all with the stats.

Code:
hero.child[mNatural].field[Bonus].value = hero.child[mNatural].field[Bonus].value + hero.child[aCON].field[aNormMod].value
Anyone got any insight into this? Or am I forgetting something simple ^^;;
Nalerenn is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old December 14th, 2009, 08:59 AM
Natural armor is:
hero.child[ArmorClass].field[tACNatural].value

Timing?

Since you want the Con mod, you'll need to be in the Post-Attributes phase or later (Post-Attributes/10000 seems about right).

I'd suggest using aModBonus instead of aNormMod - otherwise, your Amulet of Health's effects won't be added to your natural armor.

Since you want a minimum bonus (and I'm shortening the amount of typing as well):

Code:
 
hero.child[ArmorClass].field[tACNatural].value += maximum(hero.child[aCON].field[aModBonus].value, 1)
Mathias is online now   #2 Reply With Quote
Nalerenn
Junior Member
 
Join Date: Dec 2009
Posts: 3

Old December 14th, 2009, 09:01 AM
Ah, I was using it Post-Levels. My bad, forgot to whack that in there.

And that worked a charm, thanks! I'll have to remember that code.
Nalerenn is offline   #3 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:50 PM.


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