Chapter 5: The Viewpoint Character
5.1. The Human Body

By default, Inform gives the player character (and every other person) a simple unitary body, one without hands or feet or any other defined parts. In many games this is adequate; but in others it is not enough, and we may want to endow all people with some more specific physical features, as in

A face is a kind of thing. A face is part of every person.

Once we've done this, we may invite ambiguities if the player types LOOK AT FACE; it is this challenge that is addressed in The Night Before.

Our other examples have more specialized effects. Pink or Blue demonstrates a way to let the player choose a gender at the start of play: this will mostly be interesting if the rest of the game makes some use of the player's choice. Since that example is written expressly to demonstrate included Inform 6 code, however, we may find it more congenial to generalize from the more flexible Baritone, Bass.

rBGH gives him a random height and then uses this to determine how the room should be described around him.


44
*** Example  The Night Before
Instructing Inform to prefer different interpretations of EXAMINE NOSE, depending on whether the player is alone, in company, or with Rudolph the Red-nosed Reindeer.

WI
353
*** Example  Pink or Blue
Asking the player to select a gender to begin play.

WI
262
*** Example  Baritone, Bass
Letting the player pick a gender (or perhaps other characteristics) before starting play.

WI
216
* Example  rBGH
The player character's height is selected randomly at the start of play.

WI

As with ordinary numbers, we can choose random units when this is useful:

"rBGH"

The Pharmaceutical Testing Facility is a room. "A [if the player is short]large [end if][if the player is tall]cramped [end if]white space with sterile counters and a[if the player is tall]n uncomfortable little[end if] stool. There is also a mirror, behind which someone must be watching you. But you can't see through to that."

A counter, a one-way mirror, and a stool are scenery in the Facility. The stool is an enterable supporter. The counter supports a plate.

Height is a kind of value. 5 feet 11 inches specifies a height. 5'11 specifies a height. A person has a height.

Definition: a person is tall if its height is 6 feet 0 inches or more.

Definition: a person is short if its height is 5 feet 4 inches or less.

When play begins:
    change the height of the player to a random height between 5 feet 2 inches and 6 feet 4 inches;
    change the right hand status line to "[height of player]".

Instead of examining the player:
    say "You, Test Subject, are [height of the player] tall."

The growth pill is a kind of thing. A growth pill is always edible. The description is usually "It is leaf-green and has a reassuring logo of a curling vine on the side. Nothing to worry about, nothing at all." Two growth pills are on the plate.

After eating the growth pill:
    change the height of the player to the height of the player + 0 feet 6 inches;
    say "Your spine does something frightening and painful, and you find yourself looking down on the room from a wholly new angle.";
    try looking.

Test me with "examine me / eat pill / examine me / eat pill / examine me".


PreviousContentsNext