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

Observation of novice IF players suggests that they often have a hard time figuring out how to get started, especially if they are encountering the game in a context where they don't have time to settle in and read instructions. Here we provide some training wheels to help them learn to communicate. This is divided into several parts. The first part is the system of rules for general guidance, which could be excerpted and used anywhere. The second part is a scenario using these rules. "Solitude" Part 1 - General Rules When play begins: say "Have you played interactive fiction before? >"; now novice mode is whether or not the player consents. The rationale for asking the question this way, and not another, is that novices asked whether they would like instructions very often say no, even if they need them. Novice mode is a truth state that varies. Novice mode is true. Stopping novice mode is an action out of world. Starting novice mode is an action out of world. Understand "novice mode off" or "novice off" as stopping novice mode. Understand "novice mode on" or "novice on" as starting novice mode. Carry out stopping novice mode: now novice mode is false. Carry out starting novice mode: now novice mode is true. Report stopping novice mode: say "Novice mode is now off." Report starting novice mode: say "Novice mode is now on." Before reading a command when novice mode is true: say "[line break]Some options to try:[line break]"; follow the novice suggestion rules. The novice suggestion rules is a rulebook. A novice suggestion rule (this is the suggestion that he look rule): if not looking and not going, say " [bold type]look[roman type]". A novice suggestion rule (this is the suggestion that he check inventory rule): if the player carries something and we are not taking inventory, say " [bold type]inventory[roman type] (I)". A novice suggestion rule (this is the suggestion that he put things on rule): if the player carries something and a free-standing supporter is relevant, say " [bold type]put[roman type] something [bold type]on[roman type] [the list of relevant supporters]". A novice suggestion rule (this is the suggestion that he take things rule): if a gettable thing is relevant, say " [bold type]take[roman type] [the list of gettable relevant things]". A novice suggestion rule (this is the suggestion that he examine things rule): if an unexamined thing is relevant, say " [bold type]examine[roman type] (X) [the list of unexamined relevant things]". A novice suggestion rule (this is the suggestion that he enter things rule): if a relevant thing is worth entering, say " [bold type]enter[roman type] [the list of worth entering relevant things], or [bold type]get out[roman type]". A novice suggestion rule (this is the suggestion that he open things rule): if an unlocked openable thing is relevant, say " [bold type]open[roman type] or [bold type]close[roman type] [the list of unlocked openable relevant things]". A novice suggestion rule (this is the suggestion that he lock things rule): if a closed lockable thing is relevant, say " [bold type]lock[roman type] or [bold type]unlock[roman type] [the list of closed lockable relevant things]". A novice suggestion rule (this is the suggestion that he eat things rule): if the player carries an edible relevant thing, say " [bold type]eat[roman type] [the list of edible relevant things carried by the player]". A novice suggestion rule (this is the suggestion that he wear things rule): if the player carries a wearable relevant thing, say " [bold type]wear[roman type] [the list of wearable relevant things carried by the player]". A novice suggestion rule (this is the suggestion that he turn things on rule): if a device is relevant, say " [bold type]turn on[roman type] or [bold type]turn off[roman type] [the list of relevant devices]". A novice suggestion rule (this is the suggestion that he go places rule): if a room is adjacent, say " [bold type]go[roman type][exit list][if in darkness] or try other directions in the dark[otherwise]". A novice suggestion rule (this is the suggestion that he enter doors rule): if an open door is relevant, say " [bold type]go through[roman type] [the list of relevant open doors]". A novice suggestion rule (this is the suggestion that he interact with people rule): if another person is relevant, say " [bold type]kiss[roman type] or [bold type]wake[roman type] [the list of relevant other people][if the player carries something], or [bold type]give[roman type] things [bold type]to[roman type] someone[end if]". A novice suggestion rule (this is the suggestion that he ask for help rule): say " [bold type]help[roman type] to see a more complete set of instructions". A novice suggestion rule (this is the suggestion that he turn off help rule): say " [bold type]novice mode off[roman type] to turn off this guidance". Last novice suggestion rule: say "[line break]". The suggestion about asking for help is no good unless we provide some. This might take any of a number of forms, but for the sake of example we'll use an easy way out: Include Basic Screen Effects by Emily Short. Include Menus by Emily Short. Include Basic Help Menu by Emily Short. After taking inventory when novice mode is true: say "To get rid of any of these objects, [bold type]drop[roman type] it." A thing can be examined or unexamined. Carry out examining something: now the noun is examined. A thing can be seen or unseen. A thing is usually unseen. Definition: a thing is relevant if it is seen and it is visible. Before printing the name of something (called the target): now the target is seen; if novice mode is true, say "[bold type]". After printing the name of something: say "[roman type]". Definition: a supporter is worth entering: if the player carries it, no; if it is enterable, yes. Definition: a container is worth entering: if the player carries it, no; if it is enterable and it is open, yes. Definition: a person is other if it is not the player. Definition: a person is another if it is other. Definition: a thing is free-standing if it is in a room. To say exit list: let place be location; let count be 0; repeat with way running through directions: let place be the room way from the location; if place is a room: increment count; say "[if count is greater than 1] or[end if] [bold type][way][roman type]". Definition: a thing is gettable: if it is scenery, no; if it is fixed in place, no; if it is a person, no; if the player is carrying it, no; if the player is wearing it, no; yes. Part 2 - On the Ground Antarctic Research Station is a room. "Though not always the most stimulating of environments, the station is far from your ex-wife and most of the things in the world that annoy you, namely the other 6+ billion people. There is a second room to the south." The station contains a radio. The radio is a device. It is fixed in place. South of the Station is Sitting Room. The description of the Sitting Room is "Just big enough for a very [comfortable chair]." The Sitting Room contains an enterable supporter called a comfortable chair. The chair is scenery. A monograph about penguins is in the Sitting Room. Blistering Cold is a room. "It is white out here and very very very cold." The white door is a door. "[The white door] leads to [the other side of the white door]." It is west of the Blistering Cold and east of the Antarctic Research Station. Test me with "i / x radio / x door / s / i / x chair / x monograph / sit in chair / get up / n / open door / enter door".

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

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