Junior Member
Join Date: Nov 2013
Location: Sugar Land, TX
Posts: 27
|
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. |
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
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 Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. Last edited by ShadowChemosh; October 14th, 2014 at 10:36 AM. |
#2 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
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. |
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
Updated my post..... Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
|
#4 |
Junior Member
Join Date: Nov 2013
Location: Sugar Land, TX
Posts: 27
|
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. |
#5 |
Junior Member
Join Date: Nov 2013
Location: Sugar Land, TX
Posts: 27
|
Doh! It works really good when you select the feat.
Thanks again guys. |
#6 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
Sometimes it's the simplest things which are the issue.
|
#7 |
|
|