Section 5:    #ROOMS

Here's how a room is formatted:

  1. #[vnum]
  2. room header~
  3. room description
    ~
  4. [room flags]
  5. [exit direction]
  6. [extended description of what is seen in that direction]
    ~
  7. [door keyword]
    ~
  8. [door state] [key vnum] [exit vnum]
  9. [extra]
    [extended room description keywords]~
    [extended room description data]~
  10. [mana recovery adjust] [healing recovery adjust]
  11. [damage [damtype] [damdice]]
  12. [encounters nr]
  13. [encounter name]~
  14. [populate name]~
  15. [clan clanName]
  16. S

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:

  1. #[vnum]

    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.)

  2. 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 (~).

  3. room description
    ~

    This 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).

  4. [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:

    Adarka light source must be carried to see in this room
    Bno-newbieplayers between level 1 and 10 cannot enter this room (used for clan hideouts)
    Cno-mobmonsters cannot enter this room
    Dindoorsroom is inside (i.e. not affected by weather)
    Eno-gateone cannot gate into and out of this room
    Ggraveyardplayer may delete here and get a tombstone (only for the player-graveyard-area)
    Jprivateroom is limited to two characters (i.e. chat rooms)
    Ksafesafe from pkilling and aggressive mobs
    Lsolitaryone character only can enter this room
    Mpet-shopsee addendum about pet shops
    Nno-recallplayers cannot use the 'recall' command
    Oimp-onlyonly implementors can enter the room
    Pimm-onlyonly immortals (level 53up) can enter the room
    Qhero-onlyonly heroes (level 51up) can enter the room
    Rnewbie-onlyonly newbies can enter the room (level 1-5)
    Slawprevents aggressive mobiles from entering the room (tracking and charmed aggressive mobs)
    Tno-wherethe where command won't show players in this room
    Uno-magicspells, potions, wands etc. won't work here
    Vhideoutroom is part of a hideout (for dropping of clanitems)
    ano-automaproom is not automapped (for lost in the mist )
    eno-encountersno encounters occur in this room
    ffoggyroom is filled with fog and cannot scanned into or out from
    llightthe room is always lit
    nno-randomthe room cannot be chosen randomly (e.g. by teleport)
    ono-populateno populations (from #POPULATE) occur in this room
    pprotected-arearoom is part of a protected area.
    qno-quitquitting in this room is not allowed.
    rno-trapno traps can be set within this room
    sno-scryno 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:

    FlagTypeMove PtsNotes
    0INSIDE1-
    1CITY2-
    2FIELD2-
    3FOREST3-
    4HILLS4-
    5MOUNTAIN6-
    6WATER4swimmable
    7DEEP WATER-boat required
    9AIR-fly spell required
    10DESERT9will eventually affect thirst and recovery
    11ICE4-
    12ETHER2-
    13UNDERWATER4-
    14CAVE3-
    15SNOW6-

  5. [exit direction]

    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.

  6. [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).

  7. [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.
  8. [door state] [key vnum] [exit vnum]

    [door state]

    Door state sets the door as open, closed, locked, etc. Here's a list:

    0denotes an open door.
    1denotes a closed door, but can be picked, provided it's defined as locked in the #RESETS.
    2denotes closed and pickproof.
    3denotes closed and nopass, pick lock is possible.
    4denotes 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]

    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]

    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.

  9. [extra]
    [extended room description keywords]~
    [extended room description data]~

    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.

  10. [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.

  11. [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.)

  12. [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.

  13. [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. Do not forget a tilde (~) at the end.

  14. [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. Do not forget a tilde (~) at the end.

  15. [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.

  16. S

    S signifies the end of the room. All rooms MUST be ended with S.

Hints for creating rooms