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
Tsujigiri
Junior Member
 
Join Date: Mar 2010
Posts: 2

Old March 16th, 2010, 09:04 AM
I am attempting to create the Dervish Dance feat which allows your Dexterity to be applied to a scimitar instead of Strength for both attack and damage. With the way Weapon Finesse is structured I'm not sure how to go about doing this. Any ideas?
Tsujigiri is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old March 17th, 2010, 09:12 AM
Weapons have the fields wAttBonus and wDam Bonus.

(In the editor, select the help menu, go to the "Reference Information" page, and then go to the weapons section to find things like this.)

So, what you want to do in your feat is to search for all Scimitars on the character:

Code:
 
foreach pick in hero from BaseWep where "IsWeapon.wScimitar"
For each of those fields, you want to subtract the strength modifier, and add the dex modifier, but only if dex is better than strength.

So, let's calculate that difference:
Code:
 
var bonus as number
bonus = maximum(#attrmod[aDEX] - #attrmod[aSTR], 0)
That will give you your DEX mod - your STR mod, but not let it go negative (so if STR > DEX, it will be 0).

Now, add that modifier to the attack and damage:

Code:
 
eachpick.field[wAttBonus].value += bonus
eachpick.field[wDamBonus].value += bonus
Here's all that assembled, with the foreach properly closed:

Code:
 
var bonus as number
bonus = maximum(#attrmod[aDEX] - #attrmod[aSTR], 0)
 
foreach pick in hero from BaseWep where "IsWeapon.wScimitar" 
  eachpick.field[wAttBonus].value += bonus
  eachpick.field[wDamBonus].value += bonus
  nexteach
Now, for the timing - we're working with the attribute modifiers, which means we can't put it earlier than the Post-Attributes phase. The priority within the Post-Attributes phase shouldn't matter, so you can leave that at 100.
Mathias is offline   #2 Reply With Quote
Tsujigiri
Junior Member
 
Join Date: Mar 2010
Posts: 2

Old March 20th, 2010, 07:53 AM
Thank you so much for your response, worked like a charm (and thank you for explaining it piece by piece, it goes a long way towards my understanding the scripting mechanisms in Hero Lab)
Tsujigiri 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 03:17 AM.


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