Atrinik Server  4.0
Monster & NPC


Monsters can behave in various kinds of ways. They can be aggressive, attacking the player. Or peaceful, helping the player

The unagressive creatures who communicate with players are usually called "NPCs" (Non Player Characters), a well-known term in role-playing environments.

Type defined by:


Attribute Field Description
NPC message obj::msg

This textfield contains the keyword-matching-syntax. The text should have the following format:

"@match <keyword1>|<keyword2>|... ".

Any number of keywords from one to infinite is allowed. Make sure they are seperated by a '|'.

Examples: "@match yes", "@match gold|treasure". The connected value will be triggerd when the player speaks any of the given keywords within a two-square radius.

IMPORTANT: Upper/lower case does not make a difference.

align obj::align X align of the object on the map.
alignment: evil FLAG_IS_EVIL The monster is evil aligned.
alignment: good FLAG_IS_GOOD The monster is good aligned.
alignment: neutral FLAG_IS_NEUTRAL The monster is neutrally aligned.
alpha obj::alpha Alpha value of the object.
anim speed obj::anim_speed How fast to play this animation.
animation obj::animation_id The animation-name defines what animation is displayed for this object in-game. Note that a set animation will overrule the face.
armour class liv::ac

Monsters of high <armour class> are less likely to get hit from their opponent. <armour class> can be considered the "counterpiece" to <weapon class>.

Values typically range between +20 (quite good) to -20 (very bad).

Note that the monster's level further improves armour class: "real armour class" = <armour class> + <level>

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.
attack movement type obj::attack_move_type Distance attack: Move toward a player if far, but mantain some space. Run away: Run but attack if player catches up to object. Hit and run: Run to then hit player then run away cyclicly. Wait and hit: Wait for player to approach then hit, move if hit. Rush: Rush toward player blindly, similiar to dumb monster. Always run: Always run never attack. Wait and hit from distance: Attack from a distance if hit. Keep distance: Do not try to move towards player if far.
attuned paths obj::path_attuned Click on the <attuned paths> button to select spellpaths. The creature will get attuned to the specified spellpaths.
behavior obj::behavior This entry defines what kind of actions/behavior the monster is capable of.
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 of it.
breed monster obj::other_arch This only takes effect if <multiply> or <splits> 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 move on obj::terrain_flag These settings define on which kind of terrain this creature can move. If nothing is set, the creature can walk on land surface.
can use armour FLAG_USE_ARMOUR The monster will look for an armour to use.
can use bows FLAG_USE_BOW The monster will look for an usable bow in its inventory, in order to fire arrows/bolts/stones/etc.
can use weapons FLAG_USE_WEAPON The monster will look for an usable weapon in its inventory, to improve its damage.
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.
casting delay obj::magic The casting delay this monster invokes every cast. This is cumulatively added to the spell's default casting delay.
corpse FLAG_CORPSE This monster will leave a corpse behind when it dies.
cursed FLAG_CURSED The item is cursed. This object can't be removed when wielded or worn (without uncursing it). Remove curse will remove this flag.
damage liv::dam A value of 50 will be handled as 5.0, a value of 55 = 5.5. Amongst 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.
damned FLAG_DAMNED Stronger form of curse. Item can't be removed when wielded or worn. Remove damnation will remove this flag.
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.
direction obj::direction The object's direction.
direction based drawing FLAG_DRAW_DIRECTION If enabled, the object will be shown depending on its direction and player's position. Usually used by wall decoration so the decoration doesn't appear from both sides of the wall.
experience liv::exp When a player kills this monster, he will get this amount of <experience>, with various adjustments, like what level the monster was. The experience will flow into the skill category the player used for the kill.
faction faction Faction the monster is member of. Cannot contain spaces.
faction friendship faction_rep

Determine faction-based friendship.

If negative and player's faction reputation is below or equal to the value, the monster will be an enemy of the player.

If positive and the player's faction reputation is above or equal to the value, the monster will be a friend of the player.

If neither, the default friendship flag will be used.

faction kill penalty faction_kill_penalty Value to subtract from player's faction reputation if the player kills this monster/NPC.

This monster is female.

If neither male nor female is set, the monster is neuter.

If both male and female are set, the monster is hermaphrodite.

flying FLAG_FLYING Flying monsters won't get slowed down in rough terrain and they won't be affected by movers.
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 than 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 Monster regenerates this many hit points each move. Each time the monster has a move, it gets <healing rate> health points back. Hence, <movement speed> has great effect on the monster's healing rate as well.
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.

If the value '-1' is set, the monster will start out with full health. How much that is depends on <max health>.

height obj::z Adjusts Y position of the object as it appears on the map.
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.
horizontal zoom obj::zoom_x How much to horizontally zoom the object on the map.
image obj::face The image name defines what image is displayed for this object in-game.
inv. system object FLAG_SYS_OBJECT

Marks an object as system object. System objects are ALWAYS invisible and hidden from the players.

System objects are put in layer 0.

invisible FLAG_IS_INVISIBLE Generally makes the object invisible. Invisible objects will be shown if the player has "see invisible" (from an item). To hide objects totally from detection, use "sys_object".
invulnerable FLAG_INVULNERABLE This mob will never take any damage - so it can't die by damage.
is animated FLAG_ANIMATE

If set, the object is animated and animation is used.

Note: Some special objects will use an animation NOT as animation but as frame list. Examples are buttons (which frames are changed by the object status of the button). IS_TURNABLE will enable direction turning for some object types. These flags are all system related. Be VERY careful when changing them.

is turnable FLAG_IS_TURNABLE System flag. Object can be turned into directions.
layer obj::layer This is the map layer the object will put in. The selected layer will affect where and how this object is shown on the client side. Layer 0 is reserved for sys_object type objects and will NEVER be shown on the client side. Layer 1 is for floor objects and layer 2 for floor masks. Layer 3 and 4 are for items on the ground. Layer 5 is for walls, layer 6 is reserved for players and layer 7 is for spell effects and high flying/visible objects like arrows.
level obj::level A monster's <level> is the most important attribute. <level> affects the power of a monster in various ways, and also how much experience the player gains for killing the monster.
magical FLAG_IS_MAGICAL If set, this object counts as "magical". Detect magic or identify will show this flag and the player will see a small blue M in the client's inventory part.

This monster is male.

If neither male nor female is set, the monster is neuter.

If both male and female are set, the monster is hermaphrodite.

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.
movement type obj::move_type Pet movement: The monster does pet movement. Small circle: Will move in a circle until it is attacked. Large circle: Same as small circle, but a larger circle is used. Short horizontal pace: Will pace back and forth until attacked. Long horizontal pace: Like short one, but the length of the horizontal pace area is longer. Random direction: Will go in a random direction. Random walk: Constantly move in a different random direction. Short vertical pace: Like short horizontal pace, but vertical instead. Long vertical pace: Like short one, but the length of the vertical pace area is longer. Use waypoints: The monster uses waypoints, if it has any.
multiply obj::generator Monsters with <multiply> enabled will create a <breed monster> every once in a while. If enabled, you must also set <breed monster>.
name obj::name This is the name of the object, displayed to the player.
never attack FLAG_NO_ATTACK This mob will never attack or fight back.
no spells FLAG_NO_MAGIC If enabled, it is impossible for players to use spells on that spot.
no teleport FLAG_NO_TELEPORT Marks an object as no teleport object. A no teleport object can't be teleported by teleporter except if the object is inside the inventory of another object which can be teleported.
non-pickable FLAG_NO_PICK If set, the object cannot be picked up (neither by players nor monsters).
one drop FLAG_ONE_DROP If this flag is set for an item inside monster's quest_container with the quest being quest item type, the player will only be able to get this item once.
one hit only FLAG_ONE_HIT Monsters with <one hit only> dissapear after one successful hit to a player.
pass blocked tiles FLAG_CAN_PASS_THRU

If no_pass (blocking passage) is set for an object, no one can pass the tile it is on (true for walls or closed doors). But if this flag is set, the monster can pass through all no_pass objects which have pass_thru set.

This is used for example for ghosts who move through doors.

permanent cursed FLAG_PERM_CURSED The item is permanently cursed. If this flag is set, applying or unapplying it will set "cursed 1" again. This flag can't be removed by remove curse.
permanent damned FLAG_PERM_DAMNED The item is permanently damned. If this flag is set, applying or unapplying it will set "damned 1" again. This flag can't be removed by remove damnation.
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 etc are set, then the creature will pick up the matching items even if this is not set here.

player only FLAG_PLAYER_ONLY If set, only players can enter the tile the object with this flag is on.
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 move range X obj::item_race If random_move is set, this determines value of X position the creatures can move away from the spawn point (if it has one).
random move range Y obj::item_level If random_move is set, this determines value of Y position the creatures can move away from the spawn point (if it has one).
random movement FLAG_RANDOM_MOVE Monsters with this flag enabled move around at random.
reflect missiles FLAG_REFL_MISSILE Object will reflect missiles.
reflect spells FLAG_REFL_SPELL Object will reflect spells.
relative level obj::item_condition Level of the monster relative to map difficulty.
repelled paths obj::path_repelled Click on the <repelled paths> button to select spellpaths. The creature will get repelled to the specified spellpaths.
rotate obj::rotate Rotation value of the object in degrees.
run at % health FLAG_RUN_AWAY This is a percentage based value in the range 0-100. The creature will attempt to run from the attacker when it's health points drops below this percentage of max health.
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 notices him. This is done as a square, for reasons of speed. If the player has stealth, the size of this square is reduced in half plus 1.
speed obj::speed The <speed> determines how fast a monster will both move and fight. High <speed> makes a monster considerably stronger. If the start value is negative (like -0.1) then the speed is set to 0.1 but the speed counter becomes a random start value.
spellpoint regen. liv::Pow

Monsters regenerate this many spellpoints each move. Each time the monster has a move, it gets <spellpoint regen.> spellpoints back. Hence, <movement speed> has great effect on the monster's spellpoint regeneration as well.

To make a really tough spellcasting monster, the rate of spellpoint regeneration is most important.

spellpoints liv::sp

Like players, monsters need <spellpoints> to do magic. Monsters use them for both spells and prayers. However, this value defines only the amount of initial spellpoints the monster starts with.

When creating a spellcasting monster, remember that <max spellpoints> and <spellpoint regen.> are more important.

If <spelloints> are set to '-1', the monster will start out with maxed spellpoints.

split FLAG_SPLITTING Monsters with <split> enabled will split into one or more <breed monster> whenever they're hit. The number of new monsters is controlled by <split number>. If enabled, you must also set <breed monster> and <split number>.
split number liv::food This is the number of new monsters generated when this monster is split. This only takes effect if <split> and <breed monster> are set.
stackable FLAG_CAN_STACK

If set, the item can be stacked. Careful, don't use on rings or other applyable items, it will lead to side effects.

Missiles are designed to be used as stacks for example.

stand still FLAG_STAND_STILL

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

When lining up <stand still>-monster in order to "defend" something: Be aware that such monsters are rather easy to kill. It's good for low level maps, but not much more.

start speed obj::speed_left

When an active object (with 'speed' being non-zero) is put on a map, this value is used as counter. Every 'tick', 'speed' (if negative, value is turned positive before) is added to this value - if it is bigger than 0 the object 'will do something' and this counter is decreased with -1.0.

By default a normal object will be put on the map with start speed 0. It 'will do something' with the next coming 'tick'. Setting this value to -1.0 will put it on map but wait one full 'lifetime' round until it does something.

A 'fire object' should be put on map with start speed 0 - it should try to burn something in the moment it comes in the game. A bomb for example should be put with speed -1.0 on the map - it will stay then on map until the bomb becomes active - it explodes.

The 'lifetime' round is determinated by speed. A speed of 1.0 will give a 'lifetime' round of 1 tick - a speed of 0.01 100 ticks.

Special case: A negative speed value will add to start speed a random value between 0.0 to 0.9 . So, a speed of -0.1 with a start speed of -1.0 will result in speed 0.1 and start speed between -1.0 and -0.1. This is useful to let a row of same objects act in different tick ranges.

sub layer obj::sub_layer Extension of the layer attribute. If you have an object with "layer 2 sub_layer 1" and an object with "layer 2", the former object will be rendered immediately following the latter object, thus allowing double floor masks, convincing bridges and the like to be created.
sub type obj::sub_type

This important value is used to define "sub types" for objects of the same object type. Examples are weapons, which are all from type WEAPON but can be different sub types like slash, cleave, two-handed, polearms and so on. This value goes to the client too.

Warning: Not all objects have a sub type and changing it without care can corrupt server AND/OR the clients. Normally this is not a subject to change outside arch definition.

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 Yordan", "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.
use ability 1/ liv::Dex The <use ability> value is a 1/x chance that the monster tries to use per active tick a special ability like spellcasting, throwing, etc.
vertical zoom obj::zoom_y How much to vertically zoom the object on the map.
wc hit range liv::wc_range

This value is set to 20 from the server when if 0. This is for the weapon class of ranged attacks, like arrows. The server will add a random value between 0 ad wc_range to the wc.

If that is higher than the target's ac, the target is hit. The higher wc_range is 20, the more dangerous and more often a mob will hit.

Because the mobile level is added to wc too, a wc_range of 40 will let the monster hit VERY often even against the best armours.

weapon class liv::wc

Monsters of high <weapon class> are more likely to really hit their opponent. <weapon class> can be considered the "counterpiece" to <armour class>.

Note that the monster's level further improves weapon class: "real weapon class" = <weapon class> + <level>

weight obj::weight This value defines the object's weight in gram (1000g is 1kg). Objects with zero weight are not pickable for players. Still, set the "non-pickable" flag for explicitly non-pickable objects.
zoom obj::zoom How much to zoom the object on the map.