Given all the recent discussion of overriding Inform’s parser, I’ve built a new, safer way to do that.
Include this extension (Parser Overrides by Daniel Stelzer), and you can now write “parser override” rules, which circumvent the parser in specific circumstances. The result of these rules should be an action, and Inform acts as though this action had come straight from the parser; the action processing and turn sequence rules run like normal.
For example:
Blaspheming is an action applying to nothing.
Parser override when the player's command includes "ialdabaoloth":
override blaspheming.
Now, any command including the name “Ialdabaoloth” is parsed as blaspheming, and this blaspheming action is processed just like any other action coming out of the parser. You can intercept it with “instead” rules, time will pass, and so on.
Please try it out and let me know how it works. I’ll put it on Github once a few people other than me have used it and found success.
Parser Overrides.i7x (6.3 KB)
One word of caution: for complicated technical reasons, this doesn’t work.
Override asking Helen about "syzygy".
Instead, you need to do this:
Override asking Helen about overridden topic "syzygy".
This sets the player’s command to whatever text you gave, and sets the topic understood to the player’s command.
Blame Inform’s handling of topics in stored action literals. The way stored actions are handled under the hood, this could work just fine—but the syntax for a stored action literal (i.e. an action spelled out in the code, like “asking Helen about whatever”) doesn’t set the STORA_COMMAND_TEXT_F value properly, and that’s not something I can change in an extension.