abreset.htm
abreset.htm · 13.5 KB
From the archive ab.zip
Download the archive « Back to the archive contents
<html>
<head>
<title>Dizzy Mud Area Coding Guide - #RESETS Section</title>
</head>
<body BGCOLOR="#FFFFFF">
<h3 ALIGN="center">#RESETS Section</h3>
<small>
This page describes how to code resets within an area file.
</small>
<!-- BEGIN Navigator -->
<HR NOSHADE>
<table WIDTH="100%">
<tr>
<td ALIGN="left">
<small>
<< Back to
<a HREF="abroom.htm">
#ROOMS Section
</a>
</small>
</td>
<td ALIGN="right">
<small>Forward to <a HREF="abshop.htm">#SHOPS Section</a> >></small>
</td>
</tr>
</table>
<HR NOSHADE>
<!-- END Navigator -->
The <b>#RESETS</b> section describes in detail how to code resets for Dizzy MUD.
<p>
Once you have designed the infrastructure of rooms for your area and thought
up a contingent of mobs and an abundant supply of equipment, you need to
put the whole project together. This is boring busywork, but without it your
area is lifeless and bare.
<p>
The #RESETS section consists of the <b>#RESETS</b> header, a number of
reset lines (see below) and the #RESETS section ender as shown here:
<table BORDER=2 WIDTH="100%" CELLPADDING=20>
<tr>
<td>
#RESETS<br>
<a HREF="resetline">reset line</a><br>
S<br>
</td>
</tr>
</table>
<p>
In a brief, the #RESETS section accomplishes the following:
<ul>
<li>places mobs in rooms</li>
<li>gives equipment and inventory to the mobs</li>
<li>lays objects into rooms</li>
<li>puts objects into containers</li>
<li>locks doors where required</li>
</ul>
<p>
Each of these effects is accomplished by a single line,
characterized by the letter it starts with, which symbolizes its function.
The different types of reset lines and their use are
described below.
<p>
<dl>
<dt><b><a NAME="mline">M Line</a></b>: Mob Reset<dt>
<dd>
<table CELLPADDING=5 BORDER=1>
<tr>
<td>M</td>
<td>0</td>
<td>Mob<br>vnum</td>
<td>Global<br>limit</td>
<td>Room<br>vnum</td>
<td>Local<br>limit</td>
<td>* Comment: which mob into which room.</td>
</tr>
</table>
<p>
This loads one mob into the room indicated. To load more than one mob of a kind
into a room, you need to repeat this line as often as required.
<p>
The '<b>M</b>' stands for 'Mob'. Or something. It's mandatory, an M line just
would not be an M line without it. The <b>0</b> is a zero, not an 'Oh' and is
also mandatory in this and all the other reset line types.
<p>
The <b>mobile vnum</b> is the vnum (as defined in the #MOBILES section) of the
mobile you want to load. As usual, there is no hash ( <strong>#</strong> )
before the number, it's just the plain number.
<p>
The <b>global limit</b> is the maximum number of mobs with this vnum which the
MUD program will load in the game at any given time. If the current number of mobs
of this vnum is greater than or equal to this number, <em>this</em> reset line
will not load any more mobs of this type until their number goes down again.
<p>
The <b>room vnum</b> is the vnumber of the room you want the mobile to pop up in.
As usual, there is no hash ( <strong>#</strong> ) before the number, it's just the
plain number.
<p>
The <b>local limit</b> is the maximum number of mobs of this vnumber
which the MUD program will load into this room at any given time.
If the current number of mobs of this vnum in this room is greater
than or equal to this number, <em>this</em> reset will not load any more mobs
of this type into this room until their number goes down again.
<p>
The topic of global and local limits is explained in more detail in
<a HREF="abglobal.htm">A word about Global and Local Limits</a>.
<p>
The <b>comment</b> tells a human reader, not the MUD program, which mob you
are loading into which room. The asterisk ( <strong>*</strong> ) is what tells
the program that what follows, up to the end of the line, is meant for a
human reader and not for the program. In other words,
<b>the asterisk is important!</b>
Re-stating the mob's vnum will tell a human nothing;
you should specify the mob's name. For the room, it's up to you,
though the room name would be more informative again.
<p>
If you plan to give this mob inventory or equipment, <b>G</b> and or
<b>E</b> lines must <b>immediately</b> follow!
<p>
<dd>
<dt><b>G Line</b>: Give to last Mob<dt>
<dd>
<table CELLPADDING=5 BORDER=1>
<tr>
<td>G</td>
<td>0</td>
<td>Object<br>vnum</td>
<td>Global<br>limit</td>
<td>* Comment: which object.</td>
</tr>
</table>
<p>
This <b>GIVES</b> the specified object to the last M-line mob, i.e,
it is placed in the mob's inventory.
<p>
<b>Object vnum</b> is the vnum of the object you want to give the mob.
Which mob? The last one you coded! All the GIVE and EQUIP lines for a
mob must immediately follow the mob to which they apply.
<p>
<b>Global limit</b>: The maximum number of objects of the given vnum
that you want floating around in the game at any given time. The above
mob will reset without the object if the limit is reached or surpassed.
For very good equipment, global limits may intentionally be set low
so that it becomes scarce and harder to obtain.
<p>
<b>Comment</b>: Specify the name of the object here. The name of the
mob should be found in the comment of the <b>M</b> line further up.
<dd>
<p>
<dt><b>E Line</b>: Equip last Mob<dt>
<dd>
<table CELLPADDING=5 BORDER=1>
<tr>
<td>E</td>
<td>0</td>
<td>Object<br>vnum</td>
<td>Global<br>limit</td>
<td>Wear<br>location</td>
<td>* Comment: which object.</td>
</tr>
</table>
<p>
This <b>EQUIPS</b> the last M-line mob with the specified object, i.e.
it puts the object into the specified wear location on the mob.
<p>
The <b>wear location</b> is where the mob wears, wields or holds
the given object. The wear location on the mob needs to correspond
to the wear flags on the object, i.e. a neck item cannot be equipped
on a mob's feet.<br>
Unfortunately, the coding for wear locations on mobs (and players)
is different from that of equipment wear flags. The reason is that
some wear locations are doubled, such that a ring can be worn on
the left or right hand, for example. The
<a HREF="abeqwear.htm">Wear Location Reset Table</a> lists
the numeric codes for all wear locations.
<dd>
<p>
<dt><b>O Line</b>: Object Reset<dt>
<dd>
<table CELLPADDING=5 BORDER=1>
<tr>
<td>O</td>
<td>0</td>
<td>Object<br>vnum</td>
<td>Global<br>limit</td>
<td>Room<br>vnum</td>
<td>* Comment: which object into which room.</td>
</tr>
</table>
<p>
This resets an OBJECT in the given room.<br>
The <b>O</b> stands for Object, so it's <b>O</b>bviously a letter
and not a 0 (zero).
<p>
Note that room resets do not happen while a player is in the area.
This is different from mob resets, which happen less frequently with
players in the area, but happen nonetheless.
<p>
As far as I can tell, global limits are <em>not</em> honored by
O-line resets. I'm not sure if this is a bug or a feature.
<dd>
<p>
<dt><b>P Line</b>: Putting an object within another<dt>
<dd>
<table CELLPADDING=5 BORDER=1>
<tr>
<td>P</td>
<td>0</td>
<td>Object<br>vnum</td>
<td>Global<br>limit</td>
<td>Container<br>vnum</td>
<td>Number to<br>put inside</td>
<td>* Comment: which obj into which obj.</td>
</tr>
</table>
This puts an object of given vnum into a container, vnum also given.
<p>
The object is created in the specified quantity ("number to put
inside");
the container must already exist, i.e. be reset before this P line.
<p>
If there are several containers in the game with the same vnum, there
is no guarantee that this reset will fill the correct one. To be on
the safe side, create containers that may be similar but have different
vnums. Then each P line can target a specific one.
<dd>
<p>
<dt><b>D Line</b>: Door Reset<dt>
<dd>
<table CELLPADDING=5 BORDER=1>
<tr>
<td>D</td>
<td>0</td>
<td>Room<br>vnum</td>
<td>Direction</td>
<td>Door<br>state</td>
<td>* Comment: state, which room and dir.</td>
</tr>
</table>
This will close or lock a door at reset time. The door is identified
by the room number it is in and the direction it leads to.
<p>
<table WIDTH="80%">
<tr>
<td>
<table BORDER=1 CELLSPACING=0 CELLPADDING=3>
<caption><b>Directions</b></caption>
<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>
</td>
<td>
<table BORDER=1 CELLSPACING=0 CELLPADDING=3>
<caption><b>Door state</b>
<tr>
<td ALIGN="center">1</td>
<td ALIGN="center">2</td>
</tr>
<tr>
<td>closed</td>
<td>locked</td>
</tr>
</table>
</td>
</tr>
</table>
<p>
Remember that:
<ul>
<li>there is no 'D' in front of the direction code! Direction codes are
'straight' numbers.
</li>
<li>there is no sense in resetting a door open. They are that way by
default anyway.
</li>
<li>
each door is really two exits. If you lock a door from A to B, you will
usually want to lock the door from B to A as well.
</li>
<li>
you must be sure that any doors you reset shut in a D line really exist!
This means that the room must have a lock flag not equal to 0
on the corresponding exit. If this is not so, the MUD will crash while
trying to load your area.
</li>
</ul>
<dd>
<p>
<dt><b>R Line</b> = Random (shifting) mazes<dt>
<dd>
<table CELLPADDING=5 BORDER=1>
<tr>
<td>R</td>
<td>0</td>
<td>Room<br>vnum</td>
<td>Number of<br>possible exits</td>
<td>* Comment: which room.</td>
</tr>
</table>
<dd>
<p>
A shifting maze consists of a group of room whose exits are interconnected
in a random manner at reset time.
<p>
To create a shifting maze, code some rooms and interconnect them in the
usual way (with room exits). Then, for each room that you want 'jumbled',
write an '<b>R</b>' line for it, specifying its room vnumber and how many
connections to randomize. This will usually be the total number of exits
you coded into the room. If you specify fewer exits to randomize, the
remaining ones will stay hooked up as you coded them. If you specify more,
Bad Things may happen.
</dl>
<p>
Don't forget the <b>S</b> to terminate your #RESETS section!
<p>
<hr NOSHADE WIDTH="75%">
The #RESETS section is the last of the (usually) mandatory sections of an area file,
meaning that if you do not have any #SHOPS or #SPECIALS in your area, your area file
could be finished at this point. If so, <b>do not forget the #$</b> at the end of
your file to terminate your area file. The <b>#$</b> must come on a line by itself
and be followed by at least one or more empty lines. Leaving off this file
termination or getting it wrong cause the MUD to crash at load time without even
issuing an error message!
<hr NOSHADE WIDTH="75%">
<p>
<table BORDER=2 WIDTH="100%" CELLPADDING=20>
<tr>
<td>
<a NAME="example">RESETS example</a>
<pre>
<b>
#RESETS
M 0 6901 3 6901 1 * Reset example mob into example room
E 0 6901 4 13 * Equip ex.mob with ex.obj (belt, waist)
G 0 6901 4 * Give him a spare belt in case he loses it
O 0 6901 4 6901 * Leave him one more on the ground (just in case)
D 0 6901 0 1 * Close north door of ex.room (to living room)
D 0 6902 2 1 * and south door of (living) room to ex.room
D 0 6901 3 2 * Lock ex.room west door so nobody will steal belt
D 0 6905 1 2 * and east door of kitchen to ex.room
S
</b>
</pre>
</td>
</tr>
</table>
<!-- BEGIN Navigator -->
<HR NOSHADE>
<table WIDTH="100%">
<tr>
<td ALIGN="left">
<small>
<< Back to
<a HREF="abroom.htm">
#ROOMS Section
</a>
</small>
</td>
<td ALIGN="right">
<small>Forward to <a HREF="abshop.htm">#SHOPS Section<!/a > >></small>
</td>
</tr>
</table>
<HR NOSHADE>
<!-- END Navigator -->
<table WIDTH="100%">
<tr>
<td>
</td>
<td ALIGN=right>
<small>This page was last updated <font COLOR="#FF0000">February 7, 1998</font>.</small>
</td>
</tr>
</table>
</body>
</html>