Mooglegirl,

I think that the best data structure conceptually for what you are 
describing is a directed graph. Directed because you could have 'siblings' 
which is undirected but you could also have brother and sister which each 
only go one way between the pair.

In a more concrete sense you would make one tiddler for each node, in this 
case a node represents a character, and then other tiddlers define the 
edges of the graph, which represent the relationships.

As a bit of theory for tiddlywiki, one thing I have consistently struggled 
with in tiddlywiki is an incorrect idea of what complexity means in the 
context of tiddlywiki. Having hundreds of tiddlers isn't necessarily more 
complex than having 10 tiddlers that have a lot of internal structure. So I 
would go for something that uses many tiddlers and gives exactly what you 
want instead of something more compact that uses fewer tiddlers but is more 
complex.

An only slightly relevant example is the contacts database that I made a 
while ago, you can see an example here 
(http://inmysocks.tiddlyspot.com/#%24%3A%2Fplugins%2Finmysocks%2FDashboard%2FDashboard),
 
I have a dedicated demo site somewhere but I don't have the link handy.

Anyway, something with a similar structure to the contacts may be a 
reasonable way to organise your characters and make it reasonable to modify 
relations and add/remove characters. If I have time later today I will try 
to put an example together that may make more sense than the contacts 
structure.

On Thursday, February 6, 2020 at 4:57:41 AM UTC+1, Mooglegirl wrote:
>
> I have tiddlers for different characters in my story, and I want to define 
> a list of pair relationships with accompanying comments, and then generate 
> the relationships for a given character on the fly. For example, I might 
> have some hidden tiddler with something like:
>
> alice:bob (brother/sister)
> bob:carlos (friends)
> bob:darren (rivals)
> darren:alice (boyfriend/girlfriend)
>
> Then on Bob's character page, there would be an automatically generated 
> list that looks something like:
>
>    - Alice (brother/sister)
>    - Carlos (friends)
>    - Darren (rivals)
>
> How would I go about this?
>
> Edit: Figured it 
> out! https://groups.google.com/d/msg/tiddlywiki/wWQWW1roErI/Lg4dkuJ9BAAJ
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/cf1f9cbe-4199-4e63-b217-2a5bcee702f0%40googlegroups.com.

Reply via email to