… | |
… | |
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 |
… | |
… | |
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). Negative glow radii darken areas - currently, negative |
116 | glowing at all). Negative glow radii darken areas - currently, negative |
117 | glow radii are stronger than positive ones. |
117 | glow radii are stronger than positive ones. |
118 | |
118 | |
119 | =item I<speed> <number> |
119 | =item I<speed> <float> |
120 | |
120 | |
121 | 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 |
122 | 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!). |
123 | |
123 | |
124 | If I<speed> drops below the MIN_ACTIVE_SPEED the object is removed |
124 | If I<speed> drops below the MIN_ACTIVE_SPEED the object is removed |
125 | from the active object list and it won't experience any processing per tick. |
125 | from the active object list and it won't experience any processing per tick. |
126 | |
126 | |
|
|
127 | Negative speed settings in archetypes and files cause a speed_left |
|
|
128 | randomisation on load or instantiatian, but for calculations, the absolute |
|
|
129 | value is used always. |
|
|
130 | |
127 | =item I<speed_left> <number> |
131 | =item I<speed_left> <float> |
128 | |
132 | |
129 | If this field is greater than 0 and the object is on the |
133 | If this field is greater than 0 and the object is on the |
130 | active list (mostly means it's speed is also greater than 0): |
134 | active 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 | |
139 | This means: the lower I<speed> is (but still above MIN_ACTIVE_SPEED) |
143 | This means: the lower I<speed> is (but still above MIN_ACTIVE_SPEED) |
140 | the more seldom the object is processed. And the higher I<speed> is |
144 | the more seldom the object is processed. And the higher I<speed> is |
141 | the more often the object is processed. |
145 | the more often the object is processed. |
142 | |
146 | |
143 | =item I<connected> <number> |
147 | =item I<connected> <identifier> |
144 | |
148 | |
145 | When this field is set the object will be linked to a connection with the |
149 | When this field is set the object will be linked to a connection with the |
146 | id <number>. What happens when the connection is 'activated' depends on the |
150 | same <identifier>. What happens when the connection is 'activated' depends on the |
147 | type of the object. |
151 | type of the object. |
148 | |
152 | |
149 | FLAG_ACTIVATE_ON_PUSH and FLAG_ACTIVATE_ON_RELEASE they will control |
153 | FLAG_ACTIVATE_ON_PUSH and FLAG_ACTIVATE_ON_RELEASE they will control |
150 | when to activate the object, see description of these below for further details. |
154 | when to activate the object, see description of these below for further details. |
151 | |
155 | |
… | |
… | |
328 | =item FLAG_IS_LIGHTABLE |
332 | =item FLAG_IS_LIGHTABLE |
329 | |
333 | |
330 | This flag indicates whether a B<LIGHTER> can light this object. See also the |
334 | This flag indicates whether a B<LIGHTER> can light this object. See also the |
331 | description of the B<LIGHTER> type. How easy you can light an item depends |
335 | description of the B<LIGHTER> type. How easy you can light an item depends |
332 | partially on the material of the object. |
336 | partially on the material of the object. |
|
|
337 | |
|
|
338 | =item FLAG_MONSTER |
|
|
339 | |
|
|
340 | Enables NPC behaviour in general (both monster AI and friendly AI). Numerous fields |
|
|
341 | change their meaning, including: |
|
|
342 | |
|
|
343 | =over 4 |
|
|
344 | |
|
|
345 | =item I<wis> |
|
|
346 | |
|
|
347 | Governs the "wake-up radius" - the radius within a monster detects an enemy. |
|
|
348 | |
|
|
349 | Also, I<wis> governs pathfinding intelligence: 8 and up means the monster |
|
|
350 | will partake in basic smell finding. 10 and up additionally spreads smell |
|
|
351 | knowledge, and 15 and up additionally will try to perturb the path as to |
|
|
352 | find shortcuts. |
|
|
353 | |
|
|
354 | =back |
333 | |
355 | |
334 | =back |
356 | =back |
335 | |
357 | |
336 | =head2 Description of type specific fields and behaviour |
358 | =head2 Description of type specific fields and behaviour |
337 | |
359 | |
… | |
… | |
444 | This field has some special meaning in potions, currently the |
466 | This field has some special meaning in potions, currently the |
445 | bits for AT_DEPLETE and AT_GODPOWER control whethere this is a |
467 | bits for AT_DEPLETE and AT_GODPOWER control whethere this is a |
446 | restoration potion or improvement potion. |
468 | restoration potion or improvement potion. |
447 | See include/attackinc.h for the bits of these types. |
469 | See include/attackinc.h for the bits of these types. |
448 | |
470 | |
449 | If AT_DEPLETE is set the player will be restored and the ARCH_DEPLETION |
471 | If AT_DEPLETE is set the player will be restored and the "depletion" |
450 | will be removed from him. If the potion has FLAG_CURSED or FLAG_DAMNED |
472 | will be removed from him. If the potion has FLAG_CURSED or FLAG_DAMNED |
451 | set the player will be drained a random stat by inserting an ARCH_DEPLETION |
473 | set the player will be drained a random stat by inserting an "depletion" |
452 | into him. |
474 | into him. |
453 | |
475 | |
454 | If AT_GODPOWER is enabled the player will gain +1 maxvalue in his hp, sp or grace stat. |
476 | If AT_GODPOWER is enabled the player will gain +1 maxvalue in his hp, sp or grace stat. |
455 | When the potion has FLAG_CURSED or FLAG_DAMNED set he will loose one in one of these stats. |
477 | When the potion has FLAG_CURSED or FLAG_DAMNED set he will loose one in one of these stats. |
456 | |
478 | |
… | |
… | |
498 | |
520 | |
499 | =back |
521 | =back |
500 | |
522 | |
501 | =back |
523 | =back |
502 | |
524 | |
503 | =head3 B<FOOD> - type 6 - Eatable stuff |
525 | =head3 B<FOOD> - type 6 - Edible stuff |
504 | |
526 | |
505 | This is for objects that are representing general eatables like |
527 | This is for objects that are representing general eatables like |
506 | beef or bread. |
528 | beef or bread. |
507 | |
529 | |
508 | The main difference between B<FOOD>, B<FLESH> and B<DRINK> is that they |
530 | The main difference between B<FOOD>, B<FLESH> and B<DRINK> is that they |
… | |
… | |
729 | The minimum I<speed> of an arrow is 1.0. |
751 | The minimum I<speed> of an arrow is 1.0. |
730 | |
752 | |
731 | While flying the arrows I<speed> is decreased by 0.05 each time it's moved. |
753 | While flying the arrows I<speed> is decreased by 0.05 each time it's moved. |
732 | |
754 | |
733 | If the I<speed> is above 10.0 it goes straight through the creature it hits and |
755 | If the I<speed> is above 10.0 it goes straight through the creature it hits and |
734 | it's I<speed> is reduced by 1. If the I<speed> is lower or equal 10.0 the arrow is |
756 | its I<speed> is reduced by 1. If the I<speed> is lower or equal 10.0 the arrow is |
735 | stopped and either sticked into the victim (see I<weight> field description) or |
757 | stopped and either stuck into the victim (see I<weight> field description) or |
736 | put on it's map square (if it didn't break, see description of the I<food> field). |
758 | put on its map square (if it didn't break, see description of the I<food> field). |
737 | |
759 | |
738 | =item I<weight> <number> |
760 | =item I<weight> <number> |
739 | |
761 | |
740 | This field is the weight of the arrow, if I<weight> is below or equal 5000 (5 kg) |
762 | This field is the weight of the arrow, if I<weight> is below or equal 5000 (5 kg) |
741 | the arrow will stick in the victim it hits. Otherwise it will fall to the ground. |
763 | the arrow will stick in the victim it hits. Otherwise it will fall to the ground. |
… | |
… | |
953 | =item I<hp> <number> |
975 | =item I<hp> <number> |
954 | |
976 | |
955 | If FLAG_LIVE_SAVE is not set it is the absolute number of times the creator can |
977 | If FLAG_LIVE_SAVE is not set it is the absolute number of times the creator can |
956 | be used. |
978 | be used. |
957 | |
979 | |
958 | =item I<speed> <number> |
980 | =item I<speed> <float> |
959 | |
981 | |
960 | If I<speed> is set the creator will create an object periodically, |
982 | If I<speed> is set the creator will create an object periodically, |
961 | see I<speed> and I<speed_left> fields in the general object field description |
983 | see I<speed> and I<speed_left> fields in the general object field description |
962 | for more details. |
984 | for more details. |
963 | |
985 | |
… | |
… | |
968 | =item I<other_arch> <string> |
990 | =item I<other_arch> <string> |
969 | |
991 | |
970 | If the inventory of the creator is empty new objects will be derived from the |
992 | If the inventory of the creator is empty new objects will be derived from the |
971 | archetype named by <string>. |
993 | archetype named by <string>. |
972 | |
994 | |
973 | =item I<connected> <number> |
995 | =item I<connected> <identifier> |
974 | |
996 | |
975 | See generic object field description. |
997 | See generic object field description. |
|
|
998 | |
|
|
999 | =back |
|
|
1000 | |
|
|
1001 | =head3 B<SKILL> - type 43 - Skills |
|
|
1002 | |
|
|
1003 | This 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 | |
|
|
1011 | The type of weapon or ranged item compatible with this skill (For ranged |
|
|
1012 | and combat attacks). |
|
|
1013 | |
|
|
1014 | =item I<skill> <string> |
|
|
1015 | |
|
|
1016 | The skill identifier used by other items, usually the skill name |
|
|
1017 | |
|
|
1018 | =item I<level> <percentage> |
|
|
1019 | |
|
|
1020 | not used? |
|
|
1021 | |
|
|
1022 | =item I<exp> <number> |
|
|
1023 | |
|
|
1024 | Base amount of experience in a skill, for skills not starting at zero. |
|
|
1025 | |
|
|
1026 | =item I<expmul> <float> |
|
|
1027 | |
|
|
1028 | Experience is multiplied by this factor. |
976 | |
1029 | |
977 | =back |
1030 | =back |
978 | |
1031 | |
979 | =head3 B<DRINK> - type 54 - Drinkable stuff |
1032 | =head3 B<DRINK> - type 54 - Drinkable stuff |
980 | |
1033 | |
… | |
… | |
1027 | =item I<race> <string> |
1080 | =item I<race> <string> |
1028 | |
1081 | |
1029 | If this field is set the inventory checker will search for an object which |
1082 | If this field is set the inventory checker will search for an object which |
1030 | has the archetype name that matches <string>. |
1083 | has the archetype name that matches <string>. |
1031 | |
1084 | |
1032 | =item I<connected> <connection id> |
1085 | =item I<connected> <identifier> |
1033 | |
1086 | |
1034 | This is the connection that will be activated. The connection is |
1087 | This is the connection that will be activated. The connection is |
1035 | 'pushed' when someone enters the space with the inventory checker, |
1088 | 'pushed' when someone enters the space with the inventory checker, |
1036 | and it is 'released' when he leaves it. |
1089 | and it is 'released' when he leaves it. |
1037 | |
1090 | |
1038 | See also the description of the I<connected> field in the generic object field |
1091 | See also the description of the I<connected> field in the generic object |
1039 | section. |
1092 | field section. |
1040 | |
1093 | |
1041 | =back |
1094 | =back |
1042 | |
1095 | |
1043 | =head3 B<MOOD_FLOOR> - type 65 - change mood of monsters |
1096 | =head3 B<MOOD_FLOOR> - type 65 - change mood of monsters |
1044 | |
1097 | |
… | |
… | |
1077 | |
1130 | |
1078 | =item I<other_arch> <string> |
1131 | =item I<other_arch> <string> |
1079 | |
1132 | |
1080 | The archetype name of the objects that should be multiplied. |
1133 | The archetype name of the objects that should be multiplied. |
1081 | |
1134 | |
1082 | =item I<connected> <number> |
1135 | =item I<connected> <identifier> |
1083 | |
1136 | |
1084 | See generic object field description. |
1137 | See generic object field description. |
1085 | |
1138 | |
1086 | =back |
1139 | =back |
1087 | |
1140 | |
… | |
… | |
1105 | when the connection is activated. This field only has effect when the |
1158 | when the connection is activated. This field only has effect when the |
1106 | connection is triggered. So if you put a closed hole on a map, and the |
1159 | connection is triggered. So if you put a closed hole on a map, and the |
1107 | connection is deactivated, and I<maxsp> is 1 the hole will remain closed until the |
1160 | connection is deactivated, and I<maxsp> is 1 the hole will remain closed until the |
1108 | connection was triggered once. |
1161 | connection was triggered once. |
1109 | |
1162 | |
1110 | =item I<connected> <connection id> |
1163 | =item I<connected> <identifier> |
1111 | |
1164 | |
1112 | This is the connection id, which lets the hole opening or closing when |
1165 | This is the connection id, which lets the hole opening or closing when |
1113 | activated. The flags FLAG_ACTIVATE_ON_PUSH and FLAG_ACTIVATE_ON_RELEASE control |
1166 | activated. The flags FLAG_ACTIVATE_ON_PUSH and FLAG_ACTIVATE_ON_RELEASE control |
1114 | at which connection state the object is activated. |
1167 | at which connection state the object is activated. |
1115 | |
1168 | |