-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReferenceDialog.html
More file actions
283 lines (283 loc) · 8.09 KB
/
ReferenceDialog.html
File metadata and controls
283 lines (283 loc) · 8.09 KB
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://ssl.gstatic.com/docs/script/css/add-ons1.css">
<?!= include('Stylesheet'); ?>
</head>
<body>
<div>
Text Randomizer converts a spreadsheet into a customizable random text generator.
<br>
<br>
There are four main tools for generating random text: making a <b>random selection</b>, generating a <b>random number</b>, making a <b>one-time selection</b>,
and assigning random results to a <b>variable</b>. Each utilizes curly braces <b>{ }</b> (note that curly braces <b>{ }</b> should never be placed inside another set of curly braces.)
<br>
<br>
Any number of sheets may be used, but two special sheet names are reserved - <b>Endpoints</b> and <b>Names</b>. These are discussed below.
<br>
<br>
<hr>
<br>
Use column headers to define a label for a <b>random selection</b> of possible options. Labels should be written without spaces. For example: "rare_gem"
<br>
Use the rows beneath a given label to define the possible options for that label:
<br>
<br>
<table>
<tr>
<th><b>rare_gem</b></th>
</tr>
<tr>
<td>diamond</td>
</tr>
<tr>
<td>ruby</td>
</tr>
<tr>
<td>black opal</td>
</tr>
<tr>
<td>sapphire</td>
</tr>
<tr>
<td>moonstone</td>
</tr>
</table>
<br>
Once a <b>random selection</b> has been defined, it can be used in other options by surrounding the label with curly braces <b>{ }</b>
<br>
<br>
<table>
<tr>
<th>rare_gem</th>
<th>treasure</th>
</tr>
<tr>
<td>diamond</td>
<td>a magic ring</td>
</tr>
<tr>
<td>ruby</td>
<td>a sparkling <b>{rare_gem}</b></td>
</tr>
<tr>
<td>black opal</td>
<td></td>
</tr>
<tr>
<td>sapphire</td>
<td></td>
</tr>
<tr>
<td>moonstone</td>
<td></td>
</tr>
</table>
<br>
Use a pound <b>#</b> character to generate a <b>random number</b>. The minimum and maximum possible values are separated by a dash <b>-</b> .
Note that negative numbers cannot be generated (as a workaround, simply place a "-" sign before the curly brackets).
<br>
<br>
<table>
<tr>
<th>rare_gem</th>
<th>treasure</th>
</tr>
<tr>
<td>diamond</td>
<td>a magic ring</td>
</tr>
<tr>
<td>ruby</td>
<td>a sparkling {rare_gem}</td>
</tr>
<tr>
<td>black opal</td>
<td><b>{#100-300}</b> silver coins</td>
</tr>
<tr>
<td>sapphire</td>
<td></td>
</tr>
<tr>
<td>moonstone</td>
<td></td>
</tr>
</table>
<br>
Define a <b>one-time selection</b> by placing a list of options inside square braces <b>[ ]</b> separated by vertical bars <b>|</b> .
This is useful for situations where defining a whole column of options would be overkill.
<br>
<br>
<table>
<tr>
<th>rare_gem</th>
<th>treasure</th>
</tr>
<tr>
<td>diamond</td>
<td>a magic ring</td>
</tr>
<tr>
<td>ruby</td>
<td>a sparkling {rare_gem}</td>
</tr>
<tr>
<td>black opal</td>
<td>{#100-300} <b>{[grubby copper|silver|gold]}</b> coins</td>
</tr>
<tr>
<td>sapphire</td>
<td></td>
</tr>
<tr>
<td>moonstone</td>
<td></td>
</tr>
</table>
<br>
Lastly, define a <b>variable</b> using the at <b>@</b> character. The first time a variable is used it must be assigned a value by following it with a colon <b>:</b>
and any of the generator options defined above - a <b>random selection</b> label, a <b>random number</b>, or a <b>one-time selection</b>. Then the randomly assigned value can be reused by referencing the variable name.
Variable names cannot have spaces.
<br>
<br>
<table>
<tr>
<th>rare_gem</th>
<th>treasure</th>
</tr>
<tr>
<td>diamond</td>
<td>a magic ring</td>
</tr>
<tr>
<td>ruby</td>
<td>a sparkling {rare_gem}</td>
</tr>
<tr>
<td>black opal</td>
<td>{#200-300} {[grubby copper|silver|gold]} coins</td>
</tr>
<tr>
<td>sapphire</td>
<td>a crown with a small <b>{@crown_gem:rare_gem}</b> on each point, and a huge <b>{@crown_gem}</b> in the center</td>
</tr>
<tr>
<td>moonstone</td>
<td></td>
</tr>
</table>
<br>
There are two special Sheets that Text Randomizer treats differently - <b>Endpoints</b> and <b>Names</b>.
<br>
<br>
<hr>
<br>
A sheet named <b>Endpoints</b> is required. It is where the top-level random generators are defined which will appear as buttons
in the Text Randomizer interface.
Using the example labels above, the following example endpoints might be defined:
<br>
<br>
<table>
<tr>
<th>Single Treasure</th>
<th>Treasure Hoard</th>
</tr>
<tr>
<td>{treasure}</td>
<td>{treasure}, </td>
</tr>
<tr>
<td></td>
<td>{treasure}, </td>
</tr>
<tr>
<td></td>
<td>and {treasure}</td>
</tr>
</table>
<br>
When the Text Randomizer interface is opened, two buttons will be present - a button for "Single Treasure", which generates a single random treasure, and a button for "Treasure Hoard", which generates three random treasures.
The <b>Endpoints</b> sheet has a couple of key usage differences:
<ol>
<li>The headers, which will determine the button names in the interface, can have spaces and punctuation.</li>
<li>Multiple rows are used to generate a multi-line result, not to provide multiple possible options.</li>
</ol>
<br>
<hr>
<br>
Inclusion of a sheet called <b>Names</b> is optional. Use the <b>Names</b> sheet to randomly generate new words or names.
As in a regular sheet, each column header defines a label that can be used in curly braces <b>{ }</b> to produce a randomized result.
However, the rows below the header consist of sample names that will be
used to generate new names, rather than a list of predefined options. For example:
<br>
<br>
<table>
<tr>
<th>sword_name</th>
<th>monster_name</th>
</tr>
<tr>
<td>excalibur</td>
<td>balrog</td>
</tr>
<tr>
<td>callandor</td>
<td>dracula</td>
</tr>
<tr>
<td>longclaw</td>
<td>godzilla</td>
</tr>
<tr>
<td>stormbringer</td>
<td>falkor</td>
</tr>
<tr>
<td>glamdring</td>
<td>modron</td>
</tr>
</table>
<br>
Labels defined in the <b>Names</b> sheet can be used just like other <b>random selection</b> labels.
<br>
<br>
<table>
<tr>
<th>rare_gem</th>
<th>treasure</th>
</tr>
<tr>
<td>diamond</td>
<td>a magic ring</td>
</tr>
<tr>
<td>ruby</td>
<td>a sparkling {rare_gem}</td>
</tr>
<tr>
<td>black opal</td>
<td>{#200-300} {[grubby copper|silver|gold]} coins</td>
</tr>
<tr>
<td>sapphire</td>
<td>a crown with a small {@crown_gem:rare_gem} on each point, and a huge {@crown_gem} in the center</td>
</tr>
<tr>
<td>moonstone</td>
<td>the fabled sword <b>{sword_name}</b></td>
</tr>
</table>
<br>
Be aware that name generator results are dependent on the quality and quantity of sample names provided.
A minimum of 30 sample names is suggested, and 100 or more are recommended for best results.
If too few samples are provided, it is possible that the generator may produce results identical to the samples names.
<br>
<br>
<hr>
<br>
Select <b>Load examples</b> from the Text Randomizer menu to see these examples in action.
<br>
</div>
</body>
</html>