How can I create objects that, while they exist in the current location, are not described and cannot be interacted with until the player uses an action such as “searching the room”?
I know this is probably an oft-asked question that has a simple answer, but I’ll be a monkey’s uncle if I can find a single example on how to do it.
Is there any reason that they need to exist in the room? Because if not, I’d do this:
The Yard is a room. "There's a huge pile of leaves in the middle of the yard."
The pile of leaves is scenery in The Yard. "These leaves are piled very high. You could fit a horse under them."
The tennis ball is a thing.
Instead of searching the pile of leaves:
say "You discover a tennis ball that you lost a while ago.";
move the tennis ball to The Yard.
As of now, there is no need for the objects I want hidden to be in the room. But later I might implement something that repeats through every object in the room and does something to it, even hidden ones, in which case it might become problematic.
I wonder how complex creating a relation between objects and the room they’re supposed to be in would be.
Emily Short’s extension Room Description Control provides rules for concealing objects in a room.