| Chapter 16: Understanding |

| 16.17. Understanding mistakes

When inspiration strikes the player, he can usually be relied upon to make a good-faith effort to communicate the new idea: he will guess the right command. If he guesses wrongly, the mistake is probably the author's, because a good author will try to anticipate all possible wordings and make all of them work.

Nevertheless it is sometimes good practice to nudge the player towards the right wording - particularly if the player has the right idea but is not explicit enough: for instance, typing TALK TO JUDGE when we really want to know what is to be said (JUDGE, GUILTY); or if the player tries something like PLAY CHESS rather than MOVE PAWN TO KING 4. Similarly, if we make a casual reference such as "In your childhood days, you loved sliding in stocking feet across this hallway", a player might type SLIDE IN STOCKING FEET: a nice idea, and which deserves a nice response, even though it asks to do something beyond the scope of the game.

Inform provides a simple mechanism for recognising a command but at the same time recognising that it does not properly specify an action. Such commands are called "mistakes", for the sake of a memorable term, but the player has not really behaved badly, and should be helped rather than reproved. For instance:

> Understand "act" as a mistake.

While that works - the command to "act" is indeed rejected - it is not very good, because no very helpful message is brought up. The following is much better:

> Understand "act" as a mistake ("To join the actors, you have to adopt a role in the play! Try PLAY HAMLET or similar.").

Or we could once again insist on a given context:

> Understand "act" as a mistake ("To join the actors, you have to adopt a role in the play! Try PLAY HAMLET or similar.") when the location is the Garden Theatre.

That still has the drawback that the command "act hamlet" will not be recognised: so the final version we want is probably

> Understand "act [text]" as a mistake ("To join the actors, you have to adopt a role in the play! Try PLAY HAMLET or similar.") when the location is the Garden Theatre.

since the "[text]" part will soak up any words the player types (or none), meaning that any command at all whose first word is "act" will be matched.

The following is often useful during beta-testing of a new work, though we would not want it in the final published edition. Many authors like to ask their testers not to try anything in particular, simply to play naturally: but to record the transcript of the session, and email it back to the author. The following command is a device to allow the tester to type a comment in to the transcript:

> Understand "! [text]" as a mistake ("Noted.").

For instance, the tester might type "! DIDN'T WE SAY DARCY WAS TALL?", to which the game would reply "Noted." - and the author can search for such comments when receiving the transcript.

If we are careful, we can make the reply depend on what was typed in the mistaken command:

> Understand "steal [something]" as a mistake ("Just TAKE [the noun] and leave without paying: that's stealing in my book.").

The care comes in because Inform applies much less checking to mistakes than to other actions, and odd errors will result if we try to refer to (say) "the second noun" in a command which did not have a second noun.

244
| Example Responding to questions starting with WHO, WHAT, etc. Catching all questions that begin with WHO, WHAT, WHERE, and similar question words, and responding with the instruction to use commands, instead.

245
| Example The Gorge at George If the player tries to TALK TO a character, suggest alternative modes of conversation.

246
| Example Hot Glass Looks Like Cold Glass Responding to references to a property that the player isn't yet allowed to mention (or when not to use "understand as a mistake").

Previous | Contents | Next