Hi. In my Inform 7 game, I want to allow the player to ‘look’ by entering no command, like in Blue Lacuna. I’ve done this by hacking the parser error rules, but this method has caused some problems with undo functionality and phrases like “end the story.”
Blue Lacuna’s implementation is, shall we say, unorthodox:
Table of custom library messages (continued)
Message Id Message Text
[...]
LibMsg <empty line> "[unless location is a flash-room][lookfudge][as normal][bold type][location][roman type][line break][description of location][emptylineinit][the initial appearance of a random initapped thing enclosed by location][emptylineperson][initial appearance of a random other uncarried person enclosed by location][end unless]" [ Hack of the year award.]
Here’s what my own implementation looks like:
[code]This is the rest of the turn rule:
follow the scene changing rules;
follow the every turn rules;
abide by the timed events rule;
abide by the advance time rule;
abide by the update chronological records rule;
abide by the adjust light rule;
abide by the note object acquisitions rule;
abide by the notify score changes rule;
follow the scene changing rules.
[…]
Rule for printing a parser error when the latest parser error is the I beg your pardon error (this is the accept Blue Lacuna style looking rule):
follow the after reading a command rules;
try looking;
follow the rest of the turn rule.[/code]
This produces the expected outcome most of the time. However, there are two crucial scenarios where it doesn’t.
-
If I “undo” after a turn in which I tried looking using this rule, the “undo” skips over that turn.
-
If I end the story in a turn in which I tried looking using this rule, the shutdown rulebook doesn’t run until I enter another command.
I tried looking through the Standard Rules in case there was anything I missed, but it wasn’t very helpful. (There aren’t even any rules defined for the ‘reading a command’ activity.) My guess is that there’s some I6 machinery that triggers when the player enters an actual command, but not during a parser error.
In a search for alternative solutions, I’ve done some googling and found Andrew Plotkin’s Unified Glulx Inputs. It would probably be useful for writing a Blue Lacuna looking rule that’s less of a hack. Unfortunately, it breaks Emily Short’s Basic Screen Effects and Menus, which I’m also using, and which I don’t quite have the expertise to adapt.
In conclusion, I’m looking for a workaround for this problem, like an I6 hook I can drop into my “accept Blue Lacuna style looking rule” to hack “undo” and “end the story” into working. Any advice would be appreciated.