Member
Join Date: Dec 2010
Posts: 62
|
I'm trying to create a feat that improves max Dex and armor check penalties by 1 like Armor Training for a selected type of armor (similar to Weapon Focus). The problem is that entering EquipType.Armor in the custom expression field (restricted to All Things) always results in a "Nothing to choose from" message when the feat is added to a character.
Also, disabling the user selection entirely still has no effect on any purchased armors. Here's my simplified script: Code:
~ If we're disabled, do nothing doneif (tagis[Helper.FtDisable] <> 0) ~ If we haven't chosen anything, get out now ~doneif (field[usrChosen1].ischosen + tagis[Target.?] = 0) ~ If we're not shown, just get out now doneif (tagis[Helper.ShowSpec] = 0) ~Improve the armor check penalty and max dex stats of our armors. foreach pick in hero from BaseArmor eachpick.field[arArmorChk].value += field[abValue].value eachpick.field[arMaxDex].value += field[abValue].value nexteach Thanks in advance. Last edited by unforgivn; March 25th, 2011 at 12:53 PM. |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Quote:
How does that compare to the phase and priority of the fighter's armor training class special? - In general, weapons and armor are checking their details at different times, so I'd look for an armor-related script to get timing from, rather than a weapon-related script. |
|
#2 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
EquipType.Armor isn't added to armor until it's been selected.
You can use "component.BaseArmor & !ArmorClass.Shield & !ArmorClass.Tower" if you're looking for things (EquipType.Armor would work if you were looking for the picks on the hero). |
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
As your using field[abValue].value are you setting a Hard Coded Value.? tag on the feat then? Otherwise if you don't have some other Thing or script setting the value it will just be zero. 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 |
Member
Join Date: Dec 2010
Posts: 62
|
Quote:
Quote:
Quote:
|
|||
#5 |
Member
Join Date: Dec 2010
Posts: 62
|
I changed the timings to match Armor Training, and the bonuses work now. Adding in Mathias' suggested custom expression works, but it shows some things that really shouldn't be choices (Custom/Magic Armor, and other such placeholders). This isn't really a big deal, though.
Can anyone tell me how I should format the if statement to check that the eachpick being looked at is the same as the one chosen? I can't think of any feats or whatnot that use a similar selection method for armor to "borrow" code from. |
#6 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Code:
field[usrChosen1].chosen.field[arArmorChk].value += 1 field[usrChosen1].chosen.field[arMaxDex].value += 1 Sorry, I forgot about the custom armor. Try adding: Code:
& !Helper.CustomItem & !Helper.Helper |
#7 |
Member
Join Date: Dec 2010
Posts: 62
|
Quote:
And the bonuses don't work. |
|
#8 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Oops - I forgot, you're looking up a thing, then you need to use that to find all the picks that correspond to it.
Code:
var searchexpr as string searchexpr = field[usrChosen1].chosen.tagids[thingid.?] foreach pick in hero from BaseArmor where searchexpr eachpick.field[arArmorChk].value += field[abValue].value eachpick.field[arMaxDex].value += field[abValue].value nexteach |
#9 |
Member
Join Date: Dec 2010
Posts: 62
|
Works now. Thanks.
|
#10 |
|
|