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.3 by elmex, Mon Dec 18 12:11:08 2006 UTC vs.
Revision 1.7 by elmex, Tue Dec 19 21:06:08 2006 UTC

74For players this field reflects the duration of the invisibility 74For players this field reflects the duration of the invisibility
75and is decreased every tick by 1. 75and is decreased every tick by 1.
76 76
77For non-player objects this field is not changed by server ticks. 77For non-player objects this field is not changed by server ticks.
78 78
79=item speed <numeric> 79=item speed <number>
80 80
81If this field is greater than MIN_ACTIVE_SPEED (~0.0001) the object is placed 81If this field is greater than MIN_ACTIVE_SPEED (~0.0001) the object is placed
82on the active object list and will be processed each tick (see also speed_left!). 82on the active object list and will be processed each tick (see also speed_left!).
83 83
84If the speed field drops below the MIN_ACTIVE_SPEED the object is removed 84If the speed field drops below the MIN_ACTIVE_SPEED the object is removed
94 94
95If the object is on the active list and speed_left is lower or 95If the object is on the active list and speed_left is lower or
96equal to 0 the absolute value of the speed field is added to speed_left 96equal to 0 the absolute value of the speed field is added to speed_left
97on the end of the tick. 97on the end of the tick.
98 98
99This means: the lower the speed field is (but still above MIN_ACTIVE_SPEED)
100the more seldom the object is processed. And the higher the speed field is
101the more often the object is processed.
102
99=item no_drop (0|1) 103=item no_drop (0|1)
100 104
101Sets the flag FLAG_NO_DROP. See the Flags section below. 105Sets the flag FLAG_NO_DROP.
106See Flags section below.
102 107
103=item applied (0|1) 108=item applied (0|1)
104 109
105Sets the flag FLAG_APPLIED. See the Flags section below. 110Sets the flag FLAG_APPLIED.
111See Flags section below.
106 112
107=item is_used_up (0|1) 113=item is_used_up (0|1)
108 114
109Sets the flag FLAG_IS_USED_UP. See Flags section below. 115Sets the flag FLAG_IS_USED_UP.
116See Flags section below.
117
118=item auto_apply (0|1)
119
120Sets the flag FLAG_AUTO_APPLY.
121See Flags section below.
122
123=item activate_on_push (0|1) (default: 1)
124
125Sets the flag FLAG_ACTIVATE_ON_PUSH.
126See Flags section below.
127
128=item activate_on_release (0|1) (default: 1)
129
130Sets the flag FLAG_ACTIVATE_ON_RELEASE.
131See Flags section below.
110 132
111=item editable (more than deprecated) 133=item editable (more than deprecated)
112 134
113This field had a special meaning for crossedit, which used parts 135This field had a special meaning for crossedit, which used parts
114of the server code for editing. Wherever you see this attribute being 136of the server code for editing. Wherever you see this attribute being
146this object is removed or not, see the Force type below for the meaning 168this object is removed or not, see the Force type below for the meaning
147of the duration field in this context. 169of the duration field in this context.
148 170
149If FLAG_APPLIED is not set the object is destroyed. 171If FLAG_APPLIED is not set the object is destroyed.
150 172
173=item FLAG_IS_A_TEMPLATE (internal use)
174
175This flag is set on the inventory of generators like CREATORs and CONVERTERs,
176or other objects that have the flags FLAG_GENERATOR and FLAG_CONTENT_ON_GEN set.
177
178=item FLAG_AUTO_APPLY
179
180This flag has currently only meaning for the TREASURE type, see below.
181
182=item FLAG_ACTIVATE_ON_PUSH
183
184This flag has only meaning for objects that can be linked together
185with the 'connected' field and controls wether the object should
186be activated when the connection is 'pushed' or it is 'released'.
187
188This flag is by default on.
189
190=item FLAG_ACTIVATE_ON_RELEASE
191
192This flag has only meaning for objects that can be linked together
193with the 'connected' field and controls wether the object should
194be activated when the connection is 'pushed' or it is 'released'.
195
196This flag is by default on.
197
151=back 198=back
152 199
153=head2 Description of type specific attributes 200=head2 Description of type specific attributes
154 201
155The beginning of the headers of the following subsection 202The beginning of the headers of the following subsection
156are the server internal names for the objects types, see include/define.h. 203are the server internal names for the objects types, see include/define.h.
157The numeric values are maybe not 100% accurate, as the code is a changing
158target, please consult include/define.h in doubt :-)
159 204
160=head3 FORCE - type 114 - Forces 205=head3 TRANSPORT - type 2 - Player transports
161 206
162Forces are a very 'thin' type. They don't have much behaviour other than 207This type is implemented by the transport extension and has currently no special
163disappearing after a time and/or affecting the player if they are in his inventory. 208attributes that affect it.
164 209
165Forces only take effect on the player if they have set FLAG_APPLIED. 210=head3 ROD - type 3 - Rods that fire spells
166 211
167Whether the duration field is processed or not a tick is controlled via the 212Rods contain spells and can be fired by a player.
168speed and speed_left field. Look above at the generic description of these
169fields.
170 213
171=over 4 214=over 4
172 215
173=item duration 216=item level <number>
174 217
175While this field is greater than 0 the force/object is not destroyed. 218This attribute is used for calculating the spell level that can be fired
176It is decreased each tick by 1. 219with this rod, it's also the maximum level of the spell that can be fired.
220The level of the spell that is being fired depends mostly on
221the 'use magic item' skill level of the player and 1/10 of the level of the
222rod is added as bonus.
177 223
178If it reaches 0 the force/object is destroyed. 224=item hp <number>
179 225
180This field can have this meaning for B<any> object if that object has 226The amount of spellpoints this rod has left.
181FLAG_IS_USED_UP and FLAG_APPLIED set. See the description of FLAG_IS_USED_UP 227
182what happens then. 228=item maxhp <number>
229
230The maximum amount of spellpoints this rod has.
231
232=item skill <skill name>
233
234This field determines which skill you need to apply this object.
235
236=back
237
238=head3 TREASURE - type 4 - Treasures
239
240This type of objects are for random treasure generation in maps.
241If this object is applied by a player it will replace itself with it's
242inventory. If it is automatically applied
243generate a treasure and replace itself with the generated treasure.
244
245Chests are also of this type, their treasures are generated by
246the auto apply code on map instantiation.
247
248=over 4
249
250=item hp <number>
251
252The number of treasures to generate.
253
254=item exp <level>
255
256If FLAG_AUTO_APPLY is not set the exp field has no further meaning
257and the difficulty for the treasurecode only depends on the maps difficulty,
258otherwise the exp field has the following meaning:
259
260If this field is not 0 it is passed as the difficulty
261to the treasure generation code to determine how good, how much
262worth a treasure is or what bonuses it is given by the treasure code.
263
264If this field is not set or 0 the difficulty of the map is passed to the treasure
265generation code.
266
267=item randomitems <treasurelist>
268
269The treasurelist to use to generate the treasure which is put in the
270treasure objects inventory.
271
272=back
273
274=head3 POTION - type 5 - Potions for drinking and other nastynesses
275
276These objects contain a spell and will emit it on apply, which most
277of the time has the meaning of 'drinking'.
278
279If no resistancy field, stat field or attacktype is set and no spell
280is put in the potion by the sp field or the randomitems the
281potion will become an artifact and the artifact code decides which kind
282of potion will be generated.
283
284If the potion has FLAG_CURSED or FLAG_DAMNED set the usage of this potion
285will yield an explosion and hurt the player.
286
287=over 4
288
289=item Str, Dex, Con, Int, Wis, Cha, Pow <number>
290
291These stat fields determine how many stat points the player gets
292when he applies this potion.
293
294If FLAG_CURSED or FLAG_DAMNED is set the player will loose that many stat points.
295
296=item sp <number>
297
298If this field is set and the randomitems field is not set
299the field is interpreted as spell number, please look the right
300number up in common/loader.C.
301
302If this field is set the randomitems field will be unset by the
303map loading code.
304
305=item attacktype <attacktype>
306
307This field has some special meaning in potions, currently the
308bits for AT_DEPLETE and AT_GODPOWER control whethere this is a
309restoration potion or improvement potion.
310See include/attackinc.h for the bits of these types.
311
312If AT_DEPLETE is set the player will be restored and the ARCH_DEPLETION
313will be removed from him. If the potion has FLAG_CURSED or FLAG_DAMNED
314set the player will be drained a random stat by inserting an ARCH_DEPLETION
315into him.
316
317If AT_GODPOWER is enabled the player will gain +1 maxvalue in his hp, sp or grace stat.
318When the potion has FLAG_CURSED or FLAG_DAMNED set he will loose one in one of these stats.
319
320=item resist_<resistancy> <number>
321
322If this stat is set and no spell is in the potion the potion
323will create a force that give the player this specific resistancy.
324The forces type will be changed to POTION_EFFECT (see POTION_EFFECT type below)
325and the potion will last 10 times longer than the default force archetype
326FORCE_NAME (at the moment of this writing spell/force.arc).
327
328=item randomitems <treasurelist>
329
330The inventory/spell of the potion will be created by calling the treasure code
331with the treasurelist specified here. (I guess it's highly undefined what
332happens if there is not a spell in the potions inventory).
333
334=item on_use_yield <archetype>
335
336When this object is applied an instance of <archetype> will be created.
337
338=item subtypes <potion subtype>
339
340see include/spells.h for possible potion subtypes, there are currently 4:
341
342=over 4
343
344=item POT_SPELL
345
346Unused, default behaiour of a potion.
347
348=item POT_DUST
349
350This potion can be thrown to cast the spell that it has in it's inventory,
351the behaviour is not defined if there is not a spell in the inventory and the
352server will log an error.
353
354=item POT_FIGURINE
355
356Unused, default behaiour of a potion.
357
358=item POT_BALM
359
360Unused, default behaiour of a potion.
361
362=back
363
364=back
365
366=head3 FOOD - type 6 - Eatable stuff
367
368This is for objects that are representing general eatables like
369beef or bread.
370
371The main difference between FOOD, FLESH and DRINK is that they
372give different messages.
373
374The specialty of FLESH is that it inherits the resistancies of the
375monsters it was generated in and will let dragons raise their resistancies
376with that.
377
378If a player runs low on food he will grab for FOOD, DRINK and POISON
379and if he doesn't find any of that he will start eating FLESH.
380
381=over 4
382
383=item title <string>
384
385If the food has a title or is cursed it is considered 'special', which means that the
386fields Str, Dex, Con, Int, Wis, Pow, resist_<resistancy>, hp and sp
387are interpreted and have further effects on the player.
388
389The higher the food field is the longer the improvement of the player lasts
390(except for hp and sp).
391
392=item food <number>
393
394This is the amount of food points the player gets when he eats this.
395
396=item on_use_yield <archetype>
397
398When this object is applied an instance of <archetype> will be created.
183 399
184=back 400=back
185 401
186=head3 WEAPON - type 15 - Weapons 402=head3 WEAPON - type 15 - Weapons
187 403
312 528
313the amount of ac points the player's ac is decreased 529the amount of ac points the player's ac is decreased
314 530
315=item wc <number> 531=item wc <number>
316 532
317the amount of wc points the player's ac is decreased 533the amount of wc points the player's wc is decreased
318 534
319=back 535=back
320 536
321=head4 Player inherits following flags from weapons: 537=head4 Player inherits following flags from weapons:
322 538
323 FLAG_LIFESAVE, FLAG_REFL_SPELL, FLAG_REFL_MISSILE, FLAG_STEALTH, 539 FLAG_LIFESAVE
324 FLAG_XRAYS, FLAG_BLIND, FLAG_SEE_IN_DARK, FLAG_UNDEAD 540 FLAG_REFL_SPELL
541 FLAG_REFL_MISSILE
542 FLAG_STEALTH
543 FLAG_XRAYS
544 FLAG_BLIND
545 FLAG_SEE_IN_DARK
546 FLAG_UNDEAD
547
548=head3 DRINK - type 54 - Drinkable stuff
549
550See FOOD description.
551
552=head3 CHECK_INV - type 64 - Inventory checkers
553
554This object checks whether the player has a specific item in his
555inventory when he moves above the inventory checker. If the player has
556the item (or not, which can be controlled with a flag) a connection will be triggered.
557
558If you set move_block you can deny players and monsters to reach the space where
559the inventory checker is on, see 'move_block' description below.
560
561The conditions specified by hp, slaying and race are concationated with OR.
562So matching one of those conditions is enough.
563
564=over 4
565
566=item move_block <move type bitmask>
567
568If you set this field to block a movetype the move code will block any moves
569onto the space with the inventory checker, IF the moving object doesn't have
570(or has - if last_sp = 0) the item that the checker is searching for.
571
572=item last_sp (0|1)
573
574If last_sp is 1 'having' the item that is being checked for will
575activate the connection or make the space with the checker non-blocking.
576If last_sp is 0 'not having' the item will activate the connection
577or make the space with the checker non-blocking.
578
579=item last_heal (0|1)
580
581If last_heal is 1 the matching item will be removed if the inventory checker
582activates a connection and finds the item in the inventory.
583
584(A inventory checker that blocks a space won't remove anything from inventories)
585
586=item hp <number>
587
588If this field is not 0 the inventory checker will search for an object
589with the type id <number>.
590
591=item slaying <string>
592
593If this field is set the inventory checker will search for an object that
594has the same string in the slaying field (for example a key string of a key).
595
596=item race <string>
597
598If this field is set the inventory checker will search for an object which
599has the archetype name that matches <string>.
600
601=item connected <connection id>
602
603This is the connection that will be activated.
604
605=back
606
607=head3 FLESH - type 72 - Organs and body parts
608
609See FOOD description.
610
611=head3 HOLE - type 94 - Holes
612
613Holes are holes in the ground where objects can fall through. When the hole
614opens and/or is completly open all objects above it fall through (more
615precisely: if their head is above the hole).
616
617Trapdoors can only transfer the one who falls through to other coordinates
618on the B<same> map.
619
620=over 4
621
622=item maxsp (0|1)
623
624This field negates the state of the connection: When maxsp is 1 the pit will
625open/close when the connection is deactivated. Otherwise it will open/close
626when the connection is activated. This field only has effect when the
627connection is triggered. So if you put a closed hole on a map, and the
628connection is deactivated, and maxsp is 1 the hole will remain closed until the
629connection was triggered once.
630
631=item connected <connection id>
632
633This is the connection id, which lets the hole opening or closing when
634activated. The flags FLAG_ACTIVATE_ON_PUSH and FLAG_ACTIVATE_ON_RELEASE control
635at which connection state the object is activated.
636
637For example: if FLAG_ACTIVATE_ON_RELEASE is set to 0 the hole won't react when
638the connection is released.
639
640=item wc <number> (internal)
641
642This is an internal flag. If it is greater than 0 it means that the hole is not
643yet fully open. More preciesly: this field is the animation-step and if it is
644set to the 'closed' step of the animation the hole is closed and if it is on
645the 'open' animation step (wc = 0), the hole is open.
646
647=item sp <number>
648
649The destination y coordinates on the same map.
650
651=item hp <number>
652
653The destination x coordinates on the same map.
654
655=back
656
657=head3 FORCE - type 114 - Forces
658
659Forces are a very 'thin' type. They don't have much behaviour other than
660disappearing after a time and/or affecting the player if they are in his
661inventory.
662
663Forces only take effect on the player if they have set FLAG_APPLIED.
664
665Whether the duration field is processed or not a tick is controlled via the
666speed and speed_left field. Look above at the generic description of these
667fields.
668
669NOTE: Setting FLAG_IS_USED_UP on an force will also consider the 'food' field
670like stated above in the FLAG_IS_USED_UP description. BUT: If the food field reaches
6710 before duration and FLAG_APPLIED is set, the force will last for 'duration'.
672If the FLAG_APPLIED is not set the force is removed when food reaches 0.
673Generally this means: FLAG_IS_USED_UP doesn't have good semantics on forces.
674
675=over 4
676
677=item duration
678
679While this field is greater than 0 the force/object is not destroyed. It is
680decreased each tick by 1.
681
682If it reaches 0 the force/object is destroyed.
683
684This field can have this meaning for B<any> object if that object has
685FLAG_IS_USED_UP and FLAG_APPLIED set. See the description of FLAG_IS_USED_UP
686what happens then.
687
688=back
689
690=head3 POTION_EFFECT - type 115 - Potion effects (resistancies)
691
692This object is generated by the POTION code when the potion is a resistance
693giving potion. It has mainly the same behaviour as a FORCE.
694
695The specialty of the potion effect is that the resistancy it gives is absolute,
696so if you drin a resistancy potion of fire+60 you will get 60% resistancy to
697fire.
698
699Multiple potion effects only give you the maximum of their resistancy.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines