Over-specifying the understand command

Hi all. I’m trying to flesh out the descriptions of some of my locations and have stumbled upon a minor quirk. I have the following simplified code:

Copse is a room. "Sunlight filters down through the tall [one of]acacia[or]birch[or]dark oak[or]oak[or]spruce[sticky random] trees, warming [us]."

This works as expected. What I didn’t initially realise, however, was that I would need something like the following to ensure all trees can be examined by type:

Understand "acacia trees" and "birch trees" and "dark oak trees" and "oak trees" and "spruce trees" and "trees" and "tree" as some trees.

Now I have the situation in which, if a birch tree is chosen when the game starts, the user can still type in “examine acacia tree” and get the description featuring the wrong tree. I could omit the tree type from the understand rule but that would seem a little harsh on the player (“x acacia tree” - “I can see no such thing”).

I’m not hugely bothered by this but it’s good to try to do things consistently and not annoy the player unnecessarily, so if there’s a better way of doing this sort of thing, please let me know!

If you want to require the word “tree”: Understand "acacia/birch/oak/spruce tree/trees" as the trees.
If not: Understand "acacia" or "birch" or "oak" or "spruce" or "dark" or "tree" or "trees" as the trees.

Well, zarf might say (probably correctly) that it’s not really a problem if the game understands “x acacia trees” when they’re oaks; the only case where they would try that would be if they were acacia trees the last time they played, and it probably doesn’t annoy them too much if it’s understood under those circumstances.

Otherwise, though, you need to keep track of what you actually chose. (Which you might need to anyway, in order to print the description of the trees.) One way is with a kind of value (untested):

Species is a kind of value. The species are acacia, birch, oak, dark oak [etc.] Some trees have a species. When play begins: now the species of some trees is a random species. Understand the species property as describing some trees.

…and you’d have to incorporate it into the room description as appropriate.

You might also be able to set the printed name and use “Understand the printed name property as describing some trees,” but that would require the player to hit the exact printed name–“x acacia” wouldn’t work.

Also it seems to me that you ought to be able to understand “acacias.” In your original case you can just put that in the Understand line. In the case where you’re understanding a property you can do that like this, I think:

Understand "acacias" as acacia.

If you have “tree” as a kind and “understand “tree” as a tree”, you should be able to define “an oak tree is a tree”. I’ve not had problems with disambiguation that way if the player types X TREE.

Then you can make them all scenery with “a tree can be scenery…a tree is usually scenery”. Or make them backdrops.

Well, you could do it this way:

Understand "acacia" or "acacias" as the trees when the description of copse matches the text "acacia".

(and so on).

Thanks Draconis. “Dark oak” is a pain due to the space it contains, otherwise it works well and is more succinct.

Is there a difference (important or otherwise) between “as THE trees” and “as SOME trees”? I had the latter and you wrote the former, and both compile without error.

Works like a charm, thank you!

Understanding acacias, oaks, birches etc. might be overkill, but thank you for your attention to detail, as I think that’s the exact sort of thing that I would type in as a sort of short cut, and I’d prefer it not to fail.

For the “Understand the species property as describing some trees” plan, you’ll want to add:

Understand “dark”, “oak”, “oaks” as dark oak.

(I agree that recognizing singular and plural is desirable here.)

If you have a single object which is plural-named, it doesn’t matter.

If you define a kind of thing called a tree, and have several trees in the game, then you want to be careful about “some trees” vs “all trees” versus “the particular tree”.