List Controller
version 3 by Eric Eve
Documentation
- Chapter: Overview
- Chapter: Detail
- Section: Random Responses
- Section: Phrase options: with newlines, with run on, with paragraph break
- Section: Stopping, cyclic and shuffled list controllers
- Section: Event lists
- Section: Alternative table structures
- Example: * Magic Jumping - Mixing Events and responses in a list controller table
- Example: * Family Reunion - Using Tables to give successions of responses to questions and NPC fidgets
Chapter: Overview
List Controller provides much the same functionality as the older List Control extension (with some enhancements), but does away with the need to define a Table of Table Types. Instead, you need to define a number of list controller objects, but some authors may find this slightly less messy.
First, the story in brief: List Controller provides three ways of traversing a list contained in a table: stopping, cyclic, or shuffled. To define which type applies to a given table, we define a corresponding list controller and associate a Table with it:
my list is a stopping list controller.
the associated list is the Table of My Stuff.
Table of My Stuff
| response | |
| "Boo!" | |
| "Whee" | |
| "Foo!" | |
| "Bar!" |
To display the next response entry from such a table, we use the phrase:
show the next response from my list.
We can also use 'in' or 'of' instead of 'from' (to allow for whichever phrasing seems most natural without having to remember which is the only correct one).
If we want to use a table other than one with a single column called 'response' containing text, we can instead obtain the next row number in our chosen sequence with the value: