OOPS in Inform 7

Is there any way to disconnect the commands OOPS and O from UNDO? Stuff like this doesn’t work:

[code]Understand the command “oops” as something new.

After reading a command:
if the player’s command matches “oops”:
say “No thanks.” instead.[/code]
Also, I already tried using Erik Temple’s Undo Output Control, but it’s not compatible with my version of Inform. I’m using 1.64.0 on a Mac.

The easiest way (not tidy, but easy) is to replace “Vocabulary” in “Language.i6t” and change the three constants OOPS1__WD, OOPS2__WD, OOPS3__WD to some untypable I6 constant such as ‘,DUMMY’ . (With a comma inside single quotes.)

Thank you! It seems to have worked! I’d never modified Inform’s guts like that before.

I don’t think I understood the original question. Or at least I don’t understand it in light of the response, which basically deactivates OOPS entirely, doesn’t it?


Right, I wanted to deactivate OOPS but keep UNDO. Actually the truth is that I wanted to deactivate the O shortcut for OOPS and I thought it would just be easier to deactivate OOPS too, but with zarf’s method I was able to edit that single O command. I ended up looking at the French Inform translation to see how they changed the underlying I6 code, and wound up putting this into my own game:

Include (- Constant AGAIN1__WD = ’again’; Constant AGAIN2__WD = ’g//’; Constant AGAIN3__WD = ’again’; Constant OOPS1__WD = ’oops’; Constant OOPS2__WD = ’oops’; Constant OOPS3__WD = ’oops’; Constant UNDO1__WD = ’undo’; Constant UNDO2__WD = ’undo’; Constant UNDO3__WD = ’undo’; Constant ALL1__WD = ’all’; Constant ALL2__WD = ’each’; Constant ALL3__WD = ’every’; Constant ALL4__WD = ’everything’; Constant ALL5__WD = ’both’; Constant AND1__WD = ’and’; Constant AND2__WD = ’and’; Constant AND3__WD = ’and’; Constant BUT1__WD = ’but’; Constant BUT2__WD = ’except’; Constant BUT3__WD = ’but’; Constant ME1__WD = ’me’; Constant ME2__WD = ’myself’; Constant ME3__WD = ’self’; Constant OF1__WD = ’of’; Constant OF2__WD = ’of’; Constant OF3__WD = ’of’; Constant OF4__WD = ’of’; Constant OTHER1__WD = ’another’; Constant OTHER2__WD = ’other’; Constant OTHER3__WD = ’other’; Constant THEN1__WD = ’then’; Constant THEN2__WD = ’then’; Constant THEN3__WD = ’then’; Constant NO1__WD = ’n//’; Constant NO2__WD = ’no’; Constant NO3__WD = ’no’; Constant YES1__WD = ’y//’; Constant YES2__WD = ’yes’; Constant YES3__WD = ’yes’; Constant AMUSING__WD = ’amusing’; Constant FULLSCORE1__WD = ’fullscore’; Constant FULLSCORE2__WD = ’full’; Constant QUIT1__WD = ’q//’; Constant QUIT2__WD = ’quit’; Constant RESTART__WD = ’restart’; Constant RESTORE__WD = ’restore’; -) instead of "Vocabulary" in "Language.i6t".

So now OOPS2__WD is not “o//” anymore. It’s plain “oops” like the rest. Apparently Inform needed the entire list to keep the Vocabulary section otherwise intact.

Ah, I see. Yeah, I wanted the exact same thing in Leadlight Gamma - to just lose ‘O’ as a shortcut for OOPS. I wanted to give O to OPEN. But I wanted ‘oo’, ‘oop’ and ‘oops’ to still be oops. So I edited that big vocab block, but with these:

Constant OOPS1__WD = 'oo'; Constant OOPS2__WD = 'oop'; Constant OOPS3__WD = 'oops'

Anyone want to take a whack at updating Undo Output Control? It seems like one of those things where you’d just have to copy and paste the relevant I6 from the current template codes and then make the same changes that the original extension does, but I’m not up for trying it right now.