Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit

Notices

Reply
 
Thread Tools Display Modes
RayPrancer
Member
 
Join Date: Jun 2007
Location: United Kingdom
Posts: 80

Old May 23rd, 2010, 02:28 AM
Okay, I've found the main hitpoint script in thing_traits.dat (the block beginning id=trHealth). Fudge by default has it as 9+Damage Capacity Attribute. As I think I mentioned before, I've downgraded Damage Capacity to a skill.

What I need the health trait to actaully calculate is 9+Damage Capacity+Armour Class (the setting uses British English spellings) - so is this a safe script to change the current calculate script to (assuming trDefense and skDamCap are valid ids)?

<script>
<!-- Calculate the Health trait as appropriate -->
<eval value="1" phase="Traits" priority="4000">
<before name="Derived trtFinal"/>
<after name="Calc trtFinal"/><![CDATA[
field[trtBonus].value = field[trt.Final].value+linkage[trDefense]+linkage[skDamCap]
]]></eval>
</thing>
</script>
RayPrancer is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 12,806

Old May 24th, 2010, 09:55 AM
The linkage[] transition only works if you have established a linkage in the component (traits.str). Also, when using it, you use the name you established for the linkage, rather than the Id of the pick you want to target.

Also, your script has "field[trt.Final].value" - the compiler will not know what to do with the "." inside of trtFinal.

Adding the trtFinal of trDefense and skDamCap to the current thing can be done with:

Code:
 
field[trtBonus].value += hero.childfound[trDamage].field[trtFinal].value + hero.childfound[skDamCap].field[trtFinal].value
You can use macros to reduce the amount you have to type for that last statement:

Code:
 
field[trtBonus].value += #trait[trDamage] + #trait[skDamCap]
To get the starting value of 9, add the following earlier in the trait definition:

Code:
 
<fieldval field="trtBonus" value="9"/>
Here's the whole health trait, incorporating my suggestions:

Code:
 
  <thing
    id="trHealth"
    name="Health"
    compset="Trait"
    isunique="yes"
    description="Description goes here">
    <fieldval field="trtAbbrev" value="Hlth"/>
    <fieldval field="trtBonus" value="9"/>
    <tag group="explicit" tag="1"/>
    <tag group="User" tag="Power"/>
    <!-- Calculate the Health trait as appropriate -->
    <eval value="1" phase="Traits" priority="4000">
      <before name="Derived trtFinal"/>
      <after name="Calc trtFinal"/><![CDATA[
      field[trtBonus].value += #trait[trDamage] + #trait[skDamCap]
      ]]></eval>
    </thing>
Mathias is offline   #2 Reply With Quote
Reply

Thread Tools
Display Modes

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 07:37 AM.


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