Crossfire Server, Trunk  R22047
Monster & NPC


Monsters can behave in various kinds of ways. They can be aggressive, attacking the player. Or peaceful, helping the player - maybe joining him as pet. The unaggressive creatures who communicate with players are usually called "NPCs" (Non Player Character), a well-known term in role-play environments.

Type defined by:


Attribute Field Description
armor class liv::ac Monsters of low <armor class> are less likely to get hit from their opponent. <armor class> can be considered the "counter piece" to <weapon class>. Values typically range between +20 (very bad) to -20 (quite good).
artifact obj::artifact If defined, refers to an artifact to get values from.
asleep FLAG_SLEEP Being <asleep>, a monster won't move unless a player enters the <sensing range> of the monster. Usually the sensing range is larger than the players line of sight. Due to that, in most cases the player won't ever notice whether a monster was asleep or not.
attack movement obj::attack_movement

<![CDATA[ Specifies how the NPC or Monster moves: default - Move toward a player. DISTATT - Move toward a player if far, but maintain some space, attack from a distance - good for missile users only. RUNATT - Run but attack if player catches up to object. HITRUN - Run to then hit player then run away cyclicly. WAITATT - Wait for player to approach then hit, move if hit. RUSH - Rush toward player blindly, similiar to dumb monster. ALLRUN - Always run, never attack good for sim. of weak player. DISTHIT - Attack from a distance if hit as recommended by Frank. WAIT2 - Monster does not try to move towards player if far. Maintains comfortable distance.

The second setting specifies the behavior when there is no enemy: default - Stand still. PETMOVE - The monster follows the player until it is called off and will try to attack whatever the player is attacking. CIRCLE1 - The monster will move in a circle until it is attacked, or until it finds an enemy. This is good for non-aggressive monsters and NPC. CIRCLE2 - Same as CIRCLE1 but a larger circle is used. PACEH - The monster will pace back and forth until attacked. This is HORIZONTAL movement. PACEH2 - The monster will pace as above but the length of the pace area is longer and the monster stops before changing directions. This is HORIZONTAL movement. RANDO - The monster will go in a random direction until it is stopped by an obstacle, then it chooses another direction. RANDO2 - Constantly move in a different random direction. PACEV - The monster will pace back and forth until attacked. This is VERTICAL movement. PACEV2 - The monster will pace as above but the length of the pace area is longer and the monster stops before

attack type obj::attacktype

This number is a bitmask, specifying the monster's attack types for melee damage. Attack types are: physical, magical, fire, cold.. etc. Strong monsters often have more than just physical attack type.

When a monster with multiple attack types hits an opponent, it will do as much damage as the "best" of it's attack types does. So, the more attack types, the more dangerous. Attack types "magic" and "chaos" are somehow exceptions.

attuned paths obj::path_attuned Click on the <attuned paths> button to select spellpaths. The creature will get attuned to the specified spellpaths.
block view FLAG_BLOCKSVIEW If an item is set to block view, players (and monsters) cannot see beyond it unless they cross it or manage to stand on top.
breed monster obj::other_arch This only takes effect if <multiply> is enabled. The monster will create a <breed monster> every once in a while. <breed monster> can be set to any valid arch-name of a monster.
can cast spell FLAG_CAST_SPELL If <can cast spell> is disabled, the monster cannot cast any spell. Only wands/rods/etc can be used, given the appropriate abilities.
can use armor FLAG_USE_ARMOUR Monster is able to wear protective equipment like breastplate armor, helmets etc.
can use bows FLAG_USE_BOW Monster is able to use missile-weapon type objects.
can use ranged weapons FLAG_USE_RANGE Monster is able to use wands, staves, and rods.
can use rings FLAG_USE_RING Monster is able to wear rings.
can use scrolls FLAG_USE_SCROLL Monster is able to read scrolls.
can use shield FLAG_USE_SHIELD Monster is able to wear shields.
can use skills FLAG_CAN_USE_SKILL Monster is able to use skills from it's inventory. For example, you can put a throwing skill object and some boulders into the monster's object and set <can use skills>.
can use weapons FLAG_USE_WEAPON Monster is able to wield weapon type objects.
carries weight obj::carrying If a monster has something in the inventory, this value can be set to reflect the slowdown due to the carried weight.
changing FLAG_CHANGING A <changing> object converts to <food> <other_arch> objects; when it's animation is done. For non-living objects <food> is checked: if it is zero, the change happens; otherwise <food> is decreased by one. I suggest you don't mess with this value - leave the default in place.
damage liv::dam Among other parameters, <damage> affects how much melee damage a monster inflicts. <damage> is used as base value for damage per hit. <level>, <speed>, <weapon class> and resistances also take effect on the melee damage of a monster.
death animation death_animation If set to an archetype name, this item will be inserted in the map when the monster dies.
denied paths obj::path_denied Click on the <denied paths> button to select spellpaths. The creature won't be able to cast spells of the specified paths.
detect hidden liv::Int The <detect hidden> value gives monsters the ability to find hidden/invisible creatures. Higher values make for better detection-skills. Enabling <see invisible> makes this value obsolete.
elevation elevation The elevation (height above sea level) of this square. It is used for weather calculations and should be in the range -32000..32000. The elevation of a tile must be set in the bottom-most game object; elevation values for non-bottom-most game objects are ignored by the Crossfire server.
experience liv::exp

When a player kills this monster, he will get exactly this amount of <experience>. The experience will flow into the skill-category the player used for the kill.

If you create special monsters of tweaked strength/abilities, always make sure that the <experience> is set to a reasonable value. Compare with existing arches to get a feeling what reasonable means. Keep in mind that spell-casting monsters are a lot harder to kill than non spell casters!

friendly FLAG_FRIENDLY <friendly> monsters help the player, attacking any non-friendly monsters in range.
glow radius obj::glow_radius If <glow radius> is set to a value greater zero, the object appears lit up on dark maps. <glow radius> can be a value between 0 and 4, the higher, the more light does the object emit.
healing rate liv::Con Monsters regenerate this many health points each 4 ticks. Hence, the healing rate is independent of <speed>.
health points liv::hp The <health points> of a monster define how long it takes to kill it. With every successful hit from an opponent, <health points> get drained - The monster dies by zero <health points>.
hitback FLAG_HITBACK Monsters with <hitback> enabled hurt the attacker in proportion to the amount of damage the attacker inflicted. This damage is additional to the regular melee damage of the monster. As far as I know, hitback uses acid attack type, and it only takes effect if the monster actually has acid attacktype at it's disposal. Acid spheres for example use this feature.
identified FLAG_IDENTIFIED If an item is identified, the player has full knowledge about it.
identified animation identified_animation If defined, then the object will take this animation when identified.
identified animation speed identified_anim_speed If defined, then the object will have this animation speed when identified.
identified image identified_face If defined, then the object will take this appareance when identified.
identified random animation? identified_anim_random If defined, then the object's animation is in a random sequence when identified.
identified_name identified_name If defined, then the object will take this name when identified.
identified_name_pl identified_name_pl If defined, then the object will take this plural name when identified.
image obj::face The image-name defines what image is displayed for this object in-game.
invisible obj::invisible Generally makes the object invisible. Depending on the object-type, some can be made visible by the show_invisible spell. If in doubt, test it. Putting an invisible object under the floor always prevents it from being shown.
is used up FLAG_IS_USED_UP If set, decrement the <food> field at <speed>. When <food> reaches zero, remove the object.
level obj::level A monster's <level> is the most important attribute. <level> affects the power of a monster in various ways.
max health liv::maxhp <max health> is the maximum amount of <health points> this monster can have.
max spellpoints liv::maxsp

<max spellpoints> is the maximum number of spellpoints a monster can hold. Setting this to high values has little effect unless the monster has a decent <spellpoint regen.>, or the spell "regenerate mana" at it's disposal.

Warning: Do not create spell-casting and breeding monsters since this field is also used as <multiply speed>.

misc. actions obj::will_apply This entry defines which kinds of environment actions the creature is able to perform.
monster behavior FLAG_MONSTER When <monster behavior> is enabled, this object will behave like a monster: It can move and attack enemies (which are typically players). This flag should be set for all monsters as-such. Monsters which don't move, like guards, should also have <monster behavior>, but in combination with <stand still>. It should not be set for things like immobile generators.
movement type obj::move_type Determines which movement types this monster can use. Flying monsters won't get slowed down in rough terrain and they won't be affected by movers.
multiply FLAG_GENERATOR Monsters with <generator> enabled will create a <breed monster> every once in a while. Mice are a good example for this effect. If enabled, you must also set <breed monster> or check <template generation> and put other monsters in the inventory.
multiply limit generator_limit If <multiply> is enabled, this limits how many <breed monster> are created. When the maximum is reached, the generator is destroyed.
multiply map code generator_code If <multiply map limit> is set, this groups generators for counting purposes. If not set, defaults to the generator's name.
multiply map limit generator_max_map If <multiply> is enabled, this limits how many alive monsters at the same time will be on the map.
multiply radius generator_radius If <multiply> is enabled, this is the radius, in square, in which the generator will try to put a new monster. Default value is 1.
name obj::name This is the name of the object, displayed to the player.
no damage FLAG_NO_DAMAGE If set to non-zero, the monster cannot be hurt by attacking it.
no mood change no_mood_change If set, this monster is not affected by spells like 'charm monster' and such.
non-pickable FLAG_NO_PICK If set, the object cannot be picked up (Neither by players nor monsters).
npc message obj::msg

This text field contains the keyword-matching-syntax. The text should have the following format: "@match &lt;keyword1&gt;|&lt;keyword2&gt;|... ". Any number of keywords from one to infinite is allowed. Make sure they are separated by a '|'.

Examples: "@match yes", "@match gold|treasure". The monster or NPC will respond when the player speaks any of the given keywords within a two-square radius. IMPORTANT: Upper/lower case does not make a difference!

one hit only FLAG_ONE_HIT Monsters with <one hit only> disappear after one successful hit to a player.
pick up obj::pick_up

Click on the <pick up> button and select which types of objects the creature should try to pick up.

Note also that if <can use armor>, <can use weapon>, <can use ring>... etc are set, then the creature will pick up the matching items even if this is not set here.

price adjustment price_adjustment If set, this is the buy and sell price adjustment ratio for the item.
price adjustment for buying price_adjustment_buy If set, this is the adjustment ratio when buying the item. Ignored if <price> adjustment is set.
price adjustment for selling price_adjustment_sell If set, this is the adjustment ratio when selling the item. Ignored if <price> adjustment is set.
race obj::race Every monster should have a race set to categorize it. The monster's <race> can have different effects: Slaying weapons inflict triple damage against enemy races and holy word kills only enemy races of the god.
random movement FLAG_RANDOM_MOVE Living things with the <random_movement> flag set automatically move about in a random fashion.
reflect missiles FLAG_REFL_MISSILE A monster with this flag has the ability to <reflect missiles>, all kinds of projectiles (e.g. arrows, bolts, boulders) will bounce off.
reflect spells FLAG_REFL_SPELL

A monster with this flag has the ability to <reflect spells>, all kinds of spell-bullets and -beams will bounce off.

Generally this flag should not be set because it puts wizard-type players at an unfair disadvantage.

repelled paths obj::path_repelled Click on the <repelled paths> button to select spellpaths. The creature will get repelled to the specified spellpaths.
resist acid % obj::resist (no description)
resist blinding % obj::resist (no description)
resist chaos % obj::resist (no description)
resist cold % obj::resist (no description)
resist confusion % obj::resist (no description)
resist death-attack % obj::resist (no description)
resist depletion % obj::resist (no description)
resist draining % obj::resist (no description)
resist electricity % obj::resist (no description)
resist fear % obj::resist (no description)
resist fire % obj::resist (no description)
resist ghosthit % obj::resist (no description)
resist godpower % obj::resist (no description)
resist holy power % obj::resist (no description)
resist magic % obj::resist (no description)
resist paralyze % obj::resist (no description)
resist physical % obj::resist (no description)
resist poison % obj::resist (no description)
resist slow % obj::resist (no description)
resist turn undead % obj::resist (no description)
resist weaponmagic % obj::resist (no description)
run at % health FLAG_RUN_AWAY This is a percentage value in the range 0-100. When the monster's health points drop below this percentage (relative to max health), it attempts to run away from the attacker.
see in darkness FLAG_SEE_IN_DARK A monster with the ability to <see in darkness> cannot be fooled by spells of darkness or dark maps. This flag is a "should-have" for high-level monsters. When a monster is unable to see in darkness, players can cast darkness and sneak around it safely.
see invisible FLAG_SEE_INVISIBLE A monster with the ability to <see invisible> cannot be fooled with by invisible or hiding players. This flag is a must-have for high-level monsters. When a monster is unable to detect invisible players, it can be killed without fighting back.
sensing range liv::Wis <sensing range> determines how close a player needs to be before the creature wakes up. This is done as a square, for reasons of speed. Thus, if the <sensing range> is 11, any player that moves within the 11x11 square of the monster will wake the monster up. If the player has stealth, the size of this square is reduced in half plus 1.
smooth level obj::smoothlevel If <smooth level> is set to a value greater zero, the object will be drawn partially over adjacent squares having a lower <smooth level> value. The value must be between 0 and 255 (inclusive); 0 means "never overlap adjacent squares".
speed obj::speed The <speed> determines how fast a monster will both move and fight. High <speed> makes a monster considerably stronger.
spellpoint regen. liv::Pow

Monsters regenerate this many spellpoints each 16 ticks. Hence, the spellpoint regeneration rate is independent of <speed>.

To make a real tough spell-casting monster, the rate of spellpoint regeneration is most important. If your monster is still not casting fast enough, give it the spell-ability of "regenerate mana". That, paired with high <max spellpoints>, is the ultimate thing.

spellpoints liv::sp Like players, monsters need <spellpoints> to do magic. Monsters use them for both wizard- and prayer-spells. However, this value defines only the amount of initial spellpoints the monster starts with. When creating a spell-casting monster, remember that <max spellpoints> and <spellpoint regen.> are more important than just initial <spellpoints>.
splitting FLAG_SPLITTING A <splitting> object converts to <food> <other_arch> objects; when it is hit physically. For non-living objects <food> is checked: if it is zero, the change happens; otherwise <food> is decreased by one. I suggest you don't mess with this value - leave the default in place.
stand still FLAG_STAND_STILL

Monsters which <stand still> won't move to leave their position. When aggressive, they will attack all enemies who get close to them. This behavior is commonly known from castle guards.

In older versions of Crossfire it was possible to eventually push a <stand still>-monster out of position by force. I believe this is no longer possible. Nevertheless, you should still be cautious when lining up <stand still>-monster in order to "defend" something: Such monsters are rather easy to kill. It's good for low level maps, but not much more.

template generation FLAG_CONTENT_ON_GEN This only takes effect if <multiply> is enabled. The monster will create a new monster every once in a while by duplicating it's inventory. In this case, the <breed monster> value is never used and can be forgotten. Each time the monster need to generate an object, it will be a randomly chosen item from the inventory. When generator is destroyed, inventory is destroyed.
title obj::title This is the object's title. Once an object is identified the title is attached to the name. Typical titles are "of Mostrai", "of xray vision" etc.
treasurelist obj::randomitems

When the monster is killed, items from the treasurelist will drop to the ground. This is a common way to reward players for killing (masses of) monsters.

Note that you can always put items into the monster's inventory. Those will drop-at-kill just like the stuff from the <treasurelist>.

unaggressive FLAG_UNAGGRESSIVE <unaggressive> monsters do not attack players unless attacked first.
undead FLAG_UNDEAD Several spells only affect undead monsters: turn undead, banish undead, holy word, etc.
weapon class liv::wc Monsters of high <weapon class> are more likely to really hit their opponent. <weapon class> can be considered the "counter piece" to <armor class>.
weight obj::weight This value defines the object's weight in grams (1000g is 1kg). Objects with zero weight are not pickable for players. Still, set the "non-pickable"-flag for explicitly non-pickable objects (hey, this is open source.. you never know ;) ).