Here's how a room is formatted:
Items V through XV are optional; they are not necessary for the room to function. However, at least in the case of extended room descriptions, they are highly recommended. >:) You might consult the hints for creating rooms section at the end of this document.
Sections between V. [exit direction] and VIII. [exit vnum] must be kept together, and placed in the order that the above format shows. For example, if there are doors north, south and west, all of three sets of door data must go before the extended description related information.
Below is an example of a room we'll use throughout this document:
#11 A Small Glade~ Grasses, flowers, and patches of clover extend from here well to the north and into other parts of the woods surrounding this glade. The brush beneath the trees is fairly thick in places, such as to the east, making travel that way impossible to adventurers. To the south, too, the way is blocked, but by a gate which leads to a building over there. A sign hanging next to the gate on the fence reads, "Shamrock's Cafe -- Come On In!". ~ 0 0 2 D2 The gate there doesn't appear to be lockable. ~ gate~ 1 -1 7 D3 The grasses and flowers continue over there. ~ ~ 0 -1 12 D0 The glade continues that way. ~ ~ 0 -1 14 E sign~ #YShamrock's Cafe - Come On In!#n ~ E gate~ The gate resembles the rest of the fence, except for the crossbeam placed diagonally down its center. ~ E fence~ Four wood beams are set horizontally between each pair of posts in the ground, keeping the woodlands out of the area it protects. ~ E flowers wildflowers~ The flowers of the field come in many varieties and colors, although purple, white and yellow are the most prevalent colors. ~ E grass clover~ The grasses and clovers of the field are not unusual in any way. ~ E trees brush~ Oak trees are fairly prevalent in the surrounding wood, as are maples and elms. At their feet the brush grows thick, too thick, unfortunately, to pass through. ~ K xyz 0 -80 0 encounters 2 encounter shamrockCafeEncounter01~ encounter shamrockCafeEncounter02~ S
Here's the breakdown:
The vnum is the number used to reference your room. There may only be one room of any given vnum at one time. (See our discussion of vnums in the introduction to the #AREAS area header.)
room header~This is the label of the room, and should be short. Characters with 'brief' mode on will only see this section of the room. Anything not an article (i.e. "a", "an", and "the") or a preposition (e.g. "of", "on", "around", etc.) should be capitalized. Do not forget to end the room header with a tilde (~).
room descriptionThis is the room description. It should be a minimum of three lines, preferably at least four or five, but not more than eight to ten. (if you want more information than that, do it in the extra descriptions). Be sure to put a tilde (~) BELOW the description (not at the end of the line).
[room flags]The first slot of line IV is a hangover from old file format, retained for compatibility. You can set it to whatever you want, for example zero (0). The second slot is room flags. A listing of room flags defined on Dawn follows:
A | dark | a light source must be carried to see in this room |
B | no-newbie | players between level 1 and 10 cannot enter this room (used for clan hideouts) |
C | no-mob | monsters cannot enter this room |
D | indoors | room is inside (i.e. not affected by weather) |
E | no-gate | one cannot gate into and out of this room |
G | graveyard | player may delete here and get a tombstone (only for the player-graveyard-area) |
J | private | room is limited to two characters (i.e. chat rooms) |
K | safe | safe from pkilling and aggressive mobs |
L | solitary | one character only can enter this room |
M | pet-shop | see addendum about pet shops |
N | no-recall | players cannot use the 'recall' command |
O | imp-only | only implementors can enter the room |
P | imm-only | only immortals (level 53up) can enter the room |
Q | hero-only | only heroes (level 51up) can enter the room |
R | newbie-only | only newbies can enter the room (level 1-5) |
S | law | prevents aggressive mobiles from entering the room (tracking and charmed aggressive mobs) |
T | no-where | the where command won't show players in this room |
U | no-magic | spells, potions, wands etc. won't work here |
V | hideout | room is part of a hideout (for dropping of clanitems) |
a | no-automap | room is not automapped (for lost in the mist ) |
e | no-encounters | no encounters occur in this room |
f | foggy | room is filled with fog and cannot scanned into or out from |
l | light | the room is always lit |
n | no-random | the room cannot be chosen randomly (e.g. by teleport) |
o | no-populate | no populations (from #POPULATE) occur in this room |
p | protected-area | room is part of a protected area. |
q | no-quit | quitting in this room is not allowed. |
r | no-trap | no traps can be set within this room |
s | no-scry | no remote-viewing spells can be used on victims within this room |
Pet shops: The room that the pets are to be sold in must be flagged M. However, the pets themselves must be loaded into the sequentially next room (that is, if the shop is #1036, the pets MUST be loaded into #1037 for the shop to work).
The third slot is sector type. The sector types are as follows:
Flag | Type | Move Pts | Notes |
0 | INSIDE | 1 | - |
1 | CITY | 2 | - |
2 | FIELD | 2 | - |
3 | FOREST | 3 | - |
4 | HILLS | 4 | - |
5 | MOUNTAIN | 6 | - |
6 | WATER | 4 | swimmable |
7 | DEEP WATER | - | boat required |
9 | AIR | - | fly spell required |
10 | DESERT | 9 | will eventually affect thirst and recovery |
11 | ICE | 4 | - |
12 | ETHER | 2 | - |
13 | UNDERWATER | 4 | - |
14 | CAVE | 3 | - |
15 | SNOW | 6 | - |
Exit directions are signified by a line with D# on it, with # replaced by 0 for north, 1 for east, 2 for south, 3 for west, 4 for up and 5 for down. An exit line containing D2 signifies an exit south.
A little bit more detailed:
The [exit direction] line is a bit complicated. But it is also very, very important to get right. Each room will have exits, with few exceptions. If there is no [exit direction] section in the room, there will be no exit. Even if there is a door into a room from somewhere, that door was a one-way door, like a turnstile.
The directions for doors are as follows:
0 North D0 1 East D1 2 South D2 3 West D3 4 Up D4 5 Down D5
If you want to connect two rooms together, you must have a door going (for example) east from Room A to Room B in the 'Room A' vnum. But for someone to get from Room B to Room A, there must be a Door West in the Room B vnum.
That may be a bit confusing, so let's try a different explanation. If you make a vnum with exits in every direction going to recall, they will all go to recall. All you are doing is creating a one-way pathway. It doesn't have to make sense as long as it goes where you intend it to go. But if you make those doors to recall, expecting a doorway to be created from recall to that room, you are mistaken. A pathway would have to be created in that room's vnum.
[extended description of what is seen in that direction]This section determines what will be seen if a character looks in the direction the exit designates. For example,
The glade continues that way.
is what the player will see if the player typed 'look north' and the above was the exit description. Be sure to put a tilde (~) BELOW the description (not at the end of the line).
[door keyword]If the exit you are working on is a door, you may define a [door keyword] that the character may access to open the door and will see when he opens it. In the Shamrock's Cafe example above, we have
D2 The gate there doesn't appear to be lockable. ~ gate~
gate is the door keyphrase that will allow the character to type 'open gate' or 'open south' to open the entryway. When they do, they will see the message:
You open the gate.[door state] [key vnum] [exit vnum]
Door state sets the door as open, closed, locked, etc. Here's a list:
0 denotes an open door. 1 denotes a closed door, but can be picked, provided it's defined as locked in the #RESETS. 2 denotes closed and pickproof. 3 denotes closed and nopass, pick lock is possible. 4 denotes closed, nopass and pickproof.
By adding "8" to the door state number, you can make the door transparent, that is, players can see through it. This is useful for doors like iron bars and such. So, to make a door closed, pickproof, and see-thru, you add "8" to the number for closed and pickproof ("2") and insert the result ("10").
You also have the option of making the door no-close (as in a broken door) and no-lock. Just as you do for the transparent door above, you add "16" for no-close doors, and "32" for no-lock doors, to the door state of the door. Thus, you could make a door that, once opened, cannot be closed again.
Key vnum denotes the vnum of the key used to unlock the door, if the door is lockable and if you choose to have a key that allows it to be unlocked. Use -1 for a door or exit with no key to open it (that is, whether or not the exit has a door -- if there's no key for the exit, place a -1 here.) If you specify a key, give the key a reasonable level, as the level of the key sets the difficulty of the lock!
Exit vnum denotes the vnum of the room that this exit links to. For example,
1 -1 2400
defines a closed door, not locked to room number 2400.
[extra]E marks the beginning of an extra description. Extras are used to flesh out room descriptions by giving keywords that may be looked at or examined to give more information. Also, to have multiple sets of extras, you must input all of the data under independent extra lines. Using the Shamrock's Cafe example above, we have the room description,
Grasses, flowers, and patches of clover extend from here well to the north and into other parts of the woods surrounding this glade. The brush beneath the trees is fairly thick in places, such as to the east, making travel that way impossible to adventurers. To the south, too, the way is blocked, but by a gate which leads to a building over there. A sign hanging next to the gate on the fence reads, "Shamrock's Cafe -- Come On In!".
with these extended descriptions:
E gate~ The gate resembles the rest of the fence, except for the crossbeam placed diagonally down its center. ~ E fence~ Four wood beams are set horizontally between each pair of posts in the ground, keeping the woodlands out of the area it protects. ~
This would yield the following result when the player typed 'exa gate' or 'look gate':
The gate resembles the rest of the fence, except for the crossbeam placed diagonally down its center.
and would display the following if the player typed 'look fence' or 'exa fence':
Four wood beams are set horizontally between each pair of posts in the ground, keeping the woodlands out of the area it protects.
Do not forget to put a tilde (~) after the keywords or the text.
[mana recovery adjust] [healing recovery adjust]These slots can change the recovery rates of players in a room. The default recovery rate is 100% (normal). However, you may adjust recovery of mana or hit points up or down to 1% of normal or 200% of normal. To adjust mana, the syntax is
M [number]
to adjust mana point recovery (that is, M 90 to decrease mana to 90% of normal recovery rate) and
H [number]
to adjust hit point recovery (that is, H 110 to increase healing by 10%.)
Here's another example:
M 75 H 125
Note! Increasing healing or mana recovery is a room option that should be used very sparingly. Decrease of healing/mana recovery may be used more frequently.
[damage [damtype] [damdice]]Just as a room can heal, so it can damage. The damtype and damdice use the same conventions as those used by mobiles, and will damage a player or mobile every Pulse.MOBILE. Try to keep the damage low (unless you want players or mobs in the room to die quickly.)
[encounters nr]This allows the builder to specify one or more encounters in a room. By default, all rooms have at maximum one encounter. This keyword allows the builder to change that number to greater than one, that is, the room can have more than one encounter. Please use only natural numbers as the value.
[encounter name]This keyword allows the builder to specify an encounter by name. Thus, an encounter you may have on reserve for forest sectors can be applied to a special desert room or to the inside of a house using this keyword. This keyword can be used multiple times in a room.
[populate name]This keyword allows the builder to specify a populate entry by name. A builder can thus populate a room with wildly different mobiles and objects in contrast with the rest of the area. This keyword can be used multiple times in a room.
[clan clanName]When building clan areas, this specifies the room as a "clan room" so that clan items will not rot when placed on the floor of a clan room. Unless you are building a clan area, you will not use this modifier.
SS signifies the end of the room. All rooms MUST be ended with S.