A slight annoyance with interrupting UNDO

So, the first time that a player tries to UNDO, I’d like to block UNDO and print a short message about how UNDO will rot their teeth and spoil their supper, but that they can (from now on) use it anyway because blocking UNDO is an obnoxious thing to do. After the first UNDO, the message doesn’t print. I’m using Jesse McGrew’s Conditional Undo for this.

The problem with this is that, once the player has read the message, the next thing they’re likely to do is UNDO. For the first one, that’s no problem. But if the first time they use UNDO they need to use it multiple times, – not an unlikely state of affairs – then of course the game has forgotten everything beforehand, including that the first-time message has been printed. So a player can multi-undo, but they have to do so twice as many times, with every other command being blocked by the first-time message. Annoying!

UNDO is a special kind of command; it’s not even an out-of-world action, which pretty much cuts off all the ways of dealing with this I can think of. Short of writing to an external file (which seems like overkill for an issue this minor), I’m all out of ideas. Anyone?

I don’t have access to a computer these days, but I put up an example at Playfic that uses Undo Output Control. It seems to work just as you want. Unfortunately, Parchment doesn’t scroll beyond the first screen on an iPad so I can’t really test it…

Works perfectly; thank you.

Incidentally, I was playing around with ways around the problem and discovered that “After reading a command” rules don’t fire at all if you use undo. It’s not an action, out of world or otherwise. It’s totally sui generis.

The subject line really had me expecting:

Large-scale apologies for forgetting to link to the example! Glad you found it on your own. Here it is, just for the record:

playfic.com/games/ektemple/undo-test

Ayup. That’s why there was an issue in the first place.

Yes, that’s right. Undo happens, basically, very soon after a command is read in, but before the after reading a command activity fires. The Undo Output Control extension provides “before” and “after” rules for UNDO that slot into the same sequence, which is how the solution I posted works. Undo Output Control also does a bunch of other stuff, actually, from suspending UNDO to easily allowing you to set UNDO input strings (you can’t write normal vocabulary/grammar for undo) to suspending the saving of undo states. It should probably be renamed, come to think of it…