[I7] Finding your Inform 7 / Simple Chat bug

I just spent a lot of time finding out where a certain bug in my Inform 7 program came from, and I'd thought I'd post it online so people who do the same thing wrong as I can more easily find a solution.

Here's the deal:

If you have an "Instead of doing anything except ..." rule in your code which is active at the beginning of play, and you are using the Simple Chat extension, the result will be that none of your conversation options ever show up in the game. Not even when the "Instead ..." rule is turned off by the time you start a conversation.

The reason for this is that Simple Chat initialises your conversations at the beginning of the game, using the "preparing" action. If you have implicitly disallowed that action, by not putting it in your "except" clause, this initialisation will fail, and no nodes will ever be visible.

The solution is to rewrite your rule as "Instead of doing anything except preparing, ...".

(But I am a bit worried now about using this kind of rule, since it doesn't just stop actions initiated by the player, but also who knows what hidden actions occuring in the background.)

Comments

  1. (But I am a bit worried now about using this kind of rule, since it doesn't just stop actions initiated by the player, but also who knows what hidden actions occuring in the background.)

    Inform by default doesn't do "hidden actions occurring in the background": actions in the standard rules are all things triggered by the player directly or indirectly. (An implicit take would be indirect -- since it's generated in response to another action. But the player knows that it is happening, and it results from the player's command.)

    What makes this case weird is that Simple Chat uses an action (rather than an activity or a rulebook) to handle what is a behind-the-scenes bit of coding. This is a bit eccentric.

    ReplyDelete
  2. Okay, that's very good to hear. (I already emailed Mark about that action, because I think it can easily be removed in favour of only activities.)

    ReplyDelete
  3. Note that 5T18 has an additional bug relating to "doing anything except" that large works may need to compensate for. Vaporware and I both have workarounds (his in I6 to the library, mine in I7 as an in-application workaround) on the newsgroups.

    ReplyDelete

Post a Comment

Popular posts from this blog

Keeping the narrative pressure on

Thoughts on a Trollbabe session