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
CSDeeds
Junior Member
 
Join Date: Feb 2012
Posts: 20

Old October 14th, 2012, 08:36 PM
Okay, so I'm trying to recreate an old magic item from 3.5 that added to damage when you used Power Attack. Playing with things I came up with this script:

if (field[gIsEquip].value <> 0) then

~Add two damage if Power Attack is active
if (hero.childfound[fPowerAtt].field[abilActive].value <> 0) then
hero.child[Damage].field[tDamPower].value += 2
endif
endif

It almost works...but when using a weapon two-handed the bonus increases to +3. Obviously this isn't what I intended even if Power Attack itself scales like that. Played with some tags and such but can't seem to get it to work right. Any help would be greatly appreciated!
CSDeeds is offline   #1 Reply With Quote
CSDeeds
Junior Member
 
Join Date: Feb 2012
Posts: 20

Old October 15th, 2012, 06:03 PM
No one?
CSDeeds is offline   #2 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old October 15th, 2012, 07:21 PM
Sorry! Slipped by me.

I would recommend doing a foreach through the weapons if the Power Attack feat is activated, and adding to each weapons damage bonus field.
Aaron is offline   #3 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old October 15th, 2012, 07:25 PM
Here is an example script, it's not tested, so you should make sure to test it and refine it.

Code:
doneif (field[gIsEquip].value = 0)

doneif (hero.childfound[fPowerAtt].field[abilActive].value = 0)

foreach pick in hero from BaseWep where "wCategory.Melee"
   eachpick.field[wDamBonus].value += 2
   nexteach

Last edited by Aaron; October 15th, 2012 at 08:57 PM.
Aaron is offline   #4 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old October 15th, 2012, 08:22 PM
Code:
~ If not equipped just get out now
doneif (field[gIsEquip].value <> 1)
~ If we don't have Power Attack feat get out now
doneif (hero.childlives[fPowerAtt] <> 1)

~ Add +2 too damage if Power Attack is active
if (hero.childfound[fPowerAtt].field[abilActive].value <> 0) then
   hero.child[Damage].field[Bonus].value += 2
endif
I am thinking you just need to change it to use "Bonus" instead of the Power Attack damage "tDamPower" field. As the Power Attack damage will be increased when using 2H weapons where Bonus is just going to give a straight bonus.

I also added protection encase the character does not have the Power Attack feat. Otherwise it would throw an error.

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.
ShadowChemosh is offline   #5 Reply With Quote
CSDeeds
Junior Member
 
Join Date: Feb 2012
Posts: 20

Old October 16th, 2012, 04:07 PM
Thanks so much to both of you! After some testing Aaron's script looks like it works fine. If I run into any trouble with it down the road I'll try ShadowChemosh's. Thanks again!
CSDeeds is offline   #6 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 12:13 AM.


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