• 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

Creating new tracker in data file?

Endtransmission

Well-known member
For a data file I'm working on I need to create a new tracker, similar to the Bennies one, to track the player's Dementia level. This is user controlled and will be going up and down throughout the gaming session.

I've had a look at the Bennies example in the wiki on the Tracking Resources page (http://hlkitwiki.wolflair.com/index.php5?title=Resources_(Savage)), but you can't seem to create new Components in data files? It's certainly erroring for me, saying that the term Component is unknown.

So, I've switched to looking at using the Permanent Adjustment system instead, but this has it's own issues. These Adjustments function perfectly when they are manually added, however, everyone in the setting needs this tracker to be added at creation time.

I have tried to bootstrap a permanent adjustment to the setting, unfortunately it doesn't appear on any of the tabs or panes so it cannot be used? I've added a fixed value to one of the attributes in the adjustment to make sure that it is being bootstrapped, which it is, but it just doesn't appear and I cannot see how to specifically target which portal it appears in.

The wiki seems to suggest that I can also use Autoadd (http://hlkitwiki.wolflair.com/index.php5?title=AutoAdd_Element_(Data)), which allows me to specify the Portal area... unfortunately this doesn't seem to be supported in Datafiles either?

So. Question for you all... how the heck do I get a tracker added to either the Personal or In-Play screens automatically when a character is created?
 
Create a mechanic as well as your tracker, and then on the Mechanic, press the bootstrap button in the top right, and add your tracker as a thing it bootstraps.

All mechanics are added to all characters, so the tracker will be added along with the mechanic.
 
Hmmm That has exactly the same issue as just bootstrapping the Adjustment to the setting... I can see the fake effect taking place, but the Increment counter doesn't appear on the Personal or In Play tabs?

Can I just check that I've got these right?

Code:
<thing 
    id="acChar" 
    name="mechACChar" 
    compset="Mechanics" 
    summary="Add Dementia to character" 
    uniqueness="unique">
    <usesource source="sepActCth"/>
    <bootstrap thing="adjACDmnt"></bootstrap>
</thing>

<thing
  id="adjACDmnt"
  name="Manage Dementia"
  compset="Adjustment"
  description="Modify the user's Dementia value..."
  uniqueness="useronce">
  
  <fieldval field="adjMinimum" value="0"/>
  <fieldval field="adjMaximum" value="10"/>
  <usesource source="sepActCth"/>
  <tag group="AdjustShow" tag="Increment"/>
  <tag group="Helper" tag="UserAdjust"/>
  <tag group="InPlay" tag="PermOK"/>
  <eval phase="PreTraits" priority="5000"><![CDATA[
      var ACDmnt as number
      var bonus as number
      ACDmnt = field[adjUser].value
      perform #traitadjust[trACDmnt,+,20,"Increased dementia"]      
      ]]>
      <before name="Calc trtFinal"/>
  </eval>     
</thing>

Ooooh wait. Sorry, you meant to bootstrap my earlier attempt at recreating the Bennies tracker?

Looking through the wiki and the SW data files, I can't see how to create a tracker within a setting data file? They all look to have their own Component and Compset? Something like:

Code:
<component
  id="cmpDmnt"
  name="Dementia"
  autocompset="no">
  <tag group="SpecialTab" tag="Dementia"/>
  <eval index="1" phase="Render" priority="5000"><![CDATA[
    field[spcName].text = "Dementia: (" & #trkmax[trkDmnt] & " )"
    ]]></eval>
 </component>
  
  <compset
  id="csetDmnt">
  <compref component="Tracker"/>
  <compref component="SpecialTab"/>
  <compref component="cmpDmnt"/>
  </compset>
  
  <thing
  id="trkDmnt"
  name="Dementia"
  compset="csetDmnt">
  <fieldval field="trkMin" value="0"/>
  <fieldval field="trkMax" value="3"/>
  <tag group="Helper" tag="Bootstrap"/>
  <tag group="Helper" tag="ResetMax"/>
  <tag group="Helper" tag="NoMaxBound"/>
  </thing>

If I have this in the .user file it errors claiming not to know what a component is?
 
Last edited:
You mentioned a "new tracker", so I assumed that you were having trouble getting that tracker onto the character. It looks like your code is bootstrapping an adjustment. Didn't you want it to bootstrap a tracker? (or bootstrap both?)
 
I've tried both. I want some way of tracking a number on the character sheets and don't particularly care which option gets used.

If I bootstrap an adjustment it gets bootstrapped to the character, but doesn't appear on any of the forms.

If I try to add a Tracker it fails to load the data file claiming that the term Component is unknown.

The Tracker would probably be my preference so it appears on the In Play tab along side the Bennies one
 
What about using a Trait? Setting it up just like Sanity, but just with a base value of 0? Although using a tracker is probably a bit nicer in look if you did have it set up rather like Bennies, but then again is it expected that Dementia will vary every game the same amount that Bennies or Wounds might?

I tend to put several Temporary Adjustment trackers on my In-Play tab for checkable conditions (like a -1 Parry with the note for Wild Attack so I can check it to remind myself if I used Wild Attack that round) and maybe having a way to automatically include something like that from within a data file would be helpful, too. That's probably another topic, though...
 
Dementia carries across from game to game, but varies a lot based upon situation.

For example when you encounter a nasty creature you have to make fear or terror tests and this can grant a number of Dementia points. Once your dementia equals or exceeds your Sanity, then you lose another sanity point. Some situations, such as sitting quietly for a few hours meditation, or some therapy or spells can reduce the Dementia levels again.

As we need to have a count of your Dementia level it felt neater to have a Tracker like the Bennies. It could (and was before I thought of the tracker/adjustment counter) be handled as wounds, but it didn't feel *nice*.

Plus it's now got to the point that I really want to see a tracker or permanent adjustment be bootstrapped otherwise it'll frustrate me no end ;)
 
I hear you there. Always good for all of us to understand what other options we've got available! And I agree, that does sound a lot more like a Tracker kind of thing, to be honest. Something that, like bennies, could vary quite a bit in any given game session.
 
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>
 
Better late than never

I came across this thread as I was trying to work on something similar for the Lankhmar: City of Thieves book I am working on. After looking over your code and beating it over the head I got all of this to work. So here is my version, you can replace with necessary wordage of course.

First the Derived Trait: Corruption

Code:
  <thing id="trLANCorr" name="Corruption" description="Measures how corrupt from Black Magic failures." compset="Trait" uniqueness="unique">
    <fieldval field="trtAbbrev" value="Cor"/>
    <fieldval field="trtBonus" value="0"/>
    <usesource source="Lankhmar"/>
    <tag group="DashTacCon" tag="Basics" name="Basics" abbrev="Basics"/>
    <tag group="DashTacCon" tag="Traits" name="Traits" abbrev="Traits"/>
    <tag group="explicit" tag="5" name="5"/>
    </thing>

And now the Tracker (just like the Benny's tracker):

Code:
  <thing id="trkCorr" name="Corruption" description="Measures how corrupt from Black Magic failures." compset="Tracker">
    <fieldval field="trkMin" value="0"/>
    <fieldval field="trkMax" value="6"/>
    <usesource source="Lankhmar"/>
    <tag group="Helper" tag="Bootstrap"/>
    <tag group="AdjustShow" tag="Increment"/>
    <tag group="AdjustShow" tag="Menu"/>
    <tag group="Helper" tag="UserAdjust"/>
	  <eval index="1" phase="Setup" priority="8000">
	    <before name="Calc trtFinal"/><![CDATA[
			var Dmnt as number
			Dmnt += field[trkUser].value
			perform #traitadjust[trLANCorr,+,Dmnt,"Corruption"]
		 ]]>
	  </eval>
    </thing>

There may be a few tags on the Tracker that are unnecessary so if they can be removed, hopefully someone posts that result :)
 
Back
Top