Asking a character about; extraneous response

My game has multiple NPCs running around, and for reasons these characters have multiple names. For some reason unknown to me, when the player asks one of these characters a question, an extraneous output accompanies it:

>ask Robert about library
(Robert about that)
"It has books," he says.

I have Robert declared as such:

Understand "Robert/Bob/Bobby" and "Robert Jones" as Robert.

If the player asks “Bob” the same question, the response is printed correctly without that extraneous (Robert about that).

When I yank the code out and drop it into a fresh project it doesn’t behave that way, so clearly something deeper in my code is causing confusion. And again, it happens when the player addresses Robert by his proper name, but not when the player addresses him by one of his aliases. Worse still, this isn’t happening to any of the other NPC’s who have the same setup.

All that to ask: does anyone have a theory about what might be causing Inform to feel the need to clarify “Robert” in this case? As in, what should I go looking for in my sprawling code that might be the cause? I keep all my “people” declarations in one section so I can avoid things like this, but clearly something is at odds.

Here’s some general code as an example to show the top portion of what I’m working with:

The library is north of the parlor.

Colin is a person in the library.
Diana is a person in the library.
Nick is a person in the library.
Stevie is a person in the library.
Robert is a person in the library.

Understand "Stevie/Samantha" and "Stevie Bloom" as Stevie.
Understand "Diana/Diane" and "Diana Smith" as Diana.
Understand "Nick/Nicholas" and "Nick Wagner" as Nick.
Understand "Colin/Slick" and "Colin Jones" as Colin.
Understand "Robert/Bob" and "Robert Jones" as Robert.

Instead of asking Stevie about "Library":
	say "'It has books,' she says.".

Instead of asking Diana about "Library":
	say "'It has books,' she says.".
Instead of asking Nick about "Library":
	say "'It has books,' he says.".

Instead of asking Colin about "Library":
	say "'It has books,' he says.".
Instead of asking Robert about "Library":
	say "'It has books,' he says.".

You can see that if you compile just that example code (adding definitions for Diana, Nick, Colin, and the library) then the disambiguation message doesn’t happen.

The difference is almost certainly that you’ve defined another object in the game with “Robert” in its name. This sometimes happens by accident. Say you write:

A person named Robert is in the Library.

This seems to work, but actually creates an object called “person named Robert”, which could be separate from “Robert”.

Try typing TREE (the debug command) and looking for extraneous objects.


That “TREE” command is handy to know. It turns out that Inform really doesn’t like my wearable object naming convention for things like “RobertHat” or “RobertCigar”. Once I edited those names to things like “HatRobert” and “CigarRobert”, the confusion ceased.


1 Like

That shouldn’t be a problem as long as names are distinct in the first nine characters.

Adding RobertHat to the example doesn’t cause a problem, for example. But if you had Wilhelmina and WilhelminaHat, there would be.

Got it. Yeah, the character’s name isn’t actually Robert, it’s something longer, but I’m going to go with a different naming convention so I don’t get into trouble again.