Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Kairos
Senior Member
Volunteer Data File Author
 
Join Date: Feb 2009
Posts: 173

Old January 31st, 2014, 07:15 AM
What page are you using as a model? Try:

Code:
<eval value="1" phase="Traits" priority="4000">
      <before name="Derived trtFinal"/>
      <after name="Calc trtFinal"/><![CDATA[
         field[trtBonus].value += #trait[attrDef] - 3
	 if (field[trtFinal].value <= -1) then
            field[trtFinal].value = 0
         endif
      ]]></eval>
The before and after elements indicate that the eval script should be timed between the Calc trtFinal script and the Derived trtFinal script. These elements shouldn't be enclosed in a CDATA, just your code.
Kairos is offline   #11 Reply With Quote
FourCartridge
Junior Member
 
Join Date: May 2012
Posts: 7

Old January 31st, 2014, 10:09 AM
I'm using this as the example:

http://hlkitwiki.wolflair.com/index....Traits_(Savage)

And that doesn't work either. It just ignores the if statement like it wasn't there.
FourCartridge is offline   #12 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old January 31st, 2014, 10:23 AM
FourCartridge, please show us the code you're written (the updated version, after you removed the extra <![CDATA[ ), so we can help you debug it.
Mathias is offline   #13 Reply With Quote
FourCartridge
Junior Member
 
Join Date: May 2012
Posts: 7

Old January 31st, 2014, 11:26 AM
Here you go.

Code:
<thing
    id="trDefense"
    name="Armor"
    compset="Trait"
    isunique="yes"
    description="Description goes here">
    <fieldval field="trtAbbrev" value="Def"/>
    <tag group="explicit" tag="3"/>
    <tag group="User" tag="Combat"/>
    <tag group="DashTacCon" tag="Combat"/>

    <eval value="1" phase="Traits" priority="4000">
      <before name="Derived trtFinal"/>
      <after name="Calc trtFinal"/><![CDATA[
         field[trtBonus].value += #trait[attrDef] - 3
	 if (field[trtFinal].value <= -1) then
            field[trtFinal].value = 0
         endif
      ]]></eval>
    </thing>
FourCartridge is offline   #14 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old January 31st, 2014, 12:07 PM
Look in traits.str, at the Derived component's script named "Derived trtFinal". That script comes after this one, right? So, think about how they'll interact. What will happen to the trtFinal you're setting in this script when "Derived trtFinal" runs?
Mathias is offline   #15 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 06:10 AM.


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