… | |
… | |
33 | This document does explain the behaviour of the objects and the meaning of |
33 | This document does explain the behaviour of the objects and the meaning of |
34 | their fields in the server engine, which are derived from archetypes. |
34 | their fields in the server engine, which are derived from archetypes. |
35 | |
35 | |
36 | This is an example of an archetype: |
36 | This 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 |
… | |
… | |
111 | For non-player objects this field is not changed by server ticks. |
111 | For non-player objects this field is not changed by server ticks. |
112 | |
112 | |
113 | =item I<glow_radius> <number> |
113 | =item I<glow_radius> <number> |
114 | |
114 | |
115 | This field indicates how far an object glows. Default is a radius of 0 (no |
115 | This field indicates how far an object glows. Default is a radius of 0 (no |
116 | glowing at all). |
116 | glowing at all). Negative glow radii darken areas - currently, negative |
|
|
117 | glow radii are stronger than positive ones. |
117 | |
118 | |
118 | =item I<speed> <number> |
119 | =item I<speed> <number> |
119 | |
120 | |
120 | If this field is greater than MIN_ACTIVE_SPEED (~0.0001) the object is placed |
121 | If this field is greater than MIN_ACTIVE_SPEED (~0.0001) the object is placed |
121 | on the active object list and will be processed each tick (see also speed_left!). |
122 | on the active object list and will be processed each tick (see also speed_left!). |
… | |
… | |
263 | will be generated. |
264 | will be generated. |
264 | |
265 | |
265 | After the new object is created the I<hp> field from the old object is copied into |
266 | After the new object is created the I<hp> field from the old object is copied into |
266 | the new one. |
267 | the new one. |
267 | |
268 | |
268 | When the old object was a B<LAMP> it's I<food> fields value less 1 will be copied |
|
|
269 | to the new object. |
|
|
270 | |
|
|
271 | =item FLAG_IS_A_TEMPLATE (internal use) |
269 | =item FLAG_IS_A_TEMPLATE (internal use) |
272 | |
270 | |
273 | This flag is set on the inventory of generators like B<CREATOR>s and B<CONVERTER>s, |
271 | This flag is set on the inventory of generators like B<CREATOR>s and B<CONVERTER>s, |
274 | or other objects that have the flags FLAG_GENERATOR and FLAG_CONTENT_ON_GEN set. |
272 | or other objects that have the flags FLAG_GENERATOR and FLAG_CONTENT_ON_GEN set. |
275 | |
273 | |
… | |
… | |
330 | =item FLAG_IS_LIGHTABLE |
328 | =item FLAG_IS_LIGHTABLE |
331 | |
329 | |
332 | This flag indicates whether a B<LIGHTER> can light this object. See also the |
330 | This flag indicates whether a B<LIGHTER> can light this object. See also the |
333 | description of the B<LIGHTER> type. How easy you can light an item depends |
331 | description of the B<LIGHTER> type. How easy you can light an item depends |
334 | partially on the material of the object. |
332 | partially on the material of the object. |
|
|
333 | |
|
|
334 | =item FLAG_MONSTER |
|
|
335 | |
|
|
336 | Enables NPC behaviour in general (both monster AI and friendly AI). Numerous fields |
|
|
337 | change their meaning, including: |
|
|
338 | |
|
|
339 | =over 4 |
|
|
340 | |
|
|
341 | =item I<wis> |
|
|
342 | |
|
|
343 | Governs the "wake-up radius" - the radius within a monster detects an enemy. |
|
|
344 | |
|
|
345 | Also, I<wis> governs pathfinding intelligence: 8 and up means the monster |
|
|
346 | will partake in basic smell finding. 10 and up additionally spreads smell |
|
|
347 | knowledge, and 15 and up additionally will try to perturb the path as to |
|
|
348 | find shortcuts. |
|
|
349 | |
|
|
350 | =back |
335 | |
351 | |
336 | =back |
352 | =back |
337 | |
353 | |
338 | =head2 Description of type specific fields and behaviour |
354 | =head2 Description of type specific fields and behaviour |
339 | |
355 | |
… | |
… | |
500 | |
516 | |
501 | =back |
517 | =back |
502 | |
518 | |
503 | =back |
519 | =back |
504 | |
520 | |
505 | =head3 B<FOOD> - type 6 - Eatable stuff |
521 | =head3 B<FOOD> - type 6 - Edible stuff |
506 | |
522 | |
507 | This is for objects that are representing general eatables like |
523 | This is for objects that are representing general eatables like |
508 | beef or bread. |
524 | beef or bread. |
509 | |
525 | |
510 | The main difference between B<FOOD>, B<FLESH> and B<DRINK> is that they |
526 | The main difference between B<FOOD>, B<FLESH> and B<DRINK> is that they |
… | |
… | |
1064 | |
1080 | |
1065 | =head3 B<MISC_OBJECT> - type 79 - Misc. objects |
1081 | =head3 B<MISC_OBJECT> - type 79 - Misc. objects |
1066 | |
1082 | |
1067 | A type for any object that has no special behaviour. |
1083 | A type for any object that has no special behaviour. |
1068 | |
1084 | |
1069 | =head3 B<LAMP> - type 82 - A lamp |
|
|
1070 | |
|
|
1071 | This object represents a lamp, that can be carried and switched |
|
|
1072 | on and off and has a certain amount of fuel in it. |
|
|
1073 | |
|
|
1074 | A lamp consists of two archetypes: the 'on' archetype and the 'off' archetype. |
|
|
1075 | Each of them should point at the other one with it's I<other_arch> field. |
|
|
1076 | |
|
|
1077 | See the I<other_arch> field for the behaviour of a lamp object when it is applied. |
|
|
1078 | |
|
|
1079 | If this object has FLAG_IS_LIGHTABLE set the lamp can be turned on and off |
|
|
1080 | with a B<LIGHTER>, see also the description of FLAG_IS_LIGHTABLE. |
|
|
1081 | |
|
|
1082 | =over 4 |
|
|
1083 | |
|
|
1084 | =item I<glow_radius> <number> |
|
|
1085 | |
|
|
1086 | The radius of the light that the lamp emits, see also I<glow_radius> in the |
|
|
1087 | generic object flags description. |
|
|
1088 | |
|
|
1089 | =item I<speed> <number> |
|
|
1090 | |
|
|
1091 | If FLAG_CHANGING is set the I<speed> field will indicate how fast the |
|
|
1092 | lamp burns it's fuel (I<food>). |
|
|
1093 | |
|
|
1094 | Setting FLAG_CHANGING makes only sense on the archetype which represents |
|
|
1095 | the 'on' state of the lamp. |
|
|
1096 | |
|
|
1097 | See also the description of FLAG_CHANGING. |
|
|
1098 | |
|
|
1099 | Lamps which have no FLAG_CHANGING set would also make sense and represent |
|
|
1100 | lamps that never burn up. |
|
|
1101 | |
|
|
1102 | =item I<other_arch> <number> |
|
|
1103 | |
|
|
1104 | This is the field that points to the 'other' archetype which represents the |
|
|
1105 | opposite state of the lamp. The newly from I<other_arch> derived object will |
|
|
1106 | replace the current object and will get the value of I<food> of the replaced object. |
|
|
1107 | |
|
|
1108 | Rationale: |
|
|
1109 | |
|
|
1110 | When the lamp (on) is applied a new object is derived from the archetype |
|
|
1111 | in I<other_arch> and the I<food> value is copied to it ('the fuel is |
|
|
1112 | transferred'). The new lamp (off) object has to have a I<other_arch> field |
|
|
1113 | which points to the archetype from which a lamp (on) can be derived. |
|
|
1114 | |
|
|
1115 | =item I<food> <number> |
|
|
1116 | |
|
|
1117 | This fields stands for the fuel of the lamp. |
|
|
1118 | |
|
|
1119 | =back |
|
|
1120 | |
|
|
1121 | =head3 B<DUPLICATOR> - type 83 - Duplicators or: Multiplicators |
1085 | =head3 B<DUPLICATOR> - type 83 - Duplicators or: Multiplicators |
1122 | |
1086 | |
1123 | This type of objects multiplies objects that are above it when it is activated. |
1087 | This type of objects multiplies objects that are above it when it is activated. |
1124 | You can even multiply by 0, which will destroy the object. |
1088 | You can even multiply by 0, which will destroy the object. |
1125 | |
1089 | |