Need an alternative to 'now the room is visisted'

In a previous room, a new room is hidden until the player discusses a certain topic. This is revealed by stating ‘now the room is visited’. However, when the player moves to that new room for the first time, they don’t get the unvisited description, only the visited version.

Is there an alternative way of revealing the room? I know exits can be revealed or known, and I’ve tried ‘known’ or ‘true’, which don’t work, so what is the best practice for revealing a room’s existence?

There is no built-in property for this. (The presumption in old-school games is that every room is discovered the first time you enter it, and “unvisited/visited” covers that nicely.)

But you could define this yourself:

A room can be known or unknown. A room is usually unknown.


You can also make up new properties whenever you want, for individual things.

The Library can be revealed. The Library is not revealed.
The description of the Library is "It's a library[if revealed] that has been revealed[end if]."

now the Library is revealed.

Yes, these make sense, thank you. I forget how easy inform is for handling different states.

Hmmm, I’m struggling to implement this. I have this set up as my room that is supposed to be hidden:

A room can be known or unknown. A room is normally known.
The Hall is a room south of 100m.  The Hall is unknown.

(I’ve tried both ‘A room is normally known’ and ‘unknown’)

In the previous room, I have this:

After quizzing the voice about (a subject):
	say "Now I'll reveal the room";
	now the Hall is known;

I’ve even tried defining The Hall as unknown in the previous room’s description, but currently the player can skip this and just type ‘s’ to go south to The Hall, which I want to prevent.

Don’t I want to include an if statement somewhere that does something like ‘if the hall is unknown, there is no exit to the hall’?

Right, you probably want something like:

instead of going south when the location is 100m and the hall is unknown, say “You don’t see any way to do that.”

(Filling in the appropriate specifics, of course)


Perfect! Thanks @DeusIrae

1 Like

See also “Epistemology” by Eric Eve (which I believe is now included in the default Inform set) which uses “known/unknown” as properties.

Epistemology adds two properties to every thing in the game: seen/unseen and familiar/unfamiliar. Every object starts as unseen and when the player encounters things (is in the same room or looks in the container where the object is) they automatically change to being seen. The familiar/unfamiliar property is what the author can toggle when needed if the player character already knows about something or learns about it during the game. The author can test whether a thing is either seen or familiar by checking if it’s known or unknown.

1 Like