• 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

Armor Adjusting Feat

Tengu1958

Active member
I am trying to add a Feat that provides a +1 armor bonus when the hero is wearing armor. I looked at Shield Focus and it seemed quite close to what I wanted. I just needed to change from a shield to armor.

My evaluation script occurs in the post-levels Priority 500 Index 1

~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)

~find all our armor
foreach pick in hero from BaseArmor where "EquipType.Armor"
eachpick.field[arAC].value += field[abValue].value
nexteach

I have set up an abValue field equal to 1.

I tested this and it does not increase the armor of my hero. Any advice is appreciated.
 
Its working for me. You did do a "Test Now!" after coding it? That compiles it and puts it in memory.

The only problem I am finding is that your code is also finding the "mArmor" Thing which is the natural armor Thing. Its also being increased by 1. So really the hero AC is going up by 2.

So would add the tag "Helper.Natural" to your search so you do not find the Natural Armor Pick.

Code:
~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)

~find all our armor
foreach pick in hero from BaseArmor where "EquipType.Armor & !Helper.Natural"
   eachpick.field[arAC].value += field[abValue].value
nexteach
 
Last edited:
ShadowChemosh, don't forget that the portal.mTable will also exclude armor added on the magic armor table.

Also, it's possible to bootstrap armors from other places, but in circumstances when you do want them to be found by this ability.

I'd use
"EquipType.Armor & !Helper.Natural" to exclude natural armor, instead of testing for the portal.

In general, testing portal tags should be a last resort.
 
ShadowChemosh, don't forget that the portal.mTable will also exclude armor added on the magic armor table.

Also, it's possible to bootstrap armors from other places, but in circumstances when you do want them to be found by this ability.

I'd use
"EquipType.Armor & !Helper.Natural" to exclude natural armor, instead of testing for the portal.

In general, testing portal tags should be a last resort.
ahhh ug. Yea your right. Its been a really bad day and not thinking straight. Think I will stay away from posting today....

Updated my post.....
 
Thanks for the response.

I tried both ways and they did not work so I must have broken something somewhere else.

And I have habit of doing the Test Now button and when that does not work. I do a quick reload of the data files. And sometimes (like now) I will switch game systems and switch back just to make sure everything is reset to my current changes.
 
Back
Top