A usual trick in Quest is to swap one object for another e.g. broken radio for fixed radio, but for the player they are both called ‘radio’ - there is the object name that the code uses, and the name that the player sees which can be different. This is particularly useful for NPCs who are in different states e.g. asleep, awake, unhappy, happy etc.
I can get around this by putting conditionals on just one object, but it can get messy if there is a lot going on.
I believe you can do the same with rooms–call the room Workshop in your code, then say
The printed name of Workshop is "The Elves' Workshop".
or, if that is the actual name of a container(for the sake of example), do the same, but also make sure that the player can refer to it with the same words by saying
Understand "The" and "Elves" and "Workshop" as the workshop.
Also, in the case where it is a container, you’ll want to clarify, in your code, which one the player means when the player wants to do something with the elves–most likely the player will mean the actual elves (rather than the workshop, if this is a container)–you can include a line saying
Does the player mean doing anything with the elves: it is very likely.
just to make sure.
That’s the way I understand it, but I’ll defer to the experts (I’m not really one).
If you’re going to swap objects like this, consider this bit of polish:
The broken radio is a thing. The printed name of the broken radio is "radio".
The fixed radio is a thing. The printed name of the fixed radio is "radio".
The fixed radio is in the Kitchen.
Check attacking the fixed radio:
now the fixed radio is off-stage;
now the broken radio is in the location;
set pronouns from the broken radio;
instead say "You smash the radio. Now it doesn't work."
The line “set pronouns from…” resets “it” to refer to the given object. This allows the player to type
If you do go the printed name route, you don’t need to have “the” or “workshop” understood as the workshop–“workshop” is understood automatically because of the internal object name, and “the” is automatically understood as any noun (that’s not exactly how it works internally, I don’t think, but anyway it doesn’t need an explicit Understand).
If I may add a generalised version of the above, using relations:
The Shack is a room.
Degrading relates one thing to one thing. The verb to degrade to means the degrading relation.
The glass bottle is in the Shack.
The broken glass is nowhere. The indefinite article is "some".
The glass bottle degrades to the broken glass.
Instead of attacking something which degrades to something (called wreckage):
say "You let your anger loose on [the noun]. It gets smashed, leaving behind [a wreckage].";
now the noun is nowhere;
now the wreckage is in the location;
set pronouns from the wreckage.
(Thanks, Zarf, for the “set the pronouns part!” I didn’t know that one!)