Area Building

· Home
· Overview
· Helps
· Mobiles
· Objects
· Rooms
· Resets

· Shops
· Specials
· Time
· Weather
· Scripts


Mirkwood Mobiles


This is a short manual about writing mobs for Mirkwood.  There are several EXAMPLES at the very end of this document.

-Tomasin 9-22-95 


First some general guidelines:

To keep the MUD fun, we must keep it challenging. This means no wimpy mobs. It also means no incredibly tough mobs unless you have a GOOD reason. This balance is hard, we admit. We'll try to bestow some learned lessons in the text below. Generally, a 'hard fight' should mean that a player can defeat a mob using all of his/her/its mana and hit points (with a bit left over for survival, of course.) That is, the play should have to sleep and regenerate before moving on to the next target. A hard fight should earn the player about 50-60 xp. A VERY hard fight might mean fleeing several times, using potions, etc., and could earn the player a MAX of 120-150 xp. If we see players getting more than that every fight, something is wrong. Adding special functions, such as spell casting, can make SOME difference to a LOT of difference. Adding vulnerabilities, immunities, and resistances can often make or break a mob. Keep a balance -- if you add a 'common' vulnerability, add lots of hp. If you add magic or weapon  immunities, decrease the hp. Think balance balance balance....


The syntax for the mobiles' section is as follows:

#MOBILES
#vnum
name list~
short description~
long description
~
extended description
~
race~
<action flags> <affect flags> <align>   S
<level> <+ hit> <hits> <mana> <damage> <damage type>
AC values: pierce bash slash magic
<offense flags> <immunities> <resistances> <vulnerabilities>
<start position> <default position> <sex> <gold>
<form flags> <part flags> <size> <material>)
{
 mprogs
}
{
  M
  <exit msg>~
  <entrance msg>~
}
{
  A <aggie-flags>
}
... more mobs ...

#0


---- Explanation ----

The vnum is the virtual number of the mob, unique to it.

The  name list are the mob's names, its keywords. These names are the words used to interact with a mobile. You may have multiple words here, and each one can be used during player interaction with the creature. For example, if a mob had the keywords 'orc captain', a player could enter 'kill orc' or 'kill captain'.

The  short description is a simple title for the mob. This is the string that would be seen on scan or if the mob gossip'd. Note that you should NOT begin the short description with a capital 'A', as in 'A snake'. It should be 'a snake'. Mirkwood's code will capitalize the first word of a mob's short description, when needed.. Sentences that include the short description someplace else other than the beginning look pretty funny with an 'A' or 'The' stuck in the middle. Proper names used in short descriptions, as in 'Sauron', should be capitalized as normal.

The  long description is what a player would see when entering a room with the mobile in it. It should be a complete sentence, preferably one line or less. This means the long description should be no longer than 80 characters. Remember that some flags, like (Sanc), will lengthen the long description.

The  extended description is what a character would see if they looked 'at' your creature. Spend some time on your extended descriptions. Properly done, they can make your area much more interesting.

The  race is ... the race of the mobile. Race determines the body parts that might fall on the ground after the mob's death. In addition, race also determines immunities, vulnerabilities, and  resistances, as well as inherent skills such as infravision. With the addition of mounted travel and mounted combat, race also determines if a mob is ridable or not. Note that if you wish, you can choose unique and set body parts and immunities, vulnerabilities, resistances, and inherent skills yourself. In addition, you can add immunities, vulnerabilities, and resistances to an existing race. Players cannot see the race of a mob. (Race is mainly used to speed up building:)
 
 
RACE
SKILLS
IMM
RESIST
VULN
human
       
elf
infrared
 
charm
iron
dwarf
infrared
 
magic, poison, disease
drowning
giant
   
fire, cold
mental, lightning
shade
pass door
 
charm, poison, disease
light
hobbit
dark vision, detect invis
   
poison
treant
detect magic, evil
 
disease
fire
orc
infrared
 
disease
light
bat
flying, dark vision, dodge
   
light 
bear
disarm, berserk
   
bash, cold
cat
dark vision, fast, dodge
     
centipede
dark vision
 
pierce, cold
bash
dog
fast
     
doll
 
magic
bash, light
slash, fire, acid
fido
dodge, fast
   
magic
fox
dark vision, fast, dodge
     
goblin
infrared
 
disease
magic
hobgoblin
infrared
 
disease, poison
 
kobold
infrared
 
poison
magic
lizard
   
poison
cold
modron
infrared, assist race/align
charm
fire, cold, acid
holy, mental, negative, disease
pig
       
rabbit
dodge, fast
     
snake
   
poison
cold
song bird
flying, dodge, fast
     
troll
rejuvenation, infrared, detect hidden
 
charm, bash
fire, acid
water fowl
swim, flying
 
drowning
 
wolf
dark vision, dodge, fast
     
wyvern
flying, bash, fast, detect invis/hidden poison
poison
 
light
horse 1 bash, fast, dodge      
gryphon 1 Flying, detect hidden, bash, fast, dodge    
dragon 1 Flying, detect hidden, bash, fast, dodge    
unique
     

1 denotes a ridable race type

The <action flags> describe the behavior of the mob, to a certain extent.

 
ACT_IS_NPC Autoset for mobs. Don't use this flag.
ACT_SENTINEL B Stays in one room
ACT_SCAVENGER C Picks up objects
ACT_HOLYLIGHT D Gives a mob holylight, which allows it to always see PCs/NPCs, even if invis or hiding, or if the room is dark. Useful when used in conjuntion with ACT_WIZI
ACT_WIZI E Makes a mob completely invisible to players, even if they are using detect invis or hide. Useful for hiding a mobprog :)
ACT_AGGRESSIVE F Defunct--see aggie flags
ACT_STAY_AREA G Won't leave area
ACT_WIMPY H Flees if badly hurt. Note that wimpy mobs with an aggresive flag will attack sleeping players, assuming the player is included in the individual aggie flag's triggering paramenters.
ACT_PET I Autoset for pets. Builders, don't use this flag.
ACT_TRAIN J Can train PCs
ACT_PRACTICE K Can practice PCs
ACT_ILLUSION L Makes mobs disappear when try to kill/give item too/targeted by spells
ACT_BREATHES_WATER M Mob can breathe underwater (Gets hurt in air)
ACT_NOKILL N Mob cannot be attacked or killed, good for quest mobs
ACT_UNDEAD O Can't be slept, calmed, plagued, or scared
ACT_CLERIC Q Fights/casts/saves as a cleric
ACT_MAGE R Fights/casts/saves as a mage
ACT_THIEF S Fights/casts/saves as a thief
ACT_WARRIOR T Fights/casts/saves as a warrior
ACT_NOALIGN U For mobs like rabbits
ACT_NOPURGE V Will not be destoryed in a purge
ACT_REPAIR Allows a mob to repair armor. Farin in Bree is an example
ACT_POLYMORPH X Makes mobs behave as a player in levelling, death and pk logic. Not recommended for builders, used for quests, etc
ACT_SET_RECALL Z Mob can set the recall room of a player using 'recall set'
ACT_IS_HEALER a Acts as a healer
ACT_GAIN b PCs can gain spells/skills at this mob
ACT_UPDATE_ALWAYS  c Updated even if area empty
ACT_SHEPHERD e Acts as a shepherd

 The < affect flags> describe what the mobile is affected by. Builders, use the letter flags. The numbers are to be used for the isaffect if check. See the Mob Prog file for more information.
 
 
AFF_BLIND A 1
AFF_INVISIBLE  B 2
AFF_DETECT_EVIL  C 4
AFF_DETECT_INVIS  D 8
AFF_DETECT_MAGIC E 16
AFF_DETECT_HIDDEN F 32
AFF_SLOTH G 64
AFF_SANCTUARY  H 128
AFF_FAERIE_FIRE  I 256
AFF_INFRARED J 512
AFF_CURSE K 1024
AFF_PYROSHIELD L 2048
AFF_POISON M 4096
AFF_PROTECT_EVIL  N 8192
AFF_PROTECT_GOOD O 16348
AFF_SNEAK P 32768
AFF_HIDE Q 65536
AFF_SLEEP R 131072
AFF_CHARM S 262144
AFF_FLYING T 524288
AFF_PASS_DOOR  U 1048576
AFF_HASTE  V 2097152
AFF_CALM W 4194304
AFF_PLAGUE  X 8388608
AFF_WEAKEN Y 16777216
AFF_DARK_VISION Z 33554432
AFF_BERSERK a 67108864
AFF_SWIM b 134217728
AFF_REJUVENATION c 268435456
AFF_PARALYSIS (unused)  d 536870912
AFF_VISEGRIP e 1073741824

Your mobile's < align> can range from -1000 (very evil) to 1000 (saintly). NOTE: currently we have more evil mobs than good ones, so you might try to write more good mobs, assuming that fits in with the theme of your area.

That silly 'S' has just got to be there.

< level> is, of course, your mobile's level.

< + hit> is the mob's extra ability to hit. For most cases this should be low or 0. The mob's level determines the to-hit more than anything else. Below level 10, this number should be 0. At level 80, 10-15 is fine.

< hits> is the amount of hit points a mob has. It's given in terms of dice. Note that this value MUST be in this form: XdY + Z, where X = number of dice, Y = number of sides on each dice, and Z = any extra hit points (Z can be 0, if you wish).  In other words, you could use 10d100+500, but not simply 10d100. If you want your mob to always pop with the same number of hit points, you can do this: 1d1+499. That will always produce mobs with 500 hit points. As a simple guideline, you should average the following:
 
 
Mob Level  HP/Level 
1-15 10-15
15-30 15-30
30-45 25-45
45-60 30-55
60-75 35-70
75-90 45-90
90+ 70-100

The number is in terms of dice: 40d40+2500 averages to be around 3320. If you need help understanding this, ask an immortal.

< mana> for now is mostly for show, since mobs do not really USE mana (unless using MPCAST, see MOBPROGS section). (This may change!) For now, put something reasonable in there, but don't sweat over it. Note that this value is always entered as dice plus any extra mana: 10d10+400. See 'hits' above.

< damage> is the average damage (in dice) the mobile does w/o a weapon in hand. Like 'hits' and 'mana', it's entered in this form: XdY+Z, or, for example, 5d5+10. NOTE: The extra damage, the Z value, is used by the mob EVEN IF he is wielding a weapon. So, do make disarm effective, you just have to make sure that XdY in this field is a bit less than the average damage on the weapon the mob is wielding. See 'weapons' in the OBJECTS file for more information.

If you set a damage of XdY, you can calculate the following:

   Minimum damage= X
   Maximum damage= X * Y
   Average damage= ((X * Y) + X)/2  NOT (X*Y)/2, be careful!

Average damage should not to exceed (0.5*mobile level) + 4.

For example, average damage on mobs:  Maximum should be 5 to start plus 5 for  every 10 levels. So, for example, a level 30 mob's maximum average damage would be 5 plus 15 (5 per each 10 levels) for a total of 20.  Further suggestion:  if a mobile has a weapon, its damage should be slightly LOWER than the weapon's average damange. The mob's average damage only applies if it is fighting WITHOUT a weapon. If its average damage is lower than the average damage of whatever weapon it may be wielding, then disarm is effective. We WANT disarm to be effective.

< damage type> determines the kind of damage and what message is produced when the mob is fighting.
 
 
MESSAGE  TYPE  DAM TYPE
"hit" -1 0
"slice" DAM_SLASH  1
"stab" DAM_PIERCE
"slash" DAM_SLASH 3
"whip" DAM_SLASH  4
"claw" DAM_SLASH  5
"blast" DAM_BASH 6
"pound" DAM_BASH 7
"crush" DAM_BASH 8
"grep" DAM_SLASH 9
"bite" DAM_PIERCE  10
"pierce" DAM_PIERCE 11
"suction" DAM_BASH  12
"beating" DAM_BASH  13
"digestion" DAM_ACID 14
"charge" DAM_BASH 15
"slap" DAM_BASH  16
"punch" DAM_BASH 17
"wrath" DAM_ENERGY 18
"magic" DAM_ENERGY 19
"divine power" DAM_HOLY 20
"cleave" DAM_SLASH 21
"scratch" DAM_PIERCE 22
"peck" DAM_PIERCE 23
"peck" DAM_BASH 24
"chop" DAM_SLASH 25
"sting" DAM_PIERCE 26
"smash" DAM_BASH 27
"shocking bite"  DAM_LIGHTNING  28
"flaming bite" DAM_FIRE  29
"freezing bite" DAM_COLD 30
"acidic bite" DAM_ACID 31
"chomp" DAM_PIERCE  32
"flash" DAM_LIGHT 33
"inversion" DAM_NEGATIVE 34
"deluge" DAM_DROWNING 35

Your mob's AC values are next. The numbers range from 10 down, and magic should be higher than the rest (about 2/3 of the others). Remember, the lower the number, the better the Armor Class. These numbers are approximately 1/10 of the actually running value (ie, a 10 == 100 ac, and a -32 is approximately -320). Armor classes for higher level mobs (above 35) should be a bit over half (in negatives) of the mob's level. Thus, for example, an level 45 or should have something along the lines of -27 -28 -27 -17. If your mob is going to be wearing armor, this should be higher (remember, -20 is higher than -27).

< offensive flags> are as follows:
 
 
OFF_AREA_ATTACK  A hits everyone in the room
OFF_BACKSTAB B not used
OFF_BASH C can bash an opponent
OFF_BERSERK D can go berserk
OFF_DISARM can disarm an opponent
OFF_DODGE F can dodge attacks
OFF_FADE G not used
OFF_FAST H moves quickly, has more attacks
OFF_KICK I can kick an opponent
OFF_KICK_DIRT J can kick dirt into the eyes of an opponent, temporarily blinding him. (Note: does not work in air or on water!)
OFF_PARRY K can parry an opponent's attack
OFF_RESCUE L not used
OFF_TAIL can use a tail to smash opponents
OFF_TRIP N can trip an opponent
OFF_CRUSH O not used
ASSIST_ALL P will assist any mob
ASSIST_ALIGN Q will assist align
ASSIST_RACE R will assist race
ASSIST_PLAYERS S will assist players
ASSIST_GUARD T not used
ASSIST_VNUM U will assist same vnum mobs

Immunities are as follows:
 
 
IMM_SUMMON A common for higher level aggie mobs
IMM_CHARM B common for higher level aggie mobs
IMM_MAGIC C rare
IMM_WEAPON D rare--be careful using this flag. if mobs with this flag are not placed carefully, players will use them to "bot" their weapon skills, which of course is an abuse of the game. always make a mob with this flag also immune charm and immune summon, and put it in an area where other mobs might be able to intervene and foil botting plans.
IMM_BASH  E
IMM_PIERCE  F
IMM_SLASH  G
IMM_FIRE  H
IMM_COLD I
IMM_LIGHTNING J if you make a mob immune to lightning, make it immune to summon and charm too-- otherwise, you've just created a portable lightning post.
IMM_ACID  K
IMM_POISON  L
IMM_NEGATIVE 
IMM_HOLY  N
IMM_ENERGY  O
IMM_MENTAL  P
IMM_DISEASE  Q
IMM_DROWNING  R not currently used
IMM_LIGHT  S not currently used

NOTE: Be careful that immunities, resistances, and vulnerabilities don't overlap! In other words, don't make a mob both immune and resistant to poison, or immune and vulnerable to charm. Higher level mobs should have more resistances and immunities -- resistances are better.
 

Resistances are the same, basically:
 
 
RES_CHARM B
RES_MAGIC C
RES_WEAPON D
RES_BASH E
RES_PIERCE F
RES_SLASH G
RES_FIRE H
RES_COLD I
RES_LIGHTNING J
RES_ACID K
RES_POISON L
RES_NEGATIVE M
RES_HOLY N
RES_ENERGY O
RES_MENTAL P
RES_DISEASE Q
RES_DROWNING  R
 RES_LIGHT S

And  vulnerabilities:
 
 
VULN_MAGIC C
VULN_WEAPON D
VULN_BASH E
VULN_PIERCE F
VULN_SLASH G
VULN_FIRE H
 VULN_COLD I
VULN_LIGHTNING J
VULN_ACID K
VULN_POISON L
VULN_NEGATIVE M
VULN_HOLY N
 VULN_ENERGY O
 VULN_MENTAL P
VULN_DISEASE Q
VULN_DROWNING  R
VULN_LIGHT S
VULN_WOOD X
VULN_SILVER Y
VULN_IRON Z

 The < start position> indicates the repop position, and the <default position> is the position the mob will return to after fighting. Most mobs should stand (8) in the starting and default positions. If you have a mob sleeping, remember that players will be able to cast all kinds of nasty spells on it without waking it--adjust mob stats accordingly.
 
POS_SLEEPING 4
POS_RESTING 5
POS_SITTING 6
POS_STANDING  8

The < sex> of the creature is not a yes or no question. It's a 'which one?' question.
 
 
Neuter 0 "it,s" its"
Male 1 "he," "his," "him"
Female 2 "she," "her"
Randomly male or female  Use carefully -- write strings that don't specify sex

 The < gold> is the amount of gold a mob carries and can be looted. Generally, mobs under level 30 should not have more than 500 gold, but creators descretion is honored here. Level 100 mobs should have a MAX of 10000 gold ... level 80 7000, level 50 3000, level 40 2000, level 30 1000, level 20 500, level 10 250. In special cases, you can exceed these guidelines, but also remember that for some mobs it makes sense that they have NO gold whatsoever. A rabbit, for instance, is going to be cash poor :)

The < form flags> dictate the body form:
 
 
FORM_EDIBLE  A  body parts are edible
FORM_POISON  B body parts are poisonous
FORM_MAGICAL  C not used
FORM_INSTANT_DECAY  not used
FORM_OTHER E not used/defined by material bit

None of these body flags are used, but may be some day. They are documented for the sake of completeness.
 
FORM_ANIMAL G
FORM_SENTIENT H
FORM_UNDEAD I
FORM_CONSTRUCT J
FORM_MIST K
FORM_INTANGIBLE L
FORM_BIPED M
FORM_CENTAUR N
FORM_INSECT O
FORM_SPIDER P
FORM_CRUSTACEAN  Q
FORM_WORM R
FORM_BLOB S
FORM_MAMMAL V
FORM_BIRD W
FORM_REPTILE X
FORM_SNAKE Y
FORM_DRAGON Z
FORM_AMPHIBIAN a
FORM_FISH b
FORM_COLD_BLOOD c

The < part flags> are used to dictate what body parts result from chopping off pieces at death. This is constrained by race. That is,  a human (often the default for mobs) does not have a tail. Often, a 0 is used which means 'use the default for the race'.
 
 
PART_HEAD A
PART_ARMS B
PART_LEGS C
PART_HEART D
PART_BRAINS E
PART_GUTS F
PART_HANDS G
PART_FEET H
PART_FINGERS I
PART_EAR J
PART_EYE K
PART_LONG_TONGUE L
PART_EYESTALKS M
PART_TENTACLES N
PART_FINS O
PART_WINGS P
PART_TAIL Q
The following are used in combat 
PART_CLAWS U
PART_FANGS V
PART_HORNS W
PART_SCALES X
PART_TUSKS Y

The < size> is relative to humans. Size can affect the effectiveness of bash and can affect a mob's ability to move through size restricted room exits.
 
 
SIZE_TINY T
SIZE_SMALL S
SIZE_MEDIUM  M
SIZE_LARGE L
SIZE_HUGE H
SIZE_GIANT G

The < material> field is not currently used, use a 0.

This is the end of the required fields. Everything following is optional.


If the mobile has a  script, it can be inserted at the end of the normal description. See the Mirkwood Scripts text for information and form.

The optional ' Msection is for movement strings specific to the mob. Note, room exit and entrance strings will override mob movement strings. Mob movement strings are best used in areas or sections of areas that do not have many rooms with their own entrance and exit strings. If the exit or entrance has a door, the mob's exit and entrance strings will use the name of the door. This can often be awkward, so, as a general rule, always give rooms with doors their own exit and entrance strings. That way you won't get something silly like "The rabbit hops by the trap door." The mob exit and entrance strings should be no more than one line, or 80 characters INCLUDING the number of characters in the mob's short string. The following variables may be used (and some SHOULD be used):
 
 
$n the name of the mob.  REQUIRED
$T the direction the mob is going (west, north, up, etc) or the direction it came from (from the west, from above, etc)  REQUIRED
$s his, her, its
$e he, she it
$m  him, her, it

The first string is the string shown when the mob leaves the room. For example, if the mob is to 'skip' out of the room, the string might be:

 $n skips $T.~

 which, as an example, might be seen on the mud as

 The little kid skips north.

 The second string is the message shown when the mobile arrives from someplace else. As an example, if the mob were to 'hop in', the string might be:

 $n hops in $T.~

 which might be seen on the mud as:

 The little kid hops in from the north.
or
The little kid hops in from above.

An example might be:
M
$n hops $T.~
Laughing, $n skips in $T.~
 

Aggressive Flags:

Your mob may exhibit many types of aggressive behavior. This is set via the 'A' flags. The following flags are available:
 
 
AGGIE_LEGEND A Attacks PCs level 85-92
AGGIE_NORMAL B Replaces ACT_AGGRESSIVE 
AGGIE_NPC C Attacks Mobs
AGGIE_WOUNDED D Attacks wounded PCs *snicker*
AGGIE_GOOD E Attacks PCs with good alignment
AGGIE_NEUTRAL F Attacks PCs with neutral alignment
AGGIE_EVIL G Attacks PCs alignment evil
AGGIE_MALE H Attacks PCs who are male
AGGIE_FEMALE I Attacks PCs who are female
AGGIE_NEUTERED  J Attacks PCs who are Sexless
AGGIE_ORC K Attacks PCs who are Orcs
AGGIE_TREANT L Attacks PCs who are Treants
AGGIE_HOBBIT Attacks PCs who are Hobbits
AGGIE_DWARF N Attacks PCs who are Dwarves
AGGIE_ELF O Attacks PCs who are Elves
AGGIE_HUMAN P Attacks PCs who are Human
AGGIE_SHADE Q Attacks PCs who are Shade
AGGIE_GIANT R Attacks PCs who are Giant 
AGGIE_WARRIOR W Attacks PCs who are Warriors (Or Knighs Or Rangers)
AGGIE_THIEF X Attacks PCs who are Thieves (Or Assassins Or Rangers)
AGGIE_MAGE Y Attacks PCs who are Mages (Or Warlocks/Witches Or Druids)
AGGIE_CLERIC Z Attacks PCs who are Clerics (Or Templar Or Druids)

Be aware that these flags are 'OR' conditioned. For example,

A PY

will attack humans OR mages ...  not human mages. 


---- EXAMPLES -----
#MOBILES

#4202
orc red eye~
an orc of the Red Eye~
An orc of the Red Eye mutters and curses.
~
This brutish, black-skinned, lynx-eyed orc grumbles and curses, occasionally
casting a glance over his shoulder and muttering something about Lugburz. He
is nearly as tall as a man, unafraid of the sun, well-armoured, and desires
very much to slit your throat and gut you like a pig.
~
orc~
GFT HJOVZa -1000 S
60 20 10d100+4200 1d1+999 4d10+30 17
-30 -30 -30 -15
CDEFHKU ABJQ L 0
8 8 1 5000
B 0 M 0
@rand 10~
{
if (@rand(1,100) < 40) {
    curse
} else if (@rand(1,100) < 50) {
    mutter
} else {
    grumble
}
}
~
@fight 10~
{
say We are the Fightin' Uruk-Hai!
claw $n
}
~
|
M
Cursing, $n saunters off to the $T.~
$n barges in $T and spits at your feet.~

#2220
tiamat dragon~
Tiamat~
A five headed dragon hisses at you as you enter this room.
~
You see before you the master of this Tower, Tiamat.  She frowns at you as she
prepares to make you pay for your insolence ... with your lives!
~
dragon~
BCT DFNOV -1000 S
57 10 35d35+2600 20d10+150 4d9+20 5
-27 -27 -27 -13
CEKMNO AB H N
8 8 2 7000
0 ACDEGQ L 0
@greet 100~
{
if (@ispc($n)) {
  say I'm a much TOUGHER BITCH now, scum!
  grin $n
}
}
~
@fight 10~
{
   cackle
}
~
|
A B
#0