Area Writing

Henri's One Stop Shop for Area Builder Help
Edited by Conundrum
HTMLized by Dionysus

Overview

Each zone in gizmo is composed of five files. The zone file, the world file, the mobile file, the object file, and the special procedure file. The zone file (always ending with the three letter extension "zon") is the file that determines which mobiles (mobs) or objects load in each particular room. The zone file could be considered the master file for the area, and is sometimes referred to as the area file. The world file (ending in "wld") sets up the rooms of the area. The room descriptions and how the rooms are linked together are determined by this file. The mobile (ending with "mob") and object (ending with "obj") files determine the respective statistics of the mobs and items that you would like to add to your area.

This help file will be illustrated with examples from the Welmar zone (number 89). The complete zone files can be found on the gizmo website HERE It is important that you use a text editor as some wordprocessor programs will add special characters to the beginning or end of the file that will corrupt it when Gizmo tries to read it.


I.)The World File

Probably the best place to begin coding your area is with the room file. Most of your story can be developed through rooms and it will give you a better idea of how many different mobs you will need to populate your zone. The wld file is simply a listing of certain properties of each room.


WLD FILE A: room number

The room number is exactly the same as what an immortal sees after the room title. I doesn't what order you number you rooms in, as long as they appear in numerical order in the wld file. The first two (or perhaps three) digits of each room are your zone number. For instance, if you were assigned zone 89 you would start with room 8901 and could number all the way up to 8999. In front of each room number you must put a # sign to indicate the start of a new room. The first line of the wld file for zone 89 would be:

#8901


WLD FILE B: room name

Simply enough, it is the name of the room you are creating. Make sure you capitalize appropriately. And directly after the room name you put a tilde (~). For zone 89 the first room in the file is called The King's Road so the second line of the file, right after the first room number would be:

The King's Road~


WLD FILE C: room description

The room description needs to be indented by three spaces and no line should be longer than 75 characters. On the line after the last line of your room description should be a tilde. The next few lines of the zone 89 world file would be:

You come out onto the great King's Road. The road is very well
built, and goes in a straight line due east-west. To your west is
a small forest.
~


WLD FILE D: fourth entry

The fourth entry into the world file starts on the line directly after the line with the tilde from the room description. The first entry is the zone number in our case 89. The second entry contains the properties of the room. You can set weather the room is dark, a death trap, mobs are allowed, magic is allowed, or "private" (which restricts relocating abilities of players). This value is a bit vector which is made by just adding all the values for the specifications you want into a single integer. Let's say you wanted to make a room that was dark, nomob (though they could be loaded there), and nomagic. You would add up the values for each of these bits (1+4+128=133) (the values for these bits can be found in the quick reference section at the end of this file. and the second value on your line would be just 133. But in keeping with our example zone, the first room in the Welmar area is nomob so the second value of this line for the first room would be a 4. The third value of this line determines what the terrain of the room is like, and thus how many movement points it takes for players to walk out of the room. Our example room "The King's Road" is in a city so this value 1. (These values can also be found in the quick reference section at the end of the file.) The fourth entry for the first room of the Welmar zone would be:

89 4 1


WLD FILE E: exits

Next you must specify the directions of all possible exits, what rooms they lead to, and what players will see if they look in that direction. In the example room there is an exit east to room 8902 and an exit west to room 4852. Separate entries must be made for each exit. Look in the table (in the quick reference section) and find the lowest direction code and start with that exit. The direction "east" has a code of 1 and the direction "west" has a code of 3, so we begin with the exit to room 8902. The first line of an exit entry is a capital "D" followed by the direction code. For this exit it would be:

D1

The next line contains the text that a player sees when he looks in that direction, with a tilde on the line following. If you look east from room 8901 you see "The King's Road continues in a straight line to the east." So the next two lines would be:

The King's Road continues in a straight line to the east.
~

Note that exit descriptions are not required of area builders, in fact the person who built the Welmar castle did not use one for the western exit from room 8901. If you cannot think of a suitable exit description skip the line where the text would normally go, but you must include the line with the tilde. The next line of each exit description will contain the keywords if there is a door in that direction followed with a tilde on the same line. If you had a door called a cupboard that was supposed to look like a panel this line might be:

cupboard panel door~

However there are no doors in the eastern direction from room 8901 so for out example this line looks like:

~

The last line of the exit entry contains the actual states of the door. The first value of this line specifies if the lock on the door can be picked (if there is a door there at all). Since there isn't a door to the east this value is 0 for room 8901. The second value of this line is the object number of the key that is used to open the door. If there is no door in that direction (or the door can only be opened by picking it) this value is -1. The last value on this line is the number of the room to which this exits leads. The last line of the first exit entry of room number 8901 is:

0 -1 8902

Then put the entries to other rooms in order by exit number.


WLD FILE F: extra descriptions

This is where you would put the text of a sign or a plaque on the wall. Many area builders put one of these in a room that says who the area was created by. The first line of the extra description is just a capital "E." The second line of the extra description contains the keywords used to look at the description with a tilde at the end of the line. The second line(s) contain the text on the sign followed by a tilde on the line after the last line of the description. If you don't have an extra description for a room just leave all of this out. Room 8901 doesn't have an extra description but room 8904 does and it looks like:

E
whirls whirl moat~
You can't see much, but it seems that something beneath the surface
is creating them.
~


WLD FILE G: ending a room entry

After you have entered all the exits and any extra descriptions you want have a line with a capital "S" and start the next room on the next line. After the "S" of your last room you always will have the next two lines (regardless of zone number or room number).

#9999
$~


II.) The Monster File

The monster file is probably the next part you should code. It contains specifications for mobiles. I will go in to much less detail for the next two files as they follow much of the same format as the world file.


MOB FILE A: mobile number

Start with your zone followed by 01. For the first mob in the Welmar zone it is:

#8901


MOB FILE B: keywords

Separate each keyword with a space and end the line with a tilde. For mob 8901 this is:

king welmar~


MOB FILE C: short description

This is what the mud uses when the mobile does an action (like hits a player). If you use an article ("a," "an," or "the") make sure the first letter is lowercase. For mobile 8901 the short description is:

King Welmar~


MOB FILE D: title

This is what is displayed when plays type "look" in the room where Welmar is. The first line is the text followed by a tilde on the line after. Our example is:

The wise King Welmar sits here in his throne.
~


MOB FILE E: long description

This is shown when players actually look at the mobile. It consists of several lines of text followed by a tilde after the last line. Remember to limit your line lengths to 75 characters.

In his later middle-age, with his beard starting to grey, King Welmar
is still very powerfully built, and wouldn't take kindly to an attack.
Despite that, you know he is well-loved throughout the land, and has
a reputation as a wise an just ruler.
~


MOB FILE F: alignment and affection flags

This line defines how the mobile will act, what it is affected by, its alignment and ends with the capital letter S. It would be easiest to show to example first and explain it afterwards.

3 136 1000 S

Welmar has a special procedure (he "says" things) and he won't move around the mud. This is shown by the first value which is a bit vector. When mobs have a special procedure you must add a 1 to the bit vector and if you want a mob to not move around you must add a 2. So the first value on this line is 3 (1+2=3). King Welmar is affected by both sanctuary and detect invisible. The values for these (given in a table in appendix 2) are 128 for sanctuary and 8 for detect invisible. So we add them up and put their value in the second place (128+8=136). Welmar has an alignment of 1000, so this is the third value. And the line ends with the required "S."


MOB FILE G: difficulty of a mobile

This line defines the level, hitroll, armor, hitpoints, and damage of the mob. It would be easiest to show to example first and explain it afterwards.

30 0 -10 3d6+1480 4d8+10

The first value indicates that King Welmar is level 30. The next value says that he has 20 hitroll. Hitroll is calculated by taking 20 and subtracting the second value on this line (20-0=20). For a mobile with 22 hitroll the second value on this line would be -2 (20 -2=22)of for a mobile with 18 hitroll it would be 2 (20-2=18). The third value is 1/10th of Welmar's armor. The third value is -10, therefore Welmar will have -10*10 = -100 armor. The next value rolls Welmar's hitpoints. He will have a minimum of 1483 and a maximum of 1498 for an average of 1490.5. A mobile's hitpoints are rolled every time it gets loaded into the mud. The last value is how Welmar's damage is calculated. (He rolls four eight-sided dice and gets a bonus of ten.)


MOB FILE H: gold and experience

There are two values on this line. The first is the gold carried by the monster and the second is the experience the monster has. King Welmar being the well endowed ruler that he is has 15000 coins and 360000 experience. So the next line for the monster file entry on his would be:

15000 360000


MOB FILE I: position and sex

The first value is the position Welmar takes when loaded. It happens to be sitting which has a value of 6 (found in appendix 2). The next value is the position the mob will return to after a fight (if it is still alive). This is usually the same as the default position. For Welmar it is again sitting represented by a 6. The last value of this line is the monster's sex. King Welmar is a male, as most king's are, so this value is 1.

6 6 1


MOB FILE J: ending

Note that there is no special character to indicate the end of a monster entry and the start of a new one. After the position and sex line just start the next mobile. After the last line of the last mobile in your MOB file always include the following two lines (regardless again of mob number or zone number).

#9999
$~



IV.) The Object File

The object file contains all the attributes for the items in an area aside from the special procedures.


OBJ FILE A: item number

The item number is exactly like the mobile or room number. Start with the digits 01 after your zone number and count up by ones.

#8901


OBJ FILE B: keyword list

The keywords for item 8901 are ring and ethereal.

ring ethereal~


OBJ FILE C: short description

The short description is what is shown when an item is in a player's inventory or equipped by someone. Make sure that you only capitalize the first letter if it is a proper noun.

an ethereal ring~


OBJ FILE D: long description

This is shown when an item is lying on the floor. Put a tilde on the same line right after the text.

An ethereal-looking ring lies here, barely touching the ground.~


OBJ FILE E: action description

Do not enter any text in this field, but make sure you mark its place with a tilde. For all items this line should be:

~


OBJ FILE F: type, properties, body location

It would be easiest to show the example and explain afterwards.

9 1024 3

Since the item can be worn the first value is 9. (These values are found in a table in appendix 3.) The next value is a bit vector that describes what the item is affected by. The only thing that affects the ethereal ring is anti- evil so this value is 1024. Since this value is a bit vector just add up all the attributes you want and place it in the second value of this line. The third value is the bit vector of where the item can be worn or if it can be taken. In this instance a value of 3 means the item can be worn on a finger (2) and that is can be picked up off the ground (1).


OBJ FILE G: item values

The importance of each of the four values in the next value depends on what type of item you set it to be in part F. For an item of type 9 (armor) the first value is the armor content field. A positive value will increase the armor of the player, a negative value will decrease a player's AC. In the case of object type 9 the other 3 values are meaningless. Since object 8901 has no armor content this line would look like:

0 0 0 0

The different importance each of these fields take on for each different item type are explained in the appendix.


OBJ FILE H: weight, value, rent

Object 8901 has a weight of 1, a value (if sold at the appropriate store) of 10000 and a cost per day of 3000, so line H of this item entry is:

1 10000 3000


OBJ FILE I: load rate

The next line contains the load rate of the item. If an item loads half the time its load rate would be 50. Note that the values of the maximum existing of a an object that are set in the zone file take precedence if the object is loaded through an O or P command, but not if it is loaded through an E or G command. Those four commands will be explained in the zone file section.


OBJ FILE J: extra descriptions

These take the exact same form as the extra descriptions found in the wld files.


OBJ FILE K: affects

You may have between zero and two affects for each object. First you need a line that has just the character A. Like this:

A

The next line is the effect you want. Object 8901 affects a character's armor by -5. Note that AC is different that armor because it counts triple with it is on an item that is worn "on body." Also note that a negative value for armor works almost the same way as a positive value for armor content and that a negative value works almost the same way as a positive value of AC. The appendix gives the "affects code" for armor as 17 so the line after the character "A" would be:

17 -5

If you want to include second "affect" to your item simply put another "A" and on the next line have the appropriate affects code and the amount you want to have of that particular affect.


OBJ FILE L: ending the file

After you are done specifying your affects (if you have any) just move on to the virtual number of the next object. After you have finished the last object you would like to introduce to the game, end the file (as always) with the two lines:

#9999
$~


V.) The Zone File

The zone file is the file that ties your WLD, MOB, and OBJ files together. It tells the mud where to put the mobiles, items, and doors.


ZON FILE A: the heading

Zone files all start with a "#" sign and the zone number on the first line. For zone number 50 this would look like:

#50

The next line of the heading has the zone's title followed by a tilde. For instance zone number 50 is called "The Lost City" and thus the second line of the zone file for zone fifty would be:

The Lost City~

The third line contains three integers. The first is the highest room number in the zone. Usually you are assigned rooms in blocks of 100 so the person who got zone number 50 could use any room numbers from 5000 up to and including 5099. So the highest room number in zone 50 would be 5099. Convention dictates that one marks off all 100 rooms in the zone you were assigned even if you don't have 100 rooms. The second value is the time it takes for the zone to "repop." In our example zone fifty reloads any mobs that have been killed or items that have been taken and resets its doors every 20 "tics." So the second value would be 25. The third value is the reset type. If the zone never reloads objects or mobs (essentially ignoring the time in the second field) after the zone first loads at a reboot this value is a 0. If the zone only reset when there are no player characters in it this value is 1. If the zone resets every 25 tics no matter what this value is 2. Since The Lost City (our example zone) resets no matter what this value is 2. The third line of the zone file for The Lost City would be:

5099 25 2


ZON FILE B: the body

The body is by far the longest part of the zone file. This is where you specify what objects, mobs, or doors load where. Seven one-letter commands tell gizmo what to load where.

M (load a mobile):

Format: 'M' <if-flag> <mobile nr> <max existing> <room nr>

mobile nr and room nr should be self-explanatory. The 'max existing' parameter specifies the maximum permissible number of existing units. In other words: If you only want one manifestation of a given monster, you just specify the number '1'. If there is already one manifestation of that monster another won't be loaded at reset. In The Lost City the first mob to load is Ariel (mob number 5010) into room number 5004. We only want one copy of Ariel to exist at a time so our max existing value is 1. The <if-flag> field is always 0 for mobs. Therefor the first line of the body of zone 50 is:

M 0 5010 1 5004

G (give object to mobile):

Format: 'G' <if-flag> <object nr> <max existing>

Loads an object, and gives it to the last monster referenced (i.e. by the M-command). For instance if we wanted Ariel to load object number 5001 we would put the following line DIRECTLY after the line that loads Ariel. Note that in this case object 5001 would continue to load each time Ariel was killed until there were 99 copies of it in the game.

G 1 5001 99

Of course, this command doesn't make sense if a new mobile+object pair has not just been created, which is where the if-flag comes in handy. :)

E (object to equipment list of mobile)

Format: 'E' <if-flag> <object nr> <max existing> <equipment position>

Loads object and places it in the Equipment list of the last monster referenced. The body locations are listed in the appendix. If in addition to carrying object 5001 we would like Ariel to load object 5006 about his waist would put the following command DIRECTLY after Ariel.

E 1 5006 99 13

To recap, the forth, fifth, and sixth lines of our zone file would be:

M 0 5010 1 5004
G 1 5001 99
E 1 5006 99 13

O (load an object):

Format: 'O' <if-flag> <object nr> <max existing> <room nr>

Load an object and place it in a room. If we wanted to place object number 5033 in room 5014 the line of code would be:

O 0 5033 1 5014

P (put object in object):

Format: 'P' <if-flag> <object_nr1> <max existing> <object nr2>

So to put object number 5010 inside object number 5033 (make sure 5033 is a container!) Like in loading objects on mobs make sure this line directly follows the object you would like to place something into.

P 1 5010 99 5033

D (set state of door)

Format: 'D' <if-flag> <room nr> <exit nr> <state>

The door state can be 0 for open at reset, 1 for close at reset, or 2 for closed and locked at reset. The exit numbers are 0 for north, 1 for east, 2 for south, 3 for west, 4 for up, and 5 for down. To set the door as closed, but not locked, that leads north from room 5077 to 5078 we would use the two lines:

D 0 5077 0 1
D 0 5078 2 1

R (remove object from room)

Format: 'R' <if-flag> <room_nr> <object_nr>


ZON FILE C: closing

After you have finished setting all the mobs, door, and objects in you body the closing is very simple. Always use the following three lines (regardless of your zone number).

S
#999
$~


ZONE FILE D: remark statements

Remark statements are notes about what each part of the code does. Any symbols after the last field of the seven statements above is not executed by the mud. The mud also ignores anything following a * sign. The body of your zone file should be separated from the heading and closing by lines consisting of just one * each. So:

Heading line number 3
*
Body of your zone file goes here
*
Closing line number 1

Each group in the body should be set off from the others by one of these lines with a * in it. A group is either a door, a certain object that is loaded into a room, or a certain kind of mob. The best way to demonstrate this is to look at the brief zone file below.

The last bit of annotation is to note what each line does after the line. Make sure you justify these comments with each other. Again this is demonstrated in the zone file below.

Put all your mobs at the beginning of the file, then do all the objects that just load into rooms, and finally set your doors.

Note that this zone file bears little relation to the real zone 50 in the mud, since several lines had to be fabricated for teaching purposes.

#50
The Lost City~
5099 25 2
*
M 0 5010 1 5004 Ariel
G 1 5001 99 long sword
E 1 5006 99 13 clam shell
*
M 0 5019 3 5017 crabs
M 0 5019 3 5017
M 0 5019 3 5016
*
M 0 5018 3 5022 skeleton
E 1 5013 3 16 Pirate's Sword
M 0 5018 3 5022 skeleton
E 1 5013 3 16 Pirate's Sword
M 0 5018 3 5022 skeleton
E 1 5013 3 16 Pirate's Sword
*
O 0 5033 1 5014 sea chest
P 1 5010 99 5033 pirate's treasure
*
D 0 5077 0 1 door to Glittering Cave
D 0 5078 2 1
*
S
#999
$~


ZON FILE E: random list of things to watch for

1. Don't annotate your zone files and then use them with dikued as they will become gibberish.
2. Be careful about doors as if they are improperly set they will crash the mud.
3. If you try to load two pieces of equipment on the same body location on the same mob, the mud will crash.
4. If a P line is not subordinated to an O line or a G or E line is not subordinated to a M line we crash.
5. If a P, E, or G line does not have 1 as the <if-flag> we crash.
6. If a mob or object is set to load in a room that doesn't exist we crash.
7. If you don't have fun doing it, we'll know :)

Happy coding!



Appendix I. WLD FILE Quick Reference Guide

These are the values you use to determine the bit vector of the room attributes. (WLD FILE D)
DARK 1 A light must be used to see anything.
DEATH 2 Makes the room into a death trap. (Make sure death traps are always lighted-so players can see the room name when they use the "exit" command.)
NO_MOB 4 No monsters may walk around in here
INDOORS 8 Doesn't have any effect that I know of.
LAWFUL 16 not defined yet-don't use it
NEUTRAL 32 not defined yet-don't use it
SAFE 64 combat cannot occur here
NO_MAGIC 128 Magic of any sort will be absorbed.
TUNNEL 256 not defined yet-don't use it
PRIVATE 512 teleport spell will not place players here, players cannot be summoned from here, players cannot be summoned to here, players cannot relocate out of here, players cannot relocate to here, players cannot eth to here (though they can eth from here, low level characters (below level 9) cannot use the "home" command from here, rooms selected via the random_room() function or place_random_item() function (ie for reagents) will not be placed here
LOCK 1024 Lower level gods and mortals cannot enter the room at all TRAP 2048 A nomad has set a trap in this room. Once only. Do not use when building.
ARENA 4096 Players can kill each other for exp without getting a killer flag.
CLUB 8192 A resting room, gives extra regeneration.
CLAN 16384 This is reserved for use in clan houses.

DUEL 32768 Players can kill each other without loosing or gaining xp or getting a killer flag.

These are the possible values for the room type. (WLD FILE D)
SECT_INSIDE 0 Walking indoors
SECT_CITY 1 Walking in a city
SECT_FIELD 2 Walking in a field
SECT_FOREST 3 Walking in a forest
SECT_HILLS 4 Walking in hills
SECT_MOUNTAIN 5 Climbing in mountains
SECT_WATER_SWIM 6 Swimming
SECT_WATER_NOSWIM 7 Can't swim here, players must use a boat

Direction codes (WLD FILE E)
north 0
east 1
south 2
west 3
up 4
down 5

Door attributes (WLD FILE E)
no door 0 (players just walk through)
can be picked 1
cannot be picked 2


Appendix II. MOB FILE Quick Reference Guide

Mobile action values for the behavior bitvector. (MOB FILE F)
ACT_SPEC 1 The monster has a special procedure that is defined in the special procedure file.
ACT_SENTINEL 2 The monster will not move around in the world.
ACT_SCAVENGER 4 The monster will pick up things lying on the ground. It will pick up the most expensive items first.
ACT_ISNPC 8 Don't use this.
ACT_NICE_THIEF 16 The monster will not attack a thief which has been caught in the act of stealing from this monster.
ACT_AGGRESSIVE 32 The monster will attack and attempt to kill any player it can get it's claws on. It will not attack players it can't see (for example dark rooms or when player is invisible, unless the monster can detect invisibility)
ACT_STAY_ZONE 64 The monster will never move into another zone of the world (always use this for mobiles that you don't set as sentinels).
ACT_WIMPY 128 When this bit is set, the monster will flee when it's getting percentwise low on hitpoints. If the monster is both aggressive and wimpy, then it will only attack players that are not awake. (suffering players)
ACT_SUBDUE 256 The monster is subdued already.
ACT_RIDE 512 Don't use
ACT_AGGWA 1024 Monster attacks warriors (if not also aggressive)
ACT_AGGTH 2048 Monster attacks thieves (if not also aggressive)
ACT_AGGCL 4096 Monster attacks clerics (if not also aggressive)
ACT_AGGMU 8192 Monster attacks magic-users (if not also aggressive)
ACT_MEMORY 16384 Monster remembers who attacked it before and attacks them again
ACT_AGGNI 32768 Monster attacks ninjas (if not also aggressive)
ACT_AGGNO 65536 Monster attacks nomads (if not also aggressive)
ACT_ARM 131072 Cannot be disarmed
ACT_GHOST 262144 Don't use this
ACT_BLOCK 524288 Monster will try to stop players from fleeing.
ACT_CANNOTSTAT 1048576 Can't be stat-ed by immortals.

Values for the "affected by" bitvector. Note that many of these should not be used on non-player characters. (MOB FILE F)
AFF_BLIND 1 RESERVED PLAYERS
AFF_INVISIBLE 2 The monster is invisible
AFF_DETECT_ALIGNMENT 4 RESERVED PLAYERS
AFF_DETECT_INVISIBLE 8 The monster can see invisible players
AFF_DETECT_MAGIC 16 RESERVED PLAYERS
AFF_SENSE_LIFE 32 RESERVED PLAYERS
AFF_HOLD 64 DO NOT USE
AFF_SANCTUARY 128 The monster has sanctuary
AFF_GROUP 256 RESERVED PLAYERS
AFF_CURSE 1024 DO NOT USE
AFF_SPHERE 2048 DO NOT USE
AFF_POISON 4096 RESERVED PLAYERS
AFF_PROTECT_EVIL 8192 DO NOT USE
AFF_PARALYSIS 16384 DO NOT USE
AFF_INFRAVISION 32768 DO NOT USE
AFF_STATUE 65536 Players will turn to stone when they look at this monster. Note that this means players will be unable to read any description you write for this monster.
AFF_SLEEP 131072 RESERVED PLAYERS
AFF_DODGE 262144 Monsters have a chance to avoid mortal attacks (and also switch out and chose a new target if all attacks are dodged)
AFF_SNEAK 524288 The monster has sneak
AFF_HIDE 1048576 The monster will be hidden, and can only be detected by a "sense life" spell, note that this also means players cannot look at your monster and see the description you've written
AFF_ANIMATE 2097152 DO NOT USE
AFF_CHARM 4194304 The monster will act as charmed when a "follow <player>" is entered. Note that
players can't force monsters to follow them.
AFF_FOLLOW 8388608 RESERVED FOR PLAYERS
AFF_FLY 16777216 The monster can fly.
AFF_SUBDUE 33554432 The monster can be subdued.
AFF_IMINV 67108864 The monster has improved invisibility, so no-one can see it.
AFF_INVUL 134217728 The monster is surrounded by the most powerful sphere.
AFF_DUAL 268435456 The monster has two attacks
AFF_FURY 536870912 The monster is affected by fury spell

Monster position. (MOB FILE I)
POSITION_DEAD 0 DO NOT USE
POSITION_MORTALLYW 1 DO NOT USE
POSITION_INCAP 2 DO NOT USE
POSITION_STUNNED 3 DO NOT USE
POSITION_SLEEPING 4 The monster is sleeping.
POSITION_RESTING 5 The monster is resting.
POSITION_SITTING 6 The monster is sitting.
POSITION_FIGHTING 7 DO NOT USE.
POSITION_STANDING 8 The monster is standing.
POSITION_FLYING 9 The monster is flying.
POSITION_RIDING 10 DO NOT USE.
POSITION_SWIMMING 11 The monster is swimming.

Monster sex. (Though don't get any big ideas.) (MOB FILE I)
SEX_NEUTRAL 0
SEX_MALE 1
SEX_FEMALE 2

Appendix III. OBJ FILE Quick Reference Guide

Item type. (OBJ FILE F)
ITEM_LIGHT 1 Item is a light.
ITEM_SCROLL 2 Not yet implemented
ITEM_WAND 3 Not yet implemented
ITEM_STAFF 4 Not yet implemented
ITEM_WEAPON 5 Item is a weapon
ITEM_FIREWEAPON 6 Not yet implemented
ITEM_MISSILE 7 Not yet implemented
ITEM_TREASURE 8 Item is a treasure (not money)
ITEM_ARMOR 9 Item is armour.
ITEM_POTION 10 Not yet implemented
ITEM_WORN 11 used for worn items that don't have any AC
ITEM_OTHER 12 Item is other
ITEM_TRASH 13 Item is trash
ITEM_TRAP 14 Not yet implemented
ITEM_CONTAINER 15 Item is a container
ITEM_NOTE 16 Item is a note that can be written upon (with a pen)
ITEM_DRINKCON 17 Item is a drink container, for example a bottle or a barrel or a wine-skin. A drink container with contents must *always* have two names: 1. The name of the drink, 2. the name of the container, example:

tea cup~

ITEM_KEY 18 Item is a key
ITEM_FOOD 19 Item is food.
ITEM_MONEY 20 Item is money.
ITEM_PEN 21 Item is a pen.
ITEM_BOAT 22 Item is a boat, which must be carried by a player if the player wishes to enter NOSWIM room sector types.
ITEM_BULLET 23 Item is a bullet.
ITEM_MUSICAL 24 Item is a musical instrument.

Item restriction flags bitvector. (OBJ FILE F)
glowing 1 The item will just "glow" (This has no effect)
humming 2 (This has no effect)
dark 4 DO NOT USE.
lock 8 DO NOT USE.
evil 16 DO NOT USE.
invisible 32 Item is invisible
magic 64 Item will show a magical aura when 'detect magic' is used
cursed 128 Item can not be dropped
blessed 256 (This has no effect)
anti-good 512 not usable by good characters, etc.
anti-evil 1024
anti-neutral 2048
anti-warrior 4096
anti-thief 8192
anti-cleric 16384
anti-mage 32768
anti-mortal 65536
anti-male 131072
anti-female 262144
not rentable 524288 can't be rented
anti-ninja 1048576
anti-nomad 2097152
anti-paladin 4194304
anti-anti-paladin 8388608
anti-avatar 16777216
anti-bard 33554432
anti-commando 67108864
limited 134217728 can't be statted by low level immortals or cloned.
rspec 268435456

This bitvector defines if items can be taken, and if they can be worn. (OBJ FILE F)
ITEM_TAKE 1 Can be picked up off the ground
ITEM_WEAR_FINGER 2 Can be worn on a finger
ITEM_WEAR_NECK 4 Can be worn around the neck
ITEM_WEAR_BODY 8 Can be worn on the body
ITEM_WEAR_HEAD 16 Can be worn on the head
ITEM_WEAR_LEGS 32 Can be worn on the legs
ITEM_WEAR_FEET 64 Can be worn on the feet
ITEM_WEAR_HANDS 128 Can be worn on the hands
ITEM_WEAR_ARMS 256 Can be worn on the arms
ITEM_WEAR_SHIELD 512 Can be used as a shield
ITEM_WEAR_ABOUT 1024 Can be worn about the body
ITEM_WEAR_WAISTE 2048 Can be worn around the waist
ITEM_WEAR_WRIST 4096 Can be worn on the wrist
ITEM_WIELD 8192 Can be wielded and used as a weapon
ITEM_HOLD 16384 Item can be held in the hand
ITEM_THROW 32768 Item can be thrown

Meanings of item values that depend upon item type. (OBJ FILE G)

ITEM_LIGHT (1)
Value[0]: Not Used
Value[1]: Not Used
Value[2]: Number of hours the light can be used for. Zero hours means that the light has gone out. A negative number will create an eternal light source.
Value[3]: Not Used
ITEM_SCROLL (2)
Value[0]: Level of the spell on the scroll.
Value[1]: Which spell (see list somewhere around the end of file)
Value[2]: Which spell
Value[3]: Which spell
The values(1-3) are three (or less) different spells, mixed 'on' the scroll. Unused spells should be set to -1.
ITEM_WAND (3)
Value[0]: Level of spell in wand.
Value[1]: Max Charges (1..X)
Value[2]: Charges Left
Value[3]: Which spell in wand (see list somewhere around the end of file)
ITEM_STAFF (4)
Value[0]: Level of spell in staff.
Value[1]: Max Charges (1..X)
Value[2]: Charges Left
Value[3]: Which spell in staff (see list somewhere around the end of file)
ITEM_WEAPON (5)
Value[0]: Only for Magic Weapon!
Value[1]: Number of dice to roll for damage
Value[2]: Size of dice to roll for damage
Value[3]: The weapon type. Type is one of:

NUMBER CATEGORY Message type
2 : Slash "whip/whips"
3 : Slash "slash/slashes"
4 : Whip "whip/whips",
5 : Sting "sting/stings"
6 : Bludgeon "crush/crushes"
7 : Bludgeon "pound/pounds"
8 : Claw "claw/claws"
11 : Pierce "pierce/pierces"

ITEM_FIREWEAPON (6)
Value[0]: number of this gun.
Value[1]: number of shoots left.
Value[2]: Number of dice to roll for damage
Value[3]: Size of dice to roll for damage
ITEM_MISSILE (7)
Value[0]: -
Value[1]: -
Value[2]: -
Value[3]: -
ITEM_TREASURE (8)
Value[0]: -
Value[1]: -
Value[2]: -
Value[3]: -
ITEM_ARMOR (9)
Value[0]: The effective AC. >0 enhances the armour class. <0 reduces the the armour class (cursed armour for example).
Value[1]: -
Value[2]: -
Value[3]: -
ITEM_POTION (10)
Value[0]: Level of the spell in the potion.
Value[1]: Which spell (Listed elsewhere in this file)
Value[2]: Which spell
Value[3]: Which spell
The values(1-3) are three (or less) different spells, mixed in the potion. Unused spells should be set to -1.

Example:
Value 0 : 30 (Level)
Value 1 : 27 (Harm)
Value 2 : 17 (Curse)
Value 3 : 4 (Blindness)
(* Don't drink this - It's bad for your health! *)

ITEM_WORN (11)
Value[0]: -
Value[1]: -
Value[2]: -
Value[3]: -
ITEM_OTHER (12)
Value[0]: -
Value[1]: -
Value[2]: -
Value[3]: -
ITEM_TRASH (13)
Value[0]: -
Value[1]: -
Value[2]: -
Value[3]: -
ITEM_TRAP (14)
Value[0]: -
Value[1]: -
Value[2]: -
Value[3]: -
ITEM_CONTAINER (15)
Value[0]: Maximum weight the container can contain.
Value[1]: Container flags:

CLOSEABLE 1
PICKPROOF 2
CLOSED 4
LOCKED 8

Value[2]: The item-number of the object which can open the object. -1 means
no lockability.
Value[3]: Internal use for Corpses that must "rot".
ITEM_NOTE (16)
Value[0]: Tounge (language of writing). Not yet used.
Value[1]: -
Value[2]: -
Value[3]: -
ITEM_DRINKCON (17)
Value[0]: Maximum drink-units the drink-container can contain.
Value[1]: Number of drink-units that are left in the container.
Value[2]: The type of liquid in the drink-container, one of:

Type nr. Effect
Drunkness Fullness Thirst

LIQ_WATER 0 0 1 10
LIQ_BEER 1 3 2 5
LIQ_WINE 2 5 2 5
LIQ_ALE 3 2 2 5
LIQ_DARKALE 4 1 2 5
LIQ_WHISKY 5 6 1 4
LIQ_LEMONADE 6 0 1 8
LIQ_FIREBRT 7 10 0 0
LIQ_LOCALSPC 8 3 3 3
LIQ_SLIME 9 0 4 -8
LIQ_MILK 10 0 3 6
LIQ_TEA 11 0 1 6
LIQ_COFFE 12 0 1 6
LIQ_BLOOD 13 0 2 -1
LIQ_SALTWATER 14 0 1 -2
LIQ_COKE 15 0 1 5

The above values for drunkness/fullness/thirst are used per four "units" drunk. The values are expressed in HOURS!

Example:
Dragon empties a bottle (say 7 units) of saltwater.
His Drunkness is not changed ((7/4)*0)
His Fullness increases by ((7/4)*1) hours
His Thirst increases by ((7/4)*-2) hours, thus making him More thirsty.
The hours above are numbers between 0 and 24. 24 hours is maximum for drunkness/fullness/thirst. When hours are zero for any drunkness/fullness/thirst the person will be sober, hungry, or thirsty respectively.

Value[3]: if this value is non-zero, then the drink is poisoned.
ITEM_KEY (18)
Value[0]: The key-type. This value must match the lock-type the door that the key can open.
Value[1]: -
Value[2]: -
Value[3]: -
ITEM_FOOD (19)
Value[0]: The number of hours, that this food will fill the stomach
Value[1]: -
Value[2]: -
Value[3]: If this value is non-zero, the food is poisoned.
ITEM_MONEY (20)
Value[0]: The number of gold coins "in the pile of coins".
Value[1]: -
Value[2]: -
Value[3]: -
ITEM_PEN (21)
Value[0]: -
Value[1]: -
Value[2]: -
Value[3]: -
ITEM_BOAT (22)
Value[0]:
Value[1]:
Value[2]:
Value[3]:
ITEM_BULLET (23)
Value[0]: -
Value[1]: -
Value[2]: The # of the fireweapon for this bullet.
Value[3]: The number of bullets.
ITEM_MUSICAL (24)
Value[0]: From which song
Value[1]: To which song it can play
Value[2]: -
Value[3]: -

Item affects codes. (OBJ FILE K)
APPLY_NONE 0 DO NOT USE.
APPLY_STR 1
APPLY_DEX 2
APPLY_INT 3
APPLY_WIS 4
APPLY_CON 5
APPLY_SEX 6 DO NOT USE.
APPLY_CLASS 7 DO NOT USE.
APPLY_LEVEL 8 DO NOT USE.
APPLY_AGE 9
APPLY_CHAR_WEIGHT 10
APPLY_CHAR_HEIGHT 11
APPLY_MANA 12
APPLY_HIT 13
APPLY_MOVE 14
APPLY_GOLD 15 DO NOT USE.
APPLY_EXP 16 DO NOT USE.
APPLY_AC 17
APPLY_ARMOR 17
APPLY_HITROLL 18
APPLY_DAMROLL 19
APPLY_SAVING_PARA 20 These five are saving throws.
APPLY_SAVING_ROD 21
APPLY_SAVING_PETRI 22
APPLY_SAVING_BREATH 23
APPLY_SAVING_SPELL 24 This is the most used saving throw.
APPLY_SKILL_SNEAK 25 silly skill affects.
APPLY_SKILL_HIDE 26
APPLY_SKILL_STEAL 27
APPLY_SKILL_BACKSTAB 28
APPLY_SKILL_PICK_LOCK 29
APPLY_SKILL_KICK 30
APPLY_SKILL_BASH 31
APPLY_SKILL_RESCUE 32
APPLY_SKILL_BLOCK 33
APPLY_SKILL_KNOCK 34
APPLY_SKILL_PUNCH 35
APPLY_SKILL_PARRY 36
APPLY_SKILL_DUAL 37
APPLY_SKILL_THROW 38
APPLY_SKILL_DODGE 39
APPLY_SKILL_PEEK 40
APPLY_SKILL_BUTCHER 41
APPLY_SKILL_TRAP 42
APPLY_SKILL_DISARM 43
APPLY_SKILL_SUBDUE 44
APPLY_SKILL_CIRCLE 45
APPLY_SKILL_TRIPLE 46

Appendix IV. ZON FILE Quick Reference Guide

These are the codes for the body locations where you want to load an item on a mobile. (ZON FILE B)
WEAR_LIGHT 0
WEAR_FINGER_R 1
WEAR_FINGER_L 2
WEAR_NECK_1 3
WEAR_NECK_2 4
WEAR_BODY 5
WEAR_HEAD 6
WEAR_LEGS 7
WEAR_FEET 8
WEAR_HANDS 9
WEAR_ARMS 10
WEAR_SHIELD 11
WEAR_ABOUT 12
WEAR_WAISTE 13
WEAR_WRIST_R 14
WEAR_WRIST_L 15
WIELD 16
HOLD 17