Suppressing all but a set of commands - is it possible?

There’s probably an extension that does this, but I haven’t as yet been able to find one (though my searching skills are pretty awful so that isn’t saying much).

As my first proper Inform project I’m recreating Day of the Tentacle as IF, and if possible I’d like to make it so the player is only able to GIVE, OPEN, CLOSE, PICK UP, LOOK AT, TALK TO, USE, PUSH or PULL. (and possibly LOOK and INVENTORY, though I will have an inventory window off to the side anyway so that’s not vitally important)

I have in fact almost managed this with the following:

Instead of doing something except looking, going, opening, closing, picking up, looking at, talking to, using, using with, pushing or pulling, say "Permissible actions in this game are LOOK, GIVE, OPEN, CLOSE, PICK UP, LOOK AT, TALK TO, USE, PUSH and PULL."

This pretty nicely suppresses most unwanted actions…with the exception of look at, which doesn’t work at all. If I try “look at [something]” it gives me the error message because look at is a synonym for examine and I’m not allowing examining. Pick up doesn’t work either, though “use” does so I don’t think it’s related to my custom commands.

Edit: Just realised that pick up is already a subcommand of take. I wonder if I should just allow all the synonyms rather than trying to maintain the integrity of the command list from a graphical game. It might be more trouble than it’s worth.

I tried Understand the command "look at [something]" as something new. but that doesn’t seem to work either.

Any ideas?

Add examining to your list of permitted actions and instead prevent the unwanted commands for it.
They would be these I think:

Understand the commands "x", "examine", and "read" as something new.

Edit: The same solution should work for picking up things. Permit the standard taking action, and, if you want it only to respond to the command PICK UP, prevent the unwanted commands for it:

Understand the commands "take" and "get" as something new.

Earlier discussion of this: https://intfiction.org/t/how-to-discard-most-default-actions-and-rules/3286/1

Thanks a lot guys, that’s really helpful.

Edit: Felix, that suppresses the alternate commands but then when I try to do something like “x sign” it says “I don’t understand that sentence.” is there a way for me to show the viable commands when trying to use a command that I’ve removed?

Does this work? (sorry on my phone so can’t check).

Understand “x [something]” as a mistake, “The only comands are LOOK, etc etc…”.

Yeah, it does, but I decided that rather than suppress synonyms I’d just give the player a friendly reminder when doing anything else that the main 9 are the only commands (besides compass directions) they’ll actually need to beat the game.

I did a lot of suppressing for Treasures of a Slaver’s Kingdom, and the source code is available to peruse … but since it’s pretty specific to an older version of Inform 7, I’ve no idea if it’s very useful (plus, it relies on methods already described).

Does this look alright?

I can’t wait until you get to the part where Maniac Mansion 1 is playable on Weird Ed’s computer!