Valarin
Builder's Tutorial: Using zedit

5. Using zedit

5 . A

Zone Commands

All of these commands may not be available depending on the level of the builder.
zedit
Bring up the zedit screen for the room you're currently in.
zedit <room vnum>
Bring up the zedit screen for the room that you've specified by its vnum.
zreset <zone num>
Force a reset of the given zone.
5 . B

Sample Zedit Screen

Room number: 2619               Room zone: 26
Z) Zone name   : Above Brokken's Forest
L) Lifespan    : 30 minutes
T) Top of zone : 2699
R) Reset Mode  : Normal reset.
[Command list]
0 - Load the desk clerk [2600], Max : 1
1 - Load the hall guard [2601], Max : 10
2 -  then Equip with a pearl-handled dagger [2600], Wielded, Max : 10
3 - Load the hall guard [2601], Max : 10
4 -  then Equip with a pearl-handled dagger [2600], Wielded, Max : 10
5 - 
N) New command.
E) Edit a command.
D) Delete a command.
Q) Quit
5 . C

Zedit's Zone Options

The olc editor to add commands to load or remove objects or mobs from rooms, as well as shut and lock doors and such is the zedit command.

There are two parts to the zedit screen, the upper part is universal for the zone and defines the parameters for the entire zone. It doesn't change from room to room and includes everything before the command list. The command list is different for every room in the zone and defines the commands to be run in that room every time the zone resets.

So let's set about adding some zone information for your zones. Type zedit XXYY to edit the zone information for any (created) room YY.

First of all, give your zone a name by typing Z and enter and then typing in a new name for your zone.

The lifespan, top of zone, and reset mode should be left at 30 minutes, XX99 and Normal reset. However I'll introduce each topic so you know what they do.

The lifespan of the zone is how long it takes for the zone to reset. Every time the zone resets all the commands in the command lines for every room in the zone are evaluated and carried out. Making this value smaller increases the frequency of zone resets.

The top of zone is the highest numbered room belonging to this zone. This should never be changed from XX99 without the permission of an imp, as you may be including other people's work in your zone.

The reset mode gives the following options:

0) Never reset
1) Reset only when no players in zone
2) Normal reset
Never reset is generally bad, because then mobs and objects cannot be reloaded into the game is a player has killed or taken them as objects and mobs are only added when the zone resets. The best choice is the normal reset and generally that is what you should keep your reset mode on. Reset only when no players in zone is a plausible choice but it means that a popular zone may never be reset.
5 . D

Zedit's Room Commands

Now comes the fun stuff, the room specific commands. When you add commands to the command list you will be asked what number in the list the command should be. This number should be the number of the slot you want the command to be in, if there already is a command in this spot, that command, and all the commands below, will be bumped down one spot to accomodate the change.

Commands can be made dependant on the command above them in the list. That means that if the first command is not carried out (ie a mob isn't loaded because there are already the maximum in the zone) then the dependent command will not be carried out either.

You have several options for the type of commands to be performed when the zone resets:

M) Load Mobile to room             O) Load Object to room
E) Equip mobile with object        G) Give an object to a mobile
P) Put object in another object    D) Open/Close/Lock a Door
R) Remove an object from the room
Load Mobile to room - this will load the mob you specify into the room.

Load Object to room - this will load the object you specify into the room. Remember that the percentage chance that an object will be loaded is set in oedit, so this command will only load an object into the room based on the percentage load rate.

Equip mobile with object - equips a mobile with the object specified. You specify where the object gets placed on the mob(ie wielded, worn on wrist, etc). Again, the percentage chance that this will occure is set in the load rate for an object. This command should be made dependant on the mob loading into the room, otherwise there will be no mob for the object to load onto.

Give an object to a mobile - places the specified object into the mob's inventory. Again, the percentage chance that this will occure is set in the load rate for an object. This command should be made dependant on the mob loading into the room, otherwise there will be no mob for the object to load onto.

Put object in another object - places the object specified into another object. This container object should be a container and should already be loaded in the room. This command should be dependant on the loading of the container object into the room.

Open/Close/Lock a Door - set the state (open, closed, locked) of any door in the room.

Remove an object from the room - if the object is in the room, it is removed from the game. If the object isn't present then this command does nothing. You can use this to prevent the buildup of objects in a room byt first removing the object (if its there) and then loading the object back into the room.

We will try out adding a mob to a room and equiping it with an item. Here we go.

Open zedit for a room in your zone. Type in N (for a new command). Put this command as number 0 in the command list. Now pick option M, to load a mobile to the room. Pick XX00 as the mob you wish to load and input 1 as the maximum that can exist on the MUD (this can be changed later if you want more of these mobs in the game). Now we want to equip this mob with some clothing. Add another new command, this time at position 1 in the command list. Choose E to equip the mobile with an object and make sure to make this command dependant on the previous one's success, after all we don't want to be equipping a mobile with an object if the mobile didn't load for some reason. Input object 2400 (Brokken's Loincloth) and state that only 1 can exist on the MUD. Now, select position 13, worn about waist, to place the loincloth about your mob's waist. That's it. You've just learned the basics of zedit.

That's it for the general introduction to using OLC to help build the MUD. Remember to always use olc to find out if you have parts to save and to use redit/oedit/medit/zedit save XX to save your work to the database. Also, if you have a lot of things to save, remember that olcsave XX will save all the different things at once. Coming up next is a short introduction to planning out a zone well and using the techniques you've learned to put everything together.
Previous Chapter | Table of Contents | Next Chapter
Builder's Information | Home