--- deliantra/server/pod/objects.pod 2006/12/20 13:07:13 1.13 +++ deliantra/server/pod/objects.pod 2006/12/20 19:53:10 1.14 @@ -68,6 +68,18 @@ The graphical appearance of this object. +=item x + +The x position of the object when it is on a map. + +=item y + +The y position of the object when it is on a map. + +=item map (internal) + +The map the object is on. + =item invisible If the is greater than 0 the object is invisible. @@ -100,6 +112,15 @@ the more seldom the object is processed. And the higher the speed field is the more often the object is processed. +=item connected + +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 +when to activate the object, see description of these below for further details. + =item no_drop (0|1) Sets the flag FLAG_NO_DROP. @@ -205,6 +226,9 @@ with the 'connected' 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 +activates the connection. + This flag is by default on. =item FLAG_ACTIVATE_ON_RELEASE @@ -213,6 +237,9 @@ with the 'connected' 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 +activates the connection. + This flag is by default on. =item FLAG_NO_STEAL @@ -565,6 +592,127 @@ =back +=head3 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. + +Flying arrows are stopped either when they hit something blocking +(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. + +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. + +=over 4 + +=item dam + +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. + +=item wc + +The weaponclass of the arrow, which has effect on the propability of hitting. + +It is recomputed when the arrow is being fired by this formula: + + wc = 20 - bow->magic - arrow->magic - (skill->level or shooter->level) + - 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. + +The 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 + +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. + +=item 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. + +=item level (interally used) + +The level of the arrow, this affects the propability of piercing FLAG_REFL_MISSILE, +see above in the ARROW description. + +The level is set when the arrow is fired to either the skill level or the +shooters level. + +=item speed (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 +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. + +The minimum speed of an arrow is 1.0. + +While flying the arrows 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). + +=item weight + +This field is the weight of the arrow, if the 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 + +The breaking percentage. 100% means: breaks on usage for sure. + +=item 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 + +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. + +=item move_type (internally used) + +This field is set when the arrow is shot to MOVE_FLY_LOW. + +=item move_on (internally used) + +This field is set when the arrow is shot to MOVE_FLY_LOW and MOVE_WALK. + +=item race + +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). + +=back + +=head3 BOW - type 14 - Bows, those that fire ARROWs + +TODO, but take into account ARROW description above =head3 WEAPON - type 15 - Weapons @@ -693,11 +841,11 @@ =item ac -the amount of ac points the player's ac is decreased +the amount of ac points the player's ac is decreased when applying this object. =item wc -the amount of wc points the player's wc is decreased +the amount of wc points the player's wc is decreased when applying this object. =back @@ -725,6 +873,42 @@ =back +=head3 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 archetype from the other_arch slot). + +If FLAG_LIVESAFE is set the number of uses is unlimited. + +=over 4 + +=item hp + +If FLAG_LIVE_SAVE is not set it is the absolute number of times the creator can +be used. + +=item speed + +If speed is set the creator will create an object periodically, +see speed and speed_left fields in general object attribute description +for more details on how this period works. + +=item slaying + +If set the generated object's name and +title will be set to this. + +=item other_arch + +If the inventory of the creator is empty objects of the +archetype will be generated. + +=item connected + +See generic object attribute section. + +=back + =head3 DRINK - type 54 - Drinkable stuff See FOOD description. @@ -780,7 +964,12 @@ =item connected -This is the connection that will be activated. +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 attribute +section. =back @@ -792,12 +981,35 @@ A type for any object that has no special behaviour. +=head3 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 + +The multiplicator, if set to 0 or lower it will destroy the objects above it. + +=item other_arch + +The archetype name of the objects which will be multiplied. + +=item connected + +See generic object attribute section. + +=back + =head3 HOLE - type 94 - Holes Holes 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. + Trapdoors can only transfer the one who falls through to other coordinates on the B map.