Inform 7 Home Page / Documentation
§12.13. Report rules for actions by other people
Report rules for the player's actions are easy to write, and for many actions, they are not much harder for other people either:
Report photographing: say "Click!"
Report someone photographing: say "Click! [The person asked] takes a snapshot of [the noun]."
But once other people are involved, we have to go to some trouble to get all of the possibilities right. Here is a case which did not immediately occur to the author of the "going" action, for instance:
>get in cage
You get into the cage.
>clark, get in automobile
Clark Gable gets into the automobile.
>clark, push cage west
Clark Gable goes west in the automobile, pushing the cage in front, and you along too.
The Lot (in the cage)
In the Lot you can see an automobile (in which is Clark Gable).
We said before that report rules are skipped if the action is running "silently", or if the action is one that the player does not witness. But that is also a tricky concept. Inform's doctrine is that you witness an action if you can see any of the actor, the noun or the second noun at either the beginning or the end of the action; except that being able to see a backdrop does not count. Thus if Clark Gable, in Beverly Hills, photographs the Hollywood sign then we do not witness this from Sunset Boulevard merely because we, too, can see the Hollywood sign.
While the report rules for actions by the player must actually report something, report rules for other people's actions are under no such obligation. For instance, if Clark unlocks a door from the other side to the player, then this counts as an action that the player witnesses - and after all, it could be argued that the player should hear the key turning in the lock - but in fact the standard rules for reporting locking choose to say nothing.
|Start of Chapter 12: Advanced Actions|
|Back to §12.12. Check rules for actions by other people|
|Onward to §12.14. Actions for any actor|
The Man of Steel Excuses Himself
Report rules can be a good point at which to add local color: while Inform provides default descriptions of character behavior, these are rather generic and can stand to be customized.
For instance, if we wanted to liven up our previous Clark Kent example:
Table of Lame Excuses
"needing a paper-clip"
"wanting an English-Tuvalu dictionary"
"walking a neighbor's dog"
"hearing air-raid sirens"
"having drunk too much coffee"
"thinking he smells smoke"
"wondering where Lois got to"
"needing to speak to Jimmy"
"noticing the Good Year blimp"
It's good to be careful, as the library report rules have been designed and tested to describe every contingency (going through doors, going in vehicles, etc.): so when replacing a report rule, we should try to consider all the possible variations of the action that we might want to describe.
However, in this case, our scenario is so simple that there are no doors, vehicles, or pushable objects, so we're safe in giving Clark a very simple reporting scheme.
Fate Steps In
One of the nice things about before rules for actions is that they allow us to express some planning for characters other than the player: we've already seen how this works, a bit. But we could also use before rules to write plans for an abstract story-driving entity, rather than for other individual characters. This story-driver could be in charge of all the non-player characters, as well as spontaneous or natural changes in the environment, shaping the narrative around the player's behavior.
The following example is a very simple one, but the same concept could be worked out in a great deal more complexity, with all sorts of alternative procedures available to our story-manager:
Carry out someone tripping:
if something dangerous (called the trap) is in the location:
say "Lise chooses this moment to lick her fingers -- it's not gross, it's natural, you decide -- stand up, and head for the door. Unfortunately, her path crosses directly over [the trap]. There is a vaudevillesque moment where you try to warn or catch her; the next moment she's on the floor, looking shocked and also in quite a lot of pain. 'I'm not sure,' she says to you steadily but with unfocused gaze, 'but I think I might have broken my tailbone.'";
end the story saying "Well, she's paying attention to you now".
Carry out someone making a mess:
let calamitous object be a random visible supporter which supports at least three things;
if calamitous object is a supporter:
say "[The calamitous object] tips over, spilling [the list of things on calamitous object] all over the place.";
move the calamitous object to the location;
now every thing on the calamitous object is in the location.
Instead of someone making a mess when the tray is on the table:
say "Just at that moment, a large blond man-thing in a red jacket walks more or less through you, and you come into violent contact with the table, knocking [the list of the things on the table] onto the floor.";
now every thing on the table is in the location;
now every thing on the tray is in the location instead.
Lise Fitzwallace is a woman in the Dining Hall. "Lise is at the nearest table, not apparently paying any attention to you." The description of Lise is "A capella singer, women's rugby champion, general object of attention from all genders. Unlikely to notice you unless fate smiles broadly." Lise carries a fork, a napkin, an empty glass, and a plate of half-eaten eggplant parmesan.