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
Adam.Ormond
Senior Member
 
Join Date: May 2010
Location: Maryland
Posts: 167

Old May 6th, 2011, 08:03 PM
How do I "assign the Helper.DamageUp tag twice to the wSlam weapon that was bootstrapped by the race"? I've tried all sorts of variations in the Eval Scripts UI, and I just keep getting "Invalid use of a reserved word".

This is what I'm trying: hero.child[wSlam].tag[Helper.DamageUp]

I'm sure that's all sorts of wrong, but I can't find any example of where something like this is done. There's a lot of info about the tags available on weapons, but I can't find an example of how to use one outside of bootstrapping or the Tags UI the thing itself. How do I use the tags of a thing from another thing?

Last edited by Adam.Ormond; May 6th, 2011 at 08:11 PM.
Adam.Ormond is offline   #11 Reply With Quote
chava
Senior Member
 
Join Date: Jan 2011
Location: Honolulu
Posts: 250

Old May 6th, 2011, 08:39 PM
Taken from the Robe, Monk's:

Code:
        else
          perform hero.child[wUnarmed].assign[Helper.DamageUp]
          perform hero.child[wUnarmed].assign[Helper.DamageUp]
          perform hero.child[wUnarmed].assign[Helper.DamageUp]
          endif
        endif
chava is offline   #12 Reply With Quote
Adam.Ormond
Senior Member
 
Join Date: May 2010
Location: Maryland
Posts: 167

Old May 6th, 2011, 09:04 PM
Thanks!

Edit -- turns out my problem was the Phase/Timing -- was using Final (Users), and noticed that the Monk's Robe was using First. Switched it up and now it's working. Thanks again!

I just stumbled across the perform/assign combo a few minutes ago here: http://hlkitwiki.wolflair.com/index....ext#references

I've got this in my Eval Scripts now:

perform hero.child[wSlam].assign[Helper.DamageUp]
perform hero.child[wSlam].assign[Helper.DamageUp]

Damage code doesn't seem to change, however. I'll see what else is in the Monk's Robe.

Last edited by Adam.Ormond; May 6th, 2011 at 09:56 PM.
Adam.Ormond is offline   #13 Reply With Quote
Adam.Ormond
Senior Member
 
Join Date: May 2010
Location: Maryland
Posts: 167

Old May 6th, 2011, 10:09 PM
I read the page on Script Timing (http://hlkitwiki.wolflair.com/index....cript_Handling), and I placed some code to notify me of the BonEnhance field value of my pick in the Gear area, and it always tells me 0. It triggers before I've even selected the enhancement as I add the weapon, and I can tell it triggers every time I equip/unequip the weapon after it's added. Still always reads 0.

Quote:
if (this.ispick <> 0) then
notify this.field[BonEnhance].value
else
notify "not a pick?"
endif
I'm trying to dynamically detect the Enhancement Bonus assigned to the Battlefist weapon and then apply it to the wSlam pick. It works fine if I hardcode the #applybonus macro, but I'd love to read the value that's chosen when they add the weapon.

Sorry for all the questions... thanks everyone for all your help!
Adam.Ormond is offline   #14 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old May 6th, 2011, 10:45 PM
What's the phase and priority of that snippet of script?

Have you tried testing many different phases, and see if you come up with an answer to when in the phase & priority order Hero Lab assigns the bonus to the weapon?
Mathias is offline   #15 Reply With Quote
Adam.Ormond
Senior Member
 
Join Date: May 2010
Location: Maryland
Posts: 167

Old May 7th, 2011, 04:29 AM
Quote:
Originally Posted by Mathias View Post
What's the phase and priority of that snippet of script?

Have you tried testing many different phases, and see if you come up with an answer to when in the phase & priority order Hero Lab assigns the bonus to the weapon?
I don't see any options to set the Phase/Priority in the Gear area.

I tried First, Post Attributes, and Final in the Eval Scripts area.

In all cases, notify always reported 0.

Here's the whole def for the thing:

Quote:
<thing id="wBtlFist" name="Battlefist" description="This weapon resembles a massively oversized spiked gauntlet; one designed for a Medium warforged looks like a gauntlet designed for an ogre. It attaches to the arm of a warforged, completely covering the hand. This component only operates when attached and locked in place.\n\nA battlefist increases the damage dealt by the character’s natural slam attack to 1d8 points of bludgeoning and piercing damage (assuming a Medium character). \n\nA warforged monk who uses a battlefist deals increased unarmed damage as though the character were one size larger than actual, and he can add the battlefist’s enhancement bonus to his unarmed attack and damage rolls." compset="Weapon" holdable="no">
<fieldval field="gSizeCost" value="300"/>
<fieldval field="gWeight" value="6"/>
<tag group="EquipType" tag="Metal"/>
<tag group="wMain" tag="1d3_3"/>
<tag group="wProfReq" tag="Simple"/>
<tag group="wCritMin" tag="20"/>
<tag group="wCritMult" tag="2"/>
<tag group="wClass" tag="Light"/>
<tag group="wFtrGroup" tag="Natural"/>
<tag group="wCategory" tag="Unarmed"/>
<tag group="wType" tag="B"/>
<tag group="wType" tag="P"/>
<tag group="Helper" tag="GearNoSize"/>
<tag group="Helper" tag="NoPathSoc"/>
<tag group="Helper" tag="NoSelect"/>
<tag group="Helper" tag="MagicOnly"/>
<gear><![CDATA[if (this.ispick <> 0) then
notify this.field[BonEnhance].value
else
notify "not a pick?"
endif]]></gear>
<eval phase="First" priority="10000">perform hero.child[wSlam].assign[Helper.DamageUp]
perform hero.child[wSlam].assign[Helper.DamageUp]</eval>
<exprreq message=""><![CDATA[#hasrace[rWarforged] <> 0]]></exprreq>
</thing>

Last edited by Adam.Ormond; May 7th, 2011 at 04:59 AM.
Adam.Ormond is offline   #16 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old May 7th, 2011, 07:18 AM
No - detecting and changing values happens in an Eval Script.

The gear script can only affect the weight of gear - it's used for bags of holding.

http://hlkitwiki.wolflair.com/index.php5/Gear_Script
Mathias is offline   #17 Reply With Quote
Adam.Ormond
Senior Member
 
Join Date: May 2010
Location: Maryland
Posts: 167

Old May 7th, 2011, 07:40 AM
Ah, I see. Well I tried that same if/then statement in every Phase of the Eval Scripts, and it always reports "0". I see in the wiki's Eval Scripts example that it uses a field "wpBonus", but that doesn't appear to exist for my pick -- maybe that's a d20 specific field? Am I supposed to use something other than BonEnhance?

I tried using wAttack and wBonus, and those also report 0, regardless of my Phase. Accessing gWeight does appear to work correctly.

Last edited by Adam.Ormond; May 7th, 2011 at 07:59 AM.
Adam.Ormond is offline   #18 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old May 7th, 2011, 08:03 AM
The part of the manual you're using is for all of the games in Hero Lab, and its examples tend to draw from Savage Worlds more than any other.

Each of the game systems has a game-specific editor manual -to get to it, in the editor, select the help menu, and choose the first option - "Help on Using the Editor". That may be more helpful for you.

Last edited by Mathias; May 7th, 2011 at 08:30 AM.
Mathias is offline   #19 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old May 7th, 2011, 08:10 AM
You're running into problems with having a weapon on the Custom/Magic Weapon form right now, I think. Take a look at other weapons that need to use Eval Scripts to modify their behaviors - the Sawtooth Sabre, the Meteor Hammer, brass knuckles, lance, or the aldori dueling sword.

There's some special handling you need to use for a weapon that's added to the Custom/Magic Weapon form to properly apply its effects to the custom/magic weapon.

Last edited by Mathias; May 7th, 2011 at 08:31 AM.
Mathias is offline   #20 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:43 AM.


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