… | |
… | |
49 | or shouldn't be set by an archetype. If the internal names differs the |
49 | or shouldn't be set by an archetype. If the internal names differs the |
50 | external name (for the archetypes) for the attribute is written behind it. |
50 | external 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 | |
|
|
54 | These are the fields that most of the objects have and/or their |
|
|
55 | default behaviour. |
|
|
56 | |
54 | =over 4 |
57 | =over 4 |
|
|
58 | |
|
|
59 | =item name <string> |
|
|
60 | |
|
|
61 | The name of the object. |
|
|
62 | |
|
|
63 | =item name_pl <string> |
|
|
64 | |
|
|
65 | The name of a collection of these objects (the plural of the name). |
|
|
66 | |
|
|
67 | =item face <facename> |
|
|
68 | |
|
|
69 | The graphical appearance of this object. |
|
|
70 | |
|
|
71 | =item invisible <number> |
|
|
72 | |
|
|
73 | If the <number> is greater than 0 the object is invisible. |
|
|
74 | For players this field reflects the duration of the invisibility |
|
|
75 | and is decreased every tick by 1. |
|
|
76 | |
|
|
77 | For non-player objects this field is not changed by server ticks. |
|
|
78 | |
|
|
79 | =item speed <numeric> |
|
|
80 | |
|
|
81 | If this field is greater than MIN_ACTIVE_SPEED (~0.0001) the object is placed |
|
|
82 | on the active object list and will be processed each tick (see also speed_left!). |
|
|
83 | |
|
|
84 | If the speed field drops below the MIN_ACTIVE_SPEED the object is removed |
|
|
85 | from the active object list and it won't experience any processing per tick. |
|
|
86 | |
|
|
87 | =item speed_left <number> |
|
|
88 | |
|
|
89 | If this field is greater than 0 and the object is on the |
|
|
90 | active 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 | |
|
|
95 | If the object is on the active list and speed_left is lower or |
|
|
96 | equal to 0 the absolute value of the speed field is added to speed_left |
|
|
97 | on the end of the tick. |
|
|
98 | |
|
|
99 | =item no_drop (0|1) |
|
|
100 | |
|
|
101 | Sets the flag FLAG_NO_DROP. See the Flags section below. |
|
|
102 | |
|
|
103 | =item applied (0|1) |
|
|
104 | |
|
|
105 | Sets the flag FLAG_APPLIED. See the Flags section below. |
|
|
106 | |
|
|
107 | =item is_used_up (0|1) |
|
|
108 | |
|
|
109 | Sets the flag FLAG_IS_USED_UP. See Flags section below. |
|
|
110 | |
|
|
111 | =item editable (more than deprecated) |
|
|
112 | |
|
|
113 | This field had a special meaning for crossedit, which used parts |
|
|
114 | of the server code for editing. Wherever you see this attribute being |
|
|
115 | set in an archetype ignore it and/or remove it. No code interprets this |
|
|
116 | field anymore. |
|
|
117 | |
|
|
118 | =back |
|
|
119 | |
|
|
120 | =head3 Flags |
|
|
121 | |
|
|
122 | Here are the effects of the flags described. |
|
|
123 | |
|
|
124 | =over 4 |
|
|
125 | |
|
|
126 | =item FLAG_NO_DROP |
|
|
127 | |
|
|
128 | An object can't be picked up and dropped. |
|
|
129 | |
|
|
130 | =item FLAG_APPLIED |
|
|
131 | |
|
|
132 | This flag mostly states whether this object has been 'applied' by the player. |
|
|
133 | For objects that are applied by the code or have this flag set in the archetype |
|
|
134 | it mostly means 'this object is active'. |
|
|
135 | |
|
|
136 | For example the player adjustments of the hp/sp/grace fields and inheritance |
|
|
137 | of flags from objects in his inventory is toggled by this flag. |
|
|
138 | |
|
|
139 | =item FLAG_IS_USED_UP |
|
|
140 | |
|
|
141 | This flag controls whether an object is 'used up'. If it is set the 'food' field |
|
|
142 | of the object is decreased by 1 each tick, and if it is lower or equal 0 after tha |
|
|
143 | it is removed. |
|
|
144 | |
|
|
145 | If also the flag FLAG_APPLIED is set, the 'duration' field controls whether |
|
|
146 | this object is removed or not, see the Force type below for the meaning |
|
|
147 | of the duration field in this context. |
55 | |
148 | |
56 | =back |
149 | =back |
57 | |
150 | |
58 | =head2 Description of type specific attributes |
151 | =head2 Description of type specific attributes |
59 | |
152 | |
… | |
… | |
75 | |
168 | |
76 | =item attacktype <bitmask> |
169 | =item attacktype <bitmask> |
77 | |
170 | |
78 | bitfield which decides the attacktype of the damage, see include/attackinc.h |
171 | bitfield which decides the attacktype of the damage, see include/attackinc.h |
79 | |
172 | |
80 | =item dam <integer> |
173 | =item dam <number> |
81 | |
174 | |
82 | amount of damage being done with the attacktype |
175 | amount of damage being done with the attacktype |
83 | |
176 | |
84 | =item item_power <level> |
177 | =item item_power <level> |
85 | |
178 | |
… | |
… | |
104 | |
197 | |
105 | =item last_sp |
198 | =item last_sp |
106 | |
199 | |
107 | the weapon speed (see magic description) |
200 | the weapon speed (see magic description) |
108 | |
201 | |
109 | =item food <integer> |
202 | =item food <number> |
110 | |
203 | |
111 | addition to food regeneration of the player |
204 | addition to food regeneration of the player |
112 | |
205 | |
113 | =item hp <integer> |
206 | =item hp <number> |
114 | |
207 | |
115 | addition to health regeneration |
208 | addition to health regeneration |
116 | |
209 | |
117 | =item sp <integer> |
210 | =item sp <number> |
118 | |
211 | |
119 | addition to mana regeneration |
212 | addition to mana regeneration |
120 | |
213 | |
121 | =item grace <integer> |
214 | =item grace <number> |
122 | |
215 | |
123 | addititon to grace regeneration |
216 | addititon to grace regeneration |
124 | |
217 | |
125 | =item gen_sp_armour <integer> |
218 | =item gen_sp_armour <number> |
126 | |
219 | |
127 | the players gen_sp_armour field (which is per default 10) is added the <integer> amount. |
220 | the players gen_sp_armour field (which is per default 10) is added the <number> amount. |
128 | gen_sp_armour seems to be a factor with which gen_sp in do_some_living() |
221 | gen_sp_armour seems to be a factor with which gen_sp in do_some_living() |
129 | is multiplied: gen_sp *= 10/<integer> |
222 | is multiplied: gen_sp *= 10/<number> |
130 | meaning: values > 10 of gen_sp_armour limits the amout of regenerated |
223 | meaning: values > 10 of gen_sp_armour limits the amout of regenerated |
131 | spellpoints. |
224 | spellpoints. |
132 | |
225 | |
133 | generally this field on weapons is in ranges of 1-30 and decides the slowdown of the |
226 | generally this field on weapons is in ranges of 1-30 and decides the slowdown of the |
134 | sp regeneration. |
227 | sp regeneration. |
… | |
… | |
136 | =item body_<body slot/part> |
229 | =item body_<body slot/part> |
137 | |
230 | |
138 | the part of the body you need to use this weapon, possible values should be |
231 | the part of the body you need to use this weapon, possible values should be |
139 | looked up in common/item.C at body_locations. |
232 | looked up in common/item.C at body_locations. |
140 | |
233 | |
141 | =item resist_<resistnacy> <integer> |
234 | =item resist_<resistnacy> <number> |
142 | |
235 | |
143 | this is the factor with which the difference of the players resistancy and 100% |
236 | this is the factor with which the difference of the players resistancy and 100% |
144 | is multiplied, something like this: |
237 | is multiplied, something like this: |
145 | |
238 | |
146 | additional_resistancy = (100 - current_resistanct) * (<integer>/100) |
239 | additional_resistancy = (100 - current_resistanct) * (<number>/100) |
147 | |
240 | |
148 | if <integer> is negative it is added to the total vulnerabilities, |
241 | if <number> is negative it is added to the total vulnerabilities, |
149 | and later the total resistance is decided by: |
242 | and later the total resistance is decided by: |
150 | |
243 | |
151 | 'total resistance = total protections - total vulnerabilities' |
244 | 'total resistance = total protections - total vulnerabilities' |
152 | |
245 | |
153 | see also common/living.C:fix_player |
246 | see also common/living.C:fix_player |
… | |
… | |
155 | =item patch_(attuned|repelled|denied) |
248 | =item patch_(attuned|repelled|denied) |
156 | |
249 | |
157 | this field modifies the pathes the player is attuned to, see include/spells.h PATH_* |
250 | this field modifies the pathes the player is attuned to, see include/spells.h PATH_* |
158 | for the pathes. |
251 | for the pathes. |
159 | |
252 | |
160 | =item luck <integer> |
253 | =item luck <number> |
161 | |
254 | |
162 | this luck is added to the players luck |
255 | this luck is added to the players luck |
163 | |
256 | |
164 | =item move_type |
257 | =item move_type |
165 | |
258 | |
166 | if the weapon has a move_type set the player inherits it's move_type |
259 | if the weapon has a move_type set the player inherits it's move_type |
167 | |
260 | |
168 | =item exp <integer> |
261 | =item exp <number> |
169 | |
262 | |
170 | the added_speed and bonus_speed of the player is raised by <integer>/3. |
263 | the added_speed and bonus_speed of the player is raised by <number>/3. |
171 | if <integer> < 0 then the added_speed is decreased by <integer> |
264 | if <number> < 0 then the added_speed is decreased by <number> |
172 | |
265 | |
173 | =item weight |
266 | =item weight |
174 | |
267 | |
175 | the weight of the weapon |
268 | the weight of the weapon |
176 | |
269 | |
… | |
… | |
185 | - dam: the players dam is adjusted by: player->dam += (dam + magic) |
278 | - dam: the players dam is adjusted by: player->dam += (dam + magic) |
186 | |
279 | |
187 | - weapon speed (last_sp): weapon_speed is calculated by: (last_sp * 2 - magic) / 2 |
280 | - weapon speed (last_sp): weapon_speed is calculated by: (last_sp * 2 - magic) / 2 |
188 | (minium is 0) |
281 | (minium is 0) |
189 | |
282 | |
190 | =item ac <integer> |
283 | =item ac <number> |
191 | |
284 | |
192 | the amount of ac points the player's ac is decreased |
285 | the amount of ac points the player's ac is decreased |
193 | |
286 | |
194 | =item wc <integer> |
287 | =item wc <number> |
195 | |
288 | |
196 | the amount of wc points the player's ac is decreased |
289 | the amount of wc points the player's ac is decreased |
197 | |
290 | |
198 | =back |
291 | =back |
199 | |
292 | |
200 | =head4 Player inherits following flags from weapons: |
293 | =head4 Player inherits following flags from weapons: |
201 | |
294 | |
202 | FLAG_LIFESAVE, FLAG_REFL_SPELL, FLAG_REFL_MISSILE, FLAG_STEALTH, |
295 | FLAG_LIFESAVE, FLAG_REFL_SPELL, FLAG_REFL_MISSILE, FLAG_STEALTH, |
203 | FLAG_XRAYS, FLAG_BLIND, FLAG_SEE_IN_DARK, FLAG_UNDEAD |
296 | FLAG_XRAYS, FLAG_BLIND, FLAG_SEE_IN_DARK, FLAG_UNDEAD |
|
|
297 | |
|
|
298 | =head3 FORCE - type 114 - Forces |
|
|
299 | |
|
|
300 | Note: Forces only take effect on the player if they have set FLAG_APPLIED. |
|
|
301 | |
|
|
302 | Whether the duration field is processed or not a tick is controlled via the |
|
|
303 | speed and speed_left field. Look above at the generic description of these |
|
|
304 | fields. |
|
|
305 | |
|
|
306 | =over 4 |
|
|
307 | |
|
|
308 | =item duration |
|
|
309 | |
|
|
310 | While this field is greater than 0 the force is not removed. |
|
|
311 | It is decreased each tick by 1. |
|
|
312 | |
|
|
313 | =back |