18.15. Phrases concerning rules

| Chapter 18: Rulebooks |

| 18.15. Phrases concerning rules

| This section and the previous one are about a feature which is being withdrawn from Inform in future. Experience shows there are equally good ways to achieve the same ends without needing procedural rules. As elegant as they were, they often confused users, and they were expensive at run-time (that is, they made everything work more slowly). Withdrawing them from Inform will make it possible to make more efficient story files, and will simplify the language. The "ignore" phrase is only one of a suite, which should only be used in procedural rules. The full list is: ignore (rule)
This phrase can only be used in procedural rules, which are now deprecated. It causes the named rule to be ignored (skipped over without producing a result) within the scope of the current "follow".
reinstate (rule)
This phrase can only be used in procedural rules, which are now deprecated. Its only effect is to reverse the effect of any "ignore" phrase affecting the rule named.
reject the result of (rule)
This phrase can only be used in procedural rules, which are now deprecated. It causes the named rule to used, but to have its result ignored, within the scope of the current "follow". In other words, if the rule succeeds or fails then this is suppressed and its rulebook continues.
accept the result of (rule)
This phrase can only be used in procedural rules, which are now deprecated. Its only effect is to reverse the effect of any "reject the result of" phrase affecting the rule named.
substitute (rule) for (rule)
This phrase can only be used in procedural rules, which are now deprecated. Whenever the second rule is to be invoked - from any rulebook, or as a result of any "follow" instruction - invoke the first one instead.
restore the original (rule)
This phrase can only be used in procedural rules, which are now deprecated. Its only effect is to reverse the effect of any "substitute ... for ..." phrase affecting the rule named.
move (rule) to before (rule)
This phrase can only be used in procedural rules, which are now deprecated. This causes the first rule to be ignored whenever it turns up in the ordinary way, but to be invoked either immediately before 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.
move (rule) to after (rule)
This phrase can only be used in procedural rules, which are now deprecated. This causes the first rule to be ignored whenever it turns up in the ordinary way, but to be invoked either 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.

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

392
| 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. |
RB

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

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): 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. 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]."

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

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

Previous | Contents | Next