Disambiguating verbs?

I’ve run into an odd problem.

At one point the player finds a map which they cannot read, and the description suggests that they ask an NPC to explain it to them. To allow “NPC, explain the map” I added the Understand line “explain [the map]” as examining.

Later in the game, there is a performative quip (I’m using Threaded Conversation) called “explain everything”. This collides with the understand line above in an odd way: typing “explain everything” gives the error “I couldn’t understand that sentence” if the map is not currently visible, despite the grammar line “[performative quip]” matching the input perfectly.

Is there a good way to disambiguate between verbs in cases like this? Or, alternately, to restrict the word “explain” to the NPC? (In the meantime I’m just reworking my prose to remove the conflict.)

There’s never disambiguation between different grammar lines, so I’m not surprised this usurps the normal “explain” command.

You could probably get it to work if you defined “map” as some kind of quip that only applies when the actor is the NPC. I don’t know enough about the conversation extension to write that, though.

I suspect you’re running into a few different problems. One may be that “everything” has a reserved meaning.

Another is that Inform I think only checks for Understand lines with bare “[something]” tokens if they don’t start with verbs. This is certainly true of “[text]” tokens, as in non-bug 1125; and it’s true with disambiguation responses as well. There’s a list in the I6 template of verbs that are also exempt from that because they may be nouns; Felix gave me a bit of code to add to that which I used in Tea and Toast to allow ‘slice’ and ‘plug’ as disambiguation responses. But when I try a test case for your example and I add “explain” to VerbMayBeName it still doesn’t work.

So… dunno. Unfortunately Threaded Conversation seems particularly likely to run into clashes between quip names and other parts of the language.

On posting: Taking zarf’s advice is probably a good idea.

I ran into a similar problem using Threaded Conversation when I created a performative quip called “press for more information”. Inform would only try the synonym for push, which I didn’t want to define as something new. The solution was to create a scenery object called “for more information”, and upon suggesting the quip, move it into the room. The player would literally press the “for more information” button, and an instead line would discuss the quip.

You might change the “explain [map]” to “explain [something]” as examining, and then try a similar approach to the hack above. However, naming something “everything” will likely be a problem in itself. Maybe change it to “explain what he knows” or something similar.

Hmm. At first I thought you were running into a problem with my extension – the quips are not tangible rule duplicates that same error message – but no, that’s the behavior of the parser. I think this may be an Inform bug.

[spoiler][code]Command Tent is north of Revelation Woods.

A map is a thing in Command Tent. The description is “You can’t read the writing. Maybe Bob knows?”

Bob is a man in the Tent.

Understand “explain [something]” as examining when Bob is in the location.

Instead of asking Bob to try examining the map, say “Wow! A map!”

Alice is a woman in the woods.

explain everything is a thing in the woods. Understand “[something]” as examining.

Test me with “x map / talk to Bob / Bob, explain the map / south / talk to Alice / explain everything”.[/code][/spoiler]
produces

[spoiler]Welcome
An Interactive Fiction
Release 1 / Serial number 140603 / Inform 7 build 6L02 (I6/v6.33 lib 6/12N) SD

Command Tent
You can see a map and Bob here.

>test me
(Testing.)

>[1] x map
You can’t read the writing. Maybe Bob knows?

>[2] talk to bob
That’s not a verb I recognise.

>[3] bob, explain the map
Wow! A map!

>[4] south

Revelation Woods
You can see Alice and explain everything here.

>[5] talk to alice
That’s not a verb I recognise.

>[6] explain everything
I didn’t understand that sentence.

>[/spoiler]

Ordinarily I would say busterwrites is correct, naming a thing anything that may potentially collide with a system term is dangerous, and that includes ‘everything’.

Ideally, TC should detect the “Bob, [quip]” syntax and convert it to a ‘discussing [quip]’ action so you don’t have to worry about this at all. But for some reason, TC’s ‘correct indirect instructions rule’ isn’t firing in the case of asking someone to try discussing.