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.1 by elmex, Mon Dec 18 10:57:09 2006 UTC vs.
Revision 1.8 by elmex, Tue Dec 19 22:21:15 2006 UTC

49or shouldn't be set by an archetype. If the internal names differs the 49or shouldn't be set by an archetype. If the internal names differs the
50external name (for the archetypes) for the attribute is written behind it. 50external name (for the archetypes) for the attribute is written behind it.
51 51
52=head2 Description of generic archetype and object attributes 52=head2 Description of generic archetype and object attributes
53 53
54These are the fields that most of the objects have and/or their
55default behaviour.
56
54=over 4 57=over 4
58
59=item name <string>
60
61The name of the object.
62
63=item name_pl <string>
64
65The name of a collection of these objects (the plural of the name).
66
67=item face <facename>
68
69The graphical appearance of this object.
70
71=item invisible <number>
72
73If the <number> is greater than 0 the object is invisible.
74For players this field reflects the duration of the invisibility
75and is decreased every tick by 1.
76
77For non-player objects this field is not changed by server ticks.
78
79=item speed <number>
80
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!).
83
84If the speed field drops below the MIN_ACTIVE_SPEED the object is removed
85from the active object list and it won't experience any processing per tick.
86
87=item speed_left <number>
88
89If this field is greater than 0 and the object is on the
90active list (mostly means it's speed is also greater than 0):
91
92 - speed_left is decreased by 1
93 - and this object is processed and experiences a server tick.
94
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
97on the end of the tick.
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
103=item no_drop (0|1)
104
105Sets the flag FLAG_NO_DROP.
106See Flags section below.
107
108=item applied (0|1)
109
110Sets the flag FLAG_APPLIED.
111See Flags section below.
112
113=item is_used_up (0|1)
114
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 no_steal (0|1)
124
125Sets the flag FLAG_NO_STEAL.
126See Flags section below.
127
128=item activate_on_push (0|1) (default: 1)
129
130Sets the flag FLAG_ACTIVATE_ON_PUSH.
131See Flags section below.
132
133=item activate_on_release (0|1) (default: 1)
134
135Sets the flag FLAG_ACTIVATE_ON_RELEASE.
136See Flags section below.
137
138=item editable (more than deprecated)
139
140This field had a special meaning for crossedit, which used parts
141of the server code for editing. Wherever you see this attribute being
142set in an archetype ignore it and/or remove it. No code interprets this
143field anymore.
144
145=back
146
147=head3 Flags
148
149Here are the effects of the flags described.
150
151=over 4
152
153=item FLAG_NO_DROP
154
155An object can't be picked up and dropped.
156
157=item FLAG_APPLIED
158
159This flag mostly states whether this object has been 'applied' by the player.
160For objects that are applied by the code or have this flag set in the archetype
161it mostly means 'this object is active'.
162
163For example the player adjustments of the hp/sp/grace fields and inheritance
164of flags from objects in his inventory is toggled by this flag.
165
166=item FLAG_IS_USED_UP
167
168This flag controls whether an object is 'used up'. If it is set the 'food' field
169of the object is decreased by 1 each tick, and if it is lower or equal 0 after tha
170it is removed.
171
172If also the flag FLAG_APPLIED is set, the 'duration' field controls whether
173this object is removed or not, see the Force type below for the meaning
174of the duration field in this context.
175
176If FLAG_APPLIED is not set the object is destroyed.
177
178=item FLAG_IS_A_TEMPLATE (internal use)
179
180This flag is set on the inventory of generators like CREATORs and CONVERTERs,
181or other objects that have the flags FLAG_GENERATOR and FLAG_CONTENT_ON_GEN set.
182
183=item FLAG_AUTO_APPLY
184
185This flag has currently only meaning for the TREASURE type, see below.
186
187=item FLAG_ACTIVATE_ON_PUSH
188
189This flag has only meaning for objects that can be linked together
190with the 'connected' field and controls wether the object should
191be activated when the connection is 'pushed' or it is 'released'.
192
193This flag is by default on.
194
195=item FLAG_ACTIVATE_ON_RELEASE
196
197This flag has only meaning for objects that can be linked together
198with the 'connected' field and controls wether the object should
199be activated when the connection is 'pushed' or it is 'released'.
200
201This flag is by default on.
202
203=item FLAG_NO_STEAL
204
205When this flag is set this object can't be stolen. The flag will be
206resetted once the object is placed on a map.
207
208When this flag is set on a monster it can defent attempts of stealing
209(but in this context the flag is only used internally).
55 210
56=back 211=back
57 212
58=head2 Description of type specific attributes 213=head2 Description of type specific attributes
59 214
60The beginning of the headers of the following subsection 215The beginning of the headers of the following subsection
61are the server internal names for the objects types, see include/define.h. 216are the server internal names for the objects types, see include/define.h.
62The numeric values are maybe not 100% accurate, as the code is a changing 217
63target, please consult include/define.h in doubt :-) 218=head3 TRANSPORT - type 2 - Player transports
219
220This type is implemented by the transport extension and has currently no special
221attributes that affect it.
222
223=head3 ROD - type 3 - Rods that fire spells
224
225Rods contain spells and can be fired by a player.
226
227=over 4
228
229=item level <number>
230
231This attribute is used for calculating the spell level that can be fired
232with this rod, it's also the maximum level of the spell that can be fired.
233The level of the spell that is being fired depends mostly on
234the 'use magic item' skill level of the player and 1/10 of the level of the
235rod is added as bonus.
236
237=item hp <number>
238
239The amount of spellpoints this rod has left.
240
241=item maxhp <number>
242
243The maximum amount of spellpoints this rod has.
244
245=item skill <skill name>
246
247This field determines which skill you need to apply this object.
248
249=back
250
251=head3 TREASURE - type 4 - Treasures
252
253This type of objects are for random treasure generation in maps.
254If this object is applied by a player it will replace itself with it's
255inventory. If it is automatically applied
256generate a treasure and replace itself with the generated treasure.
257
258Chests are also of this type, their treasures are generated by
259the auto apply code on map instantiation.
260
261=over 4
262
263=item hp <number>
264
265The number of treasures to generate.
266
267=item exp <level>
268
269If FLAG_AUTO_APPLY is not set the exp field has no further meaning
270and the difficulty for the treasurecode only depends on the maps difficulty,
271otherwise the exp field has the following meaning:
272
273If this field is not 0 it is passed as the difficulty
274to the treasure generation code to determine how good, how much
275worth a treasure is or what bonuses it is given by the treasure code.
276
277If this field is not set or 0 the difficulty of the map is passed to the treasure
278generation code.
279
280=item randomitems <treasurelist>
281
282The treasurelist to use to generate the treasure which is put in the
283treasure objects inventory.
284
285=back
286
287=head3 POTION - type 5 - Potions for drinking and other nastynesses
288
289These objects contain a spell and will emit it on apply, which most
290of the time has the meaning of 'drinking'.
291
292If no resistancy field, stat field or attacktype is set and no spell
293is put in the potion by the sp field or the randomitems the
294potion will become an artifact and the artifact code decides which kind
295of potion will be generated.
296
297If the potion has FLAG_CURSED or FLAG_DAMNED set the usage of this potion
298will yield an explosion and hurt the player.
299
300=over 4
301
302=item Str, Dex, Con, Int, Wis, Cha, Pow <number>
303
304These stat fields determine how many stat points the player gets
305when he applies this potion.
306
307If FLAG_CURSED or FLAG_DAMNED is set the player will loose that many stat points.
308
309=item sp <number>
310
311If this field is set and the randomitems field is not set
312the field is interpreted as spell number, please look the right
313number up in common/loader.C.
314
315If this field is set the randomitems field will be unset by the
316map loading code.
317
318=item attacktype <attacktype>
319
320This field has some special meaning in potions, currently the
321bits for AT_DEPLETE and AT_GODPOWER control whethere this is a
322restoration potion or improvement potion.
323See include/attackinc.h for the bits of these types.
324
325If AT_DEPLETE is set the player will be restored and the ARCH_DEPLETION
326will be removed from him. If the potion has FLAG_CURSED or FLAG_DAMNED
327set the player will be drained a random stat by inserting an ARCH_DEPLETION
328into him.
329
330If AT_GODPOWER is enabled the player will gain +1 maxvalue in his hp, sp or grace stat.
331When the potion has FLAG_CURSED or FLAG_DAMNED set he will loose one in one of these stats.
332
333=item resist_<resistancy> <number>
334
335If this stat is set and no spell is in the potion the potion
336will create a force that give the player this specific resistancy.
337The forces type will be changed to POTION_EFFECT (see POTION_EFFECT type below)
338and the potion will last 10 times longer than the default force archetype
339FORCE_NAME (at the moment of this writing spell/force.arc).
340
341=item randomitems <treasurelist>
342
343The inventory/spell of the potion will be created by calling the treasure code
344with the treasurelist specified here. (I guess it's highly undefined what
345happens if there is not a spell in the potions inventory).
346
347=item on_use_yield <archetype>
348
349When this object is applied an instance of <archetype> will be created.
350
351=item subtypes <potion subtype>
352
353see include/spells.h for possible potion subtypes, there are currently 4:
354
355=over 4
356
357=item POT_SPELL
358
359Unused, default behaiour of a potion.
360
361=item POT_DUST
362
363This potion can be thrown to cast the spell that it has in it's inventory,
364the behaviour is not defined if there is not a spell in the inventory and the
365server will log an error.
366
367=item POT_FIGURINE
368
369Unused, default behaiour of a potion.
370
371=item POT_BALM
372
373Unused, default behaiour of a potion.
374
375=back
376
377=back
378
379=head3 FOOD - type 6 - Eatable stuff
380
381This is for objects that are representing general eatables like
382beef or bread.
383
384The main difference between FOOD, FLESH and DRINK is that they
385give different messages.
386
387The specialty of FLESH is that it inherits the resistancies of the
388monsters it was generated in and will let dragons raise their resistancies
389with that. If the monster has the POISON attacktype the FLESH
390will change into POISON.
391
392If a player runs low on food he will grab for FOOD, DRINK and POISON
393and if he doesn't find any of that he will start eating FLESH.
394
395=over 4
396
397=item title <string>
398
399If the food has a title or is cursed it is considered 'special', which means that the
400fields Str, Dex, Con, Int, Wis, Pow, resist_<resistancy>, hp and sp
401are interpreted and have further effects on the player.
402
403The higher the food field is the longer the improvement of the player lasts
404(except for hp and sp).
405
406=item food <number>
407
408This is the amount of food points the player gets when he eats this.
409
410=item on_use_yield <archetype>
411
412When this object is applied an instance of <archetype> will be created.
413
414=back
415
416=head3 POISON - type 7 - Poisonous stuff
417
418This type is for objects that can poison the player when drinking.
419When applied it will hit the attacked with AT_POISON and will create
420a POISONING object in the one who was hit.
421
422=over 4
423
424=item level <number>
425
426This field affects the propability of poisoning. The higher the level difference
427between the one who is hit and the poision the mose propable it is the attacked
428one will be poisoned.
429
430=item slaying <race>
431
432On poison this field has the usual meaning of 'slaying', when the
433ones race matches the slaying field the damage done by the poison
434is multiplied by 3.
435
436=item hp <number>
437
438This is the amount of damage the player will receive from applying this. The
439attacktype AT_POISON will be used to hit the player and the damage will
440determine the strenght, duration and depletion of stats of the poisoning. The
441created POISONING object which is being placed in the one who was attacked will
442get the damage from this field (which is maybe adjusted by slaying or the
443resistancies).
444
445=item food <number>
446
4471/4 of <number> will be drained from the players food.
448
449=item on_use_yield <archetype>
450
451When this object is applied an instance of <archetype> will be created.
452
453=back
64 454
65=head3 WEAPON - type 15 - Weapons 455=head3 WEAPON - type 15 - Weapons
66 456
67This type is for general hack and slash weapons like swords, maces 457This type is for general hack and slash weapons like swords, maces
68and daggers and and .... 458and daggers and and ....
75 465
76=item attacktype <bitmask> 466=item attacktype <bitmask>
77 467
78bitfield which decides the attacktype of the damage, see include/attackinc.h 468bitfield which decides the attacktype of the damage, see include/attackinc.h
79 469
80=item dam <integer> 470=item dam <number>
81 471
82amount of damage being done with the attacktype 472amount of damage being done with the attacktype
83 473
84=item item_power <level> 474=item item_power <level>
85 475
104 494
105=item last_sp 495=item last_sp
106 496
107the weapon speed (see magic description) 497the weapon speed (see magic description)
108 498
109=item food <integer> 499=item food <number>
110 500
111addition to food regeneration of the player 501addition to food regeneration of the player
112 502
113=item hp <integer> 503=item hp <number>
114 504
115addition to health regeneration 505addition to health regeneration
116 506
117=item sp <integer> 507=item sp <number>
118 508
119addition to mana regeneration 509addition to mana regeneration
120 510
121=item grace <integer> 511=item grace <number>
122 512
123addititon to grace regeneration 513addititon to grace regeneration
124 514
125=item gen_sp_armour <integer> 515=item gen_sp_armour <number>
126 516
127the players gen_sp_armour field (which is per default 10) is added the <integer> amount. 517the players gen_sp_armour field (which is per default 10) is added the <number> amount.
128gen_sp_armour seems to be a factor with which gen_sp in do_some_living() 518gen_sp_armour seems to be a factor with which gen_sp in do_some_living()
129is multiplied: gen_sp *= 10/<integer> 519is multiplied: gen_sp *= 10/<number>
130meaning: values > 10 of gen_sp_armour limits the amout of regenerated 520meaning: values > 10 of gen_sp_armour limits the amout of regenerated
131spellpoints. 521spellpoints.
132 522
133generally this field on weapons is in ranges of 1-30 and decides the slowdown of the 523generally this field on weapons is in ranges of 1-30 and decides the slowdown of the
134sp regeneration. 524sp regeneration.
136=item body_<body slot/part> 526=item body_<body slot/part>
137 527
138the part of the body you need to use this weapon, possible values should be 528the part of the body you need to use this weapon, possible values should be
139looked up in common/item.C at body_locations. 529looked up in common/item.C at body_locations.
140 530
141=item resist_<resistnacy> <integer> 531=item resist_<resistnacy> <number>
142 532
143this is the factor with which the difference of the players resistancy and 100% 533this is the factor with which the difference of the players resistancy and 100%
144is multiplied, something like this: 534is multiplied, something like this:
145 535
146 additional_resistancy = (100 - current_resistanct) * (<integer>/100) 536 additional_resistancy = (100 - current_resistanct) * (<number>/100)
147 537
148if <integer> is negative it is added to the total vulnerabilities, 538if <number> is negative it is added to the total vulnerabilities,
149and later the total resistance is decided by: 539and later the total resistance is decided by:
150 540
151 'total resistance = total protections - total vulnerabilities' 541 'total resistance = total protections - total vulnerabilities'
152 542
153see also common/living.C:fix_player 543see also common/living.C:fix_player
155=item patch_(attuned|repelled|denied) 545=item patch_(attuned|repelled|denied)
156 546
157this field modifies the pathes the player is attuned to, see include/spells.h PATH_* 547this field modifies the pathes the player is attuned to, see include/spells.h PATH_*
158for the pathes. 548for the pathes.
159 549
160=item luck <integer> 550=item luck <number>
161 551
162this luck is added to the players luck 552this luck is added to the players luck
163 553
164=item move_type 554=item move_type
165 555
166if the weapon has a move_type set the player inherits it's move_type 556if the weapon has a move_type set the player inherits it's move_type
167 557
168=item exp <integer> 558=item exp <number>
169 559
170the added_speed and bonus_speed of the player is raised by <integer>/3. 560the added_speed and bonus_speed of the player is raised by <number>/3.
171if <integer> < 0 then the added_speed is decreased by <integer> 561if <number> < 0 then the added_speed is decreased by <number>
172 562
173=item weight 563=item weight
174 564
175the weight of the weapon 565the weight of the weapon
176 566
185 - dam: the players dam is adjusted by: player->dam += (dam + magic) 575 - dam: the players dam is adjusted by: player->dam += (dam + magic)
186 576
187 - weapon speed (last_sp): weapon_speed is calculated by: (last_sp * 2 - magic) / 2 577 - weapon speed (last_sp): weapon_speed is calculated by: (last_sp * 2 - magic) / 2
188 (minium is 0) 578 (minium is 0)
189 579
190=item ac <integer> 580=item ac <number>
191 581
192the amount of ac points the player's ac is decreased 582the amount of ac points the player's ac is decreased
193 583
194=item wc <integer> 584=item wc <number>
195 585
196the amount of wc points the player's ac is decreased 586the amount of wc points the player's wc is decreased
197 587
198=back 588=back
199 589
200=head4 Player inherits following flags from weapons: 590=head4 Player inherits following flags from weapons:
201 591
202 FLAG_LIFESAVE, FLAG_REFL_SPELL, FLAG_REFL_MISSILE, FLAG_STEALTH, 592 FLAG_LIFESAVE
203 FLAG_XRAYS, FLAG_BLIND, FLAG_SEE_IN_DARK, FLAG_UNDEAD 593 FLAG_REFL_SPELL
594 FLAG_REFL_MISSILE
595 FLAG_STEALTH
596 FLAG_XRAYS
597 FLAG_BLIND
598 FLAG_SEE_IN_DARK
599 FLAG_UNDEAD
600
601=head3 DRINK - type 54 - Drinkable stuff
602
603See FOOD description.
604
605=head3 CHECK_INV - type 64 - Inventory checkers
606
607This object checks whether the player has a specific item in his
608inventory when he moves above the inventory checker. If the player has
609the item (or not, which can be controlled with a flag) a connection will be triggered.
610
611If you set move_block you can deny players and monsters to reach the space where
612the inventory checker is on, see 'move_block' description below.
613
614The conditions specified by hp, slaying and race are concationated with OR.
615So matching one of those conditions is enough.
616
617=over 4
618
619=item move_block <move type bitmask>
620
621If you set this field to block a movetype the move code will block any moves
622onto the space with the inventory checker, IF the moving object doesn't have
623(or has - if last_sp = 0) the item that the checker is searching for.
624
625=item last_sp (0|1)
626
627If last_sp is 1 'having' the item that is being checked for will
628activate the connection or make the space with the checker non-blocking.
629If last_sp is 0 'not having' the item will activate the connection
630or make the space with the checker non-blocking.
631
632=item last_heal (0|1)
633
634If last_heal is 1 the matching item will be removed if the inventory checker
635activates a connection and finds the item in the inventory.
636
637(A inventory checker that blocks a space won't remove anything from inventories)
638
639=item hp <number>
640
641If this field is not 0 the inventory checker will search for an object
642with the type id <number>.
643
644=item slaying <string>
645
646If this field is set the inventory checker will search for an object that
647has the same string in the slaying field (for example a key string of a key).
648
649=item race <string>
650
651If this field is set the inventory checker will search for an object which
652has the archetype name that matches <string>.
653
654=item connected <connection id>
655
656This is the connection that will be activated.
657
658=back
659
660=head3 FLESH - type 72 - Organs and body parts
661
662See FOOD description.
663
664=head3 HOLE - type 94 - Holes
665
666Holes are holes in the ground where objects can fall through. When the hole
667opens and/or is completly open all objects above it fall through (more
668precisely: if their head is above the hole).
669
670Trapdoors can only transfer the one who falls through to other coordinates
671on the B<same> map.
672
673=over 4
674
675=item maxsp (0|1)
676
677This field negates the state of the connection: When maxsp is 1 the pit will
678open/close when the connection is deactivated. Otherwise it will open/close
679when the connection is activated. This field only has effect when the
680connection is triggered. So if you put a closed hole on a map, and the
681connection is deactivated, and maxsp is 1 the hole will remain closed until the
682connection was triggered once.
683
684=item connected <connection id>
685
686This is the connection id, which lets the hole opening or closing when
687activated. The flags FLAG_ACTIVATE_ON_PUSH and FLAG_ACTIVATE_ON_RELEASE control
688at which connection state the object is activated.
689
690For example: if FLAG_ACTIVATE_ON_RELEASE is set to 0 the hole won't react when
691the connection is released.
692
693=item wc <number> (internal)
694
695This is an internal flag. If it is greater than 0 it means that the hole is not
696yet fully open. More preciesly: this field is the animation-step and if it is
697set to the 'closed' step of the animation the hole is closed and if it is on
698the 'open' animation step (wc = 0), the hole is open.
699
700=item sp <number>
701
702The destination y coordinates on the same map.
703
704=item hp <number>
705
706The destination x coordinates on the same map.
707
708=back
709
710=head3 POISONING - type 105 - The poisoning of players and monsters
711
712This type is doing the actual damage to the ones who were attacked
713via AT_POISON (or drank POISON).
714
715The duration is handled via the FLAG_IS_USED_UP mechanism (please look
716there for details).
717
718=over 4
719
720=item dam <number>
721
722Each time the poisoning is processed (which is determined by the speed and speed_left
723fields, see the general object attributes above) it hits the player with
724<number> damage and the AT_INTERNAL attacktype (means: it will simply
725hit the player with no strings attached).
726
727=item food <number>
728
729Just a note: The posion is removed when food == 1 and not when
730the whole duration is up, because the POISONING code has to remove
731the poison-effects from the player before the FLAG_IS_USED_UP mechanism
732deletes the POISONING object.
733
734=back
735
736=head3 FORCE - type 114 - Forces
737
738Forces are a very 'thin' type. They don't have much behaviour other than
739disappearing after a time and/or affecting the player if they are in his
740inventory.
741
742Forces only take effect on the player if they have set FLAG_APPLIED.
743
744Whether the duration field is processed or not a tick is controlled via the
745speed and speed_left field. Look above at the generic description of these
746fields.
747
748NOTE: Setting FLAG_IS_USED_UP on an force will also consider the 'food' field
749like stated above in the FLAG_IS_USED_UP description. BUT: If the food field reaches
7500 before duration and FLAG_APPLIED is set, the force will last for 'duration'.
751If the FLAG_APPLIED is not set the force is removed when food reaches 0.
752Generally this means: FLAG_IS_USED_UP doesn't have good semantics on forces.
753
754=over 4
755
756=item duration
757
758While this field is greater than 0 the force/object is not destroyed. It is
759decreased each tick by 1.
760
761If it reaches 0 the force/object is destroyed.
762
763This field can have this meaning for B<any> object if that object has
764FLAG_IS_USED_UP and FLAG_APPLIED set. See the description of FLAG_IS_USED_UP
765what happens then.
766
767=back
768
769=head3 POTION_EFFECT - type 115 - Potion effects (resistancies)
770
771This object is generated by the POTION code when the potion is a resistance
772giving potion. It has mainly the same behaviour as a FORCE.
773
774The specialty of the potion effect is that the resistancy it gives is absolute,
775so if you drin a resistancy potion of fire+60 you will get 60% resistancy to
776fire.
777
778Multiple potion effects only give you the maximum of their resistancy.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines