7.1. Getting Acquainted

| Chapter 7: Other Characters |

| 7.1. Getting Acquainted

Talking about characters presents some special challenges. For one thing, some characters are referred to by a proper name, but others are not: so the game might want to talk about "Jack" but also about "the drunk pedestrian". In the absence of other information, Inform attempts to divine our intentions based on the words with which we defined a new character: but we can always override its guess with an explicit statement, such as

> The Great Malefactor is proper-named.

Belfry demonstrates further how titles are set at the start of play.

The relation between the player and the other characters is not always static, however. Sometimes we want the player to learn a character's name part-way through play, and start referring to "the drunk pedestrian" as "Fernando". Similarly, the status of another character may change due to some twist of the plot. Gopher-wood shows how to change the name of a character mid-game, and Peers handles changing the character's rank.

Alternatively, of course, the player character may already know some of the other characters when the game begins, even if the player does not. In that case, we may want to add a tag-line or so of identification to a character's name when he first appears in the game. A Humble Wayside Flower shows one way of doing this.

Another occasional challenge is dealing with such commands as EXAMINE DR. THISBY. The problem here is that Inform by default will understand the full stop after "Dr" to be the end of one command and the beginning of another, and will try to interpret "Thisby" as a verb. If we do have a game populated by such formally-addressed characters, we may turn to Punctuation Removal, which provides a phrase to remove the full stops in standard titles before attempting to interpret the command.

Other characters have physical characteristics as well as names, of course, and Meet Market demonstrates one way of implementing people with notable features.

Finally, in some IF, the roles of characters may change from playing to playing. If we are writing a replayable murder mystery, we might want to select a new culprit each time the game starts; for this, see Clueless.

See The Human Body for more on body parts and physical description

See Memory and Knowledge for a way to refer to characters whom the player knows about but who aren't currently in the room

30
| Example Belfry You can see a bat, a bell, some woodworm, William Snelson, the sexton's wife, a bellringer and your local vicar here. |
WI

31
| Example Gopher-wood Changing the name of a character in the middle of play, removing the article. |
WI

Suppose that we want a character who starts out with a general epithet ("the bearded man") but is later introduced to the player properly ("Japheth"). In that case, we want to be able to tell Inform to stop using an article once the character has been given a proper name. We can do this like so: "Gopher-wood" The Ark is a room. A bearded man is in the Ark. Instead of examining the bearded man for the first time: now the printed name of the bearded man is "Japheth"; now the bearded man is proper-named; say "You peer at him a bit more closely and realize that it's Japheth." Finally, we need to tell Inform to understand the man's name, but only when he's been introduced. For this purpose, we borrow from the chapter on Understanding: Understand "Japheth" as the bearded man when the bearded man is proper-named. Test me with "x japheth / x man / look / x japheth".

303
| Example Peers The peers of the English realm come in six flavours - Baron, Viscount, Earl, Marquess, Duke and Prince - and must always be addressed properly. While a peerage is for life, it may at the royal pleasure be promoted. |
WI

237
| Example A Humble Wayside Flower Relations track the relationships between one character and another. Whenever the player meets a relative of someone he already knows, he receives a brief introduction. |
WI

238
| Example Meet Market A case in which relations give characters multiple values of the same kind. |
WI

135
| Example Clueless A murderer for the mystery is selected randomly at the beginning of the game. |
WI

Previous | Contents | Next