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
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old December 29th, 2009, 01:15 PM
This is a response to a question posted in the Hero Lab Discussion forum - moved here since it's Pathfinder specific.

Quote:
Originally Posted by Tal_Akaan View Post
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.
Mathias is offline   #1 Reply With Quote
Tal_Akaan
Junior Member
 
Join Date: Dec 2009
Posts: 4

Old December 29th, 2009, 03:46 PM
Ok, i'm starting to get this i think thanks for the help.

it didn't work at first but then i noticed that wIsEquip wasn't the one effected by the main hand it was gIsEquip. the only thing i could think of as a reason why was that it's an exotic weapon which i probably should have mentioned.

i'm gonna try my hand at some more stuff, but i'm fairly sure i'll be back with more questions.
Tal_Akaan is offline   #2 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old December 29th, 2009, 05:30 PM
Whoops - my mistake. I didn't look closely enough at the names as I was writing them down.

gIsEquip starts with a "g" since it applies to gear - on a magic item or armor, since it can only be worn one way, it's whether that item is equipped or not. Since weapons can be equipped in the main hand, off hand, or both, they also have the wIs2nd field for the off-hand.
Mathias is offline   #3 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 01:31 AM.


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