I am using data dictionaries to generate details for randomly generated stuff (in this case towns) for tabletop gaming.
I found that using either alpha or numeric calls work for dictionaries filled with a mix of alpha and numeric: {{Datadictionary Name##AlphaOrNumericIndex}}, yay!
However, the $transclude calls do not work for both alpha and numeric, just numeric.
Does anyone know if I am calling this correctly?
TW5 version: 5.1.17
Data DictionaryReturns numerically indexed values depending on which alphanumeric it is sent:
type: application/x-tiddler-dictionary
name: Available List
Hamlet: <$wikify name=randy text=<<RollDice num_dice: '1' dice_size: '2' dice_add:'0'>> ><$transclude $name="Available List" index=<<randy>>/></$wikify>
Village: <$wikify name=randy text=<<RollDice num_dice: '1' dice_size: '3' dice_add:'0'>> ><$transclude $name="Available List" index=<<randy>>/></$wikify>
1: CCC
2: DDD
3: EEE
Trials
- {{Available List##Hamlet}}: Returns CCC or DDD as expected
- {{Available List##1}}: Returns CCC as expected
- <$transclude tiddler="Available List" index=1/> : Returns CCC as expected
- <$transclude tiddler="Available List" index="Hamlet"/>: Nothing returns, expect one of 4 or 5 to act like #1
- <$transclude tiddler="Available List" index=Hamlet/>: Nothing returns
- <$transclude tiddler="Available List" index=$(A)$/> & <$transclude tiddler="Available List" index=$A$/>: Nothing return, did not expect them to.
Longer explanation on why I am using transclude:
Each data dictionary has 1 to n values, often a hundred or more.
In a "generator" tiddler I define the size of a town, and it is used repeatedly in the tiddler to grab details.
Often there is a great deal of overlap, and instead of making a ton of lists, one of each list for every flavor of town size, I used shared lists and roll on them appropriately.
\define TownSize() Hamlet
Detail 1: <$transclude tiddler="X Available" index=<<TownSize>> />
Detail 2: <$transclude tiddler="Y Available" index=<<TownSize>> />
Detail 3: <$transclude tiddler="Available List" index=<<TownSize>> />