home » builders » builder's lessons » room exits

Room exits

There are 6 possible normal room exits. North South West East Up and Down. Please note that non wilderness area's may NOT use the exits northeast, northwest, southeast and southwest. If your area arrives with those exits in it, your area will be sent back to be reworked. The first room example has only one room exit. Take note of the four lines that are in an exit. Often new builders submit their area for the first time with these lines out of order.

#QQ00
The Riven Shield Shop~
{30}This shop is famous up and down the Sword Coast for its large and varied
assortment of secondhand arms and armour.  No one is tempted to steal
any of the more valuable pieces for it is widely known that some of the
shields on the ceiling contain magically imprissoned monsters that
can be released to fight as an ally of the shield wearer.
~
0 ROOM_INDOORS SECT_INSIDE 0 0 0
DDIR_WEST
~
~
0 -1 QQ01 0
S

The room above has one exit out of the room. It leads to the west and goes to room number 01 in the area. Lets look at the elements of the exit information:

DDIR_WEST - This is telling the game which way you want the direction to go. This is the format that you should use.

~ - The tilda's on each of the next two lines are needed by the code. The first line can be used for a short comment before the tilda if you so wish. For instance when I am connecting up another area to this room, I will put a comment stating the name of the area that is being connected to it. The second tilda line is used for keywords for doors and gates. More information is about that below.

0 -1 QQ01 0 - The 0 is where the door flags would go if there were any. The -1 is the vnum of the door key. Because there is no door and therefore no lock in this room, the -1 denotes that there is no key. The QQ01 is the vnum of the room that the exit is going to. The 0 is the size of the exit. 0 or 1 denotes that there are no size limits on the room. See the table below for size limits.

Note that the S is after all the room's information. This tells the game when all the information about the room is in, even the programs and extra descriptions. (See the lessons about room programs and extra descriptions).

To follow is an example of a room using all allowed exits.

#QQ00
Refrectory~
{30}A large and airy room that holds several long tables, crafted out
of gleaming wood. This room serves as an informal meeting places
for students and teachers alike. Quarters are scattered around
for overnight stays and delicious smells drift from the kitchen.
~
0 ROOM_INDOORS|ROOM_NO_ASTRAL  SECT_INSIDE 0 0 0
DDIR_NORTH
~
~
0 -1 QQ19 1
DDIR_EAST
~
~
0 -1 QQ20 1
DDIR_SOUTH
~
~
0 -1 QQ22 1
DDIR_WEST
~
~
0 -1 QQ21 1
DDIR_UP
~
~
0 -1 QQ23 1
DDIR_DOWN
~
~
0 -1 QQ02 1
S

Rooms with doors and gates

Below is a sample of a room that has a locked door.

#QQ14
Waterdeep Dungeon Entrance~
{80}It is damp and cold in here.  The door is made of a heavy iron. It was designed
to keep people in rather than out. There is a dripping sound in the distance.  Not
a pleasant place to have to spend the night or any length of time.  Mouldering
straw is piled up in the corners.
~
0 ROOM_INDOORS SECT_INSIDE 0 0 0
DDIR_UP
~
~
0 -1 QQ04 0
DDIR_DOWN
~
iron door~
EX_ISDOOR|EX_CLOSED|EX_LOCKED QQ76 QQ15 0
S

The first exit of this room is heading up is like the others in the previous examples. It has no doors. There is nothing stopping the way up. The exit down however is barred by a locked door that requires a key to unlock it. There is nothing to prevent it from being picked, bashed or passed through by magic. There are flags that you can add to an exit to prevent all or some of these events. The last two lines of the exit code are what is important when making a room. The DDIR line and the first tilda line are the same as any other exit.

iron door~ - If you have a door or a gate in your room this is the field where you put in the keyword for the exit. For instance if it is a gate you will put gate in as keyword. Or you could put in trapdoor. The player would have to type open doorname. If there is no door just put in a tilda ~ like in the other rooms. If you want to have an ivory door and you want it to show that the player opens the ivory door rather than opens the ivory you would put the ivory door between quotes like this 'ivory door'~.

EX_ISDOOR|EX_CLOSED|EX_LOCKED QQ76 QQ15 0 This is a room exit with a closed locked door. In order for a door to be you must have the ISDOOR flag. When the game boots up after copyover or crash, this door will be locked and closed. It will remain thus until someone opens it. Once open it will stay that way until someone closes it. If you want a door close automatically, you can set a door reset (see the lessons about door resets), or you can put programs on a mobile who is guarding the door or gate. Object QQ76 will open this door. QQ76 may not be of ITEM_TYPE_KEY but could be any object. As you can see you can have more than one room flag separated by a | pipe. QQ15 is the room that the exit is going to. The 0 is the field for the size of the PC that can fit through this exit. In this case any sized PC may fit through this door.

Somewhere Exits

A somewhere exit is where the player types a keyword to enter the area rather than heading in a direction. Somewhere exits can be on top of all the other exits, and you can have more than one somewhere exit in a room providing they have different keywords. Below is a sample of a somewhere exit.

#QQ01
Before the gates of Daggerford.~
{70}The large gates of the city of Daggerford stand before you.  Although not as big
as its nearby cousin, Waterdeep, the city of Daggerford has much to offer an
adventurer.  There is a constant traffic of caravaners and traders into and out
of the city.
~
0 0 SECT_ROAD 0 0 0
DDIR_SOMEWHERE
Daggerford~
path~
EX_XAUTO -1 QQ02 1
S

The somewhere exit above can be entered by typing the word path. The EX_AUTO flag is needed to make the somewhere exit work correctly. When the PC types path, they will end up in room 02 of the area.

Door Flags Listing

Below is a list of possible door flags. Try and stick to the simple flags, unless you have good reason don't use some of the more "exotic" sounding exits.

EX_ISDOOR exit has a door
EX_CLOSED exit with door is closed
EX_LOCKED exit with door is locked
EX_SECRET cannot be seen or opened
EX_PICKPROOF door cannot be picked
EX_FLY player must fly to pass the door
EX_CLIMB players must climb to pass
EX_DIG players must dig the exit
EX_NOPASSDOOR passdoor doesn't work
EX_HIDDEN cannot be seen but can open
EX_PASSAGE passage opened by a mob program
EX_PORTAL spells that create portals
EX_XCLIMB typing 'climb' will scoot you out this exit
EX_XENTER typing 'enter' will move a PC out of this exit
EX_XLEAVE typing 'leave' will send a PC out this exit
EX_XAUTO players will 'automatically' use this exit. This is required for somewhere exits with keyword entrances.
EX_XSEARCHABLE door can be found in standard search
EX_BASHED exit has been bashed
EX_BASHPROOF exit cannot be bashed
EX_NOMOB mobiles cannot pass
EX_WINDOW players can look even thru closed door
EX_XLOOK players can look through the exit

Exit sizes

You can limit the size of your exit and make it impossible for creatures larger than a certain size to fit through. For instance you can set your exit that only creatures that are sized small may fit through the exit. This is ideal for simulating tiny tunnels that only a small gnome might fit through but not a larger creature like an orc. The table below shows the numbers to be used for the sizes.

EXIT SIZE BIT VECTOR
EXIT_SIZE_ANY 0
EXIT_SIZE_TINY 1000
EXIT_SIZE_SMALL 1001
EXIT_SIZE_MEDIUM 1002
EXIT_SIZE_NORMAL 1002
EXIT_SIZE_LARGE 1003
EXIT_SIZE_HUGE 1004
EXIT_SIZE_GIANT 1005