§7.3. Reactive Characters

As we observe characters, so they observe us. Those who seem to have no awareness of what the player is doing often come across more like waxworks than like people. Zodiac demonstrates a scenario where the watchful presence of a dangerous criminal keeps the player from doing what he otherwise might, while Police State expands on this idea with a policeman who reacts to entire types of behavior in his presence, regardless of whether the culprit is the player or a third party. Noisemaking has a crow who will fly away in response to any loud noises the player makes.

And, of course, we definitely want to have characters react to being looked at or otherwise interfered with. Search and Seizure implements a smuggler who reacts when we try to confiscate his possessions. Pine 1 gives us a sleeping princess who can be woken by a variety of methods.

We wrap up this section with two complete puzzle scenarios that demonstrate what can be achieved by giving characters reactions to the player's behavior. A Day For Fresh Sushi has a fish who watches the player's actions and comments on them, while the live furnishings in Revenge of the Fussy Table instead comment every turn on the current state of the world, until the player has successfully sorted out all their complaints.


arrow-up.pngStart of Chapter 7: Other Characters
arrow-left.pngBack to §7.2. Liveliness
arrow-right.pngOnward to §7.4. Barter and Exchange

*ExampleZodiac
Several variations on "doing something other than...", demonstrating different degrees of restriction.

*ExamplePine 1
Pine: Using a scene to watch for the solution of a puzzle, however arrived-at by the player.

*ExamplePolice State
Several friends who obey you; a policeman who doesn't (but who takes a dim view of certain kinds of antics).

***ExampleSearch and Seizure
A smuggler who has items, some of which are hidden.

Suppose the current sequence of action handling is not quite enough for us: we'd also like to have a stage after reporting, where other characters can react to the player character's behavior after it has already happened and been reported on screen. Having such a stage is unlike using "after", because after occurs before reports and prevents them from being printed. So, for instance, we could allow the player to do any of a range of different actions that make loud noises, and have a nervous bird that reacts to all of them by flying away afterward.

To do this, we can add a new rule into the specific action-processing rules. (For a list of these, see the Rules index.) Moving rules around and adding new ones requires syntax that we will learn in the chapter on Rulebooks, but the present example is fairly straightforward:

paste.png "Noisemaking"

Section 1 - Procedure

The other-player response rule is listed after the report stage rule in the specific action-processing rules.

This is the other-player response rule:
    follow the observation rules.

The observation rules is a rulebook.

Section 2 - Scenario

Country Lane is a room. West of Country Lane is Outside the Farmhouse. East of Country Lane is Village Center. North of Country Lane is Open Field.

The player carries a drum.

The black crow is an animal in Country Lane.

Singing is an action applying to nothing. Understand "sing" as singing.

Report singing:
    say "You hum a little ditty."

Singing is a loud action.

Attacking the drum is a loud action.

The block attacking rule is not listed in any rulebook.

Report attacking something:
    say "THWACK!"

An observation rule for loud action in the presence of the black crow:
    let N be a random adjacent room;
    if N is a room, move the black crow to N;
    say "The crow, startled, flies off to [N]."

Test me with "sing / g / n / hit drum".

***ExampleNoisemaking
Creating a stage after the report stage of an action, during which other characters may observe and react.

Suppose the current sequence of action handling is not quite enough for us: we'd also like to have a stage after reporting, where other characters can react to the player character's behavior after it has already happened and been reported on screen. Having such a stage is unlike using "after", because after occurs before reports and prevents them from being printed. So, for instance, we could allow the player to do any of a range of different actions that make loud noises, and have a nervous bird that reacts to all of them by flying away afterward.

To do this, we can add a new rule into the specific action-processing rules. (For a list of these, see the Rules index.) Moving rules around and adding new ones requires syntax that we will learn in the chapter on Rulebooks, but the present example is fairly straightforward:

paste.png "Noisemaking"

Section 1 - Procedure

The other-player response rule is listed after the report stage rule in the specific action-processing rules.

This is the other-player response rule:
    follow the observation rules.

The observation rules is a rulebook.

Section 2 - Scenario

Country Lane is a room. West of Country Lane is Outside the Farmhouse. East of Country Lane is Village Center. North of Country Lane is Open Field.

The player carries a drum.

The black crow is an animal in Country Lane.

Singing is an action applying to nothing. Understand "sing" as singing.

Report singing:
    say "You hum a little ditty."

Singing is a loud action.

Attacking the drum is a loud action.

The block attacking rule is not listed in any rulebook.

Report attacking something:
    say "THWACK!"

An observation rule for loud action in the presence of the black crow:
    let N be a random adjacent room;
    if N is a room, move the black crow to N;
    say "The crow, startled, flies off to [N]."

Test me with "sing / g / n / hit drum".

****ExampleRevenge of the Fussy Table
A small game about resentful furniture and inconvenient objects.

****ExampleA Day For Fresh Sushi
A complete story by Emily Short, called "A Day for Fresh Sushi", rewritten using Inform 7. Noteworthy is the snarky commenter who remarks on everything the player does, but only the first time each action is performed.