Senior Member
Join Date: Jan 2009
Location: Austin, TX
Posts: 140
|
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"> <!--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> |
#1 |
Senior Member
Join Date: Jan 2009
Location: Austin, TX
Posts: 140
|
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> |
#2 |
|
|