Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Tengu1958
Junior Member
 
Join Date: Nov 2013
Location: Sugar Land, TX
Posts: 27

Old October 14th, 2014, 09:10 AM
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.
Tengu1958 is offline   #1 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old October 14th, 2014, 10:08 AM
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.
ShadowChemosh is offline   #2 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old October 14th, 2014, 10:12 AM
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.
Mathias is offline   #3 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old October 14th, 2014, 10:36 AM
Quote:
Originally Posted by Mathias View Post
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.....

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.
ShadowChemosh is offline   #4 Reply With Quote
Tengu1958
Junior Member
 
Join Date: Nov 2013
Location: Sugar Land, TX
Posts: 27

Old October 14th, 2014, 10:45 AM
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.
Tengu1958 is offline   #5 Reply With Quote
Tengu1958
Junior Member
 
Join Date: Nov 2013
Location: Sugar Land, TX
Posts: 27

Old October 14th, 2014, 12:08 PM
Doh! It works really good when you select the feat.

Thanks again guys.
Tengu1958 is offline   #6 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old October 14th, 2014, 01:24 PM
Sometimes it's the simplest things which are the issue.
Aaron is offline   #7 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 08:47 AM.


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