Inform 7 Home Page / Documentation
Chapter 7: Other Characters
§7.1. Getting Acquainted; §7.2. Liveliness; §7.3. Reactive Characters; §7.4. Barter and Exchange; §7.5. Combat and Death; §7.6. Getting Started with Conversation; §7.7. Saying Simple Things; §7.8. Saying Complicated Things; §7.9. The Flow of Conversation; §7.10. Character Emotion; §7.11. Character Knowledge and Reasoning; §7.12. Characters Following a Script; §7.13. Traveling Characters; §7.14. Obedient Characters; §7.15. Goal-Seeking Characters; §7.16. Social Groups
§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 story 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-story, and Peers handles changing the character's rank.
Alternatively, of course, the player character may already know some of the other characters when the story 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 story. 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 story 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 story 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
|
ExampleBelfry
You can see a bat, a bell, some woodworm, William Snelson, the sexton's wife, a bellringer and your local vicar here.
|
|
"Belfry"
The Belfry is a room. A bat is in the Belfry. The bell is in the Belfry. Some woodworm are in the Belfry. A man called William Snelson is in the Belfry. A woman called the sexton's wife is in the Belfry. A man called a bellringer is in the Belfry.
In the Belfry is a man called the vicar. The indefinite article of the vicar is "your local".
Test me with "look".
|
ExampleClueless
A murderer for the mystery is selected randomly at the beginning of the game.
|
|
"When play begins" is the best point to initialize any aspects of the game that are meant to change between playings. For instance, in this scenario, we would randomly select one of the other characters to be guilty of murder:
"Clueless"
The murderer is a person that varies.
When play begins:
now the murderer is a random person who is not the player.
The Billiards Room is a room. Colonel Mustard and Professor Plum are men in the Billiards Room. Miss Scarlet and Mrs White are women in the Billiards Room.
Instead of examining the murderer:
say "[The noun] certainly looks fiendish!"
Test me with "x mustard / x plum / x scarlet / x white".
|
ExampleMeet Market
A case in which relations give characters multiple values of the same kind.
|
|
We have already seen that we can give things value properties -- a lamp has a brightness, for instance. Relations give us additional flexibility: since we may relate various things to various values, it is possible to describe a thing as having more than one value at the same time.
To demonstrate:
"Meet Market" by "K M and Eric Rossing"
Feature is a kind of value. The features are snub-nosed, gangly, comely, bright-eyed, and sulky.
Appearance relates various persons to various features. The verb to appear means the appearance relation.
Meet Market is a room.
Bob, Carol, Ted, and Alice are people in the Meet Market.
Bob appears snub-nosed and gangly.
Ted appears sulky and snub-nosed.
Carol appears comely and bright-eyed.
Alice appears bright-eyed and comely.
Yourself appears sulky and gangly.
Instead of looking:
say "The snub-nosed ones: [list of people who appear snub-nosed][line break]";
say "The gangly ones: [list of people who appear gangly][line break]";
say "The comely ones: [list of people who appear comely][line break]";
say "The bright-eyed ones: [list of people who appear bright-eyed][line break]";
say "The sulky ones: [list of people who appear sulky][paragraph break]".
Test me with "look".
The same logic might be used to provide characters who have complex mood states: a person might be angry and sad, not merely one or the other -- feelings being what they are.
|
ExampleGopher-wood
Changing the name of a character in the middle of play, removing the article.
|
|
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".
|
ExamplePeers
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.
|
|
Almost all of this example is the flummery of pomp and circumstance: only the first two paragraphs really do anything.
"Peers" by Elizabeth II R
A title is a kind of value. The titles are Baron, Viscount, Earl, Marquess, Duke and Prince.
A peer is a kind of man. A peer has a title. A peer is usually a Baron. Before printing the name of a peer, say "[title] ". Understand the title property as describing a peer.
The House of Lords is a room. Maltravers, Pollifax, Omnium and St Vincent are peers in the House of Lords. Omnium is a Duke. St Vincent is an Earl.
Ennobling is an action applying to one thing and one title.
Check ennobling:
if the noun is the player, say "The Sovereign is the fountain of honour, and may not be ennobled." instead;
if the noun is not a peer, say "Commoners should remain so." instead;
if the title of the noun is the title understood, say "But that is his title already." instead;
if the title of the noun is greater than the title understood, say "As he is already of the rank of [title of the noun], any such letters patent are liable to be deemed invalid, following the precedent of the Buckhurst Peerage Case (1876). Best not." instead.
Carry out ennobling:
now the title of the noun is the title understood.
Report ennobling:
say "'Whereas Our Parliament for arduous and urgent affairs concerning Us the state and defence of Our United Kingdom and the Church is now met at Our City of Westminster We strictly enjoining Command you upon the faith and allegiance by which you are bound to Us that the weightness of the said affairs and imminent perils considered (waiving all excuses) you be at the said day and place personally present with Us and with the said Prelates Great Men and Peers to treat and give your counsel upon the affairs aforesaid And this as you regard Us and Our honour and the safety and defence of the said Kingdom and Church and dispatch of the said affairs in nowise do you omit Witness Ourself at Westminster the Fifth day of November in the 43rd year of Our Reign,' you say, with unpunctuated serenity. The new [noun] bows stiffly."
Understand "dub [someone] a/an [title]" as ennobling.
Test me with "dub st vincent a baron / dub maltravers a marquess / look / examine marquess".
First we define the relationships we choose to acknowledge:
"A Humble Wayside Flower"
Marriage relates one person to another (called the spouse). The verb to be married to means the marriage relation.
Fatherhood relates one person (called father) to various people. The verb to engender means the fatherhood relation.
For brevity, we will ignore the existence of mothers. It is a sad world.
Siblinghood relates a person (called A) to a person (called B) when a person who engenders A engenders B. The verb to be sibling to means the siblinghood relation.
Family relates a person (called A) to a person (called B) when A is married to B or A engenders B or B engenders A or A is sibling to B. The verb to be related to means the family relation.
A person can be known or unknown. After printing the name of an unknown person (called the alien):
if a known person (called the contact) is related to the alien:
say " ([relation between alien and contact] of [the contact])";
now the alien is known;
rule succeeds.
To say relation between (first party - a person) and (second party - a person):
if the first party is married to the second party:
if the first party is female, say "wife";
otherwise say "husband";
rule succeeds;
if the first party is sibling to the second party:
if the first party is female, say "sister";
otherwise say "brother";
rule succeeds;
if the first party engenders the second party:
say "father";
rule succeeds;
if the second party is the father of the first party:
if the first party is female, say "daughter";
otherwise say "son";
rule succeeds.
Pere Blanchard's Hut is a room. Percival Blakeney is a known man in the Hut. Marguerite is a woman in the Hut. Percival is married to Marguerite. Outside from the Hut is the Garden. Louise is a woman in the Garden. The Road to Paris is west of the Garden. Armand St Just is a man in the Road. Louise is married to Armand. Monsieur St Just is a man. He engenders Armand and Marguerite.
Test me with "out / west / east / west".
Monsieur St Just never appears on the scene in this piece, but if we did put him somewhere the player could find him, he, too, would be properly introduced.