Lone Wolf Development Forums  

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

Notices

Reply
 
Thread Tools Display Modes
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,502

Old September 11th, 2017, 05:04 PM
So, I have an eval rule for calculating health that works for all but two races, adding a base value to their Endurance skill rank. Those two races, one uses a different formula based on the same variables, and the other works entirely different. The last case, A.I. characters, is a future endeavour anyhow, but I suspect people will want to do the amorphs. What's the best way to override the value? Just add an Eval script that overwrites the value?

Code:
<component
    id="Race"
    name="Race"
    autocompset="no">

    <!-- Base Health value -->
    <field
      id="baseHealth"
      name="Base Health"
      type="static">
      </field>
    
<!-- .... -->
    
    <!-- Determine base health -->
    <eval index="2" phase="Traits" priority="4001"><![CDATA[
      #traitbonus[trHealth] = field[baseHealth].value + #trait[skEndure]
    ]]></eval>

    </component>
The amorph uses a slightly different formula of "2 + Endurance * 2". Currently, it has its own Eval script to recalculate health, but that seemed a bit clumsy.
Duggan is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old September 12th, 2017, 01:33 AM
The answer varies depending on how many different things make the same change - is it just the one thing that can suppress the thing, or many different things? Same for the variant - how often will that be used?

There's quicky solutions, like just adding a tag to the hero to denote some other state, and look for that, or there's more complex solutions, like storing different values in different fields, and modifying those values depending on what's needed. Or depending on the circumstances, setting up proper handling for ability activation/deactivation may be what's needed.
Mathias is offline   #2 Reply With Quote
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,502

Old September 12th, 2017, 02:27 AM
{nods} In this case, there's literally two in the main sourcebook that don't follow the usual rule. I think I should be OK with just adding a second calculation with a note in the comments for anyone else doing the same.
Duggan is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old September 12th, 2017, 08:38 AM
In that case, I'd just use if...else, based around tags that are assigned, either to the hero context, or to the pick that will be running this script.
Mathias is offline   #4 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 01:56 AM.


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