Member
Join Date: Aug 2009
Location: Finger Lakes Region, New York
Posts: 59
|
Hi all.
I haven't been following these forums as closely as I probably should be, so I apologize if this has been asked and answered. Is it a known bug (or is it even a bug at all) that weapons equipped in the off hand don't set a value to the gIsEquip field? If it so happens that this is intended behavior and not, in fact, a bug, what is the normal way to get at an indicator that a weapon is equipped in the off hand? |
#1 |
Senior Member
Lone Wolf Staff
Join Date: Dec 2008
Posts: 4,690
|
For weapons in the off-hand, you should be able to look at the wIs2nd field - gIsEquip only gets set if the weapon uses your *main* hand (i.e. if it's a one-hand weapon in your main hand, or a two-handed weapon).
|
#2 |
Member
Join Date: Aug 2009
Location: Finger Lakes Region, New York
Posts: 59
|
Colen, thank you for the response.
I am trying to make the dual wielder feat that was posted here work a little bit better. If I may, I have a few questions. (1). Is there a way to get at what's in a hero's hands directly rather than iterating through the entire list of weapons in the character's inventory? I see that if a weapon is equipped in a hero's main hand, it has the tag Hero.MainHand, and the same for the off hand with Hero.OffHand. I was trying to find a syntax where I could basically say: Quote:
Can you combine expressions with logical operators for if-blocks with this scripting language? I altered the dual wielder feat as follows: Quote:
Quote:
(3). The way I have the feat listed above, putting a non-light weapon in each hand will trigger a validation error. The OP of the dual wielder feat solved this by manually attaching the wProperty.Light tag to the weapon, but admitted it was an inelegant solution. In addition to being an inelegant solution, it also has the potential to cause issues outside of the feat that are intended to trigger on weapons based on the presence or absence of the wProperty.Light tag. Is there a more "proper" way to solve this problem? Thank you very much for any help. Jamie (CNYGamer) |
|||
#3 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
1 - Not well. You could use a findchild to find one weapon which met the criteria of "in the off hand" if that Hero tag was present, but that runs the risk of not altering other off hand weapons in the case that the race has many arms. I think a foreach is still your best bet here.
2 - Instead of two different conditional statements, you could combine them into one statement with two branches, like so: Code:
if (eachpick.field[gIsEquip].value <> 0) then field[abValue].value += 1 elseif (eachpick.field[wIs2nd].value <> 0)then field[abValue].value += 1 endif Code:
foreach pick in hero from BaseWep where "(wCategory.Melee) & (fieldval:gIsEquip <> 0 | fieldval:wIs2nd <> 0)" field[abValue].value += 1 nexteach |
#4 |
Member
Join Date: Aug 2009
Location: Finger Lakes Region, New York
Posts: 59
|
Per the 5e rules, you can't equip a non-light weapon in your off-hand for two-weapon fighting. So if you do so in Hero Lab, you get the red diamond in the upper right corner with the exclamation point to indicate your character is not built according to the rules.
The way the script I linked to addresses the problem is to manually assign the wProperty.Light tag to a weapon that is not actually a light weapon. |
#5 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
"Only light weapons can be equipped in the off-hand".
5e has the tag "Hero.OffLight" that is assigned to the hero container when two weapons are equipped. Sense this tag does not exist in Pathfinder I assumed it was added to cause the check for the "Light Off-hand" weapons. But removing the tag does not seem to be making a difference is preventing/suppressing the error message. Should the component validation script be only firing when this "Hero.OffLight" tag is present? I can't tell if this is a bug or I am assuming incorrectly what this tag does. Any insight would be appreciated. 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. |
#6 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
Have your script assign Helper.TwoWpLight instead of wProperty.Light. Won't work now, but I have altered the scripts for that validation error so that it should work after the next release.
|
#7 |
Thread Tools | |
Display Modes | |
|
|