Chapter 6: Commands
6.16. Alternate Default Messages

Often we will want to replace the text produced by Inform by default: this includes quite a wide range of text, much of which either describes the success of a command or explains why the action failed. Replacing standard action report rules demonstrates how we might write some rules overriding the standard output.

Currently, Inform provides no systematic way to look at large numbers of textual responses and change many of them at once. While this is something that may change later in beta development, there are already some third-party extensions available on the Inform website that do provide these facilities.

This is especially useful if we want to change the person or tense in which the game is narrated, or if we would like to give the viewpoint character a distinctive voice and set of mannerisms.


382
* Example  We
Replacing the standard action report rules to reflect our own design.

WI

Suppose we don't like the library responses for certain actions and would prefer something else.

We could explicitly replace each report rule with "The new report dropping rule is listed instead of the standard report dropping rule...".

Another way is to slip in our replacements at the beginning of each report rulebook, and then stop the action before it got as far as calling the standard report rule. For instance, if we were designing a game in the first person plural:

"We"

Our Own Company is a room. It contains courage. The player carries names.

Test me with "z / take courage / drop names".

First report dropping rule:
    say "We casually drop [the noun]." instead.

First report taking rule:
    say "We gather [the noun] to ourselves." instead.

First report waiting rule:
    say "We talk amongst ourselves." instead.

...and so on throughout the action set.

The last (and probably much the most practical) approach to overriding library messages systematically is to use an extension designed for the purpose. Several of these are available on the Inform extensions page, including one that allows us to choose a different tense and person for the messages (for example, "She saw nothing special." rather than "You see nothing special.").


PreviousContentsNext