ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/pod/objects.pod
(Generate patch)

Comparing deliantra/server/pod/objects.pod (file contents):
Revision 1.29 by root, Thu Dec 4 03:48:19 2008 UTC vs.
Revision 1.36 by root, Fri Mar 26 20:30:32 2010 UTC

33This document does explain the behaviour of the objects and the meaning of 33This document does explain the behaviour of the objects and the meaning of
34their fields in the server engine, which are derived from archetypes. 34their fields in the server engine, which are derived from archetypes.
35 35
36This is an example of an archetype: 36This is an example of an archetype:
37 37
38 Object button_trigger 38 object button_trigger
39 name button 39 name button
40 type 30 40 type 30
41 face button_sma.111 41 face button_sma.x11
42 anim 42 anim
43 button_sma.111 43 button_sma.x11
44 button_sma.112 44 button_sma.x12
45 mina 45 mina
46 is_animated 0 46 is_animated 0
47 exp 30 47 exp 30
48 no_pick 1 48 no_pick 1
49 walk_on 1 49 walk_on 1
114 114
115This field indicates how far an object glows. Default is a radius of 0 (no 115This field indicates how far an object glows. Default is a radius of 0 (no
116glowing at all). Negative glow radii darken areas - currently, negative 116glowing at all). Negative glow radii darken areas - currently, negative
117glow radii are stronger than positive ones. 117glow radii are stronger than positive ones.
118 118
119=item I<speed> <number> 119=item I<speed> <float>
120 120
121If this field is greater than MIN_ACTIVE_SPEED (~0.0001) the object is placed 121If this field is greater than MIN_ACTIVE_SPEED (~0.0001) the object is placed
122on the active object list and will be processed each tick (see also speed_left!). 122on the active object list and will be processed each tick (see also speed_left!).
123 123
124If I<speed> drops below the MIN_ACTIVE_SPEED the object is removed 124If I<speed> drops below the MIN_ACTIVE_SPEED the object is removed
125from the active object list and it won't experience any processing per tick. 125from the active object list and it won't experience any processing per tick.
126 126
127Negative speed settings in archetypes and files cause a speed_left
128randomisation on load or instantiatian, but for calculations, the absolute
129value is used always.
130
127=item I<speed_left> <number> 131=item I<speed_left> <float>
128 132
129If this field is greater than 0 and the object is on the 133If this field is greater than 0 and the object is on the
130active list (mostly means it's speed is also greater than 0): 134active list (mostly means it's speed is also greater than 0):
131 135
132 - speed_left is decreased by 1 136 - speed_left is decreased by 1
138 142
139This means: the lower I<speed> is (but still above MIN_ACTIVE_SPEED) 143This means: the lower I<speed> is (but still above MIN_ACTIVE_SPEED)
140the more seldom the object is processed. And the higher I<speed> is 144the more seldom the object is processed. And the higher I<speed> is
141the more often the object is processed. 145the more often the object is processed.
142 146
143=item I<connected> <number> 147=item I<connected> <identifier>
144 148
145When this field is set the object will be linked to a connection with the 149When this field is set the object will be linked to a connection with the
146id <number>. What happens when the connection is 'activated' depends on the 150same <identifier>. What happens when the connection is 'activated' depends on the
147type of the object. 151type of the object.
148 152
149FLAG_ACTIVATE_ON_PUSH and FLAG_ACTIVATE_ON_RELEASE they will control 153FLAG_ACTIVATE_ON_PUSH and FLAG_ACTIVATE_ON_RELEASE they will control
150when to activate the object, see description of these below for further details. 154when to activate the object, see description of these below for further details.
151 155
264will be generated. 268will be generated.
265 269
266After the new object is created the I<hp> field from the old object is copied into 270After the new object is created the I<hp> field from the old object is copied into
267the new one. 271the new one.
268 272
269When the old object was a B<LAMP> it's I<food> fields value less 1 will be copied
270to the new object.
271
272=item FLAG_IS_A_TEMPLATE (internal use) 273=item FLAG_IS_A_TEMPLATE (internal use)
273 274
274This flag is set on the inventory of generators like B<CREATOR>s and B<CONVERTER>s, 275This flag is set on the inventory of generators like B<CREATOR>s and B<CONVERTER>s,
275or other objects that have the flags FLAG_GENERATOR and FLAG_CONTENT_ON_GEN set. 276or other objects that have the flags FLAG_GENERATOR and FLAG_CONTENT_ON_GEN set.
276 277
331=item FLAG_IS_LIGHTABLE 332=item FLAG_IS_LIGHTABLE
332 333
333This flag indicates whether a B<LIGHTER> can light this object. See also the 334This flag indicates whether a B<LIGHTER> can light this object. See also the
334description of the B<LIGHTER> type. How easy you can light an item depends 335description of the B<LIGHTER> type. How easy you can light an item depends
335partially on the material of the object. 336partially on the material of the object.
337
338=item FLAG_MONSTER
339
340Enables NPC behaviour in general (both monster AI and friendly AI). Numerous fields
341change their meaning, including:
342
343=over 4
344
345=item I<wis>
346
347Governs the "wake-up radius" - the radius within a monster detects an enemy.
348
349Also, I<wis> governs pathfinding intelligence: 8 and up means the monster
350will partake in basic smell finding. 10 and up additionally spreads smell
351knowledge, and 15 and up additionally will try to perturb the path as to
352find shortcuts.
353
354=back
336 355
337=back 356=back
338 357
339=head2 Description of type specific fields and behaviour 358=head2 Description of type specific fields and behaviour
340 359
447This field has some special meaning in potions, currently the 466This field has some special meaning in potions, currently the
448bits for AT_DEPLETE and AT_GODPOWER control whethere this is a 467bits for AT_DEPLETE and AT_GODPOWER control whethere this is a
449restoration potion or improvement potion. 468restoration potion or improvement potion.
450See include/attackinc.h for the bits of these types. 469See include/attackinc.h for the bits of these types.
451 470
452If AT_DEPLETE is set the player will be restored and the ARCH_DEPLETION 471If AT_DEPLETE is set the player will be restored and the "depletion"
453will be removed from him. If the potion has FLAG_CURSED or FLAG_DAMNED 472will be removed from him. If the potion has FLAG_CURSED or FLAG_DAMNED
454set the player will be drained a random stat by inserting an ARCH_DEPLETION 473set the player will be drained a random stat by inserting an "depletion"
455into him. 474into him.
456 475
457If AT_GODPOWER is enabled the player will gain +1 maxvalue in his hp, sp or grace stat. 476If AT_GODPOWER is enabled the player will gain +1 maxvalue in his hp, sp or grace stat.
458When the potion has FLAG_CURSED or FLAG_DAMNED set he will loose one in one of these stats. 477When the potion has FLAG_CURSED or FLAG_DAMNED set he will loose one in one of these stats.
459 478
501 520
502=back 521=back
503 522
504=back 523=back
505 524
506=head3 B<FOOD> - type 6 - Eatable stuff 525=head3 B<FOOD> - type 6 - Edible stuff
507 526
508This is for objects that are representing general eatables like 527This is for objects that are representing general eatables like
509beef or bread. 528beef or bread.
510 529
511The main difference between B<FOOD>, B<FLESH> and B<DRINK> is that they 530The main difference between B<FOOD>, B<FLESH> and B<DRINK> is that they
732The minimum I<speed> of an arrow is 1.0. 751The minimum I<speed> of an arrow is 1.0.
733 752
734While flying the arrows I<speed> is decreased by 0.05 each time it's moved. 753While flying the arrows I<speed> is decreased by 0.05 each time it's moved.
735 754
736If the I<speed> is above 10.0 it goes straight through the creature it hits and 755If the I<speed> is above 10.0 it goes straight through the creature it hits and
737it's I<speed> is reduced by 1. If the I<speed> is lower or equal 10.0 the arrow is 756its I<speed> is reduced by 1. If the I<speed> is lower or equal 10.0 the arrow is
738stopped and either sticked into the victim (see I<weight> field description) or 757stopped and either stuck into the victim (see I<weight> field description) or
739put on it's map square (if it didn't break, see description of the I<food> field). 758put on its map square (if it didn't break, see description of the I<food> field).
740 759
741=item I<weight> <number> 760=item I<weight> <number>
742 761
743This field is the weight of the arrow, if I<weight> is below or equal 5000 (5 kg) 762This field is the weight of the arrow, if I<weight> is below or equal 5000 (5 kg)
744the arrow will stick in the victim it hits. Otherwise it will fall to the ground. 763the arrow will stick in the victim it hits. Otherwise it will fall to the ground.
956=item I<hp> <number> 975=item I<hp> <number>
957 976
958If FLAG_LIVE_SAVE is not set it is the absolute number of times the creator can 977If FLAG_LIVE_SAVE is not set it is the absolute number of times the creator can
959be used. 978be used.
960 979
961=item I<speed> <number> 980=item I<speed> <float>
962 981
963If I<speed> is set the creator will create an object periodically, 982If I<speed> is set the creator will create an object periodically,
964see I<speed> and I<speed_left> fields in the general object field description 983see I<speed> and I<speed_left> fields in the general object field description
965for more details. 984for more details.
966 985
971=item I<other_arch> <string> 990=item I<other_arch> <string>
972 991
973If the inventory of the creator is empty new objects will be derived from the 992If the inventory of the creator is empty new objects will be derived from the
974archetype named by <string>. 993archetype named by <string>.
975 994
976=item I<connected> <number> 995=item I<connected> <identifier>
977 996
978See generic object field description. 997See generic object field description.
998
999=back
1000
1001=head3 B<SKILL> - type 43 - Skills
1002
1003This type is basically for representing skills in the game.
1004
1005=over 4
1006
1007=item I<subtype> <skill number>
1008
1009=item I<weapontype> <type of tool>
1010
1011The type of weapon or ranged item compatible with this skill (For ranged
1012and combat attacks).
1013
1014=item I<skill> <string>
1015
1016The skill identifier used by other items, usually the skill name
1017
1018=item I<level> <percentage>
1019
1020not used?
1021
1022=item I<exp> <number>
1023
1024Base amount of experience in a skill, for skills not starting at zero.
1025
1026=item I<expmul> <float>
1027
1028Experience is multiplied by this factor.
979 1029
980=back 1030=back
981 1031
982=head3 B<DRINK> - type 54 - Drinkable stuff 1032=head3 B<DRINK> - type 54 - Drinkable stuff
983 1033
1030=item I<race> <string> 1080=item I<race> <string>
1031 1081
1032If this field is set the inventory checker will search for an object which 1082If this field is set the inventory checker will search for an object which
1033has the archetype name that matches <string>. 1083has the archetype name that matches <string>.
1034 1084
1035=item I<connected> <connection id> 1085=item I<connected> <identifier>
1036 1086
1037This is the connection that will be activated. The connection is 1087This is the connection that will be activated. The connection is
1038'pushed' when someone enters the space with the inventory checker, 1088'pushed' when someone enters the space with the inventory checker,
1039and it is 'released' when he leaves it. 1089and it is 'released' when he leaves it.
1040 1090
1041See also the description of the I<connected> field in the generic object field 1091See also the description of the I<connected> field in the generic object
1042section. 1092field section.
1043 1093
1044=back 1094=back
1045 1095
1046=head3 B<MOOD_FLOOR> - type 65 - change mood of monsters 1096=head3 B<MOOD_FLOOR> - type 65 - change mood of monsters
1047 1097
1065 1115
1066=head3 B<MISC_OBJECT> - type 79 - Misc. objects 1116=head3 B<MISC_OBJECT> - type 79 - Misc. objects
1067 1117
1068A type for any object that has no special behaviour. 1118A type for any object that has no special behaviour.
1069 1119
1070=head3 B<LAMP> - type 82 - A lamp
1071
1072This object represents a lamp, that can be carried and switched
1073on and off and has a certain amount of fuel in it.
1074
1075A lamp consists of two archetypes: the 'on' archetype and the 'off' archetype.
1076Each of them should point at the other one with it's I<other_arch> field.
1077
1078See the I<other_arch> field for the behaviour of a lamp object when it is applied.
1079
1080If this object has FLAG_IS_LIGHTABLE set the lamp can be turned on and off
1081with a B<LIGHTER>, see also the description of FLAG_IS_LIGHTABLE.
1082
1083=over 4
1084
1085=item I<glow_radius> <number>
1086
1087The radius of the light that the lamp emits, see also I<glow_radius> in the
1088generic object flags description.
1089
1090=item I<speed> <number>
1091
1092If FLAG_CHANGING is set the I<speed> field will indicate how fast the
1093lamp burns it's fuel (I<food>).
1094
1095Setting FLAG_CHANGING makes only sense on the archetype which represents
1096the 'on' state of the lamp.
1097
1098See also the description of FLAG_CHANGING.
1099
1100Lamps which have no FLAG_CHANGING set would also make sense and represent
1101lamps that never burn up.
1102
1103=item I<other_arch> <number>
1104
1105This is the field that points to the 'other' archetype which represents the
1106opposite state of the lamp. The newly from I<other_arch> derived object will
1107replace the current object and will get the value of I<food> of the replaced object.
1108
1109Rationale:
1110
1111When the lamp (on) is applied a new object is derived from the archetype
1112in I<other_arch> and the I<food> value is copied to it ('the fuel is
1113transferred'). The new lamp (off) object has to have a I<other_arch> field
1114which points to the archetype from which a lamp (on) can be derived.
1115
1116=item I<food> <number>
1117
1118This fields stands for the fuel of the lamp.
1119
1120=back
1121
1122=head3 B<DUPLICATOR> - type 83 - Duplicators or: Multiplicators 1120=head3 B<DUPLICATOR> - type 83 - Duplicators or: Multiplicators
1123 1121
1124This type of objects multiplies objects that are above it when it is activated. 1122This type of objects multiplies objects that are above it when it is activated.
1125You can even multiply by 0, which will destroy the object. 1123You can even multiply by 0, which will destroy the object.
1126 1124
1132 1130
1133=item I<other_arch> <string> 1131=item I<other_arch> <string>
1134 1132
1135The archetype name of the objects that should be multiplied. 1133The archetype name of the objects that should be multiplied.
1136 1134
1137=item I<connected> <number> 1135=item I<connected> <identifier>
1138 1136
1139See generic object field description. 1137See generic object field description.
1140 1138
1141=back 1139=back
1142 1140
1160when the connection is activated. This field only has effect when the 1158when the connection is activated. This field only has effect when the
1161connection is triggered. So if you put a closed hole on a map, and the 1159connection is triggered. So if you put a closed hole on a map, and the
1162connection is deactivated, and I<maxsp> is 1 the hole will remain closed until the 1160connection is deactivated, and I<maxsp> is 1 the hole will remain closed until the
1163connection was triggered once. 1161connection was triggered once.
1164 1162
1165=item I<connected> <connection id> 1163=item I<connected> <identifier>
1166 1164
1167This is the connection id, which lets the hole opening or closing when 1165This is the connection id, which lets the hole opening or closing when
1168activated. The flags FLAG_ACTIVATE_ON_PUSH and FLAG_ACTIVATE_ON_RELEASE control 1166activated. The flags FLAG_ACTIVATE_ON_PUSH and FLAG_ACTIVATE_ON_RELEASE control
1169at which connection state the object is activated. 1167at which connection state the object is activated.
1170 1168

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines