1 |
elmex |
1.1 |
=head1 CROSSFIRE+ OBJECT AND INTERNALS DOCUMENTATION |
2 |
|
|
|
3 |
|
|
Here is all information about the object types Crossfire+ |
4 |
|
|
supports at the moment. This is not a complete documentation (yet) |
5 |
|
|
and browsing the source is still recommended to learn about |
6 |
|
|
the objects that aren't documented here. |
7 |
|
|
|
8 |
|
|
This documentation is in a sketchy state. It's mostly |
9 |
|
|
used to collect notes about the internal behaviour of the |
10 |
|
|
objects. |
11 |
|
|
|
12 |
elmex |
1.15 |
=head2 About the notation and terms |
13 |
|
|
|
14 |
|
|
The term 'archetype' stands for a collection of fields. |
15 |
|
|
The term 'object' stands for an archetype instance. |
16 |
|
|
The term 'field' is used for an object fields and archetype fields. |
17 |
|
|
|
18 |
|
|
Field names will be displayed like I<this>. |
19 |
|
|
|
20 |
elmex |
1.1 |
=head2 About archetypes and objects |
21 |
|
|
|
22 |
elmex |
1.15 |
Archetypes are 'templates' of objects. If an object is derived |
23 |
|
|
from an archetype the object fields will be set to the corresponding |
24 |
|
|
fields in the archetype. |
25 |
|
|
|
26 |
|
|
When a map is instanciated (loaded), the 'object' description on the |
27 |
|
|
map are considered patches of the archetype. |
28 |
|
|
|
29 |
|
|
This document does explain the behaviour of the objects and the meaning of |
30 |
|
|
their fields in the server engine, which are derived from archetypes. |
31 |
|
|
|
32 |
elmex |
1.1 |
This is an example of an archetype: |
33 |
|
|
|
34 |
|
|
Object button_trigger |
35 |
|
|
name button |
36 |
|
|
type 30 |
37 |
|
|
face button_sma.111 |
38 |
|
|
anim |
39 |
|
|
button_sma.111 |
40 |
|
|
button_sma.112 |
41 |
|
|
mina |
42 |
|
|
is_animated 0 |
43 |
|
|
exp 30 |
44 |
|
|
no_pick 1 |
45 |
|
|
walk_on 1 |
46 |
|
|
walk_off 1 |
47 |
|
|
editable 48 |
48 |
|
|
visibility 50 |
49 |
|
|
weight 1 |
50 |
|
|
end |
51 |
|
|
|
52 |
elmex |
1.15 |
The first B<field> is I<name>: 'button_trigger', which basically means that |
53 |
|
|
instances (objects) that are created/derived from this archetype have the |
54 |
|
|
name 'button' (which means that the field I<name> of the object will be set |
55 |
|
|
to the same value as the archetypes field I<name>). |
56 |
elmex |
1.1 |
|
57 |
elmex |
1.15 |
The next field I<type> decides the behaviour of objects derived from this archetype. |
58 |
elmex |
1.1 |
For a comprehensive list of types see include/define.h. For this case |
59 |
|
|
you might find a line like: |
60 |
|
|
|
61 |
|
|
#define TRIGGER_BUTTON 30 |
62 |
|
|
|
63 |
elmex |
1.15 |
The behaviour of objects is further determined by B<Flags>, like FLAG_APPLIED. |
64 |
|
|
For more information on this look in the Flags subsection in the next section |
65 |
elmex |
1.1 |
|
66 |
elmex |
1.15 |
The following documentation will also document the meaning of internal used |
67 |
|
|
fields of objects. These fields are marked as (internal) and can't |
68 |
|
|
or shouldn't be set by an archetype. |
69 |
elmex |
1.1 |
|
70 |
elmex |
1.15 |
=head2 Description of (mostly) generic object fields |
71 |
elmex |
1.1 |
|
72 |
elmex |
1.2 |
These are the fields that most of the objects have and/or their |
73 |
|
|
default behaviour. |
74 |
|
|
|
75 |
|
|
=over 4 |
76 |
|
|
|
77 |
|
|
=item name <string> |
78 |
|
|
|
79 |
|
|
The name of the object. |
80 |
|
|
|
81 |
|
|
=item name_pl <string> |
82 |
|
|
|
83 |
|
|
The name of a collection of these objects (the plural of the name). |
84 |
|
|
|
85 |
|
|
=item face <facename> |
86 |
|
|
|
87 |
|
|
The graphical appearance of this object. |
88 |
|
|
|
89 |
elmex |
1.14 |
=item x <number> |
90 |
|
|
|
91 |
|
|
The x position of the object when it is on a map. |
92 |
|
|
|
93 |
|
|
=item y <number> |
94 |
|
|
|
95 |
|
|
The y position of the object when it is on a map. |
96 |
|
|
|
97 |
|
|
=item map (internal) |
98 |
|
|
|
99 |
|
|
The map the object is on. |
100 |
|
|
|
101 |
elmex |
1.2 |
=item invisible <number> |
102 |
|
|
|
103 |
|
|
If the <number> is greater than 0 the object is invisible. |
104 |
|
|
For players this field reflects the duration of the invisibility |
105 |
|
|
and is decreased every tick by 1. |
106 |
|
|
|
107 |
|
|
For non-player objects this field is not changed by server ticks. |
108 |
|
|
|
109 |
elmex |
1.4 |
=item speed <number> |
110 |
elmex |
1.2 |
|
111 |
|
|
If this field is greater than MIN_ACTIVE_SPEED (~0.0001) the object is placed |
112 |
|
|
on the active object list and will be processed each tick (see also speed_left!). |
113 |
|
|
|
114 |
|
|
If the speed field drops below the MIN_ACTIVE_SPEED the object is removed |
115 |
|
|
from the active object list and it won't experience any processing per tick. |
116 |
|
|
|
117 |
|
|
=item speed_left <number> |
118 |
|
|
|
119 |
|
|
If this field is greater than 0 and the object is on the |
120 |
|
|
active list (mostly means it's speed is also greater than 0): |
121 |
|
|
|
122 |
|
|
- speed_left is decreased by 1 |
123 |
|
|
- and this object is processed and experiences a server tick. |
124 |
|
|
|
125 |
|
|
If the object is on the active list and speed_left is lower or |
126 |
|
|
equal to 0 the absolute value of the speed field is added to speed_left |
127 |
|
|
on the end of the tick. |
128 |
|
|
|
129 |
elmex |
1.7 |
This means: the lower the speed field is (but still above MIN_ACTIVE_SPEED) |
130 |
|
|
the more seldom the object is processed. And the higher the speed field is |
131 |
|
|
the more often the object is processed. |
132 |
|
|
|
133 |
elmex |
1.14 |
=item connected <number> |
134 |
|
|
|
135 |
|
|
When this field is set the object will be linked to a connection with the |
136 |
|
|
id <number>. What happens when the connection is 'activated' depends on the |
137 |
|
|
type of the object. |
138 |
|
|
|
139 |
|
|
When FLAG_ACTIVATE_ON_PUSH and FLAG_ACTIVATE_ON_RELEASE they will control |
140 |
|
|
when to activate the object, see description of these below for further details. |
141 |
|
|
|
142 |
elmex |
1.2 |
=item no_drop (0|1) |
143 |
|
|
|
144 |
elmex |
1.4 |
Sets the flag FLAG_NO_DROP. |
145 |
|
|
See Flags section below. |
146 |
elmex |
1.2 |
|
147 |
|
|
=item applied (0|1) |
148 |
|
|
|
149 |
elmex |
1.4 |
Sets the flag FLAG_APPLIED. |
150 |
|
|
See Flags section below. |
151 |
elmex |
1.2 |
|
152 |
|
|
=item is_used_up (0|1) |
153 |
|
|
|
154 |
elmex |
1.4 |
Sets the flag FLAG_IS_USED_UP. |
155 |
|
|
See Flags section below. |
156 |
|
|
|
157 |
elmex |
1.15 |
=item changing (0|1) |
158 |
|
|
|
159 |
|
|
Sets the flag FLAG_CHANGING. |
160 |
|
|
See Flags section below. |
161 |
|
|
|
162 |
elmex |
1.4 |
=item auto_apply (0|1) |
163 |
|
|
|
164 |
|
|
Sets the flag FLAG_AUTO_APPLY. |
165 |
|
|
See Flags section below. |
166 |
elmex |
1.2 |
|
167 |
elmex |
1.8 |
=item no_steal (0|1) |
168 |
|
|
|
169 |
|
|
Sets the flag FLAG_NO_STEAL. |
170 |
|
|
See Flags section below. |
171 |
|
|
|
172 |
elmex |
1.10 |
=item reflecting (0|1) |
173 |
|
|
|
174 |
|
|
Sets the flag FLAG_REFLECTING. |
175 |
|
|
See Flags section below. |
176 |
|
|
|
177 |
|
|
=item reflect_spell (0|1) |
178 |
|
|
|
179 |
|
|
Sets the flag FLAG_REFL_SPELL. |
180 |
|
|
See Flags section below. |
181 |
|
|
|
182 |
elmex |
1.9 |
=item no_skill_ident (0|1) |
183 |
|
|
|
184 |
|
|
Sets the flag FLAG_NO_SKILL_IDENT. |
185 |
|
|
See Flags section below. |
186 |
|
|
|
187 |
elmex |
1.5 |
=item activate_on_push (0|1) (default: 1) |
188 |
|
|
|
189 |
|
|
Sets the flag FLAG_ACTIVATE_ON_PUSH. |
190 |
|
|
See Flags section below. |
191 |
|
|
|
192 |
|
|
=item activate_on_release (0|1) (default: 1) |
193 |
|
|
|
194 |
|
|
Sets the flag FLAG_ACTIVATE_ON_RELEASE. |
195 |
|
|
See Flags section below. |
196 |
|
|
|
197 |
elmex |
1.2 |
=item editable (more than deprecated) |
198 |
|
|
|
199 |
|
|
This field had a special meaning for crossedit, which used parts |
200 |
elmex |
1.15 |
of the server code for editing. Wherever you see this field being |
201 |
elmex |
1.2 |
set in an archetype ignore it and/or remove it. No code interprets this |
202 |
|
|
field anymore. |
203 |
|
|
|
204 |
|
|
=back |
205 |
|
|
|
206 |
|
|
=head3 Flags |
207 |
|
|
|
208 |
|
|
Here are the effects of the flags described. |
209 |
|
|
|
210 |
elmex |
1.1 |
=over 4 |
211 |
|
|
|
212 |
elmex |
1.2 |
=item FLAG_NO_DROP |
213 |
|
|
|
214 |
|
|
An object can't be picked up and dropped. |
215 |
|
|
|
216 |
|
|
=item FLAG_APPLIED |
217 |
|
|
|
218 |
|
|
This flag mostly states whether this object has been 'applied' by the player. |
219 |
|
|
For objects that are applied by the code or have this flag set in the archetype |
220 |
|
|
it mostly means 'this object is active'. |
221 |
|
|
|
222 |
|
|
For example the player adjustments of the hp/sp/grace fields and inheritance |
223 |
|
|
of flags from objects in his inventory is toggled by this flag. |
224 |
|
|
|
225 |
|
|
=item FLAG_IS_USED_UP |
226 |
|
|
|
227 |
|
|
This flag controls whether an object is 'used up'. If it is set the 'food' field |
228 |
|
|
of the object is decreased by 1 each tick, and if it is lower or equal 0 after tha |
229 |
|
|
it is removed. |
230 |
|
|
|
231 |
|
|
If also the flag FLAG_APPLIED is set, the 'duration' field controls whether |
232 |
|
|
this object is removed or not, see the Force type below for the meaning |
233 |
|
|
of the duration field in this context. |
234 |
|
|
|
235 |
elmex |
1.3 |
If FLAG_APPLIED is not set the object is destroyed. |
236 |
|
|
|
237 |
elmex |
1.15 |
=item FLAG_CHANGING |
238 |
|
|
|
239 |
|
|
If the 'state' field of the object is 0 the object will be processed periodically. |
240 |
|
|
Otherwise it won't "change"; |
241 |
|
|
|
242 |
elmex |
1.4 |
=item FLAG_IS_A_TEMPLATE (internal use) |
243 |
|
|
|
244 |
|
|
This flag is set on the inventory of generators like CREATORs and CONVERTERs, |
245 |
|
|
or other objects that have the flags FLAG_GENERATOR and FLAG_CONTENT_ON_GEN set. |
246 |
|
|
|
247 |
|
|
=item FLAG_AUTO_APPLY |
248 |
|
|
|
249 |
|
|
This flag has currently only meaning for the TREASURE type, see below. |
250 |
|
|
|
251 |
elmex |
1.5 |
=item FLAG_ACTIVATE_ON_PUSH |
252 |
|
|
|
253 |
|
|
This flag has only meaning for objects that can be linked together |
254 |
|
|
with the 'connected' field and controls wether the object should |
255 |
|
|
be activated when the connection is 'pushed' or it is 'released'. |
256 |
|
|
|
257 |
elmex |
1.14 |
What 'pushed' and 'released' means depends on the object that |
258 |
|
|
activates the connection. |
259 |
|
|
|
260 |
elmex |
1.5 |
This flag is by default on. |
261 |
|
|
|
262 |
|
|
=item FLAG_ACTIVATE_ON_RELEASE |
263 |
|
|
|
264 |
|
|
This flag has only meaning for objects that can be linked together |
265 |
|
|
with the 'connected' field and controls wether the object should |
266 |
|
|
be activated when the connection is 'pushed' or it is 'released'. |
267 |
|
|
|
268 |
elmex |
1.14 |
What 'pushed' and 'released' means depends on the object that |
269 |
|
|
activates the connection. |
270 |
|
|
|
271 |
elmex |
1.5 |
This flag is by default on. |
272 |
|
|
|
273 |
elmex |
1.8 |
=item FLAG_NO_STEAL |
274 |
|
|
|
275 |
|
|
When this flag is set this object can't be stolen. The flag will be |
276 |
|
|
resetted once the object is placed on a map. |
277 |
|
|
|
278 |
|
|
When this flag is set on a monster it can defent attempts of stealing |
279 |
|
|
(but in this context the flag is only used internally). |
280 |
|
|
|
281 |
elmex |
1.9 |
=item FLAG_NO_SKILL_IDENT |
282 |
|
|
|
283 |
|
|
This flag is mostly used internal and prevents unidentified objects |
284 |
|
|
(objects which don't have FLAG_IDENTIFIED set) being identified by |
285 |
|
|
skills. |
286 |
|
|
|
287 |
|
|
This flag is used to mark objects to never being identified by a skill |
288 |
|
|
once a player failed to identify an object. So that multiple tries |
289 |
|
|
of identifying aren't more effective than one. |
290 |
|
|
|
291 |
elmex |
1.10 |
=item FLAG_REFLECTING |
292 |
|
|
|
293 |
elmex |
1.12 |
This flag is used by spell effects (eg. SP_BOLT), THROWN_OBJ and ARROW |
294 |
elmex |
1.10 |
to indicate whether this object reflects off walls. |
295 |
|
|
|
296 |
|
|
=item FLAG_REFL_SPELL |
297 |
|
|
|
298 |
|
|
This flag indicates whether something reflects spells, like spell reflecting |
299 |
|
|
amuletts. |
300 |
|
|
|
301 |
elmex |
1.1 |
=back |
302 |
|
|
|
303 |
elmex |
1.15 |
=head2 Description of type specific fields and behaviour |
304 |
elmex |
1.1 |
|
305 |
|
|
The beginning of the headers of the following subsection |
306 |
|
|
are the server internal names for the objects types, see include/define.h. |
307 |
|
|
|
308 |
elmex |
1.4 |
=head3 TRANSPORT - type 2 - Player transports |
309 |
|
|
|
310 |
|
|
This type is implemented by the transport extension and has currently no special |
311 |
elmex |
1.15 |
fields that affect it. |
312 |
elmex |
1.4 |
|
313 |
|
|
=head3 ROD - type 3 - Rods that fire spells |
314 |
|
|
|
315 |
|
|
Rods contain spells and can be fired by a player. |
316 |
|
|
|
317 |
|
|
=over 4 |
318 |
|
|
|
319 |
|
|
=item level <number> |
320 |
|
|
|
321 |
elmex |
1.15 |
This field is used for calculating the spell level that can be fired |
322 |
elmex |
1.4 |
with this rod, it's also the maximum level of the spell that can be fired. |
323 |
|
|
The level of the spell that is being fired depends mostly on |
324 |
|
|
the 'use magic item' skill level of the player and 1/10 of the level of the |
325 |
|
|
rod is added as bonus. |
326 |
|
|
|
327 |
|
|
=item hp <number> |
328 |
|
|
|
329 |
|
|
The amount of spellpoints this rod has left. |
330 |
|
|
|
331 |
|
|
=item maxhp <number> |
332 |
|
|
|
333 |
|
|
The maximum amount of spellpoints this rod has. |
334 |
|
|
|
335 |
|
|
=item skill <skill name> |
336 |
|
|
|
337 |
|
|
This field determines which skill you need to apply this object. |
338 |
|
|
|
339 |
|
|
=back |
340 |
|
|
|
341 |
|
|
=head3 TREASURE - type 4 - Treasures |
342 |
|
|
|
343 |
|
|
This type of objects are for random treasure generation in maps. |
344 |
|
|
If this object is applied by a player it will replace itself with it's |
345 |
|
|
inventory. If it is automatically applied |
346 |
|
|
generate a treasure and replace itself with the generated treasure. |
347 |
|
|
|
348 |
|
|
Chests are also of this type, their treasures are generated by |
349 |
|
|
the auto apply code on map instantiation. |
350 |
|
|
|
351 |
|
|
=over 4 |
352 |
|
|
|
353 |
|
|
=item hp <number> |
354 |
|
|
|
355 |
|
|
The number of treasures to generate. |
356 |
|
|
|
357 |
|
|
=item exp <level> |
358 |
|
|
|
359 |
|
|
If FLAG_AUTO_APPLY is not set the exp field has no further meaning |
360 |
|
|
and the difficulty for the treasurecode only depends on the maps difficulty, |
361 |
|
|
otherwise the exp field has the following meaning: |
362 |
|
|
|
363 |
|
|
If this field is not 0 it is passed as the difficulty |
364 |
|
|
to the treasure generation code to determine how good, how much |
365 |
|
|
worth a treasure is or what bonuses it is given by the treasure code. |
366 |
|
|
|
367 |
|
|
If this field is not set or 0 the difficulty of the map is passed to the treasure |
368 |
|
|
generation code. |
369 |
|
|
|
370 |
|
|
=item randomitems <treasurelist> |
371 |
|
|
|
372 |
|
|
The treasurelist to use to generate the treasure which is put in the |
373 |
|
|
treasure objects inventory. |
374 |
|
|
|
375 |
|
|
=back |
376 |
|
|
|
377 |
|
|
=head3 POTION - type 5 - Potions for drinking and other nastynesses |
378 |
|
|
|
379 |
|
|
These objects contain a spell and will emit it on apply, which most |
380 |
|
|
of the time has the meaning of 'drinking'. |
381 |
|
|
|
382 |
|
|
If no resistancy field, stat field or attacktype is set and no spell |
383 |
|
|
is put in the potion by the sp field or the randomitems the |
384 |
|
|
potion will become an artifact and the artifact code decides which kind |
385 |
|
|
of potion will be generated. |
386 |
|
|
|
387 |
|
|
If the potion has FLAG_CURSED or FLAG_DAMNED set the usage of this potion |
388 |
|
|
will yield an explosion and hurt the player. |
389 |
|
|
|
390 |
|
|
=over 4 |
391 |
|
|
|
392 |
|
|
=item Str, Dex, Con, Int, Wis, Cha, Pow <number> |
393 |
|
|
|
394 |
|
|
These stat fields determine how many stat points the player gets |
395 |
|
|
when he applies this potion. |
396 |
|
|
|
397 |
|
|
If FLAG_CURSED or FLAG_DAMNED is set the player will loose that many stat points. |
398 |
|
|
|
399 |
|
|
=item sp <number> |
400 |
|
|
|
401 |
|
|
If this field is set and the randomitems field is not set |
402 |
|
|
the field is interpreted as spell number, please look the right |
403 |
|
|
number up in common/loader.C. |
404 |
|
|
|
405 |
|
|
If this field is set the randomitems field will be unset by the |
406 |
|
|
map loading code. |
407 |
|
|
|
408 |
|
|
=item attacktype <attacktype> |
409 |
|
|
|
410 |
|
|
This field has some special meaning in potions, currently the |
411 |
|
|
bits for AT_DEPLETE and AT_GODPOWER control whethere this is a |
412 |
|
|
restoration potion or improvement potion. |
413 |
|
|
See include/attackinc.h for the bits of these types. |
414 |
|
|
|
415 |
|
|
If AT_DEPLETE is set the player will be restored and the ARCH_DEPLETION |
416 |
|
|
will be removed from him. If the potion has FLAG_CURSED or FLAG_DAMNED |
417 |
|
|
set the player will be drained a random stat by inserting an ARCH_DEPLETION |
418 |
|
|
into him. |
419 |
|
|
|
420 |
|
|
If AT_GODPOWER is enabled the player will gain +1 maxvalue in his hp, sp or grace stat. |
421 |
|
|
When the potion has FLAG_CURSED or FLAG_DAMNED set he will loose one in one of these stats. |
422 |
|
|
|
423 |
|
|
=item resist_<resistancy> <number> |
424 |
|
|
|
425 |
|
|
If this stat is set and no spell is in the potion the potion |
426 |
|
|
will create a force that give the player this specific resistancy. |
427 |
|
|
The forces type will be changed to POTION_EFFECT (see POTION_EFFECT type below) |
428 |
|
|
and the potion will last 10 times longer than the default force archetype |
429 |
|
|
FORCE_NAME (at the moment of this writing spell/force.arc). |
430 |
|
|
|
431 |
|
|
=item randomitems <treasurelist> |
432 |
|
|
|
433 |
|
|
The inventory/spell of the potion will be created by calling the treasure code |
434 |
|
|
with the treasurelist specified here. (I guess it's highly undefined what |
435 |
|
|
happens if there is not a spell in the potions inventory). |
436 |
|
|
|
437 |
|
|
=item on_use_yield <archetype> |
438 |
elmex |
1.3 |
|
439 |
elmex |
1.7 |
When this object is applied an instance of <archetype> will be created. |
440 |
elmex |
1.3 |
|
441 |
elmex |
1.4 |
=item subtypes <potion subtype> |
442 |
elmex |
1.3 |
|
443 |
elmex |
1.4 |
see include/spells.h for possible potion subtypes, there are currently 4: |
444 |
elmex |
1.3 |
|
445 |
|
|
=over 4 |
446 |
|
|
|
447 |
elmex |
1.4 |
=item POT_SPELL |
448 |
|
|
|
449 |
|
|
Unused, default behaiour of a potion. |
450 |
|
|
|
451 |
|
|
=item POT_DUST |
452 |
|
|
|
453 |
|
|
This potion can be thrown to cast the spell that it has in it's inventory, |
454 |
|
|
the behaviour is not defined if there is not a spell in the inventory and the |
455 |
|
|
server will log an error. |
456 |
|
|
|
457 |
|
|
=item POT_FIGURINE |
458 |
|
|
|
459 |
|
|
Unused, default behaiour of a potion. |
460 |
elmex |
1.3 |
|
461 |
elmex |
1.4 |
=item POT_BALM |
462 |
elmex |
1.3 |
|
463 |
elmex |
1.4 |
Unused, default behaiour of a potion. |
464 |
elmex |
1.3 |
|
465 |
elmex |
1.4 |
=back |
466 |
elmex |
1.3 |
|
467 |
|
|
=back |
468 |
|
|
|
469 |
elmex |
1.7 |
=head3 FOOD - type 6 - Eatable stuff |
470 |
|
|
|
471 |
|
|
This is for objects that are representing general eatables like |
472 |
|
|
beef or bread. |
473 |
|
|
|
474 |
|
|
The main difference between FOOD, FLESH and DRINK is that they |
475 |
|
|
give different messages. |
476 |
|
|
|
477 |
|
|
The specialty of FLESH is that it inherits the resistancies of the |
478 |
|
|
monsters it was generated in and will let dragons raise their resistancies |
479 |
elmex |
1.8 |
with that. If the monster has the POISON attacktype the FLESH |
480 |
|
|
will change into POISON. |
481 |
elmex |
1.7 |
|
482 |
|
|
If a player runs low on food he will grab for FOOD, DRINK and POISON |
483 |
|
|
and if he doesn't find any of that he will start eating FLESH. |
484 |
|
|
|
485 |
|
|
=over 4 |
486 |
|
|
|
487 |
|
|
=item title <string> |
488 |
|
|
|
489 |
|
|
If the food has a title or is cursed it is considered 'special', which means that the |
490 |
|
|
fields Str, Dex, Con, Int, Wis, Pow, resist_<resistancy>, hp and sp |
491 |
|
|
are interpreted and have further effects on the player. |
492 |
|
|
|
493 |
|
|
The higher the food field is the longer the improvement of the player lasts |
494 |
|
|
(except for hp and sp). |
495 |
|
|
|
496 |
|
|
=item food <number> |
497 |
|
|
|
498 |
|
|
This is the amount of food points the player gets when he eats this. |
499 |
|
|
|
500 |
|
|
=item on_use_yield <archetype> |
501 |
|
|
|
502 |
|
|
When this object is applied an instance of <archetype> will be created. |
503 |
|
|
|
504 |
|
|
=back |
505 |
|
|
|
506 |
elmex |
1.8 |
=head3 POISON - type 7 - Poisonous stuff |
507 |
|
|
|
508 |
|
|
This type is for objects that can poison the player when drinking. |
509 |
|
|
When applied it will hit the attacked with AT_POISON and will create |
510 |
|
|
a POISONING object in the one who was hit. |
511 |
|
|
|
512 |
|
|
=over 4 |
513 |
|
|
|
514 |
|
|
=item level <number> |
515 |
|
|
|
516 |
|
|
This field affects the propability of poisoning. The higher the level difference |
517 |
|
|
between the one who is hit and the poision the mose propable it is the attacked |
518 |
|
|
one will be poisoned. |
519 |
|
|
|
520 |
|
|
=item slaying <race> |
521 |
|
|
|
522 |
|
|
On poison this field has the usual meaning of 'slaying', when the |
523 |
|
|
ones race matches the slaying field the damage done by the poison |
524 |
|
|
is multiplied by 3. |
525 |
|
|
|
526 |
|
|
=item hp <number> |
527 |
|
|
|
528 |
|
|
This is the amount of damage the player will receive from applying this. The |
529 |
|
|
attacktype AT_POISON will be used to hit the player and the damage will |
530 |
|
|
determine the strenght, duration and depletion of stats of the poisoning. The |
531 |
|
|
created POISONING object which is being placed in the one who was attacked will |
532 |
|
|
get the damage from this field (which is maybe adjusted by slaying or the |
533 |
|
|
resistancies). |
534 |
|
|
|
535 |
|
|
=item food <number> |
536 |
|
|
|
537 |
|
|
1/4 of <number> will be drained from the players food. |
538 |
|
|
|
539 |
|
|
=item on_use_yield <archetype> |
540 |
|
|
|
541 |
|
|
When this object is applied an instance of <archetype> will be created. |
542 |
|
|
|
543 |
|
|
=back |
544 |
|
|
|
545 |
elmex |
1.9 |
=head3 BOOK - type 8 - Readable books |
546 |
|
|
|
547 |
|
|
This type is basically for representing text books in the game. |
548 |
|
|
|
549 |
|
|
Reading a book also identifys it (if FLAG_NO_SKILL_IDENT is not set). |
550 |
|
|
|
551 |
|
|
=over 4 |
552 |
|
|
|
553 |
|
|
=item msg <text> |
554 |
|
|
|
555 |
|
|
This is the contents of the book. When this field is unset |
556 |
|
|
at treasure generation a random text will be inserted. |
557 |
|
|
|
558 |
|
|
=item skill <skill name> |
559 |
|
|
|
560 |
|
|
The skill required to read this book. (The most resonable |
561 |
|
|
skill would be literacy). |
562 |
|
|
|
563 |
|
|
=item exp <number> |
564 |
|
|
|
565 |
|
|
The experience points the player get for reading this book. |
566 |
|
|
|
567 |
|
|
=item subtype <readable subtype> |
568 |
|
|
|
569 |
|
|
This field determines the type of the readable. |
570 |
|
|
Please see common/readable.C in the readable_message_types table. |
571 |
|
|
|
572 |
|
|
=back |
573 |
|
|
|
574 |
elmex |
1.10 |
=head3 CLOCK - type 9 - Clocks |
575 |
|
|
|
576 |
|
|
This type of objects just display the time when being applied. |
577 |
|
|
|
578 |
elmex |
1.12 |
=head3 LIGHTNING - type 12 - Lightnings (DEPRECATED, see SPELL_EFFECT subtype SP_BOLT) |
579 |
elmex |
1.10 |
|
580 |
|
|
This is a spell effect of a moving bolt. It moves straigt forward |
581 |
|
|
through the map until something blocks it. |
582 |
|
|
If FLAG_REFLECTING is set it even reflects on walls. |
583 |
|
|
|
584 |
|
|
FLAG_IS_TURNABLE should be set on these objects. |
585 |
|
|
|
586 |
|
|
=over 4 |
587 |
|
|
|
588 |
elmex |
1.11 |
=item move_type <movetype> |
589 |
|
|
|
590 |
|
|
This field affects the move type with which the lightning moves through |
591 |
|
|
the map and which map cells will reflect or block it. |
592 |
|
|
|
593 |
elmex |
1.10 |
=item attacktype <attacktype> |
594 |
|
|
|
595 |
|
|
The attacktype with which it hits the objects on the map. |
596 |
|
|
|
597 |
|
|
=item dam <number> |
598 |
|
|
|
599 |
|
|
The damage this bolt inflicts when it hits objects on the map. |
600 |
|
|
|
601 |
|
|
=item Dex <number> |
602 |
|
|
|
603 |
|
|
This is the fork percentage, it is reduced by 10 per fork. |
604 |
|
|
And the damage is halved on each fork. |
605 |
|
|
|
606 |
|
|
=item Con <number> |
607 |
|
|
|
608 |
|
|
This value is a percentage of which the forking lightning |
609 |
|
|
is deflected to the left. This value should be mostly used internally. |
610 |
|
|
|
611 |
|
|
=item duration <number> |
612 |
|
|
|
613 |
|
|
The duration the bolt stays on a map cell. This field is decreased each time |
614 |
|
|
the object is processed (see the meaning of speed and speed_left fields in |
615 |
|
|
the object general description). |
616 |
|
|
|
617 |
|
|
=item range <number> |
618 |
|
|
|
619 |
|
|
This is the range of the bolt, each space it advances this field is decreased. |
620 |
|
|
|
621 |
|
|
=back |
622 |
|
|
|
623 |
elmex |
1.14 |
=head3 ARROW - type 13 - Arrows |
624 |
|
|
|
625 |
|
|
This is the type for objects that represent projectiles like arrows. |
626 |
|
|
The movement of THROWN_OBJs behave similar to this type. |
627 |
|
|
|
628 |
|
|
Flying arrows are stopped either when they hit something blocking |
629 |
|
|
(move_block) or something which is alive. |
630 |
|
|
If it hits something that is alive, which doesn't have FLAG_REFL_MISSILE |
631 |
|
|
set, it will inflict damage. If FLAG_REFL_MISSILE is set it will inflict |
632 |
|
|
damage with a small chance which is affected by the 'level' field of the arrow. |
633 |
|
|
|
634 |
|
|
If FLAG_REFLECTING is set on the arrow it will bounce off everything |
635 |
|
|
that is not alive and blocks it's movement. |
636 |
|
|
|
637 |
|
|
When an arrow is being shot it's dam, wc, attacktype, slaying fields will |
638 |
|
|
be saved in the sp, hp, grace and spellarg fields of the object, to restore them |
639 |
|
|
once the arrow has been stopped. |
640 |
|
|
|
641 |
|
|
=over 4 |
642 |
|
|
|
643 |
|
|
=item dam <number> |
644 |
|
|
|
645 |
|
|
The amount of damage that is being done to the victim that gets hit. |
646 |
|
|
This field is recomputed when the arrow is fired and will consist |
647 |
|
|
of the sum of a damage bonus (see description of the BOW type), |
648 |
|
|
the arrows 'dam' field, the bows 'dam' field, the bows 'magic' field |
649 |
|
|
and the arrows magic field. |
650 |
|
|
|
651 |
|
|
=item wc <number> |
652 |
|
|
|
653 |
|
|
The weaponclass of the arrow, which has effect on the propability of hitting. |
654 |
|
|
|
655 |
|
|
It is recomputed when the arrow is being fired by this formula: |
656 |
|
|
|
657 |
|
|
wc = 20 - bow->magic - arrow->magic - (skill->level or shooter->level) |
658 |
|
|
- dex_bonus - thaco_bonus - arrow->stats.wc - bow->stats.wc + wc_mod |
659 |
|
|
|
660 |
|
|
When the arrow is not being shot by an player dex_bonus and thaco_bonus and the |
661 |
|
|
level is not added. |
662 |
|
|
|
663 |
|
|
The wc_mod is dependend on the fire mode of the bow. For a more detailed |
664 |
|
|
explanation of dex_bonus, thaco_bonus and wc_mod please consult the code. |
665 |
|
|
|
666 |
|
|
=item magic <number> |
667 |
|
|
|
668 |
|
|
This field is added to the damage of the arrow when it is shot and |
669 |
|
|
will also improve it's speed by 1/5 of it's value. |
670 |
|
|
|
671 |
|
|
=item attacktype <attacktype> |
672 |
|
|
|
673 |
|
|
Bitfield which decides the attacktype of the damage, see include/attackinc.h |
674 |
|
|
On fireing the attacktype of the bow is added to the arrows attacktype. |
675 |
|
|
|
676 |
|
|
=item level <number> (interally used) |
677 |
|
|
|
678 |
|
|
The level of the arrow, this affects the propability of piercing FLAG_REFL_MISSILE, |
679 |
|
|
see above in the ARROW description. |
680 |
|
|
|
681 |
|
|
The level is set when the arrow is fired to either the skill level or the |
682 |
|
|
shooters level. |
683 |
|
|
|
684 |
|
|
=item speed <number> (internal) |
685 |
|
|
|
686 |
|
|
This field shouldn't be set directly in the archetype, the arrow will get it's |
687 |
|
|
speed from the bow. This fields value has to be atleast 0.5 or otherwise the |
688 |
|
|
arrow will be stopped immediatly. |
689 |
|
|
|
690 |
|
|
On fireing the speed of the arrow is computed of 1/5 of the |
691 |
|
|
sum of the damage bonus (see BOW), bow magic and arrow magic. After that 1/7 |
692 |
|
|
of the bows 'dam' field is added to the speed of the arrow. |
693 |
|
|
|
694 |
|
|
The minimum speed of an arrow is 1.0. |
695 |
|
|
|
696 |
|
|
While flying the arrows speed is decreased by 0.05 each time it's moved. |
697 |
|
|
|
698 |
|
|
If the speed is above 10.0 it goes straight through the creature it hits and |
699 |
|
|
it's speed is reduced by 1. If the speed is lower or equal 10.0 the arrow is |
700 |
|
|
stopped and either sticked into the victim (see weight field description) or |
701 |
|
|
put on it's map square (if it didn't break, see description of the food field). |
702 |
|
|
|
703 |
|
|
=item weight <number> |
704 |
|
|
|
705 |
|
|
This field is the weight of the arrow, if the weight is below or equal 5000 (5 kg) |
706 |
|
|
the arrow will stick in the victim it hits. Otherwise it will fall to the ground. |
707 |
|
|
|
708 |
|
|
=item food <number> |
709 |
|
|
|
710 |
|
|
The breaking percentage. 100% means: breaks on usage for sure. |
711 |
|
|
|
712 |
|
|
=item inventory (internal) |
713 |
|
|
|
714 |
|
|
If the flying/moving object has something in it's inventory and it stops, it |
715 |
|
|
will be replaced with it's inventory. Otherwise it will be handled as usual, |
716 |
|
|
which means: it will be calculated whether the arrow breaks and it will be |
717 |
|
|
reset for reuse. |
718 |
|
|
|
719 |
|
|
=item slaying <string> |
720 |
|
|
|
721 |
|
|
When the bow that fires this arrow has it's slaying field set it is copied |
722 |
|
|
to the arrows slaying field. Otherwise the arrows slaying field remains. |
723 |
|
|
|
724 |
|
|
=item move_type <movetype> (internally used) |
725 |
|
|
|
726 |
|
|
This field is set when the arrow is shot to MOVE_FLY_LOW. |
727 |
|
|
|
728 |
|
|
=item move_on <movetype> (internally used) |
729 |
|
|
|
730 |
|
|
This field is set when the arrow is shot to MOVE_FLY_LOW and MOVE_WALK. |
731 |
|
|
|
732 |
|
|
=item race <string> |
733 |
|
|
|
734 |
|
|
The race field is a unique key that assigns arrows, bows and quivers. When |
735 |
|
|
shooting an arrow the bows race is used to search for arrows (which have the |
736 |
|
|
same race as the bow) in the players inventory and will recursively search in |
737 |
|
|
the containers (which are applied and have the same race as the bow and the arrow). |
738 |
|
|
|
739 |
|
|
=back |
740 |
|
|
|
741 |
|
|
=head3 BOW - type 14 - Bows, those that fire ARROWs |
742 |
|
|
|
743 |
|
|
TODO, but take into account ARROW description above |
744 |
elmex |
1.10 |
|
745 |
elmex |
1.1 |
=head3 WEAPON - type 15 - Weapons |
746 |
|
|
|
747 |
|
|
This type is for general hack and slash weapons like swords, maces |
748 |
|
|
and daggers and and .... |
749 |
|
|
|
750 |
|
|
=over 4 |
751 |
|
|
|
752 |
|
|
=item weapontype <type id> |
753 |
|
|
|
754 |
|
|
decides what attackmessages are generated, see include/define.h |
755 |
|
|
|
756 |
|
|
=item attacktype <bitmask> |
757 |
|
|
|
758 |
|
|
bitfield which decides the attacktype of the damage, see include/attackinc.h |
759 |
|
|
|
760 |
elmex |
1.2 |
=item dam <number> |
761 |
elmex |
1.1 |
|
762 |
|
|
amount of damage being done with the attacktype |
763 |
|
|
|
764 |
|
|
=item item_power <level> |
765 |
|
|
|
766 |
|
|
the itempower of this weapon. |
767 |
|
|
|
768 |
|
|
=item name |
769 |
|
|
|
770 |
|
|
the name of the weapon. |
771 |
|
|
|
772 |
|
|
=item level (internal) |
773 |
|
|
|
774 |
|
|
The improvement state of the weapon. |
775 |
|
|
If this field is greater than 0 the 'name' field starts with the |
776 |
|
|
characters name who improved this weapon. |
777 |
|
|
|
778 |
|
|
=item last_eat (internal) |
779 |
|
|
|
780 |
|
|
seems to be the amount of improvements of a weapon, |
781 |
|
|
the formular for equipping a weapon seems to be (server/apply.C:check_weapon_power): |
782 |
|
|
|
783 |
|
|
((who->level / 5) + 5) >= op->last_eat |
784 |
|
|
|
785 |
|
|
=item last_sp |
786 |
|
|
|
787 |
|
|
the weapon speed (see magic description) |
788 |
|
|
|
789 |
elmex |
1.2 |
=item food <number> |
790 |
elmex |
1.1 |
|
791 |
|
|
addition to food regeneration of the player |
792 |
|
|
|
793 |
elmex |
1.2 |
=item hp <number> |
794 |
elmex |
1.1 |
|
795 |
|
|
addition to health regeneration |
796 |
|
|
|
797 |
elmex |
1.2 |
=item sp <number> |
798 |
elmex |
1.1 |
|
799 |
|
|
addition to mana regeneration |
800 |
|
|
|
801 |
elmex |
1.2 |
=item grace <number> |
802 |
elmex |
1.1 |
|
803 |
|
|
addititon to grace regeneration |
804 |
|
|
|
805 |
elmex |
1.2 |
=item gen_sp_armour <number> |
806 |
elmex |
1.1 |
|
807 |
elmex |
1.2 |
the players gen_sp_armour field (which is per default 10) is added the <number> amount. |
808 |
elmex |
1.1 |
gen_sp_armour seems to be a factor with which gen_sp in do_some_living() |
809 |
elmex |
1.2 |
is multiplied: gen_sp *= 10/<number> |
810 |
elmex |
1.1 |
meaning: values > 10 of gen_sp_armour limits the amout of regenerated |
811 |
|
|
spellpoints. |
812 |
|
|
|
813 |
|
|
generally this field on weapons is in ranges of 1-30 and decides the slowdown of the |
814 |
|
|
sp regeneration. |
815 |
|
|
|
816 |
|
|
=item body_<body slot/part> |
817 |
|
|
|
818 |
|
|
the part of the body you need to use this weapon, possible values should be |
819 |
|
|
looked up in common/item.C at body_locations. |
820 |
|
|
|
821 |
elmex |
1.2 |
=item resist_<resistnacy> <number> |
822 |
elmex |
1.1 |
|
823 |
|
|
this is the factor with which the difference of the players resistancy and 100% |
824 |
|
|
is multiplied, something like this: |
825 |
|
|
|
826 |
elmex |
1.2 |
additional_resistancy = (100 - current_resistanct) * (<number>/100) |
827 |
elmex |
1.1 |
|
828 |
elmex |
1.2 |
if <number> is negative it is added to the total vulnerabilities, |
829 |
elmex |
1.1 |
and later the total resistance is decided by: |
830 |
|
|
|
831 |
|
|
'total resistance = total protections - total vulnerabilities' |
832 |
|
|
|
833 |
|
|
see also common/living.C:fix_player |
834 |
|
|
|
835 |
|
|
=item patch_(attuned|repelled|denied) |
836 |
|
|
|
837 |
|
|
this field modifies the pathes the player is attuned to, see include/spells.h PATH_* |
838 |
|
|
for the pathes. |
839 |
|
|
|
840 |
elmex |
1.2 |
=item luck <number> |
841 |
elmex |
1.1 |
|
842 |
|
|
this luck is added to the players luck |
843 |
|
|
|
844 |
|
|
=item move_type |
845 |
|
|
|
846 |
|
|
if the weapon has a move_type set the player inherits it's move_type |
847 |
|
|
|
848 |
elmex |
1.2 |
=item exp <number> |
849 |
elmex |
1.1 |
|
850 |
elmex |
1.2 |
the added_speed and bonus_speed of the player is raised by <number>/3. |
851 |
|
|
if <number> < 0 then the added_speed is decreased by <number> |
852 |
elmex |
1.1 |
|
853 |
|
|
=item weight |
854 |
|
|
|
855 |
|
|
the weight of the weapon |
856 |
|
|
|
857 |
|
|
=item magic |
858 |
|
|
|
859 |
|
|
the magic field affects the amounts of the following fields: |
860 |
|
|
|
861 |
|
|
- wc : the players wc is adjusted by: player->wc -= (wc + magic) |
862 |
|
|
|
863 |
|
|
- ac : the players ac is lowered by (ac + magic) if (player->ac + magic) > 0 |
864 |
|
|
|
865 |
|
|
- dam: the players dam is adjusted by: player->dam += (dam + magic) |
866 |
|
|
|
867 |
|
|
- weapon speed (last_sp): weapon_speed is calculated by: (last_sp * 2 - magic) / 2 |
868 |
|
|
(minium is 0) |
869 |
|
|
|
870 |
elmex |
1.2 |
=item ac <number> |
871 |
elmex |
1.1 |
|
872 |
elmex |
1.14 |
the amount of ac points the player's ac is decreased when applying this object. |
873 |
elmex |
1.1 |
|
874 |
elmex |
1.2 |
=item wc <number> |
875 |
elmex |
1.1 |
|
876 |
elmex |
1.14 |
the amount of wc points the player's wc is decreased when applying this object. |
877 |
elmex |
1.1 |
|
878 |
|
|
=back |
879 |
|
|
|
880 |
|
|
=head4 Player inherits following flags from weapons: |
881 |
|
|
|
882 |
elmex |
1.4 |
FLAG_LIFESAVE |
883 |
|
|
FLAG_REFL_SPELL |
884 |
|
|
FLAG_REFL_MISSILE |
885 |
|
|
FLAG_STEALTH |
886 |
|
|
FLAG_XRAYS |
887 |
|
|
FLAG_BLIND |
888 |
|
|
FLAG_SEE_IN_DARK |
889 |
|
|
FLAG_UNDEAD |
890 |
|
|
|
891 |
elmex |
1.11 |
=head3 GRIMREAPER - type 28 - Grimreapers |
892 |
|
|
|
893 |
|
|
These type are mostly used for monsters, they give the |
894 |
|
|
monster the ability to dissapear after 10 hits with AT_DRAIN. |
895 |
|
|
|
896 |
|
|
=over 4 |
897 |
|
|
|
898 |
|
|
=item value <number> |
899 |
|
|
|
900 |
|
|
This field stores the hits the monster did yet. |
901 |
|
|
|
902 |
|
|
=back |
903 |
|
|
|
904 |
elmex |
1.14 |
=head3 CREATOR - type 42 - Object creators |
905 |
|
|
|
906 |
|
|
Once a creator is activated by a connection it creates a number of objects |
907 |
elmex |
1.15 |
(cloned from it's inventory or a new object derived from the archetype |
908 |
|
|
named in the other_arch slot). |
909 |
elmex |
1.14 |
|
910 |
|
|
If FLAG_LIVESAFE is set the number of uses is unlimited. |
911 |
|
|
|
912 |
|
|
=over 4 |
913 |
|
|
|
914 |
|
|
=item hp <number> |
915 |
|
|
|
916 |
|
|
If FLAG_LIVE_SAVE is not set it is the absolute number of times the creator can |
917 |
|
|
be used. |
918 |
|
|
|
919 |
|
|
=item speed <number> |
920 |
|
|
|
921 |
|
|
If speed is set the creator will create an object periodically, |
922 |
elmex |
1.15 |
see speed and speed_left fields in general object field description |
923 |
elmex |
1.14 |
for more details on how this period works. |
924 |
|
|
|
925 |
|
|
=item slaying <string> |
926 |
|
|
|
927 |
|
|
If set the generated object's name and |
928 |
|
|
title will be set to this. |
929 |
|
|
|
930 |
|
|
=item other_arch <string> |
931 |
|
|
|
932 |
elmex |
1.15 |
If the inventory of the creator is empty new objects |
933 |
|
|
will be derived from the archetype named by <string>. |
934 |
elmex |
1.14 |
|
935 |
|
|
=item connected <number> |
936 |
|
|
|
937 |
elmex |
1.15 |
See generic object field section. |
938 |
elmex |
1.14 |
|
939 |
|
|
=back |
940 |
|
|
|
941 |
elmex |
1.7 |
=head3 DRINK - type 54 - Drinkable stuff |
942 |
|
|
|
943 |
|
|
See FOOD description. |
944 |
|
|
|
945 |
elmex |
1.6 |
=head3 CHECK_INV - type 64 - Inventory checkers |
946 |
|
|
|
947 |
|
|
This object checks whether the player has a specific item in his |
948 |
|
|
inventory when he moves above the inventory checker. If the player has |
949 |
|
|
the item (or not, which can be controlled with a flag) a connection will be triggered. |
950 |
|
|
|
951 |
|
|
If you set move_block you can deny players and monsters to reach the space where |
952 |
|
|
the inventory checker is on, see 'move_block' description below. |
953 |
|
|
|
954 |
|
|
The conditions specified by hp, slaying and race are concationated with OR. |
955 |
|
|
So matching one of those conditions is enough. |
956 |
|
|
|
957 |
|
|
=over 4 |
958 |
|
|
|
959 |
|
|
=item move_block <move type bitmask> |
960 |
|
|
|
961 |
|
|
If you set this field to block a movetype the move code will block any moves |
962 |
|
|
onto the space with the inventory checker, IF the moving object doesn't have |
963 |
|
|
(or has - if last_sp = 0) the item that the checker is searching for. |
964 |
|
|
|
965 |
|
|
=item last_sp (0|1) |
966 |
|
|
|
967 |
|
|
If last_sp is 1 'having' the item that is being checked for will |
968 |
|
|
activate the connection or make the space with the checker non-blocking. |
969 |
|
|
If last_sp is 0 'not having' the item will activate the connection |
970 |
|
|
or make the space with the checker non-blocking. |
971 |
|
|
|
972 |
|
|
=item last_heal (0|1) |
973 |
|
|
|
974 |
|
|
If last_heal is 1 the matching item will be removed if the inventory checker |
975 |
|
|
activates a connection and finds the item in the inventory. |
976 |
|
|
|
977 |
|
|
(A inventory checker that blocks a space won't remove anything from inventories) |
978 |
|
|
|
979 |
|
|
=item hp <number> |
980 |
|
|
|
981 |
|
|
If this field is not 0 the inventory checker will search for an object |
982 |
|
|
with the type id <number>. |
983 |
|
|
|
984 |
|
|
=item slaying <string> |
985 |
|
|
|
986 |
|
|
If this field is set the inventory checker will search for an object that |
987 |
|
|
has the same string in the slaying field (for example a key string of a key). |
988 |
|
|
|
989 |
|
|
=item race <string> |
990 |
|
|
|
991 |
|
|
If this field is set the inventory checker will search for an object which |
992 |
|
|
has the archetype name that matches <string>. |
993 |
|
|
|
994 |
|
|
=item connected <connection id> |
995 |
|
|
|
996 |
elmex |
1.14 |
This is the connection that will be activated. The connection is |
997 |
|
|
'pushed' when someone enters the space with the inventory checker, |
998 |
|
|
and it is 'released' when he leaves it. |
999 |
|
|
|
1000 |
elmex |
1.15 |
See also the description of the connected field in the generic object field |
1001 |
elmex |
1.14 |
section. |
1002 |
elmex |
1.6 |
|
1003 |
|
|
=back |
1004 |
|
|
|
1005 |
elmex |
1.7 |
=head3 FLESH - type 72 - Organs and body parts |
1006 |
|
|
|
1007 |
|
|
See FOOD description. |
1008 |
|
|
|
1009 |
elmex |
1.11 |
=head3 MISC_OBJECT - type 79 - Misc. objects |
1010 |
|
|
|
1011 |
|
|
A type for any object that has no special behaviour. |
1012 |
|
|
|
1013 |
elmex |
1.15 |
=head3 LAMP - type 82 - A lamp |
1014 |
|
|
|
1015 |
|
|
This object makes light. |
1016 |
|
|
|
1017 |
elmex |
1.14 |
=head3 DUPLICATOR - type 83 - Duplicators or: Multiplicators |
1018 |
|
|
|
1019 |
|
|
This type of objects multiplies objects that are above it when it is activated. |
1020 |
|
|
You can even multiply by 0, which will destroy the object. |
1021 |
|
|
|
1022 |
|
|
=over 4 |
1023 |
|
|
|
1024 |
|
|
=item level <number> |
1025 |
|
|
|
1026 |
|
|
The multiplicator, if set to 0 or lower it will destroy the objects above it. |
1027 |
|
|
|
1028 |
|
|
=item other_arch <string> |
1029 |
|
|
|
1030 |
elmex |
1.15 |
The archetype name of the objects that should be multiplied. |
1031 |
elmex |
1.14 |
|
1032 |
|
|
=item connected <number> |
1033 |
|
|
|
1034 |
elmex |
1.15 |
See generic object field section. |
1035 |
elmex |
1.14 |
|
1036 |
|
|
=back |
1037 |
|
|
|
1038 |
elmex |
1.5 |
=head3 HOLE - type 94 - Holes |
1039 |
|
|
|
1040 |
|
|
Holes are holes in the ground where objects can fall through. When the hole |
1041 |
|
|
opens and/or is completly open all objects above it fall through (more |
1042 |
|
|
precisely: if their head is above the hole). |
1043 |
|
|
|
1044 |
elmex |
1.14 |
When the HOLE is activated it's speed is set to 0.5. |
1045 |
|
|
|
1046 |
elmex |
1.5 |
Trapdoors can only transfer the one who falls through to other coordinates |
1047 |
|
|
on the B<same> map. |
1048 |
|
|
|
1049 |
|
|
=over 4 |
1050 |
|
|
|
1051 |
|
|
=item maxsp (0|1) |
1052 |
|
|
|
1053 |
|
|
This field negates the state of the connection: When maxsp is 1 the pit will |
1054 |
|
|
open/close when the connection is deactivated. Otherwise it will open/close |
1055 |
|
|
when the connection is activated. This field only has effect when the |
1056 |
|
|
connection is triggered. So if you put a closed hole on a map, and the |
1057 |
|
|
connection is deactivated, and maxsp is 1 the hole will remain closed until the |
1058 |
|
|
connection was triggered once. |
1059 |
|
|
|
1060 |
|
|
=item connected <connection id> |
1061 |
|
|
|
1062 |
|
|
This is the connection id, which lets the hole opening or closing when |
1063 |
|
|
activated. The flags FLAG_ACTIVATE_ON_PUSH and FLAG_ACTIVATE_ON_RELEASE control |
1064 |
|
|
at which connection state the object is activated. |
1065 |
|
|
|
1066 |
|
|
For example: if FLAG_ACTIVATE_ON_RELEASE is set to 0 the hole won't react when |
1067 |
|
|
the connection is released. |
1068 |
|
|
|
1069 |
|
|
=item wc <number> (internal) |
1070 |
|
|
|
1071 |
|
|
This is an internal flag. If it is greater than 0 it means that the hole is not |
1072 |
|
|
yet fully open. More preciesly: this field is the animation-step and if it is |
1073 |
|
|
set to the 'closed' step of the animation the hole is closed and if it is on |
1074 |
|
|
the 'open' animation step (wc = 0), the hole is open. |
1075 |
|
|
|
1076 |
|
|
=item sp <number> |
1077 |
|
|
|
1078 |
|
|
The destination y coordinates on the same map. |
1079 |
|
|
|
1080 |
|
|
=item hp <number> |
1081 |
|
|
|
1082 |
|
|
The destination x coordinates on the same map. |
1083 |
|
|
|
1084 |
|
|
=back |
1085 |
|
|
|
1086 |
elmex |
1.8 |
=head3 POISONING - type 105 - The poisoning of players and monsters |
1087 |
|
|
|
1088 |
|
|
This type is doing the actual damage to the ones who were attacked |
1089 |
|
|
via AT_POISON (or drank POISON). |
1090 |
|
|
|
1091 |
|
|
The duration is handled via the FLAG_IS_USED_UP mechanism (please look |
1092 |
|
|
there for details). |
1093 |
|
|
|
1094 |
|
|
=over 4 |
1095 |
|
|
|
1096 |
|
|
=item dam <number> |
1097 |
|
|
|
1098 |
|
|
Each time the poisoning is processed (which is determined by the speed and speed_left |
1099 |
elmex |
1.15 |
fields, see the general object fields above) it hits the player with |
1100 |
elmex |
1.8 |
<number> damage and the AT_INTERNAL attacktype (means: it will simply |
1101 |
|
|
hit the player with no strings attached). |
1102 |
|
|
|
1103 |
|
|
=item food <number> |
1104 |
|
|
|
1105 |
|
|
Just a note: The posion is removed when food == 1 and not when |
1106 |
|
|
the whole duration is up, because the POISONING code has to remove |
1107 |
|
|
the poison-effects from the player before the FLAG_IS_USED_UP mechanism |
1108 |
|
|
deletes the POISONING object. |
1109 |
|
|
|
1110 |
|
|
=back |
1111 |
|
|
|
1112 |
elmex |
1.4 |
=head3 FORCE - type 114 - Forces |
1113 |
|
|
|
1114 |
|
|
Forces are a very 'thin' type. They don't have much behaviour other than |
1115 |
elmex |
1.5 |
disappearing after a time and/or affecting the player if they are in his |
1116 |
|
|
inventory. |
1117 |
elmex |
1.4 |
|
1118 |
|
|
Forces only take effect on the player if they have set FLAG_APPLIED. |
1119 |
|
|
|
1120 |
|
|
Whether the duration field is processed or not a tick is controlled via the |
1121 |
elmex |
1.15 |
speed and speed_left field. Look above in the generic object field description. |
1122 |
elmex |
1.4 |
|
1123 |
elmex |
1.7 |
NOTE: Setting FLAG_IS_USED_UP on an force will also consider the 'food' field |
1124 |
|
|
like stated above in the FLAG_IS_USED_UP description. BUT: If the food field reaches |
1125 |
|
|
0 before duration and FLAG_APPLIED is set, the force will last for 'duration'. |
1126 |
|
|
If the FLAG_APPLIED is not set the force is removed when food reaches 0. |
1127 |
|
|
Generally this means: FLAG_IS_USED_UP doesn't have good semantics on forces. |
1128 |
|
|
|
1129 |
elmex |
1.4 |
=over 4 |
1130 |
|
|
|
1131 |
|
|
=item duration |
1132 |
|
|
|
1133 |
elmex |
1.5 |
While this field is greater than 0 the force/object is not destroyed. It is |
1134 |
|
|
decreased each tick by 1. |
1135 |
elmex |
1.4 |
|
1136 |
|
|
If it reaches 0 the force/object is destroyed. |
1137 |
|
|
|
1138 |
|
|
This field can have this meaning for B<any> object if that object has |
1139 |
|
|
FLAG_IS_USED_UP and FLAG_APPLIED set. See the description of FLAG_IS_USED_UP |
1140 |
|
|
what happens then. |
1141 |
|
|
|
1142 |
|
|
=back |
1143 |
|
|
|
1144 |
|
|
=head3 POTION_EFFECT - type 115 - Potion effects (resistancies) |
1145 |
|
|
|
1146 |
elmex |
1.5 |
This object is generated by the POTION code when the potion is a resistance |
1147 |
|
|
giving potion. It has mainly the same behaviour as a FORCE. |
1148 |
elmex |
1.4 |
|
1149 |
|
|
The specialty of the potion effect is that the resistancy it gives is absolute, |
1150 |
elmex |
1.5 |
so if you drin a resistancy potion of fire+60 you will get 60% resistancy to |
1151 |
|
|
fire. |
1152 |
elmex |
1.4 |
|
1153 |
|
|
Multiple potion effects only give you the maximum of their resistancy. |