Chapter 6: Commands
6.2. Examining

By default, examining an object shows its description, and - for devices - tells us whether the object is switched on or switched off.

This kind of additional information is not always what we want, so if we have a device whose on/off status we want to conceal, we may write

The examine described devices rule is not listed in any rulebook.

On the other hand, there are times when we may want to add a similar line or two to the descriptions of other kinds of objects. Waxwork shows how to make containers and supporters automatically list everything they're holding when examined, while Crusoe allows us to append an "It is charred." sentence to the end of descriptions of things we have burned in the fire. Since it works by introducing a "printing the description" activity, Crusoe is also a good example to start from if we want to introduce more complex, flexible descriptions of items throughout our game.

Odin rewrites the "You see nothing special..." line with other text of our own, for items that otherwise do not have a description.

Finally, Shawn's Bad Day allows the player to EXAMINE ALL, while Examining everything at once provides a SEARCH command that will show the descriptions of all the scenery in the current location.


181
* Example  Waxwork
Containers and supporters that report their contents when you EXAMINE them.

WI
296
*** Example  Crusoe
Adding a "printing the description of something" activity.

WI
39
* Example  Odin
Replacing "You see nothing special..." with a different default message for looking at something nondescript.

WI
261
* Example  Shawn's Bad Day
Allowing the player to EXAMINE ALL.

WI
63
** Example  Examining everything at once
Making the SEARCH command examine all the scenery in the current location.

WI

We have to create a suitable action and say what it does, and to repeat what we do through all the scenery items. That needs material from subsequent chapters, but is quite ordinary Inform all the same:

Studying the vicinity is an action applying to nothing.

Report studying the vicinity:
    if the location does not contain something which is scenery, say "There's little of interest in the [location]." instead;
    repeat with point of interest running through scenery in the location
    begin;
        say "[point of interest]: [run paragraph on]";
        try examining the point of interest;
    end repeat.

Understand "search" as studying the vicinity.

The reason for this example is to show the use of saying "[run paragraph on]". It means we have output such as:

>search
hive: The honeycombed hive is all around you, thrumming with life.

honey: Wax-sealed honey has been cached in many of the hexagonal nurseries.

Without the running on, the prompts "hive:" and "honey:" would be separated from the descriptions following them, which would look a little odd.


PreviousContentsNext