For a project I’m working on I need a way to print a room heading and description, just as if looking, but for a room that isn’t the location. Is there a way to do that without moving the player there? Or, alternatively, a way to suppress the description when I move the player back?
EDIT: Of course, as soon as I post this I find the “without printing a room description” clause. Never mind.
The easy part:
say "[bold type][roomyouwant][roman type][line break][description of roomyouwant]";
But that doesn’t deal with the stuff that you really want, which is all the other paragraphs Inform generates about notable things in the room, respecting darkness and so on.
The obvious, onerous way to do it would be to go to the Standard Rules, find the looking rulebook and the printing the locale description activity, copy it, paste to your own code, rename it and tear out everything you don’t really need, and replace names to refer to a specified room rather than the location of the player. But I’m sure there’s a much more efficient way.
I tried that, but the “visibility ceiling” rules are coded in I6 to refer to the actor and I didn’t want to risk changing them. For now I’m cheating and teleporting the player there, then teleporting the player back and resetting the visited state. It’s hacky, but it works for now.
Now I have a new problem. Is there a way to change “Library Message Number 8” for the looking action? This seems to be what controls the “(in the container)” part of the room heading. EDIT: Once again, I figure it out right after I post. Sorry.
I think there’s some kind of “through the door, you see” phrase that I vaguely remember being used in an example of Inform 7, if that’s your language. In the code, there are room descriptions tailored for looking from another location, so there should be implementations like “look west” somewhere.
There’s Emily Short’s “Facing” extension, which is useful but doesn’t quite provide what I need. It calls a different activity to describe the room, which provides a simpler description than looking does.