Chapter 14: Adaptive Text and Responses

§14.1. Tense and narrative viewpoint; §14.2. Adaptive text; §14.3. More on adapting verbs; §14.4. Adapting text about the player; §14.5. Adapting text referring to other things; §14.6. Adapting demonstratives and possessives; §14.7. Can, could, may, might, must, should, would; §14.8. Adapting contractions; §14.9. Verbs as values; §14.10. Responses; §14.11. Changing the text of responses; §14.12. The RESPONSES testing command

arrow-up-left.pngContents of Writing with Inform
arrow-left.pngChapter 13: Relations
arrow-right.pngChapter 15: Numbers and Equations
arrow-down-right.pngIndexes of the examples

§14.1. Tense and narrative viewpoint

A conspicuous difference between interactive fiction and a traditional novel is the point of view from which it's told. Inform usually produces text like:

You can see a grey cat in the basket.

where a novel would usually write:

He saw a grey cat in the basket.

Standard interactive fiction (IF) is second person singular, and present tense; most novels are told in the third person singular, and past tense.

But these are just conventions - a few novels, for example, use the so-called present historic ("Napoleon looks up at the sky and sighs. Must Ney always be so doubting?"), and plenty are told in the first person singular ("I always get the shakes before a drop."). Inform allows some of this flexibility, too. The two values:

story viewpoint
story tense

control the style of the text produced. The story viewpoint has to be one of the values:

first person singular
second person singular
third person singular
first person plural
second person plural
third person plural

(which are actually the six possible values of a kind called "narrative viewpoint"), while the story tense must be one of:

past tense
present tense
future tense
perfect tense
past perfect tense

(from a kind called "grammatical tense"). Combining these gives 30 possibilities in all, though only a few are at all commonly used.

It's important to make a very large caveat here: Inform uses these settings in producing the replies ("responses") by the built-in actions, but the only way for all of our own text to have a particular tense or narrative viewpoint is to write it that way. If we write:

The Taj Mahal is a room. "You stand and admire the Taj Mahal."

When play begins:
    now the story viewpoint is first person plural;
    now the story tense is past tense.

then we're likely to see the following peculiar transcript:

Taj Mahal
You stand and admire the Taj Mahal.

>e
We couldn't go that way.

That's because the response ("We couldn't go that way") was constructed to follow the settings for viewpoint and tense, but the fixed text of the room description wasn't. In fact there are ways to write the room description so that it would adapt itself automatically, as we'll see, but it takes a fair amount of work. More simply:

The Taj Mahal is a room. "I stood and admired the Taj Mahal."

When play begins:
    now the story viewpoint is first person plural;
    now the story tense is past tense.

In short, tense and viewpoint switching is neat, but it isn't magic.

If we want to write text which will work in whatever the current tense is, the following turn out to be useful little conveniences:

say "[here]"

Produces "here" if the story tense is the present tense, and "there" otherwise.

say "[now]"

Produces "now" if the story tense is the present tense, and "then" otherwise.


arrow-up.pngStart of Chapter 14: Adaptive Text and Responses
arrow-left.pngBack to Chapter 13: Relations: §13.16. What are relations for?
arrow-right.pngOnward to §14.2. Adaptive text