#RESETS Section

This page describes how to code resets within an area file.
<< Back to #ROOMS Section Forward to #SHOPS Section >>

The #RESETS section describes in detail how to code resets for Dizzy MUD.

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.

The #RESETS section consists of the #RESETS header, a number of reset lines (see below) and the #RESETS section ender as shown here:
reset line

In a brief, the #RESETS section accomplishes the following:

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.

M Line: Mob Reset
M 0 Mob
* Comment: which mob into which room.

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.

The 'M' stands for 'Mob'. Or something. It's mandatory, an M line just would not be an M line without it. The 0 is a zero, not an 'Oh' and is also mandatory in this and all the other reset line types.

The mobile vnum is the vnum (as defined in the #MOBILES section) of the mobile you want to load. As usual, there is no hash ( # ) before the number, it's just the plain number.

The global limit 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, this reset line will not load any more mobs of this type until their number goes down again.

The room vnum is the vnumber of the room you want the mobile to pop up in. As usual, there is no hash ( # ) before the number, it's just the plain number.

The local limit 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, this reset will not load any more mobs of this type into this room until their number goes down again.

The topic of global and local limits is explained in more detail in A word about Global and Local Limits.

The comment tells a human reader, not the MUD program, which mob you are loading into which room. The asterisk ( * ) 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, the asterisk is important! 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.

If you plan to give this mob inventory or equipment, G and or E lines must immediately follow!

G Line: Give to last Mob
G 0 Object
* Comment: which object.

This GIVES the specified object to the last M-line mob, i.e, it is placed in the mob's inventory.

Object vnum 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.

Global limit: 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.

Comment: Specify the name of the object here. The name of the mob should be found in the comment of the M line further up.

E Line: Equip last Mob
E 0 Object
* Comment: which object.

This EQUIPS the last M-line mob with the specified object, i.e. it puts the object into the specified wear location on the mob.

The wear location 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.
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 Wear Location Reset Table lists the numeric codes for all wear locations.

O Line: Object Reset
O 0 Object
* Comment: which object into which room.

This resets an OBJECT in the given room.
The O stands for Object, so it's Obviously a letter and not a 0 (zero).

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.

As far as I can tell, global limits are not honored by O-line resets. I'm not sure if this is a bug or a feature.

P Line: Putting an object within another
P 0 Object
Number to
put inside
* Comment: which obj into which obj.
This puts an object of given vnum into a container, vnum also given.

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.

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.

D Line: Door Reset
D 0 Room
Direction Door
* Comment: state, which room and dir.
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.

0 1 2 3 4 5
north east south west up down
Door state
1 2
closed locked

Remember that:

R Line = Random (shifting) mazes
R 0 Room
Number of
possible exits
* Comment: which room.

A shifting maze consists of a group of room whose exits are interconnected in a random manner at reset time.

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 'R' 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.

Don't forget the S to terminate your #RESETS section!

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, do not forget the #$ at the end of your file to terminate your area file. The #$ 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!

RESETS example

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

<< Back to #ROOMS Section Forward to #SHOPS Section >>

  This page was last updated May 15, 2001