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.3 by elmex, Mon Dec 18 12:11:08 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 <numeric>
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
99=item no_drop (0|1)
100
101Sets the flag FLAG_NO_DROP. See the Flags section below.
102
103=item applied (0|1)
104
105Sets the flag FLAG_APPLIED. See the Flags section below.
106
107=item is_used_up (0|1)
108
109Sets the flag FLAG_IS_USED_UP. See Flags section below.
110
111=item editable (more than deprecated)
112
113This field had a special meaning for crossedit, which used parts
114of the server code for editing. Wherever you see this attribute being
115set in an archetype ignore it and/or remove it. No code interprets this
116field anymore.
117
118=back
119
120=head3 Flags
121
122Here are the effects of the flags described.
123
124=over 4
125
126=item FLAG_NO_DROP
127
128An object can't be picked up and dropped.
129
130=item FLAG_APPLIED
131
132This flag mostly states whether this object has been 'applied' by the player.
133For objects that are applied by the code or have this flag set in the archetype
134it mostly means 'this object is active'.
135
136For example the player adjustments of the hp/sp/grace fields and inheritance
137of flags from objects in his inventory is toggled by this flag.
138
139=item FLAG_IS_USED_UP
140
141This flag controls whether an object is 'used up'. If it is set the 'food' field
142of the object is decreased by 1 each tick, and if it is lower or equal 0 after tha
143it is removed.
144
145If 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
147of the duration field in this context.
148
149If FLAG_APPLIED is not set the object is destroyed.
55 150
56=back 151=back
57 152
58=head2 Description of type specific attributes 153=head2 Description of type specific attributes
59 154
60The beginning of the headers of the following subsection 155The beginning of the headers of the following subsection
61are the server internal names for the objects types, see include/define.h. 156are 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 157The numeric values are maybe not 100% accurate, as the code is a changing
63target, please consult include/define.h in doubt :-) 158target, please consult include/define.h in doubt :-)
64 159
160=head3 FORCE - type 114 - Forces
161
162Forces are a very 'thin' type. They don't have much behaviour other than
163disappearing after a time and/or affecting the player if they are in his inventory.
164
165Forces only take effect on the player if they have set FLAG_APPLIED.
166
167Whether the duration field is processed or not a tick is controlled via the
168speed and speed_left field. Look above at the generic description of these
169fields.
170
171=over 4
172
173=item duration
174
175While this field is greater than 0 the force/object is not destroyed.
176It is decreased each tick by 1.
177
178If it reaches 0 the force/object is destroyed.
179
180This field can have this meaning for B<any> object if that object has
181FLAG_IS_USED_UP and FLAG_APPLIED set. See the description of FLAG_IS_USED_UP
182what happens then.
183
184=back
185
65=head3 WEAPON - type 15 - Weapons 186=head3 WEAPON - type 15 - Weapons
66 187
67This type is for general hack and slash weapons like swords, maces 188This type is for general hack and slash weapons like swords, maces
68and daggers and and .... 189and daggers and and ....
69 190
75 196
76=item attacktype <bitmask> 197=item attacktype <bitmask>
77 198
78bitfield which decides the attacktype of the damage, see include/attackinc.h 199bitfield which decides the attacktype of the damage, see include/attackinc.h
79 200
80=item dam <integer> 201=item dam <number>
81 202
82amount of damage being done with the attacktype 203amount of damage being done with the attacktype
83 204
84=item item_power <level> 205=item item_power <level>
85 206
104 225
105=item last_sp 226=item last_sp
106 227
107the weapon speed (see magic description) 228the weapon speed (see magic description)
108 229
109=item food <integer> 230=item food <number>
110 231
111addition to food regeneration of the player 232addition to food regeneration of the player
112 233
113=item hp <integer> 234=item hp <number>
114 235
115addition to health regeneration 236addition to health regeneration
116 237
117=item sp <integer> 238=item sp <number>
118 239
119addition to mana regeneration 240addition to mana regeneration
120 241
121=item grace <integer> 242=item grace <number>
122 243
123addititon to grace regeneration 244addititon to grace regeneration
124 245
125=item gen_sp_armour <integer> 246=item gen_sp_armour <number>
126 247
127the players gen_sp_armour field (which is per default 10) is added the <integer> amount. 248the 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() 249gen_sp_armour seems to be a factor with which gen_sp in do_some_living()
129is multiplied: gen_sp *= 10/<integer> 250is multiplied: gen_sp *= 10/<number>
130meaning: values > 10 of gen_sp_armour limits the amout of regenerated 251meaning: values > 10 of gen_sp_armour limits the amout of regenerated
131spellpoints. 252spellpoints.
132 253
133generally this field on weapons is in ranges of 1-30 and decides the slowdown of the 254generally this field on weapons is in ranges of 1-30 and decides the slowdown of the
134sp regeneration. 255sp regeneration.
136=item body_<body slot/part> 257=item body_<body slot/part>
137 258
138the part of the body you need to use this weapon, possible values should be 259the part of the body you need to use this weapon, possible values should be
139looked up in common/item.C at body_locations. 260looked up in common/item.C at body_locations.
140 261
141=item resist_<resistnacy> <integer> 262=item resist_<resistnacy> <number>
142 263
143this is the factor with which the difference of the players resistancy and 100% 264this is the factor with which the difference of the players resistancy and 100%
144is multiplied, something like this: 265is multiplied, something like this:
145 266
146 additional_resistancy = (100 - current_resistanct) * (<integer>/100) 267 additional_resistancy = (100 - current_resistanct) * (<number>/100)
147 268
148if <integer> is negative it is added to the total vulnerabilities, 269if <number> is negative it is added to the total vulnerabilities,
149and later the total resistance is decided by: 270and later the total resistance is decided by:
150 271
151 'total resistance = total protections - total vulnerabilities' 272 'total resistance = total protections - total vulnerabilities'
152 273
153see also common/living.C:fix_player 274see also common/living.C:fix_player
155=item patch_(attuned|repelled|denied) 276=item patch_(attuned|repelled|denied)
156 277
157this field modifies the pathes the player is attuned to, see include/spells.h PATH_* 278this field modifies the pathes the player is attuned to, see include/spells.h PATH_*
158for the pathes. 279for the pathes.
159 280
160=item luck <integer> 281=item luck <number>
161 282
162this luck is added to the players luck 283this luck is added to the players luck
163 284
164=item move_type 285=item move_type
165 286
166if the weapon has a move_type set the player inherits it's move_type 287if the weapon has a move_type set the player inherits it's move_type
167 288
168=item exp <integer> 289=item exp <number>
169 290
170the added_speed and bonus_speed of the player is raised by <integer>/3. 291the added_speed and bonus_speed of the player is raised by <number>/3.
171if <integer> < 0 then the added_speed is decreased by <integer> 292if <number> < 0 then the added_speed is decreased by <number>
172 293
173=item weight 294=item weight
174 295
175the weight of the weapon 296the weight of the weapon
176 297
185 - dam: the players dam is adjusted by: player->dam += (dam + magic) 306 - dam: the players dam is adjusted by: player->dam += (dam + magic)
186 307
187 - weapon speed (last_sp): weapon_speed is calculated by: (last_sp * 2 - magic) / 2 308 - weapon speed (last_sp): weapon_speed is calculated by: (last_sp * 2 - magic) / 2
188 (minium is 0) 309 (minium is 0)
189 310
190=item ac <integer> 311=item ac <number>
191 312
192the amount of ac points the player's ac is decreased 313the amount of ac points the player's ac is decreased
193 314
194=item wc <integer> 315=item wc <number>
195 316
196the amount of wc points the player's ac is decreased 317the amount of wc points the player's ac is decreased
197 318
198=back 319=back
199 320

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines