• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

having trouble getting enhancement bonuses to not stack

DocSwiv

New member
Hi everyone,

Im trying to make a customizable amulet of natural armor using a the customizable bracers of armor as a jumping off point, and while the item works, I cant seem to get it to not stack with other enhancement bonuses to natural armor.

the evalscript Im running looks like this

~ If we're equipped, add a natural armor bonus
if (field[gIsEquip].value <> 0) then
hero.child[ArmorClass].field[tACNatural].value = maximum(hero.child[ArmorClass].field[tACNatural].value, gizmo.child[gCustMagic].field[gCustBonus].value)
endif

and Im just not seeing what is wrong. when equipped at the same time as an amulet of natural armor, both bonuses are added to AC.
if anyone can lend me a second set of eyes, I would greatly appreciate it.
 
Natural armor is its own thing, it has a helper pick to which enhancement and other bonuses can be applied, before the final total bonus is shifted to the armorclass pick. Your script is skipping directly to the armorclass pick, so any other bonuses are applied later will stack, including enhancement bonuses applied to the helper. Take at look at the script for normal amulets of natural armor, that should give you an example to follow.
 
Got it. Im a bit new to this, so I wasnt thinking about using the enhancement bonus field when referencing mNatural. That sorted it out. Thanks
 
Back
Top