I'm curious, but does anyone know whether the game has some internal process to check and make sure that there isn't a blockable object in the square below before spawning a staircase? I can't recall ever having been trapped this way (since there's no way to go the opposite direction on the stairs without moving off and back onto it again) though it's the sort of thing that could easily happen when you get the random placement of objects. My concern is because I'm designing a couple of rooms that have fenced in sections and would hate to find out people were getting stuck because I think it looks prettier with a back wall. However, since it hasn't happened after multiple playtesting runthroughs, I'm beginning to think that it can't happen, which has some interesting ramifications by itself. If you're into creating hidden rooms and secret passages, nothing spoils the fun like having the player blunder into the middle of your super-secret treasure vault, simply because he went down a staircase and that's where the game randomly chose to stick the other end when building the next map. If the game does check for blockables before placing staircases, then you can prevent them from spawning in a certain room by making sure the top row is blocked off with custom blockers, water, impassable tiles, etc. EDIT: I've tested things out, and I can say with 99% certainty that if you cover every north wall square in a room with customblockers, that room will not spawn a staircase. If you use a transparent 32x32 png, and leave off both Name & Description, the player will never even know they're there. I've started doing this for my boss rooms and wizard galleries, and haven't had a problem since.
I suppose I should note that when building my rooms, I take the added precaution of using the "X" impassable space character anywhere that I'm planning on placing an immovable custom blocker. It makes it easier when figuring out X/Y coordinates, though I suppose it's possible the game might be looking at these spaces the same way they do water, lava, ice, and goo, and preventing stairs from forming in those locations, but still allowing for the possibility of getting blocked in by a custom blocker sitting on it's own, or a randomly place dungeon item like vending machines, mellow shrines, etc... <room width="15" height="12" name="Stink Garden 4"> <flags special="1" nomonsters="1" noblockers="1" notreasure="1" notraps="1" minLevel="5" maxLevel="5"/> <!-- Only appears on 5 --> <!-- - - - - - - - - - 11111 --> <!-- - - - - 012345678901234 --> <row text=" ############# "/><!--0--> <row text=" ############# "/><!--1--> <row text=" ##XXXXXXXXX## "/><!--2--> <row text="###X.......X###"/><!--3--> <row text="#..X.......X..#"/><!--4--> <row text="d..XXX...XXX..d"/><!--5--> <row text="#....X...X....#"/><!--6--> <row text="#....XX.XX....#"/><!--7--> <row text="##...........##"/><!--8--> <row text=" ##.........## "/><!--9--> <row text=" #####...##### "/><!--10--> <row text=" ######D###### "/><!--11--> <customblocker x="3" y="2" png="dungeon/bars_ne_corner.png" visblock="0" can_push="0" passable="0" /> <customblocker x="4" y="2" png="dungeon/bars_ew.png" visblock="0" can_push="0" passable="0" />
If you have non-square rooms and/or ones with floating chunks of wall in the middle, I've just noticed that these can spawn staircases too. Technically, you could have a room shaped like this: <row text=" ####### "/><!--0--> <row text="#########"/><!--1--> <row text="##.....##"/><!--2--> <row text="#.......#"/><!--3--> <row text="d...#...d"/><!--4--> <row text="#.......#"/><!--5--> <row text="##.....##"/><!--6--> <row text="#########"/><!--7--> <row text=" ####### "/><!--8--> ...and end up with a staircase floating in the middle of the room, seemingly unattached to any walls. (though really, you shouldn't be leaving a single vertical wall tile sitting on it's own because they don't draw properly, and cause weird line of sight issues.)