I have done a lot of similar database-ish uses of tiddlywiki and here is my 
advice based on that:

1) Make lots of tiddlers. The data for each character can (and probably 
should) be its own tiddler. So if each character has a description, name, 
home and occupation than you make one tiddler per character like this (I 
would use fields instead of the json tiddlers because they are easier to 
work with in the rest of tiddlywiki):

tiddler title:
$:/data/Characters/Samewise Gamgee

tiddler fields:

description: Samwise Gamgee is a Hobbit who is in love Rosie.
name: Samwise Gamgee
home: Hobbiton
occupation: Gardner

Then to display the information you make a template tiddler like this, I am 
going to assume you make the tiddler title OMGACHARACTER because I want to:

!Name: {{!!name}}


!! Description
{{!!description}}

!! Stats
Name: {{!!name}}
Home: {{!!home}}
Occupation: {{!!occupation}}

and to display it you put this inside a tiddler:

{{$:/data/Characters/Samwise Gamgee||OMGACHARACTER}}

than it will display the template using the data for Samwise Gamgee.

Then to make life easier you can make some macros like this in a tiddler 
you tag with $:/tags/Macro:

\define DisplayCharacter(Character)
{{$:/data/Characters/$Character$||OMGACHARACTER}}
\end

\define DisplayCharacterStat(Character, Stat)
<$view tiddler="""$:/data/Characters/$Character$""" field=$Stat$/>
\end

To display a chracatres stat block use the `DisplayCharacter` macro

Usage: `<<DisplayCharacter "Samwise Gamgee">>`

Result:

<<DisplayCharacter "Samwise Gamgee">>

To display a specific stat for a character use the `DisplayCharacterStat` 
macro

Usage: `<<DisplayCharacterStat "Samwise Gamgee" "home">>`

<<DisplayCharacterStat "Samwise Gamgee" "home">>


and then to make life easier you can make a form that lets you input data 
for a character and it will automatically generate the character data 
tiddlers for you.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/2fa76284-a9a6-499e-916e-1d9e1b65084b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to