This is a response to a question posted in the Hero Lab Discussion forum - moved here since it's Pathfinder specific.
Okay, you've entered the basics of the weapon in the editor - so it has a damage, weapon type, etc. Go ahead and buy a copy of the weapon on a blank character (maybe add a level of fighter if you don't want to see the non-proficiency marker).
In the develop menu at the top of the program, make sure that the first item "Enable Data File Debugging" is checked, then right-click on the weapon, and select "Show debug tags for XXX" and right click again, selecting "Show debug fields for XXX".
Expand those windows to see as much as possible, and then try equipping your weapon in the main hand, in the off hand, in both hands, in no hands - watch how the tags and fields change as that happens.
You'll find that if the weapon is equipped in the main hand, the field wIsEquip = 1, and wIs2nd = 1 if it's equipped in the off hand. There are some other fields that change, and some tags that change, but we'll go with these.
So, since each of those fields will equal 1 if that hand is used, and 0 if it isn't, you want to know if exactly one hand is being used to hold the weapon. So, add the two fields together:
Now, going on to AC. In the editor, select the help menu at the top, and then scroll down to "Reference Information", and find Armor Class in there.
hero.child[ArmorClass].field[Penalty].value is a generic penalty. If this item inflicts a circumstance penalty or some other specific penalty, you'll find the instructions for using those in the same "Reference Information" page.
Timing: Post-Attributes phase, any priority should work
Put that into a script on the weapon, then press "Test Now!" at the top right of the editor, and go back to your character. Now try out various ways of equipping the weapon, watching the character's AC, and make sure it works as expected.
ok, let's start with something that i think will be simple.
i have a weapon that i want create, and the only problem i'm having is that when you wield the weapon 1 handed you take a -1 penalty to AC.
how do i implement this in the editor so it applies the penalty?
thanks for the help.
Okay, you've entered the basics of the weapon in the editor - so it has a damage, weapon type, etc. Go ahead and buy a copy of the weapon on a blank character (maybe add a level of fighter if you don't want to see the non-proficiency marker).
In the develop menu at the top of the program, make sure that the first item "Enable Data File Debugging" is checked, then right-click on the weapon, and select "Show debug tags for XXX" and right click again, selecting "Show debug fields for XXX".
Expand those windows to see as much as possible, and then try equipping your weapon in the main hand, in the off hand, in both hands, in no hands - watch how the tags and fields change as that happens.
You'll find that if the weapon is equipped in the main hand, the field wIsEquip = 1, and wIs2nd = 1 if it's equipped in the off hand. There are some other fields that change, and some tags that change, but we'll go with these.
So, since each of those fields will equal 1 if that hand is used, and 0 if it isn't, you want to know if exactly one hand is being used to hold the weapon. So, add the two fields together:
Code:
if (field[wIsEquip].value + field[wIs2nd].value = 1) then
Now, going on to AC. In the editor, select the help menu at the top, and then scroll down to "Reference Information", and find Armor Class in there.
hero.child[ArmorClass].field[Penalty].value is a generic penalty. If this item inflicts a circumstance penalty or some other specific penalty, you'll find the instructions for using those in the same "Reference Information" page.
Timing: Post-Attributes phase, any priority should work
Code:
if (field[wIsEquip].value + field[wIs2nd].value = 1) then
hero.child[ArmorClass].field[Penalty].value -= 1
endif
Put that into a script on the weapon, then press "Test Now!" at the top right of the editor, and go back to your character. Now try out various ways of equipping the weapon, watching the character's AC, and make sure it works as expected.