12.9. Check, carry out, report

| Chapter 12: Advanced Actions |

| 12.9. Check, carry out, report

The normal behaviour of an action is specified by its three associated rulebooks - check, carry out and report. In the case of our "photographing" example, these rulebooks will be:

> Check photographing. Here, for instance, we need to verify that the player has the camera. If any of our checks fail, we should say why and stop the action. If they succeed, we say nothing.

> Carry out photographing. At this stage no further checking is needed (or allowed): the action now definitively takes place. At this point we might, for instance, deduct one from the number of exposures left on the film in the camera, or award the player points for capturing something interesting for posterity. But we should say nothing.

> Report photographing. At this stage no further activity is needed (or allowed): whatever effect the action had, it has happened and is now over. All we can do is to say what has taken place.

So far we have not really gone into the business of what rulebooks are, and we don't do so here either - suffice to say that we can now create whatever rules we need:

> A check photographing rule:
> if the camera is not carried:
> say "You can hardly photograph without a camera, now can you?" instead.

In fact, writing "a check photographing rule" is over-formal. We can more simply label our rules like so:

> Check photographing:
> if we have photographed the noun:
> say "You've already snapped [the noun]." instead.

> Report photographing: say "Click!"

For the sake of brevity, photography has no interesting consequence (no points to be won, no film to use up), so there are no carry out rules here. Note the way we used the word "instead" once again to stop actions in their tracks.

We can continue to add rules at any point, and a classic thing that happens when testing a new work is that the designer realises there is a case which has not been thought of:

> Check photographing:
> if the noun is the camera:
> say "That would require some sort of contraption with mirrors." instead.

194
| Example The Dark Ages Revisited An electric light kind of device which becomes lit when switched on and dark when switched off. |
RB

195
| Example Paddington A CUT [something] WITH [something] command which acts differently on different types of objects. |
RB

Suppose we intend a game in which the player needs to cut things open on a regular basis. We'll want to check whether he has the proper tools handy, and deal graciously with commands such as CUT [something] when no tool is specified. So: "Paddington" A blade is a kind of thing. Understand "cut [something] with [something]" as cutting it with. Instead of cutting something: if a blade (called the edge) is held by the player, try cutting the noun with the edge; otherwise say "Your fingernails are not sharp enough." Cutting it with is an action applying to two things. Check cutting it with: if the noun is a person, say "That would hurt." instead; if the second noun is not a blade, say "[The second noun] has not got enough of a blade." instead. Carry out cutting it with: increment the count of rips of the noun. Report cutting it with: say "You slash [the noun] with [the second noun]." We'll need a way to account for all these cuts and rips. Definition: a thing is ripped if the count of rips of it > 0. A thing has a number called the count of rips. After examining something ripped, say "You see [the count of rips of the noun in words] rip[s] in [the noun][if something is in the noun], revealing [a list of things in the noun][end if]." Moreover, because open containers normally list their contents when examined but we'd prefer Paddington's to be mentioned in the ripping paragraph: A procedural rule while examining the teddy bear: ignore the examine containers rule. So far, so good. But suppose that we'd like cutting also to make containers be permanently open and impossible to close again. We could write an "instead" rule, but that would mean that only our instead instructions would take effect, overriding the normal cutting it with rules entirely. Better would be to add a second carry out rule: Carry out cutting a container with something: now the noun is open; now the noun is unopenable. Now our rule will occur whenever a container is cut, but play will still go on to the reporting stage. And indeed we can add more of these, of varying degrees of specificity: Carry out cutting something which is part of something with something: move the noun to the player. Carry out cutting the quilt with something: now the description of the quilt is "Horribly tattered." For that matter, we might want to add a report rule as well, to occur after the "You slash..." rule, so that every time the player cuts something open which has contents, the contents will be listed. Report cutting it with: if the noun is open and the noun contains something, say "Visible within [is-are a list of things in the noun]." This time we do not add the condition to the rule (i.e., Report cutting an open noun...) If we did, this report rule would be more specific than the general report rule, and would occur first. The Safehouse is a room. The teddy bear is a closed thing in the Safehouse. The description is "Fluffy[if the head is part of the bear], with an outsized head[otherwise], but headless[end if]." The head is a closed part of the teddy bear. In the bear is a large wad of stuffing. In the head are a small wad of stuffing and a packet of smuggled diamonds. The quilt is in the Safehouse. The description is "An old but comforting quilt." The player carries a blade called a switchblade. If we may be permitted to borrow one line from chapter 16, here is a final nicety to get rid of the "which is closed" statement on our closed unopenable teddy bear: After printing the name of a closed unopenable container: omit contents in listing. Test me with "cut quilt with bear / cut quilt with switchblade / examine quilt / cut bear with switchblade / again / examine bear / cut head with switchblade / get diamonds / mourn loss of innocence".

196
| Example Noisemaking Creating a stage after the report stage of an action, during which other characters may observe and react. |
RB

197
| Example Delicious, Delicious Rocks Adding a "sanity-check" stage to decide whether an action makes any sense, which occurs before any before rules, implicit taking, or check rules. |
RB

Previous | Contents | Next