The .mob File

The .mob file contains everything the mud needs to know about the mobs, except for where they are and what they're holding. Each mob in the file is in sequential vnum order.

There are two types of mob files, but only the 'simple' mob type is described in detail below. The simple mob type contains all the necessary distinctions commonly used in muds -- the 'complex' mobs take a lot of time and effort for very little return. Most, if not all muds use simple mobs. The complex mob archetype will be given later in this Part, but no explanation will be given.

Here's a sample mob:

mob example~
the Example Mob~
An example mob stands here, completely clueless.

The example mob looks indistinct, as if it hasn't been completely fleshed out yet.

194 8 100 S
1 20 10 1d6+2 1d4+0
10 100
8 8 0

Now, to explain, line-by-line:

The vnum of the mob. Read the section on Virtual Numbers in the Basics section for more information.
mob example~
The namelist of this mob: what words can be used to interact with this mob. For instance, 'kill mob' or 'kill example' would both be valid for this mob. Note the tilde following the field.
the Example Mob~
The short desc of the mob. Used in messages such as, "You poke the Example Mob." or "the Example Mob pounds you!" Note the tilde following the description.
An example mob stands...
The long desc of the mob. Used as part of a room description when a player enters or looks in a room. Note the tilde on its own line after the description.
The example mobs looks...
This is the description of the mob; what a player sees when typing 'look' at the mob.
194 8 100 S
The first number is the Action flag of the mob, which tell the mud how the mob should act.
The second number is the Affection flag, which tells the mud about any special abilities the mob might have. Both these flag values work as per the Flags subject in the basics section of this handbook.
The third number is the alignment of the mob, ranging from 1000 (good) to -1000 (evil).
The 'S' stands for simple mob. Complex mobs are denoted by anything other than an 'S' in this field. Complex mob archetypes are covered later, but no explanation for these will be given.
1 20 10 1d6+2 1d4+0
Field one is the mob's level.
The second field is the mob's Thaco, or rather, 'To Hit Armour Class 0'.
The third field is the mob's armour value.
Field four is the mob's hit points. There is more on Hitpoints and damage below in the aptly named Hitpoints and Damage.
The fifth field is how much damage a mob does with its bare hands.
10 100
The first number is how much gold pieces this mob is carrying.
The second is how many experience points it is worth.
8 8 0
The first and second number are the mob's loading and default position, respectively. There is a section below, Positions that will explain more.
The final number is the mob's gender; 0 is neuter, 1 is male, and 2 is female.


Descriptions are done much the same way as those in the section in Rooms, earlier in this handbook. The reader is encouraged to go back and reread that section if necessary. However, the placement of tildes is still very important.

Action & Affection Flags

Action flags tell the mud how a mob behaves, and affection flags control the special qualities of a mob. These flags are added together in the way detailed in the Basics section under Flags. Below is a listing of flags for each type, with descriptions of what each does:

Action Flags

- Special routine which can be found in the file spec_proc.c -- Ask the admins of your mud for more information on specials.
- This mob stays put.
- This mob picks up stuff lying on the ground.
- Reserved. Do not use.
Nice to Thieves
- Will not attack a player trying to steal from it.
- Automatically attacks players it can see.
Stays in zone
- Will not enter a room with a different zone number than its own. See zone numbers in the Basics section.
- Will flee when hurt badly.

Affection Flags

* Blind
- Reserved for players, or internal use only.
- Mob is invisible
* Detect Evil
- Reserved for players, or internal use only.
Detect Invis
- Mob can see invisible players
* Detect Magic
- Reserved for players, or internal use only.
* Sense Life
- Reserved for players, or internal use only.
* Hold
- Reserved for players, or internal use only.
- Mob is affected by the sanctuary spell.
* Group
- Reserved for players, or internal use only.
* Nothing
- This flag was left out in the original DikuMud
* Cursed
- Reserved for players, or internal use only.
* Flaming
- Reserved for players, or internal use only.
* Poisoned
- Reserved for players, or internal use only.
* Protected/Evil
- Reserved for players, or internal use only.
* Paralyzed
- Reserved for players, or internal use only.
* Morden Sword
- Reserved for players, or internal use only.
* Slept
- Reserved for players, or internal use only.
* Dodging
- Reserved for players, or internal use only.
- Mob cannot be seen entering or leaving a room.
- Mob is hidden
* Afraid
- Reserved for players, or internal use only.
- Mob will act charmed if follow <player> is entered.
* Following
- Reserved for players, or internal use only.


Thac0, or To Hit Armour Class 0, is a function of how well a mob can hit a player, or another mob. This number is a target number, which a mob must get higher than on a random roll between 1 and 20 to hit. After this random number is found, and all other bonuses and penalties are weighed in, the final number is compared to the target number, and the mud will determine if the mob has hit.

Armour class 0 is just a handy benchmark for the system. The target number at armour class 0 is modified up or down based on what the target's armour is like. For example, if a sample mob with a Thaco of 19 were trying to hit a player with a 5 armour, its adjusted target number would be 14 to hit this player. Likewise, if the same mob were trying to hit a player with a -2 armour, it would need a 21 to hit (good luck!).

Hitpoints And Damage

The functions of hitpoints and damage are arrayed randomly by the mud, as a function of imaginary dice and bonuses. These always follow the form xdy+z, where x is the imaginary amount of dice, y is how many sides these dice have, and z is a constant being added to the final total.

For example, our example mob had hitpoints of 1d6+2: a random number between 1 and 6, then add 2, for a range of 3-8. Another mob might have 10d10+150 for a range of 160-250. Damage is calculated the same way.

These fields must follow the form xdy+z, even if z equals 0! For instance, our example mob does 1d4+0 damage with its bare hands...

One more important thing to know about damage: this is the mob's damage with its fists/claws/what-have-you. If this mob is wielding a weapon, it will do the weapons damage instead of its own, but will then ADD its z constant to the amount of damage done as a strength bonus.


A mob always has two position numbers: its loading position, and its default position. A mob will be loaded into its loading position initially, and after fighting, will return to its default position. Note that these do not have to be the same, but often are.

The valid positions are:

        4       Sleeping
        5       Resting
        6       Sitting
        8       Standing

There are a few more positions than these, but are not used except during fighting, which the mud takes care of automatically.

Standards And Measures

These are the suggested strengths of mobs, as given in the original Diku documentation...

Level Hp.        Exp.   Thaco  Armour   Damage  Notes
  0   1-10          25    20     10     1d4+0
  1   11-22        100    20      9     1d5+0
  2   23-35        200    19      8     1d6+0
  3   36-47        350    18      7     1d7+0
  4   48-60        600    17      6     1d8+0

  5   61-72        900    16      5     2d4+0
  6   73-85       1500    15      4     1d8+1
  7   86-97       2250    14      4     2d4+1
  8   98-110      3750    13      3     2d5+1
  9   111-122     6000    12      3     2d5+1

 10   123-135     9000    11      2     2d6+1
 11   136-147    11000    10      2     2d6+1
 12   148-160    13000     9      2     2d7+1
 13   161-172    16000     8      2     2d7+1
 14   173-185    18000     7      1     2d8+1

 15   186-197    21000     6      1     2d8+2
 16   198-210    24000     5      1     2d8+2
 17   211-222    28000     4      1     3d6+2
 18   223-235    30000     3      0     3d6+2
 19   236-247    35000     2      0     3d6+3

 20   248-260    40000     1      0     3d6+4  Minor Demons
 21   261-350    50000     0     -1     3d7+4
 22   351-400    60000     0     -1     3d8+4
 23   401-450    80000     0     -2     3d8+4  Shopkeepers
 24   451-500   100000     0     -3     3d8+4  Guildmasters

 25   501-550   130000     0     -4     4d6+4
 26   551-600   155000     0     -6     4d6+4  Major Demons
 27   601-650   200000     0     -7     4d6+4  Demigods
 28   651-700   310000     0     -8     4d6+5  Lesser Gods
 29   701-900   450000     0     -9     4d7+5  Demon Lords/Arch Devils

 30   901-1000  600000     0    -10     4d8+5  Greater Gods

Archetype Mob (Simple)

name list~
short desc~
long desc
mob desc
<action flags> <affection flags> <alignment> S
<level> <thaco> <ac> <hitpoints> <damage>
<gold> <experience>
<loading position> <default position> <gender>

Archetype Mob (Complex)

name list~
short desc~
long desc
mob desc
<action flags> <affection flags> <alignment> <anything but an S>
<strength> <intelligence> <wisdom> <dexterity> <constitution>
<hit low> <hit high> <armour> <mana> <movement> <gold> <exp>
<position> <default> <sex> <class> <level> <age> <weight> <height>
<condition 0> <condition 1> <condition 2>
<savingthrow 0> <savingthrow 1> <savingthrow 2> <savingthrow 3> <savingthrow 4>

Tips And Observations

[Next] On to the next section
[Back] Back to the previous section
Back to the Builders' Handbook contents

[C.A.W.] Back to the C.A.W. Homepage

Alex Fletcher
Last modified: June 24th, 1996