Default disambiguation behavior for I7

Hi everyone. This is my first post here. I have a question about how I7 interprets incomplete commands by the player.

Basically, I am finding that I7’s default behavior when I type a command for an action applying to a thing, without specifying the thing, defaults to applying the action to something in the inventory, if there is only one thing in the inventory. Let me explain.

The code:

the testroom is a room. the badge is a thing carried by the player. the box is a container in the testroom.
produces “(the badge) Nothing obvious happens” when I type “push”.

The code:

the testroom is a room. the badge is a thing carried by the player. the hat is a thing carried by the player. the box is a container in the testroom.
produces “What do you want to push?” when I type “push”.

I want the second result; I want Inform to ask “What do you want to [action]?” even if there is only one thing in my inventory. Can anyone help me figure out why Inform behaves this way and how to change the behavior?

Thanks.

Have the player start the game carrying two things. Or zero things.

This is really honestly the optimal answer, aside from “don’t worry about it in the first place”. Anything else is getting into a mare’s nest of disambiguation changes which will make your game worse and not better.

Hmm. I wrote an extension a while ago, called “Disambiguation Control”, that was at least partly designed to fix this, since it feels like a bug.

It’s been a while since I used the extension now: I think it was pretty stable and bug-free, but I can’t remember if it was easy enough to use to recommend to someone new. But you could give it a go.

jon

Well, if the only change to disambiguation you want to make is to suppress this behavior, then Disambiguation Control is easy to use; just put in “Include Disambiguation Control by Jon Ingold.” and the behavior will be suppressed automatically.

Doing anything more with Disambiguation Control seems pretty complicated to me, though perhaps no more than doing the same things without Disambiguation Control (using Does the player mean rules and the like).

[rant]The one thing I ever tried to do with Disambiguation Control wound up being really difficult to do, but it was kind of an insane hack.[/rant]

I remember liking Disambiguation Control but it was very hard to grok and remember the difference between “should the game choose” and “should the game suggest” rules.

Ok thanks, I will attempt using disambiguation control and see how that goes