Section 6:    #RESETS

This is the section that installs all the mobiles in their various locations, equips the mobiles, locks and closes any necessary doors, randomizes any random room exits, and generally sets up the area and populates it.

To reset an area, the server executes each command in the list of reset commands once. Each area is reset once when the server loads, and again periodically as it ages. An area is reset if it is at least 3 area-minutes old and is empty of players, or if it is 15 area-minutes old and has players in it.

An 'area-minute' varies between 30 and 90 seconds of real time, with an average of 60 seconds. The variation defeats area time-keepers.

The #RESETS section contains a series of single lines. The reset commands are:

  1.      M     load a mobile into a room
  2.      O     load an object into a room
  3.      P     put an object in an object (gold in a safe, etc.)
  4.      G     give an object to mobile
  5.      E     equip an object to mobile
  6.      D     set state of door
  7.      R     random exits
  8.      S     stop (END OF LIST)

Note! You may put a comment after an asterisk (*) on any line, but NOT on a line that is blank otherwise.

By the way, you might wish to consult the hints for resets at the end of this document.

Here's the breakdown:

  1.      M     load a mobile into a room

    The format for inserting mobiles into your area is as follows:

    M 0 [mobile vnum] [global mob limit] [room vnum] [local mob limit]

    1.slot: M signifies that a mobile is being loaded.

    2.slot: keep this slot with zero (0).

    3.slot: vnum of the mobile that has to be loaded.

    4.slot: total number of copies of that mobile that may exist in the game world.

    5.slot: number of the room that the mobile is being loaded into.

    6.slot: number of copies of that mobile that may exist in that room.

    Example:

    M 0 1000 6 1001 1

    This will reset mobile 1000 into room 1001 once, but allow you to place five other copies of that mobile in other rooms.

    Note that if you wish to have multiple copies of the same mobile you must enter multiple resets for them. For example,

    M 0 1000 6 1000 2
    M 0 1000 6 1000 2 
    

    will reset mobile 1000 into room 1000 twice.

  2.      O     load an object into a room

    The format for inserting objects into your area is as follows:

    O 0 [object vnum] [global object limit] [room vnum]

    1.slot: O signifies that a object is being loaded.

    2.slot: keep this slot with zero (0).

    3.slot: vnum of the object that has to be loaded.

    4.slot: total number of copies of that object that may exist in the game world.

    5.slot: number of the room that the object is being loaded into.

    Hence, the following example will reset object 1000 into room 1001:

    O 0 1000 1 1001
  3.      P     put an object in an object (gold in a safe, etc.)

    The format for inserting objects into other objects in your area is as follows:

    P 0 [object vnum] 1 [container vnum] [number of copies]

    1.slot: P denotes that this reset is putting an object into another object.

    2.slot: keep this slot with zero (0).

    3.slot: vnum of the object that is being contained.

    4.slot: 1 is a placeholder for a no longer used field.

    5.slot: denotes the vnum of the container.

    6.slot: denotes the number of copies of the object that will be loaded into the container.

    The following example will put 3 copies of object 1001 into container 1000:

    P 0 1001 1 1000 3

    Note! If you wish to have, for example, five mobiles carrying containers called 'backpacks' with 'bread' 'cheese' and 'water jug' items in them, and have an abandoned backpack with the same gear as would be in the carried backpacks, you are best off making a total of six *individual* 'backpack' containers and resetting the *same* 'bread', 'cheese' and 'water' items.

    Let's try explaining that one again. :) If you wish to have multiple copies of a container resetting with things being put into them, you are in fact having several identical container objects with different vnums for the things to be put into. If you have six backpacks with bread, cheese and water resetting into them, after it finds the first backpack to place the items into, the mud sometimes becomes confused and misplaces items. If you have different containers, the mud will not become confused. We are not sure what causes containers to become confused, and doubtless this attempt at explanation is confusing, but hopefully you get the idea. You may use the same items *going into* the containers but *not* the same container item. Get it? Good. :)

  4.      G     give an object to mobile
    G 0 [object vnum] [limit number]

    1.slot: G denotes that a give reset to a mobile is being done. This reset places the object being given into the inventory of the mobile.

    2.slot: keep this slot with zero (0).

    3.slot: vnum of the object being given.

    4.slot: total number of copies of that object that may exist in the game world. -1 := unlimited

    Note! The give reset MUST be placed, in the reset ordering, DIRECTLY after the loading of the mobile that the object is being given to. For example,

    M 0 1000 6 1000 2  [resetting mob 1000 into room 1000 with a global limit of 6 and a local limit of 2]
    G 0 1006 -1  [places object 1006 into the inventory of the most recently loaded mobile] 
    
  5.      E     equip an object to mobile
    E 0 [object vnum] [limit number] [wear location]

    1.slot: E denotes that an equip reset is being done.

    2.slot: keep this slot with zero (0).

    3.slot: indicates the vnum of the object being equipped.

    4.slot: total number of copies of that object that may exist in the game world. -1 := unlimited

    5.slot: number of the wear location that is being equipped to.

    Wear flags are as follows:

     0  Light Source     17  Held    
     1  Finger1          18  Floating
     2  Finger2          19  Floating
     3  Neck             20  Floating
     4  Tattoo           21  Finger3
     5  On Torso         22  Finger4
     6  Head             23  Finger5
     7  Legs             24  Finger6
     8  Feet             25  Sheath
     9  Hands            26  Quiver
    10  Arms             27  Head2
    11  Shield           28  Neck2
    12  About Body       29  Hindleg
    13  Waist            30  Finger7
    14  Left Wrist       31  Finger8
    15  Right Wrist      32  Finger9
    16  Wield            33  Finger10
    
  6.      D     set state of door
    D 0 [room vnum] [door direction] [door condition]

    1.slot: D denotes that a door reset is being generated.

    2.slot: 0 (zero) denotes a placeholder for an unused slot.

    3.slot: vnum of the room that the door reset is being generated in.

    4.slot: direction of the door reset is being generated in (since any room may have up to six doors)

    5.slot: condition that the door is being placed in.

    The following example shows the eastern door of room 1000 being set in a closed and locked position:

    D 0 1000 1 2

    The following list shows the correlating numbers for the door directions:

    0 North 
    1 East 
    2 South 
    3 West 
    4 Up 
    5 Down 
    

    How to use the 5.slot:

    Set the 5.slot to 1, if you only want a closed, but no locked door.

    Set the 5.slot to 2, if you want a closed and locked door.

    There is also the possibility to use door flags, but we don't use them right now; the following is a list of door flags that may be used for Slot 5:

    0Normal exit, no door
    Adoor that may be opened and closed, but no lock and resets to open
    Bdoor resets to closed
    Cdoor that is locked
    Fdoor with a lock that cannot be picked (key needed to open)
    Gdoor that the 'pass door' spell will not allow passage through (the lock may still be picked, however)
    Hlock that is easy to pick *
    Ilock that is hard to pick *
    Jlock that is infuriating to pick *
    Kdoor that cannot be closed
    Ldoor that cannot be locked

    * not yet implemented, but use them in conjunction with C (door resets to locked) for when the code is enabled.

    So for a closed, locked door that can't be passed through but which is easy to pick, the flags are BCGH.

    Note! If you have a door going north from room 1001 to room 1002, you must also have a door going south from room 1002 to room 1001, unless you wish the door in 1001 to be ONE WAY ONLY.

  7.      R     random exits
    R 0 [room-vnum] [Exits #]

    This is to create random exits. Count the number of exits in your room and use that number for [Exits #]. What will result is a shuffling of the doors intended exits. Example: Going South could result in going North in a random room. The R reset should be used in *Every* room in a random maze for best results with possible exceptions being the entry and exit rooms.

    WARNING: UNPREDICTABLE RESULTS WILL HAPPEN IF BOTH D AND R RESETS ARE USED FOR A ROOM.

    Example:

    R 0 1301 4 * The Shadow Grove 
    R 0 1302 4 * The Shadow Grove 
    R 0 1303 4 * The Shadow Grove 
    R 0 1304 4 * The Shadow Grove 
    R 0 1305 4 * The Shadow Grove 
    
  8.      S     stop (END OF LIST)

    S denotes the end of the #RESETS section.

Hints for resets