Hookleft.pngChapter 17: UnderstandingHookup.pngHookright.png

ยง17.4. Standard tokens of grammar

We have already seen "[something]" and "[someone]", which are standard examples of "tokens of grammar" - patterns matched by suitable named things. There are several other standard tokens, provided not so much from necessity but to allow the game parser to be more graceful and responsive. "[someone]" matches the same possibilities as "[a person]" would, but the parser handles it a little better in cases of failure. These special tokens are best explained by looking at some of the examples in the standard grammar, which can be browsed in the Index of any game.

Understand "wear [something preferably held]" as wearing.

Here we expect that the named item will be one that is held by the player, and the parser will use this to resolve ambiguities between names of things carried and not carried. (If the action is one which positively requires that its noun be something carried, such as "eating", then a command matching this token against something not carried will generate an automatic attempt to take it.)

Understand "take [things]" as taking.
Understand "drop [things preferably held]" as dropping.

"[things]" is like "[something]" but allows a list of items, or a vague plural like "all", to be typed. The result will be a sequence of actions, one for each item thus described. "[things preferably held]" is the analogous token for "[something preferably held]".

Understand "take [things inside] from [something]" as removing.

"[things inside]" matches only what is inside the second-named thing, and ensures that (for instance) the command "take all from box" does not also try to take the box.

Understand "put [other things] in/inside/into [something]" as inserting it into.

Similarly, "[other things]" will allow anything except the second-named thing. (Like "[things inside]" it is really only needed for handling containers.)


*ExampleShawn's Bad Day
Allowing the player to EXAMINE ALL.

***ExampleThe Left Hand of Autumn
The possibility of using a [things] token opens up some interesting complications, because we may want actions on multiple items to be reported differently from actions on just one. Here we look at how to make a multiple examination command that describes groups in special ways.


PreviousContentsNext