![]() | Chapter 17: Activities | ![]() ![]() |
17.10. Printing the name of something |
1. When it happens. Whenever the name of a thing or room is printed.
2. The default behaviour. Its "printed name" property is printed out.
3. Examples. (a) A pen which is described differently in inventories:
Rule for printing the name of the pen while taking inventory: say "useful pen".
"Taking inventory" is a condition which is true if that's the current action and not otherwise, so the effect is that the pen is called "a useful pen" only in inventory listings. "While looking" is a similarly useful one.
(b) Italicising the names of novels:
A novel is a kind of thing. Dr Zhivago and Persuasion are novels. Before printing the name of a novel, say "[italic type]". After printing the name of a novel, say "[roman type]".
(c) Telling the time:
After printing the name of the wrist watch while taking inventory: say " (time: [the time of day])".
(d) Merging containers with their contents:
Rule for printing the name of the bottle while not inserting or removing:
if the bottle contains sand, say "bottle of sand";
otherwise say "empty bottle";
omit contents in listing.
The special phrase "omit contents in listing" means that any inventory list, room description, etc., will simply list "a bottle of sand" or "an empty bottle", rather than "a bottle (in which is sand)" or "a bottle (which is empty)". The clause about not inserting or removing is to prevent messages like "You put the sand in the bottle of sand.", where it's confusing to refer to the bottle as anything other than "the bottle".
| ![]() A box of baking soda whose name changes to "completely ineffective baking soda" when it is in a container with something that smells funny. |
|
| ![]() ![]() Bottles with removable stoppers: when the stopper is in the bottle, the bottle is functionally closed, but the stopper can also be removed and used elsewhere. Descriptions of the bottle reflect its state intelligently. |
|
| ![]() ![]() ![]() ![]() Using name-printing rules to keep track of whether the player knows about objects, and also to highlight things he might want to follow up. |
|
Previous | Contents | Next |