If you open the Standard Rules (under the menu File â open Installed Extension â Graham Nelson â Standard Rules) then search for the examine undescribed things rule, you find this:
Carry out examining (this is the examine undescribed things rule):
if examine text printed is false:
say "[We] [see] nothing special about [the noun]." (A).
Essentially this is a default âfall-throughâ rule that runs when all the other more specific âCarry out examiningâ rules (of which there are a number, for example to print out descriptions when provided and to print out the contents of containers and supporters) have run their course. Each of them, if it prints text, sets the flag âexamine text printedâ to true. So, when this last rule is finally reached, the familiar âYou see nothing special about the thingumajig,â will only be printed if nothing else has already been output.
To replace this rule, you need to emulate its form with your own:
The new_examine_undescribed_things rule substitutes for the examine undescribed things rule.
This is the new_examine_undescribed_things rule:
if examine text printed is false:
if Scene Dreams is not happening:
say "You see nothing [one of]interesting[or]noteworthy[or]special[at random] about [the noun]." (A);
else:
say "Details are foggy." (B);
Unfortunately, this involves the action variable âexamine text printedâ, which is valid only within the Examine action rulebooks, and when compiling Inform has not yet placed the substitute routine in place and therefore (outside the Examine action rulebooks) canât find a valid reference to this variable and generates the compilation error.
Getting round this by being specific about where the rule is going to go:
Carry out examining (This is the new_examine_undescribed_things rule):
if examine text printed is false:
if Scene Dreams is not happening:
say "You see nothing [one of]interesting[or]noteworthy[or]special[at random] about [the noun]." (A);
else:
say "Details are foggy." (B);
allows this to compile, but creates a new problem because the rule now runs twice: once as a substitution for the original rule then again because the new rule itself is now also listed last in the Carry out Examining rulebook (you can verify this by typing >Rules, which will demonstrate the rule running twice, and by looking at the Examine action in the Index, which shows both the substituted original rule and the new rule itself listed in the Carry out Examining rulebook). This is why the response is printed twice.
There are a few ways of dealing with this. One is to append ânow examine text printed is trueâ to the end of the rule, so that the second time it fires nothing is printed. The neater one is to unlist the new version of the rule by writing âThe new_examine_undescribed_things rule is not listed in any rulebook.â This allows the compilation to take place (because Inform still recognises it as a Carry out Examining rule, even though itâs no longer listed in the Examining actionâs rulebooks, and so allows it access to Examine action variables), keeps the substituted rule in place, but removes the redundant copy from the Carry out Examining Rulebook. A third option, but probably not the best, is to append ârule succeedsâ at the end of the rule, which forces an exit from the âCarry out examiningâ rulebook and ensures that the rule will only fire once even if listed twice. This might cause problems if for any reason you or an extension decide to put an even later rule into the âCarry out examiningâ rulebook, which would never then be reached.
PS the rule for examining undescribed things is the only one that doesnât usually need to set the âexamine text printedâ flag when it prints something because it is the last rule in the book to run, so there are no rules coming after that need to examine the flag.