| Chapter 18: Rulebooks |

| 18.13. Phrases concerning rules

The "ignore" phrase is only one of a suite. The full list is:

> ignore ...rule...
> reinstate ...rule...

The "reinstate" phrase simply reverses any previous "ignore" of the same rule, and is otherwise not useful.

> reject the result of ...rule...
> accept the result of ...rule...

Some rules produce results, as we shall see in the next section, but they can be set so that whatever result they produce will be ignored. Again, "accept ..." simply undoes a previous "reject ..." and otherwise has no effect.

> substitute ...first rule... for ...second rule...
> restore the original ...second rule...

Whenever the second rule is to be invoked - from any rulebook, or as a result of any "follow" instruction - invoke the first one instead. Again, "restore ..." simply undoes the effect of an earlier "substitute".

> move ...first rule... to before/after ...second rule...

This causes the first rule to be ignored whenever it turns up in the ordinary way, but to be invoked either immediately before or immediately after the second rule whenever that second rule is invoked. In effect, it cuts out the first rule from wherever it was, and glues it onto the second. Note that there is no obligation for the first rule to begin in the same rulebook(s) as the second, so this can be used to slot in a wholly new rule, perhaps only if certain circumstances hold.

These rule-changing instructions allow apparently casual sentences to wreak havoc with the model world. This, for instance, is quite the recipe for mayhem and perplexity:

> A procedural rule: reject the result of the before rules; ignore the after rules; move the after rules to before the before rules.

295
| Example Uptempo Adjust time advancement so the game clock moves fifteen minutes each turn.

296
| Example Lethal Concentration 1 A poisonous gas that spreads from room to room, incapacitating or killing the player when it reaches sufficient levels.

297
| Example Swigmore U. Adding a new kind of supporter called a perch, where everything dropped lands on the floor.

Inform's default assumption is that if a player on an enterable object drops something, the dropped article winds up beside him on the same supporter or in the same container. This makes lots of sense for a dais, say, or a king-sized bed. It's a little less sensible if the enterable supporter in question is a bar stool or the like. So suppose we want to add a new kind of supporter called a perch, where everything dropped lands on the floor. There are actually several ways of implementing this, but one of them is to reach right into the drop action and replace the "standard dropping rule" with a different one of our own invention -- like this: "Swigmore U." Moe's Tavern is a room. The bar is an enterable supporter in Moe's. A drink is a kind of thing. On the bar is a drink called a flaming Homer. A perch is a kind of supporter. A perch is always enterable. The stool is a perch in Moe's. The player carries a dead field mouse and a tomacco fruit. The sophisticated dropping rule is listed instead of the standard dropping rule in the carry out dropping rulebook. This is the sophisticated dropping rule: if the player is on a perch (called the awkward position) begin; let place be the holder of the awkward position; move the noun to the place; otherwise; move the noun to the holder of the player; end if. Test me with "sit on stool / drop mouse / look / get up / look". Now the carry-out behavior of the dropping action has been changed, but we haven't had to interfere in the checks or reporting at all. The rest of the action works just as it always did. Of course, maybe we do want to change the way the action is reported, to make it clearer to the player where the dropped article wound up: The sophisticated report dropping rule is listed instead of the standard report dropping rule in the report dropping rulebook. This is the sophisticated report dropping rule: say "You drop [the noun] on [if the holder of the noun is a room]the ground[otherwise][the holder of the noun][end if]."

298
| Example Lethal Concentration 2 Poisonous gas again, only this time it sinks.

299
| Example Solitude Novice mode that prefaces every prompt with a list of possible commands the player could try, and highlights every important word used, to alert players to interactive items in the scenery.

Previous | Contents | Next