--- deliantra/server/pod/objects.pod 2006/12/20 20:25:59 1.15 +++ deliantra/server/pod/objects.pod 2006/12/21 21:24:06 1.18 @@ -15,7 +15,11 @@ The term 'object' stands for an archetype instance. The term 'field' is used for an object fields and archetype fields. -Field names will be displayed like I. +Field names will be displayed like this: I + +Type names will be displayed like this: B + +Flag names will be displayer like this: FLAG_NAME =head2 About archetypes and objects @@ -74,31 +78,31 @@ =over 4 -=item name +=item I The name of the object. -=item name_pl +=item I The name of a collection of these objects (the plural of the name). -=item face +=item I The graphical appearance of this object. -=item x +=item I The x position of the object when it is on a map. -=item y +=item I The y position of the object when it is on a map. -=item map (internal) +=item I (internal) The map the object is on. -=item invisible +=item I If the is greater than 0 the object is invisible. For players this field reflects the duration of the invisibility @@ -106,15 +110,20 @@ For non-player objects this field is not changed by server ticks. -=item speed +=item I + +This field indicates how far an object glows. Default is a radius of 0 (no +glowing at all). + +=item I If this field is greater than MIN_ACTIVE_SPEED (~0.0001) the object is placed on the active object list and will be processed each tick (see also speed_left!). -If the speed field drops below the MIN_ACTIVE_SPEED the object is removed +If I drops below the MIN_ACTIVE_SPEED the object is removed from the active object list and it won't experience any processing per tick. -=item speed_left +=item I If this field is greater than 0 and the object is on the active list (mostly means it's speed is also greater than 0): @@ -122,79 +131,84 @@ - speed_left is decreased by 1 - and this object is processed and experiences a server tick. -If the object is on the active list and speed_left is lower or -equal to 0 the absolute value of the speed field is added to speed_left +If the object is on the active list and I is lower or +equal to 0 the absolute value of the I is added to I on the end of the tick. -This means: the lower the speed field is (but still above MIN_ACTIVE_SPEED) -the more seldom the object is processed. And the higher the speed field is +This means: the lower I is (but still above MIN_ACTIVE_SPEED) +the more seldom the object is processed. And the higher I is the more often the object is processed. -=item connected +=item I When this field is set the object will be linked to a connection with the id . What happens when the connection is 'activated' depends on the type of the object. -When FLAG_ACTIVATE_ON_PUSH and FLAG_ACTIVATE_ON_RELEASE they will control +FLAG_ACTIVATE_ON_PUSH and FLAG_ACTIVATE_ON_RELEASE they will control when to activate the object, see description of these below for further details. -=item no_drop (0|1) +=item I (0|1) Sets the flag FLAG_NO_DROP. See Flags section below. -=item applied (0|1) +=item I (0|1) Sets the flag FLAG_APPLIED. See Flags section below. -=item is_used_up (0|1) +=item I (0|1) Sets the flag FLAG_IS_USED_UP. See Flags section below. -=item changing (0|1) +=item I (0|1) Sets the flag FLAG_CHANGING. See Flags section below. -=item auto_apply (0|1) +=item I (0|1) Sets the flag FLAG_AUTO_APPLY. See Flags section below. -=item no_steal (0|1) +=item I (0|1) Sets the flag FLAG_NO_STEAL. See Flags section below. -=item reflecting (0|1) +=item I (0|1) Sets the flag FLAG_REFLECTING. See Flags section below. -=item reflect_spell (0|1) +=item I (0|1) Sets the flag FLAG_REFL_SPELL. See Flags section below. -=item no_skill_ident (0|1) +=item I (0|1) Sets the flag FLAG_NO_SKILL_IDENT. See Flags section below. -=item activate_on_push (0|1) (default: 1) +=item I (0|1) (default: 1) Sets the flag FLAG_ACTIVATE_ON_PUSH. See Flags section below. -=item activate_on_release (0|1) (default: 1) +=item I (0|1) (default: 1) Sets the flag FLAG_ACTIVATE_ON_RELEASE. See Flags section below. -=item editable (more than deprecated) +=item I (0|1) + +Sets the flag FLAG_IS_LIGHTABLE. +See Flags section below. + +=item I (more than deprecated) This field had a special meaning for crossedit, which used parts of the server code for editing. Wherever you see this field being @@ -219,39 +233,54 @@ For objects that are applied by the code or have this flag set in the archetype it mostly means 'this object is active'. -For example the player adjustments of the hp/sp/grace fields and inheritance +For example the player adjustments of the I/I/I fields and inheritance of flags from objects in his inventory is toggled by this flag. =item FLAG_IS_USED_UP -This flag controls whether an object is 'used up'. If it is set the 'food' field -of the object is decreased by 1 each tick, and if it is lower or equal 0 after tha -it is removed. +This flag controls whether an object is 'used up'. If it is set I +is decreased by 1 each tick, and will be removed when I is lower or equal 0. -If also the flag FLAG_APPLIED is set, the 'duration' field controls whether -this object is removed or not, see the Force type below for the meaning +If also the flag FLAG_APPLIED is set, the I field controls whether +this object is removed or not, see the B type below for the meaning of the duration field in this context. If FLAG_APPLIED is not set the object is destroyed. =item FLAG_CHANGING -If the 'state' field of the object is 0 the object will be processed periodically. -Otherwise it won't "change"; +If the I field of the object is 0 the object will be processed periodically +(if I is set). If the I field is 1 it won't be processed. + +This flag indicates that the object is changing into a different object. +The object has to have the I field set. The object the changing object +changes into is derived from the archetype in I. + +When the object does not have FLAG_ALIVE set the I field will be decremented +each time the object is processed, and if I reaches 0 one new object will be generated. + +When the object has FLAG_ALIVE set the I field is the number of objects that +will be generated. + +After the new object is created the I field from the old object is copied into +the new one. + +When the old object was a B it's I fields value less 1 will be copied +to the new object. =item FLAG_IS_A_TEMPLATE (internal use) -This flag is set on the inventory of generators like CREATORs and CONVERTERs, +This flag is set on the inventory of generators like Bs and Bs, or other objects that have the flags FLAG_GENERATOR and FLAG_CONTENT_ON_GEN set. =item FLAG_AUTO_APPLY -This flag has currently only meaning for the TREASURE type, see below. +This flag has currently only meaning for the B type, see below. =item FLAG_ACTIVATE_ON_PUSH This flag has only meaning for objects that can be linked together -with the 'connected' field and controls wether the object should +by the I field and controls wether the object should be activated when the connection is 'pushed' or it is 'released'. What 'pushed' and 'released' means depends on the object that @@ -262,7 +291,7 @@ =item FLAG_ACTIVATE_ON_RELEASE This flag has only meaning for objects that can be linked together -with the 'connected' field and controls wether the object should +by the I field and controls wether the object should be activated when the connection is 'pushed' or it is 'released'. What 'pushed' and 'released' means depends on the object that @@ -281,16 +310,16 @@ =item FLAG_NO_SKILL_IDENT This flag is mostly used internal and prevents unidentified objects -(objects which don't have FLAG_IDENTIFIED set) being identified by -skills. +(objects which don't have FLAG_IDENTIFIED set) being identified +multiple times by skills. -This flag is used to mark objects to never being identified by a skill -once a player failed to identify an object. So that multiple tries -of identifying aren't more effective than one. +This flag is used to mark objects which were unsuccessfully identified by a +players skill. So that multiple tries of identifying aren't more effective than +one. =item FLAG_REFLECTING -This flag is used by spell effects (eg. SP_BOLT), THROWN_OBJ and ARROW +This flag is used by spell effects (eg. SP_BOLT), B and B to indicate whether this object reflects off walls. =item FLAG_REFL_SPELL @@ -298,6 +327,12 @@ This flag indicates whether something reflects spells, like spell reflecting amuletts. +=item FLAG_IS_LIGHTABLE + +This flag indicates whether a B can light this object. See also the +description of the B type. How easy you can light an item depends +partially on the material of the object. + =back =head2 Description of type specific fields and behaviour @@ -305,18 +340,18 @@ The beginning of the headers of the following subsection are the server internal names for the objects types, see include/define.h. -=head3 TRANSPORT - type 2 - Player transports +=head3 B - type 2 - Player transports This type is implemented by the transport extension and has currently no special fields that affect it. -=head3 ROD - type 3 - Rods that fire spells +=head3 B - type 3 - Rods that fire spells Rods contain spells and can be fired by a player. =over 4 -=item level +=item I This field is used for calculating the spell level that can be fired with this rod, it's also the maximum level of the spell that can be fired. @@ -324,21 +359,21 @@ the 'use magic item' skill level of the player and 1/10 of the level of the rod is added as bonus. -=item hp +=item I The amount of spellpoints this rod has left. -=item maxhp +=item I The maximum amount of spellpoints this rod has. -=item skill +=item I This field determines which skill you need to apply this object. =back -=head3 TREASURE - type 4 - Treasures +=head3 B - type 4 - Treasures This type of objects are for random treasure generation in maps. If this object is applied by a player it will replace itself with it's @@ -350,11 +385,11 @@ =over 4 -=item hp +=item I The number of treasures to generate. -=item exp +=item I If FLAG_AUTO_APPLY is not set the exp field has no further meaning and the difficulty for the treasurecode only depends on the maps difficulty, @@ -367,14 +402,14 @@ If this field is not set or 0 the difficulty of the map is passed to the treasure generation code. -=item randomitems +=item I The treasurelist to use to generate the treasure which is put in the treasure objects inventory. =back -=head3 POTION - type 5 - Potions for drinking and other nastynesses +=head3 B - type 5 - Potions for drinking and other nastynesses These objects contain a spell and will emit it on apply, which most of the time has the meaning of 'drinking'. @@ -389,14 +424,14 @@ =over 4 -=item Str, Dex, Con, Int, Wis, Cha, Pow +=item I, I, I, I, I, I, I These stat fields determine how many stat points the player gets when he applies this potion. If FLAG_CURSED or FLAG_DAMNED is set the player will loose that many stat points. -=item sp +=item I If this field is set and the randomitems field is not set the field is interpreted as spell number, please look the right @@ -405,7 +440,7 @@ If this field is set the randomitems field will be unset by the map loading code. -=item attacktype +=item I This field has some special meaning in potions, currently the bits for AT_DEPLETE and AT_GODPOWER control whethere this is a @@ -420,7 +455,7 @@ If AT_GODPOWER is enabled the player will gain +1 maxvalue in his hp, sp or grace stat. When the potion has FLAG_CURSED or FLAG_DAMNED set he will loose one in one of these stats. -=item resist_ +=item I If this stat is set and no spell is in the potion the potion will create a force that give the player this specific resistancy. @@ -428,17 +463,17 @@ and the potion will last 10 times longer than the default force archetype FORCE_NAME (at the moment of this writing spell/force.arc). -=item randomitems +=item I The inventory/spell of the potion will be created by calling the treasure code with the treasurelist specified here. (I guess it's highly undefined what happens if there is not a spell in the potions inventory). -=item on_use_yield +=item I When this object is applied an instance of will be created. -=item subtypes +=item I see include/spells.h for possible potion subtypes, there are currently 4: @@ -451,7 +486,7 @@ =item POT_DUST This potion can be thrown to cast the spell that it has in it's inventory, -the behaviour is not defined if there is not a spell in the inventory and the +the behaviour is not defined if there is not a B in the inventory and the server will log an error. =item POT_FIGURINE @@ -466,83 +501,84 @@ =back -=head3 FOOD - type 6 - Eatable stuff +=head3 B - type 6 - Eatable stuff This is for objects that are representing general eatables like beef or bread. -The main difference between FOOD, FLESH and DRINK is that they +The main difference between B, B and B is that they give different messages. -The specialty of FLESH is that it inherits the resistancies of the +The specialty of B is that it inherits the resistancies of the monsters it was generated in and will let dragons raise their resistancies -with that. If the monster has the POISON attacktype the FLESH -will change into POISON. +with that. If the monster has the B attacktype the B +will change into B. -If a player runs low on food he will grab for FOOD, DRINK and POISON -and if he doesn't find any of that he will start eating FLESH. +If a player runs low on food he will grab for B, B and B +and if he doesn't find any of that he will start eating B. =over 4 -=item title +=item I <string> -If the food has a title or is cursed it is considered 'special', which means that the -fields Str, Dex, Con, Int, Wis, Pow, resist_<resistancy>, hp and sp -are interpreted and have further effects on the player. +If the food has B<title> set or is cursed it is considered 'special', which +means that the fields I<Str>, I<Dex>, I<Con>, I<Int>, I<Wis>, I<Pow>, +I<resist_RESISTANCY>, I<hp> and I<sp> are interpreted and have further effects +on the player. -The higher the food field is the longer the improvement of the player lasts -(except for hp and sp). +The higher the I<food> field is the longer the improvement of the player lasts +(except for I<hp> and I<sp>). -=item food <number> +=item I<food> <number> This is the amount of food points the player gets when he eats this. -=item on_use_yield <archetype> +=item I<on_use_yield> <archetype> When this object is applied an instance of <archetype> will be created. =back -=head3 POISON - type 7 - Poisonous stuff +=head3 B<POISON> - type 7 - Poisonous stuff -This type is for objects that can poison the player when drinking. +This type is for objects that can poison the player when he drinks/applies it. When applied it will hit the attacked with AT_POISON and will create -a POISONING object in the one who was hit. +a B<POISONING> object in the one who was hit. =over 4 -=item level <number> +=item I<level> <number> This field affects the propability of poisoning. The higher the level difference -between the one who is hit and the poision the mose propable it is the attacked +between the one who is hit and the poision the more propable it is the attacked one will be poisoned. -=item slaying <race> +=item I<slaying> <race> -On poison this field has the usual meaning of 'slaying', when the -ones race matches the slaying field the damage done by the poison +This field has the usual meaning of 'slaying', when the +poisoned's race matches the I<slaying> field the damage done by the poison is multiplied by 3. -=item hp <number> +=item I<hp> <number> This is the amount of damage the player will receive from applying this. The attacktype AT_POISON will be used to hit the player and the damage will determine the strenght, duration and depletion of stats of the poisoning. The -created POISONING object which is being placed in the one who was attacked will +created B<POISONING> object which is being placed in the one who was attacked will get the damage from this field (which is maybe adjusted by slaying or the resistancies). -=item food <number> +=item I<food> <number> -1/4 of <number> will be drained from the players food. +1/4 of <number> will be drained from the players I<food>. -=item on_use_yield <archetype> +=item I<on_use_yield> <archetype> When this object is applied an instance of <archetype> will be created. =back -=head3 BOOK - type 8 - Readable books +=head3 B<BOOK> - type 8 - Readable books This type is basically for representing text books in the game. @@ -550,32 +586,32 @@ =over 4 -=item msg <text> +=item I<msg> <text> This is the contents of the book. When this field is unset at treasure generation a random text will be inserted. -=item skill <skill name> +=item I<skill> <skill name> The skill required to read this book. (The most resonable skill would be literacy). -=item exp <number> +=item I<exp> <number> The experience points the player get for reading this book. -=item subtype <readable subtype> +=item I<subtype> <readable subtype> This field determines the type of the readable. Please see common/readable.C in the readable_message_types table. =back -=head3 CLOCK - type 9 - Clocks +=head3 B<CLOCK> - type 9 - Clocks This type of objects just display the time when being applied. -=head3 LIGHTNING - type 12 - Lightnings (DEPRECATED, see SPELL_EFFECT subtype SP_BOLT) +=head3 B<LIGHTNING> - type 12 - Lightnings (DEPRECATED: see B<SPELL_EFFECT> subtype SP_BOLT) This is a spell effect of a moving bolt. It moves straigt forward through the map until something blocks it. @@ -585,72 +621,72 @@ =over 4 -=item move_type <movetype> +=item I<move_type> <movetype> This field affects the move type with which the lightning moves through the map and which map cells will reflect or block it. -=item attacktype <attacktype> +=item I<attacktype> <attacktype> The attacktype with which it hits the objects on the map. -=item dam <number> +=item I<dam> <number> The damage this bolt inflicts when it hits objects on the map. -=item Dex <number> +=item I<Dex> <number> This is the fork percentage, it is reduced by 10 per fork. -And the damage is halved on each fork. +And the I<dam> field is halved on each fork. -=item Con <number> +=item I<Con> (internal) This value is a percentage of which the forking lightning is deflected to the left. This value should be mostly used internally. -=item duration <number> +=item I<duration> <number> The duration the bolt stays on a map cell. This field is decreased each time -the object is processed (see the meaning of speed and speed_left fields in -the object general description). +the object is processed (see the meaning of I<speed> and I<speed_left> fields in +the generic object field description). -=item range <number> +=item I<range> <number> This is the range of the bolt, each space it advances this field is decreased. =back -=head3 ARROW - type 13 - Arrows +=head3 B<ARROW> - type 13 - Arrows This is the type for objects that represent projectiles like arrows. -The movement of THROWN_OBJs behave similar to this type. +The movement of B<THROWN_OBJ>s behave similar to this type. Flying arrows are stopped either when they hit something blocking -(move_block) or something which is alive. +(I<move_block>) or something which is alive. If it hits something that is alive, which doesn't have FLAG_REFL_MISSILE set, it will inflict damage. If FLAG_REFL_MISSILE is set it will inflict -damage with a small chance which is affected by the 'level' field of the arrow. +damage with a small chance which is affected by the I<level> field of the arrow. If FLAG_REFLECTING is set on the arrow it will bounce off everything that is not alive and blocks it's movement. -When an arrow is being shot it's dam, wc, attacktype, slaying fields will -be saved in the sp, hp, grace and spellarg fields of the object, to restore them -once the arrow has been stopped. +When an arrow is being shot it's I<dam>, I<wc>, I<attacktype>, I<slaying> +fields will be saved in the I<sp>, I<hp>, I<grace> and I<spellarg> fields of +the object, to restore them once the arrow has been stopped. =over 4 -=item dam <number> +=item I<dam> <number> The amount of damage that is being done to the victim that gets hit. This field is recomputed when the arrow is fired and will consist -of the sum of a damage bonus (see description of the BOW type), -the arrows 'dam' field, the bows 'dam' field, the bows 'magic' field -and the arrows magic field. +of the sum of a damage bonus (see description of the B<BOW> type), +the arrows I<dam> field, the bows I<dam> field, the bows I<magic> field +and the arrows I<magic> field. -=item wc <number> +=item I<wc> <number> -The weaponclass of the arrow, which has effect on the propability of hitting. +The weapon class of the arrow, which has effect on the propability of hitting. It is recomputed when the arrow is being fired by this formula: @@ -658,167 +694,166 @@ - dex_bonus - thaco_bonus - arrow->stats.wc - bow->stats.wc + wc_mod When the arrow is not being shot by an player dex_bonus and thaco_bonus and the -level is not added. +level is not added. -The wc_mod is dependend on the fire mode of the bow. For a more detailed +wc_mod is dependend on the fire mode of the bow. For a more detailed explanation of dex_bonus, thaco_bonus and wc_mod please consult the code. -=item magic <number> +=item I<magic> <number> This field is added to the damage of the arrow when it is shot and -will also improve it's speed by 1/5 of it's value. +will also improve it's I<speed> by 1/5 of it's value. -=item attacktype <attacktype> +=item I<attacktype> <attacktype> Bitfield which decides the attacktype of the damage, see include/attackinc.h -On fireing the attacktype of the bow is added to the arrows attacktype. +On fireing the I<attacktype> of the bow is added to the arrows I<attacktype>. -=item level <number> (interally used) +=item I<level> <number> (interally used) The level of the arrow, this affects the propability of piercing FLAG_REFL_MISSILE, -see above in the ARROW description. +see above in the B<ARROW> description. -The level is set when the arrow is fired to either the skill level or the -shooters level. +The I<level> is set when the arrow is fired to either the skill level or the +shooters level. -=item speed <number> (internal) +=item I<speed> <number> (internal) This field shouldn't be set directly in the archetype, the arrow will get it's -speed from the bow. This fields value has to be atleast 0.5 or otherwise the +I<speed> from the bow. This fields value has to be at least 0.5 or otherwise the arrow will be stopped immediatly. -On fireing the speed of the arrow is computed of 1/5 of the -sum of the damage bonus (see BOW), bow magic and arrow magic. After that 1/7 -of the bows 'dam' field is added to the speed of the arrow. +On fireing the I<speed> of the arrow is computed of 1/5 of the +sum of the damage bonus (see BOW), bow I<magic> and arrow I<magic>. After that 1/7 +of the bows I<dam> field is added to the I<speed> of the arrow. -The minimum speed of an arrow is 1.0. +The minimum I<speed> of an arrow is 1.0. -While flying the arrows speed is decreased by 0.05 each time it's moved. +While flying the arrows I<speed> is decreased by 0.05 each time it's moved. -If the speed is above 10.0 it goes straight through the creature it hits and -it's speed is reduced by 1. If the speed is lower or equal 10.0 the arrow is -stopped and either sticked into the victim (see weight field description) or -put on it's map square (if it didn't break, see description of the food field). +If the I<speed> is above 10.0 it goes straight through the creature it hits and +it's I<speed> is reduced by 1. If the I<speed> is lower or equal 10.0 the arrow is +stopped and either sticked into the victim (see I<weight> field description) or +put on it's map square (if it didn't break, see description of the I<food> field). -=item weight <number> +=item I<weight> <number> -This field is the weight of the arrow, if the weight is below or equal 5000 (5 kg) +This field is the weight of the arrow, if I<weight> is below or equal 5000 (5 kg) the arrow will stick in the victim it hits. Otherwise it will fall to the ground. -=item food <number> +=item I<food> <number> -The breaking percentage. 100% means: breaks on usage for sure. +The breaking percentage. 100 (%) means: breaks on usage for sure. -=item inventory (internal) +=item I<inventory> (internal) If the flying/moving object has something in it's inventory and it stops, it will be replaced with it's inventory. Otherwise it will be handled as usual, which means: it will be calculated whether the arrow breaks and it will be reset for reuse. -=item slaying <string> +=item I<slaying> <string> -When the bow that fires this arrow has it's slaying field set it is copied -to the arrows slaying field. Otherwise the arrows slaying field remains. +When the bow that fires this arrow has it's I<slaying> field set it is copied +to the arrows I<slaying> field. Otherwise the arrows I<slaying> field remains. -=item move_type <movetype> (internally used) +=item I<move_type> <movetype> (internally used) This field is set when the arrow is shot to MOVE_FLY_LOW. -=item move_on <movetype> (internally used) +=item I<move_on> <movetype> (internally used) This field is set when the arrow is shot to MOVE_FLY_LOW and MOVE_WALK. -=item race <string> +=item I<race> <string> -The race field is a unique key that assigns arrows, bows and quivers. When -shooting an arrow the bows race is used to search for arrows (which have the -same race as the bow) in the players inventory and will recursively search in -the containers (which are applied and have the same race as the bow and the arrow). +The I<race> field is a unique key that assigns arrows, bows and quivers. When +shooting an arrow the bows I<race> is used to search for arrows (which have the +same I<race> as the bow) in the players inventory and will recursively search in +the containers (which are applied and have the same I<race> as the bow and the arrow). =back -=head3 BOW - type 14 - Bows, those that fire ARROWs +=head3 B<BOW> - type 14 - Bows, those that fire B<ARROW>s -TODO, but take into account ARROW description above +TODO, but take into account B<ARROW> description above! -=head3 WEAPON - type 15 - Weapons +=head3 B<WEAPON> - type 15 - Weapons This type is for general hack and slash weapons like swords, maces and daggers and and .... =over 4 -=item weapontype <type id> +=item I<weapontype> <type id> decides what attackmessages are generated, see include/define.h -=item attacktype <bitmask> +=item I<attacktype> <bitmask> bitfield which decides the attacktype of the damage, see include/attackinc.h -=item dam <number> +=item I<dam> <number> amount of damage being done with the attacktype -=item item_power <level> +=item I<item_power> <level> the itempower of this weapon. -=item name +=item I<name> the name of the weapon. -=item level (internal) +=item I<level> (internal) The improvement state of the weapon. -If this field is greater than 0 the 'name' field starts with the +If this field is greater than 0 the I<name> field starts with the characters name who improved this weapon. -=item last_eat (internal) +=item I<last_eat> (internal) -seems to be the amount of improvements of a weapon, +This seems to be the amount of improvements of a weapon, the formular for equipping a weapon seems to be (server/apply.C:check_weapon_power): ((who->level / 5) + 5) >= op->last_eat -=item last_sp +=item I<last_sp> the weapon speed (see magic description) -=item food <number> +=item I<food> <number> addition to food regeneration of the player -=item hp <number> +=item I<hp> <number> addition to health regeneration -=item sp <number> +=item I<sp> <number> addition to mana regeneration -=item grace <number> +=item I<grace> <number> addititon to grace regeneration -=item gen_sp_armour <number> +=item I<gen_sp_armour> <number> -the players gen_sp_armour field (which is per default 10) is added the <number> amount. -gen_sp_armour seems to be a factor with which gen_sp in do_some_living() -is multiplied: gen_sp *= 10/<number> -meaning: values > 10 of gen_sp_armour limits the amout of regenerated -spellpoints. +the players I<gen_sp_armour> field (which is per default 10) is being added the +<number> amount. gen_sp_armour seems to be a factor with which gen_sp in +do_some_living() is multiplied: gen_sp *= 10/<number> meaning: values > 10 of +I<gen_sp_armour> limits the amout of regenerated spellpoints. -generally this field on weapons is in ranges of 1-30 and decides the slowdown of the -sp regeneration. +Generally this field on weapons is in ranges of 1-30 and decides the slowdown of the +I<sp> regeneration. -=item body_<body slot/part> +=item I<body_BODYSLOT> -the part of the body you need to use this weapon, possible values should be +The part of the body you need to use this weapon, possible values should be looked up in common/item.C at body_locations. -=item resist_<resistnacy> <number> +=item I<resist_RESISTNACY> <number> this is the factor with which the difference of the players resistancy and 100% is multiplied, something like this: @@ -832,31 +867,31 @@ see also common/living.C:fix_player -=item patch_(attuned|repelled|denied) +=item I<path_(attuned|repelled|denied)> this field modifies the pathes the player is attuned to, see include/spells.h PATH_* for the pathes. -=item luck <number> +=item I<luck> <number> -this luck is added to the players luck +this luck is added to the players I<luck> -=item move_type +=item I<move_type> -if the weapon has a move_type set the player inherits it's move_type +if the weapon has a I<move_type> set the player inherits it's I<move_type> -=item exp <number> +=item I<exp> <number> the added_speed and bonus_speed of the player is raised by <number>/3. if <number> < 0 then the added_speed is decreased by <number> -=item weight +=item I<weight> the weight of the weapon -=item magic +=item I<magic> -the magic field affects the amounts of the following fields: +the I<magic> field affects the amounts of the following fields: - wc : the players wc is adjusted by: player->wc -= (wc + magic) @@ -867,13 +902,13 @@ - weapon speed (last_sp): weapon_speed is calculated by: (last_sp * 2 - magic) / 2 (minium is 0) -=item ac <number> +=item I<ac> <number> -the amount of ac points the player's ac is decreased when applying this object. +the amount of ac points the player's I<ac> is decreased when applying this object. -=item wc <number> +=item I<wc> <number> -the amount of wc points the player's wc is decreased when applying this object. +the amount of wc points the player's I<wc> is decreased when applying this object. =back @@ -888,20 +923,20 @@ FLAG_SEE_IN_DARK FLAG_UNDEAD -=head3 GRIMREAPER - type 28 - Grimreapers +=head3 B<GRIMREAPER> - type 28 - Grimreapers These type are mostly used for monsters, they give the monster the ability to dissapear after 10 hits with AT_DRAIN. =over 4 -=item value <number> +=item I<value> <number> This field stores the hits the monster did yet. =back -=head3 CREATOR - type 42 - Object creators +=head3 B<CREATOR> - type 42 - Object creators Once a creator is activated by a connection it creates a number of objects (cloned from it's inventory or a new object derived from the archetype @@ -911,153 +946,200 @@ =over 4 -=item hp <number> +=item I<hp> <number> If FLAG_LIVE_SAVE is not set it is the absolute number of times the creator can be used. -=item speed <number> +=item I<speed> <number> -If speed is set the creator will create an object periodically, -see speed and speed_left fields in general object field description -for more details on how this period works. +If I<speed> is set the creator will create an object periodically, +see I<speed> and I<speed_left> fields in the general object field description +for more details. -=item slaying <string> +=item I<slaying> <string> -If set the generated object's name and -title will be set to this. +If set the generated object's name and title will be set to this. -=item other_arch <string> +=item I<other_arch> <string> -If the inventory of the creator is empty new objects -will be derived from the archetype named by <string>. +If the inventory of the creator is empty new objects will be derived from the +archetype named by <string>. -=item connected <number> +=item I<connected> <number> -See generic object field section. +See generic object field description. =back -=head3 DRINK - type 54 - Drinkable stuff +=head3 B<DRINK> - type 54 - Drinkable stuff -See FOOD description. +See B<FOOD> description. -=head3 CHECK_INV - type 64 - Inventory checkers +=head3 B<CHECK_INV> - type 64 - Inventory checkers This object checks whether the player has a specific item in his inventory when he moves above the inventory checker. If the player has the item (or not, which can be controlled with a flag) a connection will be triggered. -If you set move_block you can deny players and monsters to reach the space where -the inventory checker is on, see 'move_block' description below. +If you set I<move_block> you can deny players and monsters to reach the space where +the inventory checker is on, see I<move_block> description below. -The conditions specified by hp, slaying and race are concationated with OR. +The conditions specified by I<hp>, I<slaying> and I<race> are OR concationated. So matching one of those conditions is enough. =over 4 -=item move_block <move type bitmask> +=item I<move_block> <move type bitmask> If you set this field to block a movetype the move code will block any moves onto the space with the inventory checker, IF the moving object doesn't have -(or has - if last_sp = 0) the item that the checker is searching for. +(or has - if I<last_sp> = 0) the item that the checker is searching for. -=item last_sp (0|1) +=item I<last_sp> (0|1) -If last_sp is 1 'having' the item that is being checked for will +If I<last_sp> is 1 'having' the item that is being checked for will activate the connection or make the space with the checker non-blocking. -If last_sp is 0 'not having' the item will activate the connection +If I<last_sp> is 0 'not having' the item will activate the connection or make the space with the checker non-blocking. -=item last_heal (0|1) +=item I<last_heal> (0|1) -If last_heal is 1 the matching item will be removed if the inventory checker +If I<last_heal> is 1 the matching item will be removed if the inventory checker activates a connection and finds the item in the inventory. (A inventory checker that blocks a space won't remove anything from inventories) -=item hp <number> +=item I<hp> <number> If this field is not 0 the inventory checker will search for an object with the type id <number>. -=item slaying <string> +=item I<slaying> <string> If this field is set the inventory checker will search for an object that -has the same string in the slaying field (for example a key string of a key). +has the same string in the I<slaying> field (for example a key string of a key). -=item race <string> +=item I<race> <string> If this field is set the inventory checker will search for an object which has the archetype name that matches <string>. -=item connected <connection id> +=item I<connected> <connection id> This is the connection that will be activated. The connection is 'pushed' when someone enters the space with the inventory checker, and it is 'released' when he leaves it. -See also the description of the connected field in the generic object field +See also the description of the I<connected> field in the generic object field section. =back -=head3 FLESH - type 72 - Organs and body parts +=head3 B<FLESH> - type 72 - Organs and body parts -See FOOD description. +See B<FOOD> description. -=head3 MISC_OBJECT - type 79 - Misc. objects +=head3 B<MISC_OBJECT> - type 79 - Misc. objects A type for any object that has no special behaviour. -=head3 LAMP - type 82 - A lamp +=head3 B<LAMP> - type 82 - A lamp + +This object represents a lamp, that can be carried and switched +on and off and has a certain amount of fuel in it. + +A lamp consists of two archetypes: the 'on' archetype and the 'off' archetype. +Each of them should point at the other one with it's I<other_arch> field. + +See the I<other_arch> field for the behaviour of a lamp object when it is applied. -This object makes light. +If this object has FLAG_IS_LIGHTABLE set the lamp can be turned on and off +with a B<LIGHTER>, see also the description of FLAG_IS_LIGHTABLE. + +=over 4 + +=item I<glow_radius> <number> + +The radius of the light that the lamp emits, see also I<glow_radius> in the +generic object flags description. + +=item I<speed> <number> + +If FLAG_CHANGING is set the I<speed> field will indicate how fast the +lamp burns it's fuel (I<food>). + +Setting FLAG_CHANGING makes only sense on the archetype which represents +the 'on' state of the lamp. + +See also the description of FLAG_CHANGING. + +Lamps which have no FLAG_CHANGING set would also make sense and represent +lamps that never burn up. + +=item I<other_arch> <number> + +This is the field that points to the 'other' archetype which represents the +opposite state of the lamp. The newly from I<other_arch> derived object will +replace the current object and will get the value of I<food> of the replaced object. + +Rationale: + +When the lamp (on) is applied a new object is derived from the archetype +in I<other_arch> and the I<food> value is copied to it ('the fuel is +transferred'). The new lamp (off) object has to have a I<other_arch> field +which points to the archetype from which a lamp (on) can be derived. + +=item I<food> <number> + +This fields stands for the fuel of the lamp. + +=back -=head3 DUPLICATOR - type 83 - Duplicators or: Multiplicators +=head3 B<DUPLICATOR> - type 83 - Duplicators or: Multiplicators This type of objects multiplies objects that are above it when it is activated. You can even multiply by 0, which will destroy the object. =over 4 -=item level <number> +=item I<level> <number> The multiplicator, if set to 0 or lower it will destroy the objects above it. -=item other_arch <string> +=item I<other_arch> <string> The archetype name of the objects that should be multiplied. -=item connected <number> +=item I<connected> <number> -See generic object field section. +See generic object field description. =back -=head3 HOLE - type 94 - Holes +=head3 B<HOLE> - type 94 - Holes -Holes are holes in the ground where objects can fall through. When the hole +B<HOLE>s are holes in the ground where objects can fall through. When the hole opens and/or is completly open all objects above it fall through (more precisely: if their head is above the hole). -When the HOLE is activated it's speed is set to 0.5. +When the B<HOLE> is activated it's speed is set to 0.5. -Trapdoors can only transfer the one who falls through to other coordinates -on the B<same> map. +These holes can only transfer the one who falls through to other coordinates +on the same map. =over 4 -=item maxsp (0|1) +=item I<maxsp> (0|1) This field negates the state of the connection: When maxsp is 1 the pit will open/close when the connection is deactivated. Otherwise it will open/close when the connection is activated. This field only has effect when the connection is triggered. So if you put a closed hole on a map, and the -connection is deactivated, and maxsp is 1 the hole will remain closed until the +connection is deactivated, and I<maxsp> is 1 the hole will remain closed until the connection was triggered once. -=item connected <connection id> +=item I<connected> <connection id> This is the connection id, which lets the hole opening or closing when activated. The flags FLAG_ACTIVATE_ON_PUSH and FLAG_ACTIVATE_ON_RELEASE control @@ -1066,69 +1148,70 @@ For example: if FLAG_ACTIVATE_ON_RELEASE is set to 0 the hole won't react when the connection is released. -=item wc <number> (internal) +=item I<wc> <number> (internal) -This is an internal flag. If it is greater than 0 it means that the hole is not +This is an internal field. If it is greater than 0 it means that the hole is not yet fully open. More preciesly: this field is the animation-step and if it is set to the 'closed' step of the animation the hole is closed and if it is on -the 'open' animation step (wc = 0), the hole is open. +the 'open' animation step (I<wc> = 0), the hole is open. -=item sp <number> +=item I<sp> <number> The destination y coordinates on the same map. -=item hp <number> +=item I<hp> <number> The destination x coordinates on the same map. =back -=head3 POISONING - type 105 - The poisoning of players and monsters +=head3 B<POISONING> - type 105 - The poisoning of players and monsters This type is doing the actual damage to the ones who were attacked -via AT_POISON (or drank POISON). +via AT_POISON (or drank B<POISON>). The duration is handled via the FLAG_IS_USED_UP mechanism (please look there for details). =over 4 -=item dam <number> +=item I<dam> <number> -Each time the poisoning is processed (which is determined by the speed and speed_left -fields, see the general object fields above) it hits the player with -<number> damage and the AT_INTERNAL attacktype (means: it will simply -hit the player with no strings attached). +Each time the poisoning is proccessed (which is determined by the I<speed> and +I<speed_left> fields, see the general object fields description above) it hits +the player with <number> damage and the AT_INTERNAL attacktype (means: it will +simply hit the player with no strings attached). -=item food <number> +=item I<food> <number> -Just a note: The posion is removed when food == 1 and not when -the whole duration is up, because the POISONING code has to remove +Just a note: The posioning is removed if I<food> == 1 and not if +the whole I<duration> is up, because the B<POISONING> code has to remove the poison-effects from the player before the FLAG_IS_USED_UP mechanism -deletes the POISONING object. +deletes the B<POISONING> object. =back -=head3 FORCE - type 114 - Forces +=head3 B<FORCE> - type 114 - Forces Forces are a very 'thin' type. They don't have much behaviour other than disappearing after a time and/or affecting the player if they are in his inventory. -Forces only take effect on the player if they have set FLAG_APPLIED. +Forces only take effect on the player if they have FLAG_APPLIED set. -Whether the duration field is processed or not a tick is controlled via the -speed and speed_left field. Look above in the generic object field description. +Whether the I<duration> field is processed or not per tick is controlled by the +I<speed> and I<speed_left> fields. Look above in the generic object field description. -NOTE: Setting FLAG_IS_USED_UP on an force will also consider the 'food' field -like stated above in the FLAG_IS_USED_UP description. BUT: If the food field reaches -0 before duration and FLAG_APPLIED is set, the force will last for 'duration'. -If the FLAG_APPLIED is not set the force is removed when food reaches 0. -Generally this means: FLAG_IS_USED_UP doesn't have good semantics on forces. +NOTE: If FLAG_IS_USED_UP is set on a B<FORCE> it's I<food> field will also +interpreter like described in the description of the FLAG_IS_USED_UP flag. +BUT: If I<food> reaches 0 before I<duration> and FLAG_APPLIED is set, the force +will still last for I<duration>. If the FLAG_APPLIED is not set the force is +removed when I<food> reaches 0. Generally this means: FLAG_IS_USED_UP doesn't +have good semantics on forces, try to avoid it. =over 4 -=item duration +=item I<duration> While this field is greater than 0 the force/object is not destroyed. It is decreased each tick by 1. @@ -1141,13 +1224,13 @@ =back -=head3 POTION_EFFECT - type 115 - Potion effects (resistancies) +=head3 B<POTION_EFFECT> - type 115 - Potion effects (resistancies) -This object is generated by the POTION code when the potion is a resistance -giving potion. It has mainly the same behaviour as a FORCE. +This object is generated by the B<POTION> code when the potion is a resistance +giving potion. It has mainly the same behaviour as a B<FORCE>. The specialty of the potion effect is that the resistancy it gives is absolute, -so if you drin a resistancy potion of fire+60 you will get 60% resistancy to +so if you drink a resistancy potion of fire+60 you will get 60% absolute resistancy to fire. Multiple potion effects only give you the maximum of their resistancy.