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.16 by elmex, Wed Dec 20 21:30:42 2006 UTC vs.
Revision 1.29 by root, Thu Dec 4 03:48:19 2008 UTC

1=head1 CROSSFIRE+ OBJECT AND INTERNALS DOCUMENTATION 1=head1 DELIANTRA OBJECT AND INTERNALS DOCUMENTATION
2 2
3Here is all information about the object types Crossfire+ 3Here is all information about the object types Deliantra
4supports at the moment. This is not a complete documentation (yet) 4supports at the moment. This is not a complete documentation (yet)
5and browsing the source is still recommended to learn about 5and browsing the source is still recommended to learn about
6the objects that aren't documented here. 6the objects that aren't documented here.
7 7
8This documentation is in a sketchy state. It's mostly 8This documentation is in a sketchy state. It's mostly
108For players this field reflects the duration of the invisibility 108For players this field reflects the duration of the invisibility
109and is decreased every tick by 1. 109and is decreased every tick by 1.
110 110
111For non-player objects this field is not changed by server ticks. 111For non-player objects this field is not changed by server ticks.
112 112
113=item I<glow_radius> <number>
114
115This field indicates how far an object glows. Default is a radius of 0 (no
116glowing at all). Negative glow radii darken areas - currently, negative
117glow radii are stronger than positive ones.
118
113=item I<speed> <number> 119=item I<speed> <number>
114 120
115If this field is greater than MIN_ACTIVE_SPEED (~0.0001) the object is placed 121If this field is greater than MIN_ACTIVE_SPEED (~0.0001) the object is placed
116on the active object list and will be processed each tick (see also speed_left!). 122on the active object list and will be processed each tick (see also speed_left!).
117 123
194See Flags section below. 200See Flags section below.
195 201
196=item I<activate_on_release> (0|1) (default: 1) 202=item I<activate_on_release> (0|1) (default: 1)
197 203
198Sets the flag FLAG_ACTIVATE_ON_RELEASE. 204Sets the flag FLAG_ACTIVATE_ON_RELEASE.
205See Flags section below.
206
207=item I<is_lightable> (0|1)
208
209Sets the flag FLAG_IS_LIGHTABLE.
199See Flags section below. 210See Flags section below.
200 211
201=item I<editable> (more than deprecated) 212=item I<editable> (more than deprecated)
202 213
203This field had a special meaning for crossedit, which used parts 214This field had a special meaning for crossedit, which used parts
238If FLAG_APPLIED is not set the object is destroyed. 249If FLAG_APPLIED is not set the object is destroyed.
239 250
240=item FLAG_CHANGING 251=item FLAG_CHANGING
241 252
242If the I<state> field of the object is 0 the object will be processed periodically 253If the I<state> field of the object is 0 the object will be processed periodically
243(if speed is set). If the I<state> field is 1 it won't be processed. 254(if I<speed> is set). If the I<state> field is 1 it won't be processed.
255
256This flag indicates that the object is changing into a different object.
257The object has to have the I<other_arch> field set. The object the changing object
258changes into is derived from the archetype in I<other_arch>.
259
260When the object does not have FLAG_ALIVE set the I<food> field will be decremented
261each time the object is processed, and if I<food> reaches 0 one new object will be generated.
262
263When the object has FLAG_ALIVE set the I<food> field is the number of objects that
264will be generated.
265
266After the new object is created the I<hp> field from the old object is copied into
267the new one.
268
269When the old object was a B<LAMP> it's I<food> fields value less 1 will be copied
270to the new object.
244 271
245=item FLAG_IS_A_TEMPLATE (internal use) 272=item FLAG_IS_A_TEMPLATE (internal use)
246 273
247This flag is set on the inventory of generators like B<CREATOR>s and B<CONVERTER>s, 274This flag is set on the inventory of generators like B<CREATOR>s and B<CONVERTER>s,
248or other objects that have the flags FLAG_GENERATOR and FLAG_CONTENT_ON_GEN set. 275or other objects that have the flags FLAG_GENERATOR and FLAG_CONTENT_ON_GEN set.
274This flag is by default on. 301This flag is by default on.
275 302
276=item FLAG_NO_STEAL 303=item FLAG_NO_STEAL
277 304
278When this flag is set this object can't be stolen. The flag will be 305When this flag is set this object can't be stolen. The flag will be
279resetted once the object is placed on a map. 306reset once the object is placed on a map.
280 307
281When this flag is set on a monster it can defent attempts of stealing 308When this flag is set on a monster it can defend attempts at stealing
282(but in this context the flag is only used internally). 309(but in this context the flag is only used internally).
283 310
284=item FLAG_NO_SKILL_IDENT 311=item FLAG_NO_SKILL_IDENT
285 312
286This flag is mostly used internal and prevents unidentified objects 313This flag is mostly used internal and prevents unidentified objects
299=item FLAG_REFL_SPELL 326=item FLAG_REFL_SPELL
300 327
301This flag indicates whether something reflects spells, like spell reflecting 328This flag indicates whether something reflects spells, like spell reflecting
302amuletts. 329amuletts.
303 330
331=item FLAG_IS_LIGHTABLE
332
333This flag indicates whether a B<LIGHTER> can light this object. See also the
334description of the B<LIGHTER> type. How easy you can light an item depends
335partially on the material of the object.
336
304=back 337=back
305 338
306=head2 Description of type specific fields and behaviour 339=head2 Description of type specific fields and behaviour
307 340
308The beginning of the headers of the following subsection 341The beginning of the headers of the following subsection
311=head3 B<TRANSPORT> - type 2 - Player transports 344=head3 B<TRANSPORT> - type 2 - Player transports
312 345
313This type is implemented by the transport extension and has currently no special 346This type is implemented by the transport extension and has currently no special
314fields that affect it. 347fields that affect it.
315 348
316=head3 B<ROD> - type 3 - Rods that fire spells 349=head3 B<ROD>, B<HORN> - type 3, 35 - Rods that fire spells
317 350
318Rods contain spells and can be fired by a player. 351Rods contain spells and can be fired by a player.
319 352
320=over 4 353=over 4
321 354
327the 'use magic item' skill level of the player and 1/10 of the level of the 360the 'use magic item' skill level of the player and 1/10 of the level of the
328rod is added as bonus. 361rod is added as bonus.
329 362
330=item I<hp> <number> 363=item I<hp> <number>
331 364
332The amount of spellpoints this rod has left. 365The amount of spellpoints this rod has left. Recharges at a rate of C<1 +
366maxhp/10> per tick.
333 367
334=item I<maxhp> <number> 368=item I<maxhp> <number>
335 369
336The maximum amount of spellpoints this rod has. 370The maximum amount of spellpoints this rod has.
337 371
515 549
516=over 4 550=over 4
517 551
518=item I<level> <number> 552=item I<level> <number>
519 553
520This field affects the propability of poisoning. The higher the level difference 554This field affects the probability of poisoning. The higher the level difference
521between the one who is hit and the poision the more propable it is the attacked 555between the one who is hit and the poision the more probable it is the attacked
522one will be poisoned. 556one will be poisoned.
523 557
524=item I<slaying> <race> 558=item I<slaying> <race>
525 559
526This field has the usual meaning of 'slaying', when the 560This field has the usual meaning of 'slaying', when the
652the arrows I<dam> field, the bows I<dam> field, the bows I<magic> field 686the arrows I<dam> field, the bows I<dam> field, the bows I<magic> field
653and the arrows I<magic> field. 687and the arrows I<magic> field.
654 688
655=item I<wc> <number> 689=item I<wc> <number>
656 690
657The weapon class of the arrow, which has effect on the propability of hitting. 691The weapon class of the arrow, which has effect on the probability of hitting.
658 692
659It is recomputed when the arrow is being fired by this formula: 693It is recomputed when the arrow is being fired by this formula:
660 694
661 wc = 20 - bow->magic - arrow->magic - (skill->level or shooter->level) 695 wc = 20 - bow->magic - arrow->magic - (skill->level or shooter->level)
662 - dex_bonus - thaco_bonus - arrow->stats.wc - bow->stats.wc + wc_mod 696 - dex_bonus - thaco_bonus - arrow->stats.wc - bow->stats.wc + wc_mod
677Bitfield which decides the attacktype of the damage, see include/attackinc.h 711Bitfield which decides the attacktype of the damage, see include/attackinc.h
678On fireing the I<attacktype> of the bow is added to the arrows I<attacktype>. 712On fireing the I<attacktype> of the bow is added to the arrows I<attacktype>.
679 713
680=item I<level> <number> (interally used) 714=item I<level> <number> (interally used)
681 715
682The level of the arrow, this affects the propability of piercing FLAG_REFL_MISSILE, 716The level of the arrow, this affects the probability of piercing FLAG_REFL_MISSILE,
683see above in the B<ARROW> description. 717see above in the B<ARROW> description.
684 718
685The I<level> is set when the arrow is fired to either the skill level or the 719The I<level> is set when the arrow is fired to either the skill level or the
686shooters level. 720shooters level.
687 721
816Generally this field on weapons is in ranges of 1-30 and decides the slowdown of the 850Generally this field on weapons is in ranges of 1-30 and decides the slowdown of the
817I<sp> regeneration. 851I<sp> regeneration.
818 852
819=item I<body_BODYSLOT> 853=item I<body_BODYSLOT>
820 854
821The part of the body you need to use this weapon, possible values should be 855The part/slot of the body you need to use this weapon, possible values for
822looked up in common/item.C at body_locations. 856C<BODYSLOT> should be looked up in common/item.C at body_locations.
823 857
858The value (in the range C<-7..7>) gives the number of those body slots
859used up by the item (if negative) or the number of body slots this object
860has (if positive, e.g. for monsters or players). The special value C<0>
861indicates that this object cannot equip items requiring these body slots.
862
824=item I<resist_RESISTNACY> <number> 863=item I<resist_RESISTANCY> <number>
825 864
826this is the factor with which the difference of the players resistancy and 100% 865this is the factor with which the difference of the players resistancy and 100%
827is multiplied, something like this: 866is multiplied, something like this:
828 867
829 additional_resistancy = (100 - current_resistanct) * (<number>/100) 868 additional_resistancy = (100 - current_resistancy) * (<number>/100)
830 869
831if <number> is negative it is added to the total vulnerabilities, 870if <number> is negative it is added to the total vulnerabilities,
832and later the total resistance is decided by: 871and later the total resistance is decided by:
833 872
834 'total resistance = total protections - total vulnerabilities' 873 'total resistance = total protections - total vulnerabilities'
835 874
836see also common/living.C:fix_player 875see also common/living.C:fix_player.
837 876
838=item I<path_(attuned|repelled|denied)> 877=item I<path_(attuned|repelled|denied)>
839 878
840this field modifies the pathes the player is attuned to, see include/spells.h PATH_* 879this field modifies the pathes the player is attuned to, see include/spells.h PATH_*
841for the pathes. 880for the pathes.
1002See also the description of the I<connected> field in the generic object field 1041See also the description of the I<connected> field in the generic object field
1003section. 1042section.
1004 1043
1005=back 1044=back
1006 1045
1046=head3 B<MOOD_FLOOR> - type 65 - change mood of monsters
1047
1048speed == 0 for triggered mood changes, speed != 0 for non-triggered mood
1049changes.
1050
1051 (based on value that last_sp takes):
1052 0: 'furious' Makes all monsters aggressive
1053 1: 'angry' As above but pets are unaffected
1054 2: 'calm' Makes all monsters unaggressive
1055 3: 'sleep' Puts all monsters to sleep
1056 4: 'charm' Makes monster into a pet of person
1057 who triggers the square. This setting
1058 is not enabled for continous operation
1059 5: 'destroy mons' destroy any monsters on this space
1060 6: 'destroy pets' destroy friendly monsters on this space
1061
1007=head3 B<FLESH> - type 72 - Organs and body parts 1062=head3 B<FLESH> - type 72 - Organs and body parts
1008 1063
1009See B<FOOD> description. 1064See B<FOOD> description.
1010 1065
1011=head3 B<MISC_OBJECT> - type 79 - Misc. objects 1066=head3 B<MISC_OBJECT> - type 79 - Misc. objects
1012 1067
1013A type for any object that has no special behaviour. 1068A type for any object that has no special behaviour.
1014 1069
1015=head3 B<LAMP> - type 82 - A lamp 1070=head3 B<LAMP> - type 82 - A lamp
1016 1071
1017This object makes light. 1072This object represents a lamp, that can be carried and switched
1073on and off and has a certain amount of fuel in it.
1074
1075A lamp consists of two archetypes: the 'on' archetype and the 'off' archetype.
1076Each of them should point at the other one with it's I<other_arch> field.
1077
1078See the I<other_arch> field for the behaviour of a lamp object when it is applied.
1079
1080If this object has FLAG_IS_LIGHTABLE set the lamp can be turned on and off
1081with a B<LIGHTER>, see also the description of FLAG_IS_LIGHTABLE.
1082
1083=over 4
1084
1085=item I<glow_radius> <number>
1086
1087The radius of the light that the lamp emits, see also I<glow_radius> in the
1088generic object flags description.
1089
1090=item I<speed> <number>
1091
1092If FLAG_CHANGING is set the I<speed> field will indicate how fast the
1093lamp burns it's fuel (I<food>).
1094
1095Setting FLAG_CHANGING makes only sense on the archetype which represents
1096the 'on' state of the lamp.
1097
1098See also the description of FLAG_CHANGING.
1099
1100Lamps which have no FLAG_CHANGING set would also make sense and represent
1101lamps that never burn up.
1102
1103=item I<other_arch> <number>
1104
1105This is the field that points to the 'other' archetype which represents the
1106opposite state of the lamp. The newly from I<other_arch> derived object will
1107replace the current object and will get the value of I<food> of the replaced object.
1108
1109Rationale:
1110
1111When the lamp (on) is applied a new object is derived from the archetype
1112in I<other_arch> and the I<food> value is copied to it ('the fuel is
1113transferred'). The new lamp (off) object has to have a I<other_arch> field
1114which points to the archetype from which a lamp (on) can be derived.
1115
1116=item I<food> <number>
1117
1118This fields stands for the fuel of the lamp.
1119
1120=back
1018 1121
1019=head3 B<DUPLICATOR> - type 83 - Duplicators or: Multiplicators 1122=head3 B<DUPLICATOR> - type 83 - Duplicators or: Multiplicators
1020 1123
1021This type of objects multiplies objects that are above it when it is activated. 1124This type of objects multiplies objects that are above it when it is activated.
1022You can even multiply by 0, which will destroy the object. 1125You can even multiply by 0, which will destroy the object.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines