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
Mettius
Senior Member
 
Join Date: Jan 2009
Location: Austin, TX
Posts: 140

Old February 19th, 2017, 11:12 AM
In regards to the skeleton sample game system files:

The code comments (and wiki) imply that "Attributes" (below) as well as "Skills" would inherit the elements of the "Trait" component. What is the mechanism for this inheritance?

In traits.str:
Code:
 <!-- Trait component
        All traits derive from this component and share these mechanisms in common
  -->
  <component
    id="Trait"
    name="Trait"
    autocompset="no"
    hasshortname="yes"
    ispublic="no">
Attribute section follows, same file.
<!--note ...I cut out the rest of the code from this post for brevity). -->
Code:
<component
    id="Attribute"
    name="Attribute"
    autocompset="no">

    <eval index="1" phase="Initialize" priority="3000"><![CDATA[
      field[trtMinimum].value = 0
      field[trtMaximum].value = 12
      ]]></eval>

    <!-- Each attribute point above one that is allocated by the user costs 7 CP -->
    <eval index="2" phase="Traits" priority="10000">
      <before name="Calc resLeft"/>
      <after name="Bound trtUser"/><![CDATA[
      hero.child[resCP].field[resSpent].value += (field[trtUser].value - 1) * 7
      ]]></eval>

    </component>
Yet, how is this so? I don't see anything explicitly defining the component id "Attribute" as inheriting anything from the component id "Trait"
Mettius is offline   #1 Reply With Quote
Mettius
Senior Member
 
Join Date: Jan 2009
Location: Austin, TX
Posts: 140

Old February 19th, 2017, 11:19 AM
I can stare at things for hours and only after asking someone for help do I seem to finally (and almost instantly) see the answer hiding in plain sight...

So, it would appear that the answer to my question is the following bit of code: I guess what I was missing is that the "attributes" which end up on the character sheet is not the component "Attribute" but rather the Component Set (compset) "Attribute".

Code:
 <!-- Attribute - all attributes derive from this compset -->
  <compset
    id="Attribute"
    forceunique="yes">
    <compref component="Attribute"/>
    <compref component="Trait"/>
    <compref component="CanAdvance"/>
    </compset>
Mettius is offline   #2 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 07:39 AM.


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