--- deliantra/server/pod/objects.pod 2006/12/20 22:54:59 1.17 +++ deliantra/server/pod/objects.pod 2010/03/26 20:30:32 1.36 @@ -1,6 +1,6 @@ -=head1 CROSSFIRE+ OBJECT AND INTERNALS DOCUMENTATION +=head1 DELIANTRA OBJECT AND INTERNALS DOCUMENTATION -Here is all information about the object types Crossfire+ +Here is all information about the object types Deliantra supports at the moment. This is not a complete documentation (yet) and browsing the source is still recommended to learn about the objects that aren't documented here. @@ -35,13 +35,13 @@ This is an example of an archetype: - Object button_trigger + object button_trigger name button type 30 - face button_sma.111 + face button_sma.x11 anim - button_sma.111 - button_sma.112 + button_sma.x11 + button_sma.x12 mina is_animated 0 exp 30 @@ -110,7 +110,13 @@ For non-player objects this field is not changed by server ticks. -=item I +=item I + +This field indicates how far an object glows. Default is a radius of 0 (no +glowing at all). Negative glow radii darken areas - currently, negative +glow radii are stronger than positive ones. + +=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!). @@ -118,7 +124,11 @@ 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 I +Negative speed settings in archetypes and files cause a speed_left +randomisation on load or instantiatian, but for calculations, the absolute +value is used always. + +=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): @@ -134,10 +144,10 @@ the more seldom the object is processed. And the higher I is the more often the object is processed. -=item I +=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 +same . What happens when the connection is 'activated' depends on the type of the object. FLAG_ACTIVATE_ON_PUSH and FLAG_ACTIVATE_ON_RELEASE they will control @@ -198,6 +208,11 @@ Sets the flag FLAG_ACTIVATE_ON_RELEASE. See Flags section below. +=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 @@ -255,9 +270,6 @@ 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 Bs and Bs, @@ -292,9 +304,9 @@ =item FLAG_NO_STEAL When this flag is set this object can't be stolen. The flag will be -resetted once the object is placed on a map. +reset once the object is placed on a map. -When this flag is set on a monster it can defent attempts of stealing +When this flag is set on a monster it can defend attempts at stealing (but in this context the flag is only used internally). =item FLAG_NO_SKILL_IDENT @@ -317,6 +329,30 @@ 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. + +=item FLAG_MONSTER + +Enables NPC behaviour in general (both monster AI and friendly AI). Numerous fields +change their meaning, including: + +=over 4 + +=item I + +Governs the "wake-up radius" - the radius within a monster detects an enemy. + +Also, I governs pathfinding intelligence: 8 and up means the monster +will partake in basic smell finding. 10 and up additionally spreads smell +knowledge, and 15 and up additionally will try to perturb the path as to +find shortcuts. + +=back + =back =head2 Description of type specific fields and behaviour @@ -329,7 +365,7 @@ This type is implemented by the transport extension and has currently no special fields that affect it. -=head3 B - type 3 - Rods that fire spells +=head3 B, B - type 3, 35 - Rods that fire spells Rods contain spells and can be fired by a player. @@ -345,7 +381,8 @@ =item I -The amount of spellpoints this rod has left. +The amount of spellpoints this rod has left. Recharges at a rate of C<1 + +maxhp/10> per tick. =item I @@ -431,9 +468,9 @@ restoration potion or improvement potion. See include/attackinc.h for the bits of these types. -If AT_DEPLETE is set the player will be restored and the ARCH_DEPLETION +If AT_DEPLETE is set the player will be restored and the "depletion" will be removed from him. If the potion has FLAG_CURSED or FLAG_DAMNED -set the player will be drained a random stat by inserting an ARCH_DEPLETION +set the player will be drained a random stat by inserting an "depletion" into him. If AT_GODPOWER is enabled the player will gain +1 maxvalue in his hp, sp or grace stat. @@ -485,7 +522,7 @@ =back -=head3 B - type 6 - Eatable stuff +=head3 B - type 6 - Edible stuff This is for objects that are representing general eatables like beef or bread. @@ -533,8 +570,8 @@ =item I -This field affects the propability of poisoning. The higher the level difference -between the one who is hit and the poision the more propable it is the attacked +This field affects the probability of poisoning. The higher the level difference +between the one who is hit and the poision the more probable it is the attacked one will be poisoned. =item I @@ -670,7 +707,7 @@ =item I -The weapon class of the arrow, which has effect on the propability of hitting. +The weapon class of the arrow, which has effect on the probability of hitting. It is recomputed when the arrow is being fired by this formula: @@ -695,7 +732,7 @@ =item I (interally used) -The level of the arrow, this affects the propability of piercing FLAG_REFL_MISSILE, +The level of the arrow, this affects the probability of piercing FLAG_REFL_MISSILE, see above in the B description. The I is set when the arrow is fired to either the skill level or the @@ -716,9 +753,9 @@ While flying the arrows I is decreased by 0.05 each time it's moved. If the I is above 10.0 it goes straight through the creature it hits and -it's I is reduced by 1. If the I is lower or equal 10.0 the arrow is -stopped and either sticked into the victim (see I field description) or -put on it's map square (if it didn't break, see description of the I field). +its I is reduced by 1. If the I is lower or equal 10.0 the arrow is +stopped and either stuck into the victim (see I field description) or +put on its map square (if it didn't break, see description of the I field). =item I @@ -834,22 +871,27 @@ =item I -The part of the body you need to use this weapon, possible values should be -looked up in common/item.C at body_locations. +The part/slot of the body you need to use this weapon, possible values for +C should be looked up in common/item.C at body_locations. -=item I +The value (in the range C<-7..7>) gives the number of those body slots +used up by the item (if negative) or the number of body slots this object +has (if positive, e.g. for monsters or players). The special value C<0> +indicates that this object cannot equip items requiring these body slots. + +=item I this is the factor with which the difference of the players resistancy and 100% is multiplied, something like this: - additional_resistancy = (100 - current_resistanct) * (/100) + additional_resistancy = (100 - current_resistancy) * (/100) if is negative it is added to the total vulnerabilities, and later the total resistance is decided by: 'total resistance = total protections - total vulnerabilities' -see also common/living.C:fix_player +see also common/living.C:fix_player. =item I @@ -935,7 +977,7 @@ If FLAG_LIVE_SAVE is not set it is the absolute number of times the creator can be used. -=item I +=item I If I is set the creator will create an object periodically, see I and I fields in the general object field description @@ -950,12 +992,43 @@ If the inventory of the creator is empty new objects will be derived from the archetype named by . -=item I +=item I See generic object field description. =back +=head3 B - type 43 - Skills + +This type is basically for representing skills in the game. + +=over 4 + +=item I + +=item I + +The type of weapon or ranged item compatible with this skill (For ranged +and combat attacks). + +=item I + +The skill identifier used by other items, usually the skill name + +=item I + +not used? + +=item I + +Base amount of experience in a skill, for skills not starting at zero. + +=item I + +Experience is multiplied by this factor. + +=back + =head3 B - type 54 - Drinkable stuff See B description. @@ -1009,17 +1082,33 @@ If this field is set the inventory checker will search for an object which has the archetype name that matches . -=item I +=item I 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 I field in the generic object field -section. +See also the description of the I field in the generic object +field section. =back +=head3 B - type 65 - change mood of monsters + +speed == 0 for triggered mood changes, speed != 0 for non-triggered mood +changes. + + (based on value that last_sp takes): + 0: 'furious' Makes all monsters aggressive + 1: 'angry' As above but pets are unaffected + 2: 'calm' Makes all monsters unaggressive + 3: 'sleep' Puts all monsters to sleep + 4: 'charm' Makes monster into a pet of person + who triggers the square. This setting + is not enabled for continous operation + 5: 'destroy mons' destroy any monsters on this space + 6: 'destroy pets' destroy friendly monsters on this space + =head3 B - type 72 - Organs and body parts See B description. @@ -1028,50 +1117,6 @@ A type for any object that has no special behaviour. -=head3 B - 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 field. - -See the I field for the behaviour of a lamp object when it is applied. - -=over 4 - -=item I - -If FLAG_CHANGING is set the I field will indicate how fast the -lamp burns it's fuel (I). - -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 - -This is the field that points to the 'other' archetype which represents the -opposite state of the lamp. The newly from I derived object will -replace the current object and will get the value of I of the replaced object. - -Rationale: - -When the lamp (on) is applied a new object is derived from the archetype -in I and the I value is copied to it ('the fuel is -transferred'). The new lamp (off) object has to have a I field -which points to the archetype from which a lamp (on) can be derived. - -=item I - -This fields stands for the fuel of the lamp. - -=back - =head3 B - type 83 - Duplicators or: Multiplicators This type of objects multiplies objects that are above it when it is activated. @@ -1087,7 +1132,7 @@ The archetype name of the objects that should be multiplied. -=item I +=item I See generic object field description. @@ -1115,7 +1160,7 @@ connection is deactivated, and I is 1 the hole will remain closed until the connection was triggered once. -=item I +=item I 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