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.
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:
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.