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.2 by elmex, Mon Dec 18 12:01:20 2006 UTC vs.
Revision 1.6 by elmex, Tue Dec 19 15:30:01 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
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
99=item no_drop (0|1) 99=item no_drop (0|1)
100 100
101Sets the flag FLAG_NO_DROP. See the Flags section below. 101Sets the flag FLAG_NO_DROP.
102See Flags section below.
102 103
103=item applied (0|1) 104=item applied (0|1)
104 105
105Sets the flag FLAG_APPLIED. See the Flags section below. 106Sets the flag FLAG_APPLIED.
107See Flags section below.
106 108
107=item is_used_up (0|1) 109=item is_used_up (0|1)
108 110
109Sets the flag FLAG_IS_USED_UP. See Flags section below. 111Sets the flag FLAG_IS_USED_UP.
112See Flags section below.
113
114=item auto_apply (0|1)
115
116Sets the flag FLAG_AUTO_APPLY.
117See Flags section below.
118
119=item activate_on_push (0|1) (default: 1)
120
121Sets the flag FLAG_ACTIVATE_ON_PUSH.
122See Flags section below.
123
124=item activate_on_release (0|1) (default: 1)
125
126Sets the flag FLAG_ACTIVATE_ON_RELEASE.
127See Flags section below.
110 128
111=item editable (more than deprecated) 129=item editable (more than deprecated)
112 130
113This field had a special meaning for crossedit, which used parts 131This field had a special meaning for crossedit, which used parts
114of the server code for editing. Wherever you see this attribute being 132of the server code for editing. Wherever you see this attribute being
144 162
145If also the flag FLAG_APPLIED is set, the 'duration' field controls whether 163If also the flag FLAG_APPLIED is set, the 'duration' field controls whether
146this object is removed or not, see the Force type below for the meaning 164this object is removed or not, see the Force type below for the meaning
147of the duration field in this context. 165of the duration field in this context.
148 166
167If FLAG_APPLIED is not set the object is destroyed.
168
169=item FLAG_IS_A_TEMPLATE (internal use)
170
171This flag is set on the inventory of generators like CREATORs and CONVERTERs,
172or other objects that have the flags FLAG_GENERATOR and FLAG_CONTENT_ON_GEN set.
173
174=item FLAG_AUTO_APPLY
175
176This flag has currently only meaning for the TREASURE type, see below.
177
178=item FLAG_ACTIVATE_ON_PUSH
179
180This flag has only meaning for objects that can be linked together
181with the 'connected' field and controls wether the object should
182be activated when the connection is 'pushed' or it is 'released'.
183
184This flag is by default on.
185
186=item FLAG_ACTIVATE_ON_RELEASE
187
188This flag has only meaning for objects that can be linked together
189with the 'connected' field and controls wether the object should
190be activated when the connection is 'pushed' or it is 'released'.
191
192This flag is by default on.
193
149=back 194=back
150 195
151=head2 Description of type specific attributes 196=head2 Description of type specific attributes
152 197
153The beginning of the headers of the following subsection 198The beginning of the headers of the following subsection
154are the server internal names for the objects types, see include/define.h. 199are the server internal names for the objects types, see include/define.h.
155The numeric values are maybe not 100% accurate, as the code is a changing 200
156target, please consult include/define.h in doubt :-) 201=head3 TRANSPORT - type 2 - Player transports
202
203This type is implemented by the transport extension and has currently no special
204attributes that affect it.
205
206=head3 ROD - type 3 - Rods that fire spells
207
208Rods contain spells and can be fired by a player.
209
210=over 4
211
212=item level <number>
213
214This attribute is used for calculating the spell level that can be fired
215with this rod, it's also the maximum level of the spell that can be fired.
216The level of the spell that is being fired depends mostly on
217the 'use magic item' skill level of the player and 1/10 of the level of the
218rod is added as bonus.
219
220=item hp <number>
221
222The amount of spellpoints this rod has left.
223
224=item maxhp <number>
225
226The maximum amount of spellpoints this rod has.
227
228=item skill <skill name>
229
230This field determines which skill you need to apply this object.
231
232=back
233
234=head3 TREASURE - type 4 - Treasures
235
236This type of objects are for random treasure generation in maps.
237If this object is applied by a player it will replace itself with it's
238inventory. If it is automatically applied
239generate a treasure and replace itself with the generated treasure.
240
241Chests are also of this type, their treasures are generated by
242the auto apply code on map instantiation.
243
244=over 4
245
246=item hp <number>
247
248The number of treasures to generate.
249
250=item exp <level>
251
252If FLAG_AUTO_APPLY is not set the exp field has no further meaning
253and the difficulty for the treasurecode only depends on the maps difficulty,
254otherwise the exp field has the following meaning:
255
256If this field is not 0 it is passed as the difficulty
257to the treasure generation code to determine how good, how much
258worth a treasure is or what bonuses it is given by the treasure code.
259
260If this field is not set or 0 the difficulty of the map is passed to the treasure
261generation code.
262
263=item randomitems <treasurelist>
264
265The treasurelist to use to generate the treasure which is put in the
266treasure objects inventory.
267
268=back
269
270=head3 POTION - type 5 - Potions for drinking and other nastynesses
271
272These objects contain a spell and will emit it on apply, which most
273of the time has the meaning of 'drinking'.
274
275If no resistancy field, stat field or attacktype is set and no spell
276is put in the potion by the sp field or the randomitems the
277potion will become an artifact and the artifact code decides which kind
278of potion will be generated.
279
280If the potion has FLAG_CURSED or FLAG_DAMNED set the usage of this potion
281will yield an explosion and hurt the player.
282
283=over 4
284
285=item Str, Dex, Con, Int, Wis, Cha, Pow <number>
286
287These stat fields determine how many stat points the player gets
288when he applies this potion.
289
290If FLAG_CURSED or FLAG_DAMNED is set the player will loose that many stat points.
291
292=item sp <number>
293
294If this field is set and the randomitems field is not set
295the field is interpreted as spell number, please look the right
296number up in common/loader.C.
297
298If this field is set the randomitems field will be unset by the
299map loading code.
300
301=item attacktype <attacktype>
302
303This field has some special meaning in potions, currently the
304bits for AT_DEPLETE and AT_GODPOWER control whethere this is a
305restoration potion or improvement potion.
306See include/attackinc.h for the bits of these types.
307
308If AT_DEPLETE is set the player will be restored and the ARCH_DEPLETION
309will be removed from him. If the potion has FLAG_CURSED or FLAG_DAMNED
310set the player will be drained a random stat by inserting an ARCH_DEPLETION
311into him.
312
313If AT_GODPOWER is enabled the player will gain +1 maxvalue in his hp, sp or grace stat.
314When the potion has FLAG_CURSED or FLAG_DAMNED set he will loose one in one of these stats.
315
316=item resist_<resistancy> <number>
317
318If this stat is set and no spell is in the potion the potion
319will create a force that give the player this specific resistancy.
320The forces type will be changed to POTION_EFFECT (see POTION_EFFECT type below)
321and the potion will last 10 times longer than the default force archetype
322FORCE_NAME (at the moment of this writing spell/force.arc).
323
324=item randomitems <treasurelist>
325
326The inventory/spell of the potion will be created by calling the treasure code
327with the treasurelist specified here. (I guess it's highly undefined what
328happens if there is not a spell in the potions inventory).
329
330=item on_use_yield <archetype>
331
332When this object is applied this object will be created.
333This field is also used by FOOD and POISON.
334
335=item subtypes <potion subtype>
336
337see include/spells.h for possible potion subtypes, there are currently 4:
338
339=over 4
340
341=item POT_SPELL
342
343Unused, default behaiour of a potion.
344
345=item POT_DUST
346
347This potion can be thrown to cast the spell that it has in it's inventory,
348the behaviour is not defined if there is not a spell in the inventory and the
349server will log an error.
350
351=item POT_FIGURINE
352
353Unused, default behaiour of a potion.
354
355=item POT_BALM
356
357Unused, default behaiour of a potion.
358
359=back
360
361=back
157 362
158=head3 WEAPON - type 15 - Weapons 363=head3 WEAPON - type 15 - Weapons
159 364
160This type is for general hack and slash weapons like swords, maces 365This type is for general hack and slash weapons like swords, maces
161and daggers and and .... 366and daggers and and ....
284 489
285the amount of ac points the player's ac is decreased 490the amount of ac points the player's ac is decreased
286 491
287=item wc <number> 492=item wc <number>
288 493
289the amount of wc points the player's ac is decreased 494the amount of wc points the player's wc is decreased
290 495
291=back 496=back
292 497
293=head4 Player inherits following flags from weapons: 498=head4 Player inherits following flags from weapons:
294 499
295 FLAG_LIFESAVE, FLAG_REFL_SPELL, FLAG_REFL_MISSILE, FLAG_STEALTH, 500 FLAG_LIFESAVE
296 FLAG_XRAYS, FLAG_BLIND, FLAG_SEE_IN_DARK, FLAG_UNDEAD 501 FLAG_REFL_SPELL
502 FLAG_REFL_MISSILE
503 FLAG_STEALTH
504 FLAG_XRAYS
505 FLAG_BLIND
506 FLAG_SEE_IN_DARK
507 FLAG_UNDEAD
508
509=head3 CHECK_INV - type 64 - Inventory checkers
510
511This object checks whether the player has a specific item in his
512inventory when he moves above the inventory checker. If the player has
513the item (or not, which can be controlled with a flag) a connection will be triggered.
514
515If you set move_block you can deny players and monsters to reach the space where
516the inventory checker is on, see 'move_block' description below.
517
518The conditions specified by hp, slaying and race are concationated with OR.
519So matching one of those conditions is enough.
520
521=over 4
522
523=item move_block <move type bitmask>
524
525If you set this field to block a movetype the move code will block any moves
526onto the space with the inventory checker, IF the moving object doesn't have
527(or has - if last_sp = 0) the item that the checker is searching for.
528
529=item last_sp (0|1)
530
531If last_sp is 1 'having' the item that is being checked for will
532activate the connection or make the space with the checker non-blocking.
533If last_sp is 0 'not having' the item will activate the connection
534or make the space with the checker non-blocking.
535
536=item last_heal (0|1)
537
538If last_heal is 1 the matching item will be removed if the inventory checker
539activates a connection and finds the item in the inventory.
540
541(A inventory checker that blocks a space won't remove anything from inventories)
542
543=item hp <number>
544
545If this field is not 0 the inventory checker will search for an object
546with the type id <number>.
547
548=item slaying <string>
549
550If this field is set the inventory checker will search for an object that
551has the same string in the slaying field (for example a key string of a key).
552
553=item race <string>
554
555If this field is set the inventory checker will search for an object which
556has the archetype name that matches <string>.
557
558=item connected <connection id>
559
560This is the connection that will be activated.
561
562=back
563
564=head3 HOLE - type 94 - Holes
565
566Holes are holes in the ground where objects can fall through. When the hole
567opens and/or is completly open all objects above it fall through (more
568precisely: if their head is above the hole).
569
570Trapdoors can only transfer the one who falls through to other coordinates
571on the B<same> map.
572
573=over 4
574
575=item maxsp (0|1)
576
577This field negates the state of the connection: When maxsp is 1 the pit will
578open/close when the connection is deactivated. Otherwise it will open/close
579when the connection is activated. This field only has effect when the
580connection is triggered. So if you put a closed hole on a map, and the
581connection is deactivated, and maxsp is 1 the hole will remain closed until the
582connection was triggered once.
583
584=item connected <connection id>
585
586This is the connection id, which lets the hole opening or closing when
587activated. The flags FLAG_ACTIVATE_ON_PUSH and FLAG_ACTIVATE_ON_RELEASE control
588at which connection state the object is activated.
589
590For example: if FLAG_ACTIVATE_ON_RELEASE is set to 0 the hole won't react when
591the connection is released.
592
593=item wc <number> (internal)
594
595This is an internal flag. If it is greater than 0 it means that the hole is not
596yet fully open. More preciesly: this field is the animation-step and if it is
597set to the 'closed' step of the animation the hole is closed and if it is on
598the 'open' animation step (wc = 0), the hole is open.
599
600=item sp <number>
601
602The destination y coordinates on the same map.
603
604=item hp <number>
605
606The destination x coordinates on the same map.
607
608=back
297 609
298=head3 FORCE - type 114 - Forces 610=head3 FORCE - type 114 - Forces
299 611
612Forces are a very 'thin' type. They don't have much behaviour other than
613disappearing after a time and/or affecting the player if they are in his
614inventory.
615
300Note: Forces only take effect on the player if they have set FLAG_APPLIED. 616Forces only take effect on the player if they have set FLAG_APPLIED.
301 617
302Whether the duration field is processed or not a tick is controlled via the 618Whether the duration field is processed or not a tick is controlled via the
303speed and speed_left field. Look above at the generic description of these 619speed and speed_left field. Look above at the generic description of these
304fields. 620fields.
305 621
306=over 4 622=over 4
307 623
308=item duration 624=item duration
309 625
310While this field is greater than 0 the force is not removed. 626While this field is greater than 0 the force/object is not destroyed. It is
311It is decreased each tick by 1. 627decreased each tick by 1.
312 628
629If it reaches 0 the force/object is destroyed.
630
631This field can have this meaning for B<any> object if that object has
632FLAG_IS_USED_UP and FLAG_APPLIED set. See the description of FLAG_IS_USED_UP
633what happens then.
634
313=back 635=back
636
637=head3 POTION_EFFECT - type 115 - Potion effects (resistancies)
638
639This object is generated by the POTION code when the potion is a resistance
640giving potion. It has mainly the same behaviour as a FORCE.
641
642The specialty of the potion effect is that the resistancy it gives is absolute,
643so if you drin a resistancy potion of fire+60 you will get 60% resistancy to
644fire.
645
646Multiple potion effects only give you the maximum of their resistancy.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines