Examining a collection of objects

This is not enough of a problem to warrant a robust solution, but I thought it was a bit amusing that it works, but only so far:

[code]Exhibition is a room. “Many pictures line the walls.”

A painting is a kind of thing. It is usually undescribed. Understand “picture/painting” as a painting.

The Gnome is a painting in Exhibition. The description is “A little man with crooked legs.”

The Castle is a painting in Exhibition. The description is “A forbidding old castle.”

The Hut is a painting in Exhibition. The description is “Baba Yaga’s Hut on Fowl’s Legs”

paintings-set is scenery in Exhibition. The description is “There is a painting of a gnome, a castle, and a witch’s hut.”

Multi-examining is an action applying to two visible things.
Understand “examine [things]” as multi-examining.
Understand “x [things]” as multi-examining.

Carry out multi-examining:
say “You can’t examine all those things at once.”

Instead of multi-examining a painting when paintings-set is visible:
try examining paintings-set.

test me with “x paintings/x all paintings/x painting/all”[/code]

“x gnome and hut” yields an odd response. I guess it’s trying to multi-examine both of them?

Possibly overkill answer: Jon Ingold’s Multi-examine extension used to be pretty cool for this kind of thing, and let you define a group definition for a kind, which would automatically be used if the player tried to examine multiple objects of that kind.

It looks like it doesn’t compile under current Inform, but if there’s a lot of interest in this, it might be worthwhile someone finding the necessary bugfixes to make it go again.

The reason why the last command doesn’t work is because the parser is trying to find a match for “all painting” and there isn’t one. You can fix that with Understand “all painting” as the paintings-set, but that will fix only that specific situation. (The player is just as likely to type “everything” or “each of them” or “gnome and castle”. The convention is that if the parser asks to choose one, it accepts only one of the given set so I’m not sure how big of a problem this is.)

I don’t think this is true – “x all painting” gives a different error, “There are none at all available!” (And “x all” gives “You must supply a second noun.”) I think, and someone else certainly knows whether this is true, that “Sorry, you can only have one” is a library message specifically for responding “all” to disambiguation requests. I put in an “after reading a command” to echo which command was being read, and when you type “x painting/all” no command is echoed after “all,” indicating that it’s not even trying to process that as a command.

PS Can we do strikethrough text on this board?

Would it be simpler to use “Understand ‘paintings’ as paintings-set when examining” instead of creating a multi-examine action? I tried that first, but the problem is that it then redirects ALL actions on “paintings” to the paintings-set. Even adding “does the player mean…” lines didn’t help.

After seeing that horrible repeating “you must supply a second noun,” I’m sort of going sour on the multi-examine idea…

Now I’m thinking of a number of games I’ve played where I inadvertently discovered an object because of a disambiguation question (or even a misunderstood noun description). Wouldn’t it be nice to have a way to force the player to view the most general level of the object detail hierarchy before doing anything with more fiddly things deeper in? That’s partly the point of this example anyway - you don’t want to view an automatically-generated list of the paintings before seeing the paintings-set description.