Parser accepting "container" and "supporter"

The plural kind names of anything of that exists in your game are added to the dictionary (except that “people” isn’t added unless there’s a person other than yourself). The matching must be exact: “things” won’t match containers or other subkinds of thing.

So if the remote is a device, get devices can get the remote. But not get device.

Except for container or supporter. If your game includes something whose exact kind is one of them, you can refer to it/them in the plural, as the other kinds, or to one singularly as “container” or “supporter”.

I can’t see where this special-casing occurs. Does anyone know?

Both of those words happen to be nine letters long. :)

2 Likes

sigh. I actually had noticed that and had tried increasing DICT_WORD_SIZE but through whatever independent problem between keyboard and chair I ended up convinced “container” in the singular still worked in that case. Which it doesn’t.

thanks!

will be interesting implementing the deck of a modern container ship, with all those stacked (that is, supporter), openable, lockable and enterable things whose happen to be named “container”… and indeed are designed contain goods (in maritime parlance, in IF parlance, objects/things)

… no wonder that the classical drug-busting trope was never an IF puzzle, I suspect.

Best regards from Italy,
dott. Piergiorgio.

1 Like

If necessary, you can disable this with a bit of a hack:

The plural of container is asdfasdf.

I use this in Scroll Thief to have “some containers” as a specific piece of scenery without triggering disambiguation. It has no serious side effects—you can still “repeat with the item running through containers” in your source, for example, without a problem.

(You can even set several different plurals to asdfasdf without Inform complaining. I do it for doors too, to have “a pair of double doors”.)

2 Likes

I’ve been toying with the idea of explicitly making all kind plurals begin with a punctuation mark that I’ll also strip from user input (and putting anything I do want to be usable in commands back in an Understand statement).

Honestly I’m not sure why this is a default at all, when the singular name isn’t. I’ll look through the compiler documentation at some point and see if it says.

I haven’t found an explanation, but It seems the logic is just that for any object that can be a noun, it wants to set a plural form for understanding and for the printed plural name. It defaults to the plural of the kind for both. But Understand "octopodes" as the plural of the octopus. doesn’t clobber animals being understood as the octopus; it’s additive.

It works with directions too.

>take directions
Which do you mean, the north, the northeast, the northwest, the south, the southeast, the southwest, the east, the west, the up, the down, the inside or the outside?

And rooms, though you have to go out of your way to put them in scope, of course.

The automatic generation of plurals is very useful functionality in general, but I would love it if it were possible to override the behavior via something like:

The plural of widget is nothing.

or

The kind widget has no plural.

or the like.

I think I once got to submit an interesting bug report when trying the first version, come to think of it.

@Zed, it’s the result of class-based inheritance of the name property at the I6 level. Creating the octopus kind as an animal in I7 (as assumed in your example) means that the kind’s provided plural (octopodes) will be applied to the I6 class associated with the I7 kind. The declaration of a plural for the octopus kind doesn’t override the default plural creation for the animal kind (which gets its own I6 class that is designated as parent to the octopus kind’s class).

1 Like

I can confirm that this works. And some time I’ll publish my Punctuation Removal successor.

doh, much simpler: make everything privately-named and explicitly associate with them whatever plurals I do or don’t want, just like I’d then have to explicitly associate singulars.

1 Like

Honestly I’m not sure why this is a default at all, when the singular name isn’t.

I reported this as a bug back in 2017. We were discussing it in this thread.

2 Likes

And there it remains, to this day: bug I7-1980.