Lone Wolf Development Forums  

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

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,458

Old January 27th, 2016, 11:48 AM
OK, three things. With the trackers I'm working with, the maximum value is based on the value of related attributes. So there's a "Might" attribute and a "Might" tracker. The value of the Might attribute is supposed to be the maximum value for the Might pool.

The Might attribute starts at 0 until someone picks a Type (analogous to a class or a profession or a template).

So, Might is 0. Pick a template, then Might gets a proper value.

The max for Might Pool is derived from Might.

Now, if I use literal values in both the creation script and the Might Pool thing, it all works. When I go to the In-Play tab, I see "5/20". Which perfectly met my expectations.
Code:
------ components.core excerpt------
.
.
.
      <creation><![CDATA[
        if (tagis[Helper.ResetMax] <> 0) then
          ~field[trkUser].value = field[trkMax].value
          field[trkUser].value = 5
          endif
      ]]></creation>
    </component>
------ end components.core ------

--------- thing_miscellaneous.dat excerpt ---------
  <thing
    id="trkMight"
    name="Might Pool"
    compset="Tracker">

    <!-- Automatically add the tracker to every actor -->
    <tag group="Helper" tag="Bootstrap"/>

    <!-- Resetting the tracker sets the value to the maximum -->
    <tag group="Helper" tag="ResetMax"/>

    <!-- Use the starting power points as our initial maximum -->
    <eval index="1" phase="Final" priority="1000"><![CDATA[
      field[trkMin].value = 0
      ~field[trkMax].value = #trait[attrMight]
      field[trkMax].value = 20
      ]]></eval>
      
    </thing>
--------- end excerpt ---------
If I then leave the literal value in the Pool, but change the creation script to abide by the Max value, then when I go to the In-Play tab, I will see 0/20.

Code:
------ components.core excerpt------
.
.
.
      <creation><![CDATA[
        if (tagis[Helper.ResetMax] <> 0) then
          field[trkUser].value = field[trkMax].value
          ~field[trkUser].value = 5
          endif
      ]]></creation>
    </component>
------ end components.core ------

--------- thing_miscellaneous.dat excerpt ---------
  <thing
    id="trkMight"
    name="Might Pool"
    compset="Tracker">

    <!-- Automatically add the tracker to every actor -->
    <tag group="Helper" tag="Bootstrap"/>

    <!-- Resetting the tracker sets the value to the maximum -->
    <tag group="Helper" tag="ResetMax"/>

    <!-- Use the starting power points as our initial maximum -->
    <eval index="1" phase="Final" priority="1000"><![CDATA[
      field[trkMin].value = 0
      ~field[trkMax].value = #trait[attrMight]
      field[trkMax].value = 20
      ]]></eval>
      
    </thing>
--------- end excerpt ---------
This part confuses me. At first, I thought, "Maybe it's not working because the max value is 0 at creation, and it can't surpass that." But this seems to falsify that hypothesis, because the max value is still a literal value of 20.

So, something is happening that I don't understand.
EightBitz is offline   #11 Reply With Quote
 


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:32 PM.


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