• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Skeleton Files: Traits.str How does "Attribute" incoperate "Trait"?

Mettius

Well-known member
Skeleton Files: Traits.str How does "Attribute" incoperate "Trait"?

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"
 
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>
 
Back
Top