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
jbearwillis
Senior Member
 
Join Date: Dec 2009
Location: Independence, Mo
Posts: 797

Old October 26th, 2014, 08:04 PM
I am trying to make a racial special that gives a +1 to both to Hit and damage that only work on a Shortspear and also if that character gets a magic shortspear, that it will automatically apply to it as well. Any help would be appreciated. Thanks JBear
jbearwillis is offline   #1 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old October 27th, 2014, 10:15 AM
Assuming the bonus is untyped, you'll want to foreach through all weapons on the hero with the IsWeapon.wShortspr tag, and then add +1 to the Bonus field on each pick.
Aaron is offline   #2 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old October 27th, 2014, 10:42 AM
Just to build on that with some examples see THIS thread with the only difference is you won't care if the weapon is equipped or not. And see THIS thread where I show how to change a Rapier to use Dex for damage. Both are examples of using the "foreach" that Aaron is talking about.

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   #3 Reply With Quote
jbearwillis
Senior Member
 
Join Date: Dec 2009
Location: Independence, Mo
Posts: 797

Old October 27th, 2014, 03:00 PM
This is what I came up with and it worked - Thanks again

Pre-Levels 10000

~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)

foreach pick in hero from BaseWep where "thingid.wShortspr"
if (eachpick.tagis[IsWeapon.wShortspr] <> 0) then
eachpick.field[Bonus].value += 1
endif
nexteach
jbearwillis is offline   #4 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old October 27th, 2014, 03:03 PM
The if statement is more than you need, you should put the IsWeapon.wShortspr where you have "thingid.wShortspr" then it'll cover weapons that count as short spears too, but the "where" part of the foreach statement is like saying "if (tagis[xxx] <> 0) for each thing in the script listed there.
AndrewD2 is offline   #5 Reply With Quote
jbearwillis
Senior Member
 
Join Date: Dec 2009
Location: Independence, Mo
Posts: 797

Old October 27th, 2014, 03:37 PM
Gotcha, Thanks AndrewD2. LOL - I was playing around with it way to long and when I got it to work, I was so damn happy. I didn't think to clean it up.
jbearwillis 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 01:59 AM.


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