Parser supply a wrong object as a second noun

Hi:

I have this little but annoying problem:

anoint me
(with the dress)
You need the flask of scented oils.

anoint chest
(with the dress)
You need the flask of scented oils.

As the dress is always carried in the game, the parser gets it for actions that have a missing object, and that seems a little silly on its part.

I’ve tried to use:

Does the player mean doing something with the dress: it is very unlikely.

But with no luck. It always gets the damned dress.

Any idea of how to prevent this?

[code]Understand “anoint [something]” as anointing. [Note: this grammar line is intentionally missing the second noun!]

Rule for supplying a missing second noun when anointing:
if the player can see the oils:
now the second noun is the oils;
otherwise:
now the second noun is the location. [Nonsensical value]

Check anointing something with the location: say “You have nothing on hand that would be useful.” instead.[/code]

That doesn’t help with the default behavior of Inform 7 for every other action:

>put chest in
(the dress)
(first taking the small chest)
That can't contain things.

Well, this forces the player to always specify the second noun in actions that require a second noun…

Rule for supplying a missing second noun:
    say "You will have to be more specific". 

That doesn’t work:

anoint
(the dress with the dress)
You need the flask of scented oils.

:slight_smile: XD

anyway, I don’t want to drop the whole system, just stop it to choosing always the dress.

So, the system used by default is rather convoluted and not explained well in the documentation.

If there’s a grammar line without the second noun (like I added in my example), it’ll call the “supplying a missing second noun” activity.

If there’s no grammar line without the second noun, it’ll check if there’s exactly one viable item, where “viable” depends on the action but usually means “in scope”. “Take”, for example, requires its noun to be in scope and not held. If so, it’ll use that item automatically.

If both of those fail, it’ll say you have to be more specific.

You can use the Disambiguation Control extension to control these behaviors more precisely.

Good! I will look into Disambiguation Control.

It becomes less of a problem once the player is carrying two objects. So, cheap solution, give the player a useless object. :slight_smile:

THAT is even a better solution!

Implicit shoes, I SUMMON YOU!!!