-
Notifications
You must be signed in to change notification settings - Fork 0
RECITE
The RECITE command is a way to itemize lists in a way that makes them readable. For example, consider a list called food:
food
pizza
apple
spaghetti
Applying the RECITE command to the list called food
would result in: "pizza, apple and spaghetti". This is ideal when you're looking to list out a character's inventory, or list the names of a group of characters. The RECITE command can be applied to lists as long as desired. If there are only 2 items in the original list, the output in our example above would be "apple and spaghetti". If only one item is present in the original list, the output in the example above would be "spaghetti".
Note that although I've written the output to look like a string literal, it's really stored as a single-item list and can subsequently be used the same way as any other list variable.
Note: RECITE produces a list that contains unique items only. Duplicates are discarded to ensure there is only one of each item in the final list. This is because in most types of generative fiction, duplicates in a recited list would look odd to the reader.
The syntax of a RECITE command is:
RECITE newlistnames = originallist + string(optional) + all(optional)
where newlistname is the name of the new single-item list that is to be produced by the RECITE command. originallist is the list that has the items to be recited. The optional string is a string literal in quotes whose content is automatically prepended to each word. This is used when desiring to say for example "the pen, the clipboard, the plum and the desk". In that case, string would be "the ". The optional '+ all' (without quotes) is a clarification for if originallist is inside a gen and the user desires to recite across all items in a gen. The default without '+ all' is the current gen only.
The most common use case for + all is when listing character names in a group, or listing inventory that the entire group has as a whole.
As with most assignment statements in YeetWords, multiple variables may be on the left hand side of the equals sign to indicate they all get the recited list.
RECITE groupnames = character.name + all
RECITE someonesfriends = character.friends
RECITE trees = localtrees
RECITE groupinventory = character.carrying + "a " + all
ASSIGNLIST, ASSIGNGEN, GEN
For a hierarchical directory, see the homepage for this Wiki