Member
Join Date: May 2012
Location: Reading, UK
Posts: 79
|
I'd love to see that as I still can't get either option working. Have PM'd you about the file
Working on: Official Achtung! Cthulhu datafiles |
#11 |
Member
Join Date: May 2012
Location: Reading, UK
Posts: 79
|
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 |
#12 |
Senior Member
Join Date: Jun 2010
Location: Florida
Posts: 242
|
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> 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> |
#13 |
|
|