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 Dictionary*
Returns 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*


   1. {{Available List##Hamlet}}: Returns CCC or DDD as expected
   2. {{Available List##1}}: Returns CCC as expected
   3. <$transclude tiddler="Available List" index=1/> : Returns CCC as 
   expected
   4. <$transclude tiddler="Available List" index="Hamlet"/>: Nothing 
   returns, expect one of 4 or 5 to act like #1
   5. <$transclude tiddler="Available List" index=Hamlet/>: Nothing returns
   6. <$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>> />


-- 
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/2cf079e8-a04d-41a5-b0b6-badf8299bffa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to