abroom.htm

abroom.htm · 20.4 KB

From the archive ab.zip

Download the archive   « Back to the archive contents

<html>
 <head>
  <title>Dizzy Mud Area Coding Guide - #ROOMS Section</title>
 </head>
 <body BGCOLOR="#FFFFFF">
  <h3 ALIGN="center">#ROOMS Section</h3>
  <small>
   This page describes how to code room descriptions within an area file.
  </small>
  <!-- BEGIN Navigator -->
  <HR NOSHADE>
  <table WIDTH="100%">
   <tr>
    <td ALIGN="left">
     <small>
      &lt;&lt; Back to 
      <a HREF="abobj.htm">
       #OBJECTS Section
      </a>
     </small>
    </td>
    <td ALIGN="right">
     <small>Forward to <a HREF="abreset.htm">#RESETS Section</a> &gt;&gt;</small>
    </td>
   </tr>
  </table>
  <HR NOSHADE>
  <!-- END Navigator -->
  The <b>#ROOMS</b> section of an area describes the structure, layout 
  and characteristics of rooms.
  <p>
  The #ROOMS section consists of the #ROOMS header, one or more
  <a HREF="#room">room</a>s (see below) and the #ROOMS section ender
  <code><b>#0</b></code> as shown here:
  <p>
  <table BORDER=2 CELLPADDING=20 WIDTH="100%">
   <tr>
    <td>
     <code><b>#ROOMS</b></code>
     <br>
     <a HREF="#room">room</a>
     <br>
     <b>#0</b>
     <p>
    </td>
   </tr>
  </table>
  <p>
  A <a NAME="room"><b>room</b></a> looks like this:
  <p>
  <table BORDER=2 CELLPADDING=20 WIDTH="100%">
   <tr>
    <td>
     <code>
      <b>#</b><a HREF="#vnum">vnum</a>
      <br>
      <a HREF="#roomname">room name</a><strong>~</strong>
      <br>
      <a HREF="#roomdesc">room description</a><br>
      <strong>~</strong><br>
      <a HREF="#teleport">teleport</a> 
      <a HREF="#roomflags">roomflags</a>
      <a HREF="#sectortype">sectortype</a>
      <br>
      <b>C </b><a HREF="#clanname">clanname</a><strong>~</strong><br>
      <b>H </b><a HREF="#hitregen">hitregen</a> <b>M </b><a HREF="#manaregen">manaregen</a><br>
      <b>O </b><a HREF="#owner">owner</a><strong>~</strong><br>
      <b>D</b><a HREF="#directionnumber">directionnumber</a><br>
      <a HREF="#exitdesc">exitdesc</a><br>
      <strong>~</strong><br>
      <a HREF="#doorname">doorname</a><strong>~</strong><br>
      <a HREF="#lockflag">lockflag</a> 
      <a HREF="#keynumber">keynumber</a> 
      <a HREF="#toroomvnum">toroomvnum</a>
      <br>
      <b>E</b><br>
      <a HREF="#extkeywords">extended keyword(s)</a><strong>~</strong><br>
      <a HREF="#extdesc">extended description</a><br>
      <strong>~</strong><br>
      <b>S</b>
     </code>
    </td>
   </tr>
  </table>
  <p>
  There is an <a HREF="#example">example</a> at the end of this page.
  <p>
  Here's what the (<u>underlined</u>) terms mean:
  <dl>
   <dt><a NAME="vnum"><code><b>#vnum</b></code></a></dt>
   <dd>
   Each room gets a unique vnum as assigned on your <b>room list</b>.
   Unlike mobs or objects, each room appears in the game exactly once!
   Remember to precede the vnum with the hash sign ('<code><b>#</b></code>')!
   <p>
   Although the MUD program does not care whether the vnums for rooms are in 
   ascending order and consecutive, your area file will be very difficult to 
   maintain if this is not so. <b>
   Start with the first vnum you were assigned and number consecutively up to 
   as many as you need for all your rooms.</b>
   </dd>
   <p>
   <dt><a NAME="roomname"><code><b>room name</b></code></a><dt>
   <dd>
    This is the name of the room. It's all a player sees of a room
    if he is running around with BRIEF turned on and does not do a LOOK.
    It's just a name, not a description, so a small number of words
    should be enough. Remember, it needs to fit on the end of SHORTWHO
    and other list output.
   </dd>
   <p>
   <dt><a NAME="roomdesc"><code><b>room description</b></code></a><dt>
   <dd>
    This text describes the room to a player if he enters it without BRIEF
    on or does a LOOK there.
    <p>
    This description gives a room its atmosphere and uniqueness.
    Short, one-line room descriptions should be a rare exception. Normally
    you want the room description to bring across the feelings you want
    to inspire in the player as he looks around, to describe the geography,
    landscape, exits, and the style of furnishing, if any.
    <p>
    Remember that the room description is static. You want it to be valid
    at all times, no matter what happens to the room. Thus, it is a 
    no-no to include in the room description any mention of mobs standing
    around there or of objects you plan to reset there. For a living
    quarters, it would be OK to state that so-and-so lives here, but not
    to say that so-and-so <i><b>is</b></i> here. It's quite possible that so-and-so
    has been killed and your room description is telling a lie.
    <p>
    It is OK to include references to objects in the room if you make sure
    those objects stay there (by giving the object a NOPURGE flag and
    no TAKE flag as described in the <a HREF="abobj.htm">#OBJECTS</a>
    section). A LOOK will reveal the object itself, so you
    should not say anything redundant like "a fountain is here". You may, 
    however say that "people often come here to drink from the fountain 
    standing here."
    <p>
    Another instance in which objects should be included in a room description
    is if they are 'truly invisible', i.e. coded with no long description.
    Popular objects of this 'hide and seek' technique are portals and fixed containers.
    It is practically impossible for a player to guess at the presence of
    such objects unless at least a hint is given in the room description.
    If you want to give a strong hint, you may color the name of the object.
    <p>
    When writing the room description, be aware that players may be intrigued
    by things (i.e. nouns) they see in the description and may wish to LOOK at
    these things. You can give them the opportunity to do so by including
    extended descriptions for some or all of the nouns used in your description.
    It may help to plan ahead for this.
   </dd>
   <p>
   <dt><a NAME="teleport"><code><b>teleport</b></code></a><dt>
   <dd>
    Normally, you code a <b>0</b> (zero) here.
    <p>
    Some rare rooms in the game are teleport rooms. Entering such a room will
    cause a player to be teleported to another room. If you really want this
    to happen, you code either:
    <ul>
     <li>the vnum of the room you want him to be teleported to (<b>without the '#' (hash)!</b>), or</li>
     <li><b>0</b> for a teleport to a random room.</li>
    </ul>
    In addition, the room will only teleport people if the TELEPORT flag is
    set in the <a HREF="#roomflags">roomflags</a>.<br>
    Be aware that an area full of teleports can be very annoying, especially
    if it is not well thought out, perhaps as a puzzle or such. Also remember
    that a random teleport can be fatal to a low level character. Random 
    teleports should not be coded into low level areas.
   </dd>
   <p>
   <dt><a NAME="roomflags"><code><b>roomflags</b></code></a><dt>
   <dd>
    Room flags describe some special characteristics of the room.
    Take your pick from the <a HREF="abrflag.htm">Room Flag Table</a>
    or code a <b>0</b> (zero) if your room does not need any of them.
   </dd>
   <p>
   <dt><a NAME="sectortype"><code><b>sectortype</b></code></a><dt>
   <dd>
    Determines what kind of terrain the room is in. The sector type is
    used to enhance area realism and controls such things as
    movement loss when a player walks through rooms of that type.
    The DIRT KICK skill in particular is influenced by the sector type.
    The chances are mostly logical with respect to your chance of 
    finding dirt to kick in the given environment.
    See the <a HREF="absector.htm">Sector Type Table</a> for available
    sector types and detailed information.<br>
    The "<b>Mv Loss</b>" column indicates how much movement is lost
    by a player moving into or out of a room of this sector type.<br>
    The sector type is a single value, not a flag. Thus, you cannot
    code more than one sector type for any given room!
   </dd>
   <p>
   <dt><a NAME="clanname"><code><b>clanname</b></code></a><dt>
   <dd>
    The <b>clanname</b> line is not normally used in room coding.
    <b>clanname</b> and its preceding '<b>C</b>' are optional and
    only used if you want your room to belong to a given clan.
    A room coded with a clan name is not accessible to mortal
    players not in that clan.
    <b>clanname</b> must exactly match the "mailname" as seen in
    CLANLIST for the given clan. If a clan mail name happens to be
    a multi word name, you can use single quotes ( <strong>'</strong> ) to 
    hold it together.
   </dd>
   <p>
   <dt><a NAME="hitregen"><code><b>hitregen</b></code></a><dt>
   <dt><a NAME="manaregen"><code><b>manaregen</b></code></a><dt>
   <dd>
    The <b>hitregen</b> and <b>manaregen</b> line(s) are not frequently
    used in normal area coding.
    <b>hitregen</b> and <b>manaregen</b> and their preceding '<b>H</b>'
    and '<b>M</b>' are optional and only used if you want your room to
    affect the hit point and/or mana regeneration rate of players in it.
    A room's description may indicate that it is a particularly quiet
    and restful room, and then values of <b>hitregen</b> and/or 
    <b>manaregen</b> above the default regeneration rate of <b>100%</b>
    will cause players to regenerate more quickly while in the room.
    Regen rates lower than 100% may be specified to slow down regeneration.
    <br>
    <b>hitregen</b> and <b>manaregen</b> are traditionally specified 
    together on the same line, but it is legal to specify them singly
    on individual lines as well. Thus,
    <table>
     <tr>
      <td> &nbsp; </td>
      <td><code><b>H 120 M 130</b></code></td>
      <td> &nbsp; and &nbsp; </td>
      <td><code><b>H 120<br>M 130</b></code></td>
     </tr>
    </table>
    are equivalent. The first form takes up a little less space, though.<br>
    As the example shows, it's quite OK to have different values for 
    <b>hitregen</b> and <b>manaregen</b>.<br>
    It is Dizzy MUD's policy that rooms with regen rates above 100% must be
    approved by the Imp and will not be approved with rates higher than 150%.
    <br>
    Although the numbers represent percentages, do <b>not</b> write a
    percent sign ( <strong>%</strong> ) into the <b>H</b> and <b>M</b> lines!
   </dd>
   <p>
   <dt><a NAME="owner"><code><b>owner</b></code></a><dt>
   <dd>
    Rooms coded for or by an individual may optionally have his or her name
    coded into it. This will prevent other players from walking into that 
    room, and also a few of the magical forms of transporting and otherwise
    invading the room. Privacy is not ironclad, however, as there are still
    a few holes in the access control code.<br>
    Again, this line is optional. You may either code it, complete with
    '<b>O</b>', name and trailing tilde ( <strong>~</strong> ), or leave out
    the entire line, as is usually done.
   </dd>
   <p>
   <dt><a NAME="directionnumber"><code><b>directionnumber</b></code></a><dt>
   <dd>
    The line consisting of <b>directionnumber</b> and its preceding '<b>D</b>'
    marks the beginning of what I'll call a <b>room exit</b>. The whole thing
    consists of all the lines from <b>directionnumber</b> to <b>toroomvnum</b>.
    <br>
    You need to code a (complete) <b>room exit</b> for each of the directions through 
    which it is possible to leave the room. A room connected on all sides would have
    6 of these, one each for the directions north, east, south, west, up and
    down.<br>
    The <directionnumber> encodes the direction in which this exit leads.
    <directionnumber> must be one of the numbers <b>0</b> through <b>5</b>
    to encode one of the directions, as shown here:
    <div ALIGN="center">
     <table BORDER=1>
      <tr>
       <td ALIGN="center">0</td>
       <td ALIGN="center">1</td>
       <td ALIGN="center">2</td>
       <td ALIGN="center">3</td>
       <td ALIGN="center">4</td>
       <td ALIGN="center">5</td>
      </tr>
      <tr>
       <td>north</td>
       <td>east</td>
       <td>south</td>
       <td>west</td>
       <td>up</td>
       <td>down</td>
      </tr>
     </table>
    </div>
    Thus, an exit to the north would be coded as '<b>D0</b>', an exit going up
    would be '<b>D4</b>'.
   </dd> 
   <p>     
   <dt><a NAME="exitdesc"><code><b>exitdesc</b></code></a><dt>
   <dd>
    The <b>exitdesc</b> is what the character sees when he LOOKs in the
    specified direction using "LOOK NORTH", "LOOK SOUTH", etc. 
    It is possible to code an empty exitdesc by leaving this line out,
    but <b>please</b> don't!
    Exit descriptions make an area more alive and interesting. A player
    can use something other than just SCAN to see where he is going.
    A player can be hinted as to which direction it would be good to go
    in. A player can be alerted of danger.<br>
    <b>Example:</b><br>
    <cite>
     You see a deep ditch before you. You may be able to enter it but
     it's uncertain whether you would be able to climb back out!
    </cite>
    <br>
    As the exmple shows, an exitdesc <em>can</em> have more than one line,
    though this is not very common.<br>
    Whether you code an exitdesc or not, <b>the next line must consist of a 
    tilde ( <strong>~</strong> ) !</b>
   </dd>
   <p>
   <dt><a NAME="doorname"><code><b>doorname</b></code></a><dt>
   <dd>
    If the exit is a door, gate or other openable obstruction,
    you should code a <b>doorname</b> for it. Unlike an 
    <a HREF="#extkeyword">extkeyword</a>, this name will not work with 
    LOOK. A player cannot LOOK at whatever name you code here; the game
    will use this name only to respond to UNLOCK, OPEN, CLOSE and LOCK.
    You may use a multiple word name for a door, e.g. 
    "<b>trap door</b>". Assuming such a door leads downward,
    the player can either "OPEN DOWN" or "OPEN TRAP" or perhaps "OPEN DOOR"
    to open it. "OPEN DOOR" is guaranteed to work only if there are no
    other exits from this room whose <b>doornames</b> are also "door".
    The door name is also used to give the player his response:
    "<cite>You open the trap door.</cite>" Thus, the door name should not
    be a random collection of likely keywords; it needs to be chosen to
    make sense in the response sentence.<br>
    The <b>doorname</b> <em>must</em> be followed by a tilde ( <strong>~</strong> ) !
    If there is no doorname, you must still code the tilde (alone on the line).
   </dd>
   <p>
   <dt><a NAME="lockflag"><code><b>lockflag</b></code></a><dt>
   <dd>
    <b>lockflag</b> specifies how impassable a door is. The possible values are:
    <div ALIGN="center">
     <table BORDER=1>
      <tr><td><b>&nbsp;0&nbsp;</b></td><td>No door</td></tr>
      <tr><td><b>&nbsp;1&nbsp;</b></td><td>Normal door</td></tr>
      <tr><td><b>&nbsp;2&nbsp;</b></td><td>Pickproof door</td></tr>
      <tr><td><b>&nbsp;3&nbsp;</b></td><td>Door not passable with PASS DOOR</td></tr>
      <tr><td><b>&nbsp;4&nbsp;</b></td><td>Door neither passable nor pickable</td></tr>
     </table>
    </div>
    Note that it doesn't matter how well you secure your door with this flag, 
    the door initially resets in the <b>OPEN</b> position unless you code it
    <b>CLOSED</b> or <b>LOCKED</b> later on in the <a HREF="abreset.htm">#RESETS</a>
    section!<br>
    Also, of course, remember that it makes no sense to code a <b>doorname</b>
    if you code a 0 (no door) here.
   </dd>
   <p>
   <dt><a NAME="keynumber"><code><b>keynumber</b></code></a><dt>
   <dd>
    This is the vnum (<b>without</b> the hash ('<strong>#</strong>') !) of
    the key, if any, which unlocks this door. If this is no door
    (<b>lockflag</b> = 0) or you do not want to make a key available
    to this door, code a <b>-1</b>.
   </dd>
   <p>
   <dt><a NAME="toroomvnum"><code><b>toroomvnum</b></code></a><dt>
   <dd>
    This is the vnum (<b>without</b> the hash ('<strong>#</strong>') !) of
    the room to which this exit leads.
   </dd>
   <p>
   <dt><a NAME="extkeywords"><code><b>extended keyword(s)</b></code></a><dt>
   <dt><a NAME="extdesc"><code><b>extended description</b></code></a><dt>
   <dd>
    <b>extkeywords</b>, <b>extdesc</b> and the '<b>E</b>' and tildes
    around them make up what I call an <b>extended room description</b>.
    Extended room descriptions are optional; you may have none, one,
    or as many as you like. I strongly encourage you to code one or
    more. Extended room descriptions go a long way toward making your
    rooms interesting and alive.<br>
    When a player reads your <b>room description</b> (using LOOK or
    by walking into the room without BRIEF on), he will hopefully
    see a detailed description of the contents of the room. He will
    hopefully become curious about one or more of the objects, er, THINGS
    he sees in that description. He may then try to LOOK at the things
    he sees in the description. If you do not code an <b>extended room 
    description</b> for the THING he is looking at, then he will get a
    response of "<cite>You do not see that here.</cite>" This will
    quickly stifle his curiosity and his interest in your area for all
    but the most mundane purposes.<br>
    I realize that coding extended room descriptions, perhaps even
    whole chains of them as described below, is a lot of work. But
    your area will be more enjoyable if it has a few well done rooms
    than if it is a sprawling complex of barren, uninteresting equipment
    and mob dump sites.<br>
    The <b>extkeywords</b> should be a list of the words which a player
    might be temped to LOOK at in your room. A LOOK at any one (or
    several) of them will cause the game to show him the <b>extdesc</b>
    which you have coded following the <b>extkeywords</b>.<br>
    High-class areas often have chains of extended room descriptions on 
    some rooms. Some of the words in the first <b>extdesc</b> will be
    found in the second or further <b>extdesc</b>s, which can allow
    you to tell a whole story in one room if the player takes the 
    trouble to follow the clues.<br>
    The <b>extdesc</b> <em>must</em> be followed on the next line with
    a tilde ( <strong>~</strong> ) !
   </dd>
   <dt><strong>S</strong>
   <dd>
    <b>Remember to end each room with an '</b>S<b>' on a line by itself!</b>
   </dd>
  </dl>
  <p>
  <table BORDER=2 WIDTH="100%" CELLPADDING=20>
   <tr>
    <td>
     <a NAME="example">ROOM example</a>
     <pre>
      <b>
#6901
Example Room~
You are standing in the Entrance Hall of the Example House.
The floor is covered in a rich persian rug. A wardrobe stands off
to the side, and doors lead off to the north, south and west
while a corridor leads off to the east.
~
0 D 0
D0
To the north lies a door leading to the Living Room.
~
living room door~
1 -1 6902
D1
To the east there is a Corridor.
~
~
0 -1 6903
D2
To the south you can leave the Example House.
~
entrance door~
1 -1 6904
D3
To the west lies a door leading to the Kitchen.
~
kitchen door~
1 -1 6905
E
entrance hall~
You are standing in the middle of the Entrance Hall. Have a look to
see your surroundings.
~
E
house example~
Well, you are inside of the Example House, so you don't see much of it
but for the room you are standing in at the moment.
~
E
rug persian~
Your feet sink deeply into the rug. It seems to emanate an air of affluence.
~
E
wardrobe~
The wardrobe is not very big, but it looks to be a genuine antique.
~
E
corridor~
A spacious corridor leads to some more rooms in the east.
~
E
doors~
The door to the north is the living room door, that to the south is
the entrance door, and the west one leads to the kitchen.
~
S
      </b>
     </pre>
    </td>
   </tr>
  </table>
  <!-- BEGIN Navigator -->
  <HR NOSHADE>
  <table WIDTH="100%">
   <tr>
    <td ALIGN="left">
     <small>
      &lt;&lt; Back to 
      <a HREF="abobj.htm">
       #OBJECTS Section
      </a>
     </small>
    </td>
    <td ALIGN="right">
     <small>Forward to <a HREF="abreset.htm">#RESETS Section</a > &gt;&gt;</small>
    </td>
   </tr>
  </table>
  <HR NOSHADE>
  <!-- END Navigator -->
  <table WIDTH="100%">
   <tr>
    <td>
     &nbsp;
    </td>
    <td ALIGN=right>
     <small>This page was last updated <font COLOR="#FF0000">January 31, 1998</font>.</small>
    </td>
   </tr>
  </table>
 </body>
</html>

Site Stats

Snippets: 1791
Codebases: 571