How to Build and Walk Through a Master Bathroom in Rooms and Exits

The Rooms and Exits library for Inform 7 handles exit generation automatically based on adjacency rules, which sounds convenient until your interactive fiction project has a master bathroom with eight possible exits and three of them need conditional locking. I spent a week debugging a plumbing-themed mystery because the library kept creating a door from the shower stall back into the hallway. It turns out Inform treats "inside" as a direction, and the master bathroom had two objects claiming the same exit vector. The short version: You place rooms, attach the Rooms and Exits library, define adjacency, and then either let it generate exits or override it where it matters. The walkthrough comes after everything is walking correctly.

Rooms And Exits Master Bathroom Walkthrough

Here is the practical setup. You start with a basic room declaration and the library inclusion at the top of your Inform source file. Then you declare the master bathroom and the rooms surrounding it. Include Rooms and Exits by Graham Nelson. Bedroom is a room. The master bathroom is north of the bedroom. The hallway is east of the bedroom.

That alone triggers automatic exit creation between adjacent rooms. Inform generates the north exit from the bedroom into the master bathroom, and the reverse south exit. If you have four rooms touching each other, you get all the exits without writing a single "instead of going" rule. The problem shows up when you want something other than a plain door. You want the master bathroom to have a locked door that only opens after the player finds the key under the towel rack. The library does not handle conditional exits natively. You have to override them. The locked door is a private entrance between the bedroom and the master bathroom. The description of the locked door is "A heavy oak door with a brass lock."

Get the Full Details

Rooms & Exits Level 7 Chapter 3 Master Bathroom Walkthrough Gameplay Android,iOS - YouTube
Rooms & Exits Level 7 Chapter 3 Master Bathroom Walkthrough Gameplay Android,iOS - YouTube

Instead of going into the master bathroom from the bedroom when the locked door is closed: say "The door is locked." This overrides the auto-generated exit. The library still creates it, but your rule intercepts the movement before it happens. You also need to handle the reverse direction. Players will try to go south from the master bathroom into the bedroom and hit the same wall. Instead of going south from the master bathroom when the locked door is closed: say "The door is locked."

Now here is the part nobody writes about clearly. When you define a private entrance like that, the library sometimes still generates a fallback exit through walls. I discovered this when a player could walk from the master bathroom straight into the kitchen because the adjacency list had a leftover connection from an earlier room layout I changed. The fix was to add an explicit wall barrier. The thick drywall is scenery in the master bathroom. Understand "wall" as the thick drywall. The thick drywall is west of the master bathroom. That blocks the phantom passage. Walls are scenery by default, so players can't pick them up, but they still function as proper barriers in the exit generation logic.

For the walkthrough itself, once the layout is correct, you write it as a step-by-step sequence. Here is what a complete walkthrough looks like for a master bathroom scene with a few interactables. Start in the bedroom. Go north into the master bathroom. Examine the towel rack. Take the key from under the towel rack. Unlock the locked door with the key. Go south back to the bedroom. Re-examine the locked door. It is now open. That is the core loop. Any puzzles, secret passages, or timed events slot into this skeleton. The walkthrough does not need fancy formatting. It needs accurate directional commands that match your room topology.

Rooms & Exits Chapter 2 Level 7 Walkthrough [Master Bathroom]
Rooms & Exits Chapter 2 Level 7 Walkthrough [Master Bathroom]

One thing that trips people up repeatedly: the library uses cardinal directions by default, but Inform allows any named direction if you declare it first. If your master bathroom has a hatch to the ceiling or a trapdoor to the basement, you need to declare "up" and "down" as directions before the library starts generating exits, or they get swallowed by the default adjacency system. I learned this the hard way when a basement exit appeared as "north" because the library had no other option and chose the nearest cardinal direction. Direction up is upwards. Direction down is downward. The trapdoor is down from the master bathroom. This forces the library to respect your intentional directions instead of guessing. The difference between a clean layout and a broken one is usually a single misplaced direction declaration.

Another edge case involves multiple exits to the same room. Say you want both a door and a doorway from the bedroom into the master bathroom. The library treats these as duplicates and merges them. If you need two distinct exits, you have to make one of them a private entrance and write custom movement rules for it. It adds code, but it prevents the game from confusing which exit the player used. The walkthrough should document every non-obvious choice. If the player can only reach the key by climbing on the toilet seat, the walkthrough says "Climb toilet seat. Take key." If there is a timer that locks the bathroom after five in-game minutes, the walkthrough notes the time constraint and the workaround, which in my experience is usually a switch or item that resets the timer. If you are distributing this as part of a larger game, include the walkthrough in the game itself using the "table of walkthrough" feature or as a separate help text. Players skip it if it is buried in documentation. Put it under the help command so it is one keystroke away.

The whole process from blank source file to a working master bathroom with a locked exit and a clean walkthrough takes about forty-five minutes if you know the library quirks. The first time, plan on two to three hours because you will miss the direction declaration issue and spend an hour tracking down a phantom exit through a wall that should not have been passable. There is no way around learning the failure modes. They present themselves quickly and then never again once you know what to look for.

Rooms & Exits Chapter 2 Level 7 Walkthrough [Master Bathroom]
Rooms & Exits Chapter 2 Level 7 Walkthrough [Master Bathroom]