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
Redcap's Corner
Senior Member
 
Join Date: Jul 2010
Posts: 149

Old December 1st, 2014, 10:28 AM
I have a custom ability that either gives the hero a pair of claw attacks OR increases the damage of the hero's claw attacks by one step if the hero already has claws.

I have wClaw bootstrapped at First/600 with the following condition:

Code:
(fieldval:abValue2 <> 1)
And I have the following evalscript:

Code:
FIRST/599
~ If the hero already has claws, ignore the following.
doneif (hero.childlives[wClaw] <> 0)

~ Increase the existing claws' damage by one step.
perform hero.child[wClaw].assign[Helper.DamageUp]

~ Flag the hero as having claws for the conditional claw bootstrapping.
field[abValue2].value = 1
At present, it's just adding the second pair of claws and not worrying about increasing the damage of the first pair. I'm guessing this means wClaw is not a direct child of hero. What's the "address" for wClaw?
Redcap's Corner is offline   #1 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old December 1st, 2014, 10:39 AM
I'd approach it slightly differently than with a bootstrap condition. The pick which bootstraps claws always bootstraps them, but includes a custom tag as a marker, then an eval script on the pick foreaches through all claws on the hero which do NOT have that marker, and increases their damage. If it increased anyone's damage, then find the marked set of claws and hide them with Hide.Weapon.
Aaron is offline   #2 Reply With Quote
Redcap's Corner
Senior Member
 
Join Date: Jul 2010
Posts: 149

Old December 1st, 2014, 10:53 AM
Hmm... That's an interesting suggestion, and one I definitely hadn't considered. Immediately after posting this, I had a bit of a revelation that the problem might be that claws could actually be a child of a variety of different children of the hero, and thus a foreach statement was probably necessary either way. And I came up with the following (which seems to be working) to replace the code in the evalscript I posted above:

Code:
First/599
~ If the hero already has claws, instead increase their damage.
foreach pick in hero from BaseNatWep where "IsWeapon.wClaw"
  perform eachpick.assign[Helper.DamageUp]
  field[abValue2].value = 1
  nexteach
If I were to change it to work the way you suggested, though, how would I foreach for both the weapon being a claw AND it not having my custom tag? Something like this?

Code:
foreach pick in hero from BaseNatWep where "IsWeapon.wClaw" !& "Custom.GrislyHands"
I ask because I have to assume there are probably things that add claws to the hero at a later stage than First/598.

Last edited by Redcap's Corner; December 1st, 2014 at 11:19 AM.
Redcap's Corner is offline   #3 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old December 1st, 2014, 01:50 PM
Quote:
Originally Posted by Redcap's Corner View Post
Code:
foreach pick in hero from BaseNatWep where "IsWeapon.wClaw" !& "Custom.GrislyHands"
I ask because I have to assume there are probably things that add claws to the hero at a later stage than First/598.
Doubtful anything does after First/598. Most natural attacks should be getting on by First/99.

Also the above is not a valid search string. Here it is fixed:
Code:
foreach pick in hero from BaseNatWep where "IsWeapon.wClaw & !Custom.GrislyHands"

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   #4 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 04:46 PM.


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