View Single Post
Endtransmission
Member
 
Join Date: May 2012
Location: Reading, UK
Posts: 79

Old December 28th, 2013, 12:19 AM
Oh! Oh! Nearly there on getting a tracker working.

My problem with the tracker before was trying to assume that it went into it's own compset, which you can't seem to create within the .user file (unless I've missed something?). Using the existing Bennies one seems to have given me a working Tracker on the In Play tab whenever I create a new character and it is updating the new trait trACDmnt with #trkmax[trkDmnt]. My last issue is trying to identify what I need to call to get the current value of the tracker. Any ideas?

Code:
  <thing
  id="trkDmnt"
  name="Dementia"
  compset="Bennies"
  description="Modify the character's Dementia level"
  >
  <fieldval field="trkMin" value="0"/>
  <fieldval field="trkMax" value="20"/>
  <tag group="Helper" tag="Bootstrap"/>
  <eval index="1" phase="PreTraits" priority="5000"><![CDATA[
      var Dmnt as number
      Dmnt = #trkmax[trkDmnt]
      perform #traitadjust[trACDmnt,+,Dmnt,"Increased dementia"]
    ]]>
  </eval>      
  </thing>

Working on: Official Achtung! Cthulhu datafiles
Endtransmission is offline   #12 Reply With Quote