Writing a Zone File
The zone file contains many essential facts that the game needs
in order to load a zone and the monsters, doors and objects in
it correctly. The zone file begins by listing the general information
the game needs to assign status for autoexits, reset time and
how large the zone is and ends with a far more extensive list
which details where everything loads, when and how often.
Zone Creation Fields
<Zone
number>
Every zone has a unique zone number associated with it. The
zone number is used with many immortal commands inside the running
game.
<Top room
of the zone>
The game actually needs the top room number of each zone to
start correctly.
<Zone
lifespan>
The zone lifespan is the length of time the zone will be active
between resets. When the lifespan elapses it will be queued to
reset at the earliest opportunity.
<Reset
mode>
The zone's reset mode will determine the conditions under
which a zone will reset when its lifespan has elapsed. Chose
a reset mode from the following table:
|
Value |
Purpose |
|
0 |
The zone will only reset when the game crashes. |
|
1 |
The zone will reset as soon as it is deserted. |
|
2 |
The zone will reset no matter what. |
<Autoexits
status>
An interesting feature of the JediMUD code is the ability
to turn off the autoexits command by zone. When autoexits are
disabled, players are forced to slow down and be more careful
when they initially explore a zone than might be the case otherwise.
If this value is 0, then autoexits will not work in the zone.
If the value in this field is a 1, then autoexits will function.
The Command
Table
The command table is the list of commands that the game will
attempt to execute every time the zone is reset. Each command
consists of a letter, which identifies the command type, followed
by three or four fields.
<Command
type>
Each command type has a unique letter associated with it.
Chose the appropriate command type from the table below:
|
Function |
Flag |
|
Load a monster and place it into a room. |
M |
|
Percentile load a monster and place it into a room. |
W |
|
Load an object and place it into a room. |
O |
|
Percentile load an object and place it into a room. |
X |
|
Load an object and give it to the last monster loaded. |
G |
|
Percentile load an object and give it to the last monster loaded. |
Y |
|
Load an object into the equipment list of a monster. |
E |
|
Percentile load an object and place it into the equipment list
of a monster. |
Z |
|
Load one object into another object. |
P |
|
Percentile load an object and place it into another object. |
Q |
|
Load a door. |
D |
<If flag>
The first field is common to all commands. It is called the
If flag and will tell the game specific conditions that must
be met for the command on that line to execute. The following
If commands are available on JediMUD:
|
Conditions for the Load Command to Execute |
If Flag |
|
Execute no matter what. |
0 |
|
Execute only if the last command was successful. |
1 |
|
Execute only if the last command was not successful. |
2 |
|
Execute if the last monster load command was successful. |
3 |
|
Execute if the last monster load command failed because of a
probability test. |
4 |
|
Execute if the last monster load command was successful. |
5 |
|
Execute if the last monster load command did not succeed for
any reason. |
6 |
How
to use each type of load command
- The following section lists the format for each type of load
command. If flags are listed in the previous section.
-
M- Load a monster and place it into
a room
- Format: M <if flag> <monster number> <maximum
existing> <room number>
- Monster number is the virtual number of the monster that
is to be loaded.
- Maximum existing is the absolute maximum number of this monster
that can be in the game at any one time. Unique monsters should
have a one in this field.
- Room number is the number for the room in which this command
is going to load the monster.
W- Percentile load a monster and place
it into a room
- Format: W <if flag> <monster number> <maximum
existing> <room number> <probability>
- Monster number is the virtual number of the monster that
is to be loaded.
- Maximum existing is the absolute maximum number of this monster
that can be in the game at any one time. Unique monsters should
have a one in this field.
- Room number is the number for the room in which this command
is going to load the monster.
- Probability is the percent chance that the command will execute
successfully.
O- Load an object and place it into
a room
- Format: O <if flag> <object number> <maximum
existing> <room number>
- Object number is the virtual number of the object that is
to be loaded.
- Maximum existing is the absolute maximum number of this object
that can be in the game at any one time. Unique objects should
have a one in this field.
- Room number is the number for the room in which this command
is going to load the object.
X- Percentile load an object and place
it into a room
- Format: X <if flag> <object number> <maximum
existing> <room number> <probability>
- Object number is the virtual number of the object that is
to be loaded.
- Maximum existing is the absolute maximum number of this object
that can be in the game at any one time. Unique objects should
have a one in this field.
- Room number is the number for the room in which this command
is going to load the object.
- Probability is the percent chance that the command will execute
successfully.
G- Load an object and give it to the
last monster loaded
- Format: G <if flag> <object number> <maximum
existing>
- Object number is the virtual number of the object that is
to be loaded.
- Maximum existing is the absolute maximum number of this object
that can be in the game at any one time. Unique objects should
have a one in this field.
Y- Percentile load an object and give
it to the last monster loaded
- Format: Y <if flag> <object number> <maximum
existing> <probability>
- Object number is the virtual number of the object that is
to be loaded.
- Maximum existing is the absolute maximum number of this object
that can be in the game at any one time. Unique objects should
have a one in this field.
- Probability is the percent chance that the command will execute
successfully.
-
E- Load an object into the equipment
list of the last monster loaded
- Format: E <if flag> <object number> <maximum
existing> <equipment position>
- Object number is the virtual number of the object that is
to be loaded.
- Maximum existing is the absolute maximum number of this object
that can be in the game at any one time. Unique objects should
have a one in this field.
- Equipment position is the body location where the item will
be worn by the monster. Chose this value from the following table:
|
Location |
Number |
|
Light |
0 |
|
Finger (right) |
1 |
|
Finger (left) |
2 |
|
Neck (one) |
3 |
|
Neck (two) |
4 |
|
Body |
5 |
|
Head |
6 |
|
Legs |
7 |
|
Feet |
8 |
|
Hands |
9 |
|
Arms |
10 |
|
Shield |
11 |
|
About the Body |
12 |
|
Waist |
13 |
|
Wrist (right) |
14 |
|
Wrist (left) |
15 |
|
Wield |
16 |
|
Hold |
17 |
Z- Percetile load an object into the
equipment list of the last monster loaded
- Format: Z <if flag> <object number> <maximum
existing> <equipment position> <probability>
- Object number is the virtual number of the object that is
to be loaded.
- Maximum existing is the absolute maximum number of this object
that can be in the game at any one time. Unique objects should
have a one in this field.
- Equipment position is the body location where the item will
be worn by the monster. Chose this value from the following table:
|
Location |
Number |
|
Light |
0 |
|
Finger (right) |
1 |
|
Finger (left) |
2 |
|
Neck (one) |
3 |
|
Neck (two) |
4 |
|
Body |
5 |
|
Head |
6 |
|
Legs |
7 |
|
Feet |
8 |
|
Hands |
9 |
|
Arms |
10 |
|
Shield |
11 |
|
About the Body |
12 |
|
Waist |
13 |
|
Wrist (right) |
14 |
|
Wrist (left) |
15 |
|
Wield |
16 |
|
Hold |
17 |
- Probability is the percent chance that the command will execute
successfully.
P- Load an object and place it into
another object
- Format: P <if flag> <object one> <max existing>
<object two>
- Object one is the virtual number of the object that is to
be loaded.
- Maximum existing is the absolute maximum number of this object
that can be in the game at any one time. Unique objects should
have a one in this field.
- Object two is the virtual number of the object object one
is to be put into.
Q- Percentile load an object and place
it into another object
- Format: Q <if flag> <object one> <maximum
existing> <object two> <probability>
- Object one is the virtual number of the object that is to
be loaded.
- Maximum existing is the absolute maximum number of this object
that can be in the game at any one time. Unique objects should
have a one in this field.
- Object two is the virtual number of the object object one
is to be put into.
- Probability is the percent chance that the command will execute
successfully.
D- Loading a door
into a room
Format: D <if flag> <room number> <exit number>
<state>
- Room number is the room that the door is located in.
- Exit number refers to the number associated with the direction
that the door is supposed to block. Use the same values for this
number as you would for a world file.
- The state can be one of the following:
|
Open |
0 |
|
Closed |
1 |
|
Closed and Locked |
2 |
Questions? Send mail to the build team:
areas@jedi.america.net