8.3. Changing the status line

| Chapter 8: Change |

| 8.3. Changing the status line

The status line is the black bar along the top of a game being played, which ordinarily displays the current position, score and number of moves taken. Like the command prompt, it is not fixed but results from values which can be changed: the "left hand status line" and "right hand status line".

The default values are "[the player's surroundings]" for the left hand status line and "[score]/[turn count]" for the right hand status line. Score and turn count are numbers which vary in play (more about scoring later); "[the player's surroundings]" is a text substitution really intended for just this purpose:

say "[the/-- player's surroundings]"

This text substitution produces a succinct description of where the player is, be this in darkness, in a lighted room or inside an opaque container such as a large packing case. Example: now the left hand status line is "You: [the player's surroundings]";

These make useful elements to juggle in redesigning the status line, as in the following example:

> When play begins:
> now the left hand status line is
> "[the player's surroundings] / [turn count] / [score]";
> now the right hand status line is "Time: [time of day]".

The text in the right hand status line should be kept no more than 14 letters long, including any spaces. The left hand status line has more leeway, but should still be kept brief.

See Awarding points for scoring

114
| Example Politics as Usual Have the status line indicate the current region of the map. |
RB

115
| Example Centered Replacing the two-part status line with one that centers only the room name at the top of the screen. |
RB

If we want to lay out the status line in some other way than with left-hand and right-hand entries, it is possible to do this as well. Later we will learn about the "rule for constructing the status line", but here is a basic effect using this rule and an Inform extension included as part of the standard distribution, called Basic Screen Effects. "Centered" When play begins: say "After months of boring through the Earth's crust in this metal-jawed vehicle, you break through..." The Hollow Core is a room. "Truly a magnificent sight: the land curves up away from you in every direction, covered with the cities and fields of the Core People. Molten rock runs in the canals, bringing heat and light to every home. At the center of the Earth hangs a dense black sun." Include Basic Screen Effects by Emily Short. Rule for constructing the status line: center "[location]" at row 1; rule succeeds. Test me with "look". Basic Screen Effects also provides a mechanism for building complicated status lines of more than one row. To read its documentation, we include the extension, press Go!, and then consult the contents index that results.

Previous | Contents | Next