~hokiegeek/tw5-thousand-year-old-vampire-rpg

ref: 3ad3626b275878d7a22a0e3688920a25c6cbe279 tw5-thousand-year-old-vampire-rpg/view-vampire.tid -rw-r--r-- 4.5 KiB
3ad3626bHokieGeek Added diary to memories section 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
modified: 20220208230338000
created: 20220206140147000
title: $:/plugins/hokiegeek/thousand-year-old-vampire-rpg/views/vampire
tags: $:/tags/ViewTemplate ThousandYearOldVampire
type: text/vnd.tiddlywiki

<!--
- Memories
  * Max 5 memories
  * One memory is 1-3 Experiences
  * Can be moved to current Diary
  * Can be forgotten (but must still be readable)
- Skills
  * Can be 'checked' (used)
  * Can be lost
- Resources
  * Can be lost but recovered
  * Can be used
  * Can be 'stationary'
  * Diary
    > Needs short description
    > 1 at a time
    > Contains memories
    > Max 4 memories
- Characters
  * Mortal or immortal
  * Mortals can become immortal
- Marks
  * Can't be lost?

> Striking traits out with a line
> Identify starting traits
> Vampire name is part of their first Experience
-->

\whitespace trim
\define traitHeader(heading, trait, limit:99999)
<div class="header-button">
    <h1>$heading$</h1>
    <$set name="num" filter="[tag[ThousandYearOldVampire]tag[$trait$]tag{!!title}count[]]">
    <$reveal type="lt" default=<<num>> text=$limit$>
    <$button tooltip="New $trait$" aria-label="New $trait$" class=<<tv-config-toolbar-class>>>
        <$let tags={{{ [{!!title}][[$trait$]][[ThousandYearOldVampire]] +[join[ ]] }}}
              count={{{ [tag{!!title}tag[$trait$]count[]] }}}
              title={{{ [{!!title}addsuffix[-$trait$]addsuffix<count>] }}}
              caption={{{ [<count>addprefix[$trait$]] }}}>
        <$action-sendmessage $message="tm-new-tiddler" title=<<title>> caption=<<caption>> tags=<<tags>> $trait$-num=<<count>> prompt="c0.0" />
              <!--
        <$action-createtiddler $basetitle=<<title>> tags=<<tags>> caption=<<caption>> $trait$-num=<<count>> />
        -->
        </$let>
        {{$:/core/images/new-button}}
    </$button>
    </$reveal>
    </$set>
</div>
\end

<$list filter="[all[current]is[tiddler]!is[system]tag[ThousandYearOldVampire]tag[vampire]]">
<div class="header-button">
    <h1>Memories</h1>
    <$let numRemembered={{{ [tag[ThousandYearOldVampire]tag{!!title}tag[memory]!tag[forgotten]] -[tag[ThousandYearOldVampire]tag{!!title}tag[resource]tag[diary]tagging[]] +[count[]] }}}>
    <$reveal type="lt" default=<<numRemembered>> text="5">
    <$button tooltip="New memory" aria-label="New memory" class=<<tv-config-toolbar-class>>>
        <$let tags={{{ [{!!title}][[memory]][[ThousandYearOldVampire]] +[join[ ]] }}}
              count={{{ [tag{!!title}tag[memory]count[]] }}}
              title={{{ [{!!title}addsuffix[-memory]addsuffix<count>] }}}
              caption={{{ [<count>addprefix[memory]] }}}>
        <$action-createtiddler $basetitle=<<title>> tags=<<tags>> caption=<<caption>> memory-num=<<count>> />
        </$let>
        {{$:/core/images/new-button}}
    </$button>
    </$reveal>
    </$let>
</div>
<$let diary={{{ [tag[ThousandYearOldVampire]tag<currentTiddler>tag[resource]tag[diary]!tag[lost]] }}}
      tabstate={{{ [<title>prefix[$:/state/thousand-year-old-vampire/tabs/memories/]] }}}>
<$reveal type="match" default=<<diary>> text="">
<$macrocall $name="tabs" tabsList="$:/plugins/hokiegeek/thousand-year-old-vampire/templates/memories/current $:/plugins/hokiegeek/thousand-year-old-vampire/templates/memories/forgotten" default="$:/plugins/hokiegeek/thousand-year-old-vampire/templates/memories/current" state=<<tabstate>> />
</$reveal>
<$reveal type="nomatch" default=<<diary>> text="">
<$macrocall $name="tabs" tabsList="$:/plugins/hokiegeek/thousand-year-old-vampire/templates/memories/current $:/plugins/hokiegeek/thousand-year-old-vampire/templates/memories/diary $:/plugins/hokiegeek/thousand-year-old-vampire/templates/memories/forgotten" default="$:/plugins/hokiegeek/thousand-year-old-vampire/templates/memories/current" state=<<tabstate>> />
</$reveal>
</$let>
<$set name="tabstate" filter="[<title>prefix[$:/state/thousand-year-old-vampire/tabs/memories/]]">
</$set>

<<traitHeader "Skills" "skill">>
<<list-links filter:"[tag[ThousandYearOldVampire]tag[skill]tag{!!title}]" emptyMessage:"none yet">>

<<traitHeader "Resources" "resource">>
<<list-links filter:"[tag[ThousandYearOldVampire]tag[resource]tag{!!title}]" emptyMessage:"none yet">>

<<traitHeader "Characters" "character">>
<<list-links filter:"[tag[ThousandYearOldVampire]tag[character]tag{!!title}]" emptyMessage:"none yet">>

<<traitHeader "Marks" "mark">>
<$list filter="[tag[ThousandYearOldVampire]tag[mark]tag{!!title}]" emptyMessage="none yet">
<$transclude tiddler="$:/plugins/hokiegeek/thousand-year-old-vampire/template/marks/mark" mode="block" />
</$list>

</$list>