Hidden doors and compass rose

I am using the compass rose on the status bar as demonstrated in Bronze…

And I have a hidden room. And I cannot figure out how to hide it from the compass rose, and reveal it when the door is opened. I have tried both Secret Doors by Andrew Owen and Hidden Items by Krister Fundin to hide the door.

I can get it to work (with a bit of editing) with Exit Lister by Eric Eve and using Hidden Items, but the rose always shows the room. Secret Doors has been a bit tougher to work into this combo, but either would be okay if I could get them to work correctly with the compass rose. But decided to use Hidden Items because at least I can get it to work consistently in Exit Lister.

I can get it to be hidden from both… but not revealed when door is found… at least in compass rose. In the rose I can get it to be hidden or shown, but no way to change it as the status of the hidden door changes. I can make the room “invisible” to the rose… but not bring it back… and I can make it always show, but not hide it when the door is hidden, and then show it when the door in no longer hidden.

Okay… to be fair I have to add, I have blended the compass rose routine with Exit Lister into a custom status bar extension. I thought it would make things easier to have a personal “default status bar”. Here is how it stands now:

[spoiler][code]Seekers Status Bar by Seeker begins here.

[Based in part on Exit Lister by Eric Eve and the status bar from ‘Bronze’ by Emily Short]

Include Basic Screen Effects by Emily Short.

Section 1 - Apparent

A room has a text called destination name. The destination name of a room is usually “”.

A door can be apparent or not apparent. A door is usually apparent.
A hidden door is not apparent.
A revealed door is apparent.
A room can be apparent or not apparent. A room is usually apparent.

Section 2 - Dark Stuff

dark-exits-invisible is a truth state that varies. dark-exits-invisible is true.

The light-meter is a privately-named scenery thing.

Definition: a room (called the target room) is light-filled:
if the target room is lighted, decide yes;
move the light-meter to the target room;
if the light-meter can see a lit thing, decide yes;
remove the light-meter from play;
decide no.

Definition: a room (called target-destination) is darkness-occluded:
if dark-exits-invisible is false, decide no;
if not in darkness, decide no;
decide on whether or not target-destination is not light-filled.

Chapter 3 - Exit Lister Tables

To say exit list:
let exits count be 0;
let farplace be location;
say "Exits: ";
repeat with way running through directions
begin;
let farplace be the room way from the location;
now direction-object is the room-or-door way from the location;
if direction-object is apparent and farplace is not darkness-occluded
begin;
increase the exits count by 1;
if farplace is unvisited and indicate-unvisited is show-unvisited, say “[unvisited-mark][u-v way][end-unvisited-mark]”;
otherwise say “[way]”;
say " ";
end if;
end repeat;
if exits count is 0,
say “[italic type][no-exits][roman type]”.

To say no-exits: say “None”.

Chapter 5 - Exit Lister Values

A listing_state is a kind of value. The listing_states are enabled and disabled.

Exit listing is a listing_state that varies. Exit Listing is enabled.

A visiting-mark is a kind of value. The visiting-marks are show-unvisited and dont-show-unvisited.

indicate-unvisited is a visiting-mark that varies.

indicate-unvisited is show-unvisited.

The direction-object is an object that varies.

Chapter 6 - Exit Lister Actions

Section 1 - ExitStarting and ExitStopping

ExitStarting is an action out of world.

ExitStopping is an action out of world.

Carry out ExitStopping (this is the standard Exit Stopping rule):
now exit listing is disabled.

Report ExitStopping:
clear only the status line;
say “Exit listing is now off.”

Understand “exits off” as ExitStopping.

Understand “exits on” as ExitStarting.

Carry out ExitStarting (this is the standard Exit Starting rule):
now exit listing is enabled.

Report ExitStarting:
say “Exit listing is now on.”;

Section 2- ExitListing

ExitListing is an action out of world.

Understand “exits” as ExitListing.

Carry out ExitListing (this is the standard carry out exit listing rule):
list the exits.

[ This is defined as a separate phrase so that it can be called from
user code, e.g. to replace the standard “You can’t go that way” message. ]

To list the exits:
let exits count be 0;
let farplace be location;
repeat with way running through directions
begin;
let farplace be the room way from the location;
now direction-object is the room-or-door way from the location;
if the direction-object is apparent and farplace is not darkness-occluded, increase exits count by 1;
end repeat;
if exits count is 0
begin;
say “[no-obvious-exits]”;
rule fails;
end if;
let i be exits count;
if exits count is 1, say "The only obvious exit is ";
otherwise say "The obvious exits are “;
repeat with way running through directions
begin;
let farplace be the room way from the location;
now direction-object is the room-or-door way from the location;
if direction-object is apparent and farplace is not darkness-occluded
begin;
say “[way]”;
if farplace is visited, say " (to [destname farplace])”;
decrease i by 1;
if i is 0, say “.”;
if i is 1, say " and ";
if i > 1, say ", ";
end if;
end repeat.

To say list the exits: list the exits.

To say no-obvious-exits: say “There are no obvious exits.”

Report ExitListing when listing explained is false (this is the explain exit listing rule):
now listing explained is true;
say “(Use EXITS ON to enable the status line exit lister and EXITS OFF to turn it
off.)”

To say destname (place - a room):
if the destination name of place is “”, say “[the place]” in lower case;
otherwise say “[destination name of place]”.

listing explained is a truth state that varies.

Chapter 7 - Exit Lister Indicating Unvisited

exit colouring is an action out of world.
understand “exit colour/color” as exit colouring.

exit-colour-num is a number that varies.
exit-colour-num is 1.
exit-symbol-num is a number that varies.

exit symboling is an action out of world.

Understand “exit symbol” as exit symboling.

exit-marker is a text that varies.

Carry out exit symboling (this is the standard exit symboling rule):
increase exit-symbol-num by 1;
if exit-symbol-num > the number of rows in the Table of Exit Symbols, now exit-symbol-num is 1;
choose row exit-symbol-num in the Table of Exit Symbols;
now exit-marker is the exit-symbol entry.

Report exit symboling:
say “Done.”

Table of Exit Symbols
exit-symbol
“”
“=”
“-”
“*”
“+”

Section 7G (for Glulx Only)

exit-symbol-num is 1.
exit-marker is “”.

Carry out exit colouring (this is the standard exit colouring rule):
now indicate-unvisited is the visiting-mark after indicate-unvisited.

to say unvisited-mark:
say “[exit-marker]”.

to say end-unvisited-mark:
say “[exit-marker]”.

to say u-v (way - a direction):
let cap-way be indexed text;
now cap-way is “[way]”;
say "[cap-way in upper case] ".

Section 7Z (for Z-machine only)

Carry out exit colouring (this is the standard exit colouring rule):
increase exit-colour-num by 1;
if exit-colour-num > 4 begin;
now exit-colour-num is 0;
now indicate-unvisited is dont-show-unvisited;
otherwise;
now indicate-unvisited is show-unvisited;
end if.

Report exit colouring:
say “Done.”

to say unvisited-mark:
if exit-colour-num is 1 begin;
turn the background red;
otherwise if exit-colour-num is 2;
turn the background yellow;
otherwise if exit-colour-num is 3;
turn the background blue;
otherwise;
turn the background green;
end if;
say “[exit-marker]”.

to say end-unvisited-mark:
say “[exit-marker][default letters]”.

exit-symbol-num is 1.
exit-marker is “”.

to say u-v (way - a direction):
say “[way]”.

Table of Fancy Status
left central right
" [if in darkness]Darkness[otherwise]Location: [location][end if]" “Current Time: [time of day]” “[top rose]”
" " “” “[middle rose]”
" Rooms seen : [number of rooms which are visited]/[number of rooms]" “[exit list]” “[bottom rose]”

To say red reverse:
turn the background red.

To say black reverse:
turn the background black.

To say white reverse:
turn the background white.

[Definition: a room is apparent:
[if it is the Dank Room and the trapdoor is scenery, no;]
if it is lit, yes;
[if it is the ultimate location of the candle, yes;]
if in darkness, no;
if it is apparent, yes;
yes.]

To say top rose:
let place be the room up from the location;
if the place is a apparent room, say “[if the place is unvisited][red reverse][end if]U [default letters]”; otherwise say " ";
let place be the room northwest from the location;
if place is a apparent room, say “[if the place is unvisited][red reverse][end if]NW[default letters]”; otherwise say " ";
let place be the room north from the location;
if place is a apparent room, say “[if the place is unvisited][red reverse][end if] N [default letters]”; otherwise say " ";
let place be the room northeast from the location;
if place is a apparent room, say “[if the place is unvisited][red reverse][end if]NE[default letters]”; otherwise say " ".

To say middle rose:
say " ";
let place be the room west from the location;
if place is a apparent room, say “[if the place is unvisited][red reverse][end if]W [default letters]”; otherwise say " ";
say " . ";
let place be the room east from the location;
if place is a apparent room, say “[if the place is unvisited][red reverse][end if] E[default letters]”; otherwise say " ".

To say bottom rose:
let place be the room down from the location;
if the place is a apparent room, say “[if the place is unvisited][red reverse][end if]D [default letters]”; otherwise say " ";
let place be the room southwest from the location;
if place is a apparent room, say “[if the place is unvisited][red reverse][end if]SW[default letters]”; otherwise say " ";
let place be the room south from the location;
if place is a apparent room, say “[if the place is unvisited][red reverse][end if] S [default letters]”; otherwise say " ";
let place be the room southeast from the location;
if place is a apparent room, say “[if the place is unvisited][red reverse][end if]SE[default letters]”; otherwise say " ".

Rule for constructing the status line:
fill status bar with Table of Fancy Status;
say default letters;
rule succeeds.

Seekers Status Bar ends here.
[/code][/spoiler]

Any ideas? I know it is silly, but I would like to use both the Exit Lister and compass rose on the status bar. Different people like different ways of visualizing things. I think it is a left brain/right brain type of thing. Personally, I prefer the rose or I would just remove it. So I want the hidden rooms hidden in it till they have been revealed…

I hope this makes sense… it is almost 2:30 am here… and this has been one of those “I will keep trying till I figure it out” type of problems. I should have been in bed hours ago. :wink:

Edit: to put code into a spoiler… I didn’t realize how long it would look in the forum.

Second edit to add: I think it is because Exit Lister looks at the door, and the compass rose looks at the room. And if I try to hide the room, I get a compile error that hidden can apply to things but not a room. I hope that might help.

Okay… solved my own problem.

I had tried so many combination’s of things, I thought I had tried them all. But I missed the key one…

Door 11 is a hidden door. It is closed.

Hallway is a room. Hallway is not apparent.

and then, when the proper item had been taken…

After taking the pillow:
reveal door 11;
now the door 11 is open;
now door 11 is apparent;
now hallway is apparent;
say “As you take the pillow, a secret door opens, revealing a secret passage!”

It was the “now hallway is apparent;” line. I had tried it before, but not in the right combination with the others.

Sorry for giving you all a long winded read and then realizing I missed the obvious answer.

Just a note: When you’re posting if you use a code tag (the “code” button above the text box) and then copy and paste your text from the IDE, your tab stops will show up. That’s really helpful in making your code legible.

(Advanced kludge: If you copy someone’s code directly from the post, the tabs will convert to spaces, which means Inform won’t read them; but if you hit “reply” and copy the code from their quoted post, you usually will preserve the tabs.)

I came across a curious problem involving hidden doors recently:

[code]Dark Passage is a room. Dim Corner is north of Dark Passage. Bright Entry is southeast of Dim Corner. Dingy Hairpin is southwest of Bright Entry and south of Dark Passage.

Bright Entry is mapped east of Dark Passage.[/code]

My intention was to implement a secret door between Dark Passage and Bright Entry using “instead of going east in Dark Passage,” etc. But the “mapped east” declaration, intended to make my Index map prettier, actually created a connection. Is that supposed to happen?

Yup: see Bee Chambers. It looks like the phrase you’re looking for is “Index map with Bright Entry mapped east of Dark Passage”; see here.

Thanks. I knew I’d read about that, but I couldn’t find the documentation when I was actually writing the source.