| 1 |
elmex |
1.1 |
=head1 CROSSFIRE+ OBJECT AND INTERNALS DOCUMENTATION |
| 2 |
|
|
|
| 3 |
|
|
Here is all information about the object types Crossfire+ |
| 4 |
|
|
supports at the moment. This is not a complete documentation (yet) |
| 5 |
|
|
and browsing the source is still recommended to learn about |
| 6 |
|
|
the objects that aren't documented here. |
| 7 |
|
|
|
| 8 |
|
|
This documentation is in a sketchy state. It's mostly |
| 9 |
|
|
used to collect notes about the internal behaviour of the |
| 10 |
|
|
objects. |
| 11 |
|
|
|
| 12 |
|
|
=head2 About archetypes and objects |
| 13 |
|
|
|
| 14 |
|
|
Field denotes an attribute of an archetype. |
| 15 |
|
|
This is an example of an archetype: |
| 16 |
|
|
|
| 17 |
|
|
Object button_trigger |
| 18 |
|
|
name button |
| 19 |
|
|
type 30 |
| 20 |
|
|
face button_sma.111 |
| 21 |
|
|
anim |
| 22 |
|
|
button_sma.111 |
| 23 |
|
|
button_sma.112 |
| 24 |
|
|
mina |
| 25 |
|
|
is_animated 0 |
| 26 |
|
|
exp 30 |
| 27 |
|
|
no_pick 1 |
| 28 |
|
|
walk_on 1 |
| 29 |
|
|
walk_off 1 |
| 30 |
|
|
editable 48 |
| 31 |
|
|
visibility 50 |
| 32 |
|
|
weight 1 |
| 33 |
|
|
end |
| 34 |
|
|
|
| 35 |
|
|
This archetype has the name 'button_trigger' and the objects that |
| 36 |
|
|
inherit from this archetype have the name 'button'. |
| 37 |
|
|
|
| 38 |
|
|
The next field 'type' decides the main behaviour of this archetype. |
| 39 |
|
|
For a comprehensive list of types see include/define.h. For this case |
| 40 |
|
|
you might find a line like: |
| 41 |
|
|
|
| 42 |
|
|
#define TRIGGER_BUTTON 30 |
| 43 |
|
|
|
| 44 |
|
|
The server internally works with objects that 'inherit' attributes from |
| 45 |
|
|
an archetype. They have a similar set of attributes. |
| 46 |
|
|
|
| 47 |
|
|
The following documentation will also document the meaning of code internal |
| 48 |
|
|
attributes of objects. These attributes are marked as '(internal)' and can't |
| 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. |
| 51 |
|
|
|
| 52 |
|
|
=head2 Description of generic archetype and object attributes |
| 53 |
|
|
|
| 54 |
|
|
=over 4 |
| 55 |
|
|
|
| 56 |
|
|
=back |
| 57 |
|
|
|
| 58 |
|
|
=head2 Description of type specific attributes |
| 59 |
|
|
|
| 60 |
|
|
The beginning of the headers of the following subsection |
| 61 |
|
|
are the server internal names for the objects types, see include/define.h. |
| 62 |
|
|
The numeric values are maybe not 100% accurate, as the code is a changing |
| 63 |
|
|
target, please consult include/define.h in doubt :-) |
| 64 |
|
|
|
| 65 |
|
|
=head3 WEAPON - type 15 - Weapons |
| 66 |
|
|
|
| 67 |
|
|
This type is for general hack and slash weapons like swords, maces |
| 68 |
|
|
and daggers and and .... |
| 69 |
|
|
|
| 70 |
|
|
=over 4 |
| 71 |
|
|
|
| 72 |
|
|
=item weapontype <type id> |
| 73 |
|
|
|
| 74 |
|
|
decides what attackmessages are generated, see include/define.h |
| 75 |
|
|
|
| 76 |
|
|
=item attacktype <bitmask> |
| 77 |
|
|
|
| 78 |
|
|
bitfield which decides the attacktype of the damage, see include/attackinc.h |
| 79 |
|
|
|
| 80 |
|
|
=item dam <integer> |
| 81 |
|
|
|
| 82 |
|
|
amount of damage being done with the attacktype |
| 83 |
|
|
|
| 84 |
|
|
=item item_power <level> |
| 85 |
|
|
|
| 86 |
|
|
the itempower of this weapon. |
| 87 |
|
|
|
| 88 |
|
|
=item name |
| 89 |
|
|
|
| 90 |
|
|
the name of the weapon. |
| 91 |
|
|
|
| 92 |
|
|
=item level (internal) |
| 93 |
|
|
|
| 94 |
|
|
The improvement state of the weapon. |
| 95 |
|
|
If this field is greater than 0 the 'name' field starts with the |
| 96 |
|
|
characters name who improved this weapon. |
| 97 |
|
|
|
| 98 |
|
|
=item last_eat (internal) |
| 99 |
|
|
|
| 100 |
|
|
seems to be the amount of improvements of a weapon, |
| 101 |
|
|
the formular for equipping a weapon seems to be (server/apply.C:check_weapon_power): |
| 102 |
|
|
|
| 103 |
|
|
((who->level / 5) + 5) >= op->last_eat |
| 104 |
|
|
|
| 105 |
|
|
=item last_sp |
| 106 |
|
|
|
| 107 |
|
|
the weapon speed (see magic description) |
| 108 |
|
|
|
| 109 |
|
|
=item food <integer> |
| 110 |
|
|
|
| 111 |
|
|
addition to food regeneration of the player |
| 112 |
|
|
|
| 113 |
|
|
=item hp <integer> |
| 114 |
|
|
|
| 115 |
|
|
addition to health regeneration |
| 116 |
|
|
|
| 117 |
|
|
=item sp <integer> |
| 118 |
|
|
|
| 119 |
|
|
addition to mana regeneration |
| 120 |
|
|
|
| 121 |
|
|
=item grace <integer> |
| 122 |
|
|
|
| 123 |
|
|
addititon to grace regeneration |
| 124 |
|
|
|
| 125 |
|
|
=item gen_sp_armour <integer> |
| 126 |
|
|
|
| 127 |
|
|
the players gen_sp_armour field (which is per default 10) is added the <integer> amount. |
| 128 |
|
|
gen_sp_armour seems to be a factor with which gen_sp in do_some_living() |
| 129 |
|
|
is multiplied: gen_sp *= 10/<integer> |
| 130 |
|
|
meaning: values > 10 of gen_sp_armour limits the amout of regenerated |
| 131 |
|
|
spellpoints. |
| 132 |
|
|
|
| 133 |
|
|
generally this field on weapons is in ranges of 1-30 and decides the slowdown of the |
| 134 |
|
|
sp regeneration. |
| 135 |
|
|
|
| 136 |
|
|
=item body_<body slot/part> |
| 137 |
|
|
|
| 138 |
|
|
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. |
| 140 |
|
|
|
| 141 |
|
|
=item resist_<resistnacy> <integer> |
| 142 |
|
|
|
| 143 |
|
|
this is the factor with which the difference of the players resistancy and 100% |
| 144 |
|
|
is multiplied, something like this: |
| 145 |
|
|
|
| 146 |
|
|
additional_resistancy = (100 - current_resistanct) * (<integer>/100) |
| 147 |
|
|
|
| 148 |
|
|
if <integer> is negative it is added to the total vulnerabilities, |
| 149 |
|
|
and later the total resistance is decided by: |
| 150 |
|
|
|
| 151 |
|
|
'total resistance = total protections - total vulnerabilities' |
| 152 |
|
|
|
| 153 |
|
|
see also common/living.C:fix_player |
| 154 |
|
|
|
| 155 |
|
|
=item patch_(attuned|repelled|denied) |
| 156 |
|
|
|
| 157 |
|
|
this field modifies the pathes the player is attuned to, see include/spells.h PATH_* |
| 158 |
|
|
for the pathes. |
| 159 |
|
|
|
| 160 |
|
|
=item luck <integer> |
| 161 |
|
|
|
| 162 |
|
|
this luck is added to the players luck |
| 163 |
|
|
|
| 164 |
|
|
=item move_type |
| 165 |
|
|
|
| 166 |
|
|
if the weapon has a move_type set the player inherits it's move_type |
| 167 |
|
|
|
| 168 |
|
|
=item exp <integer> |
| 169 |
|
|
|
| 170 |
|
|
the added_speed and bonus_speed of the player is raised by <integer>/3. |
| 171 |
|
|
if <integer> < 0 then the added_speed is decreased by <integer> |
| 172 |
|
|
|
| 173 |
|
|
=item weight |
| 174 |
|
|
|
| 175 |
|
|
the weight of the weapon |
| 176 |
|
|
|
| 177 |
|
|
=item magic |
| 178 |
|
|
|
| 179 |
|
|
the magic field affects the amounts of the following fields: |
| 180 |
|
|
|
| 181 |
|
|
- wc : the players wc is adjusted by: player->wc -= (wc + magic) |
| 182 |
|
|
|
| 183 |
|
|
- ac : the players ac is lowered by (ac + magic) if (player->ac + magic) > 0 |
| 184 |
|
|
|
| 185 |
|
|
- dam: the players dam is adjusted by: player->dam += (dam + magic) |
| 186 |
|
|
|
| 187 |
|
|
- weapon speed (last_sp): weapon_speed is calculated by: (last_sp * 2 - magic) / 2 |
| 188 |
|
|
(minium is 0) |
| 189 |
|
|
|
| 190 |
|
|
=item ac <integer> |
| 191 |
|
|
|
| 192 |
|
|
the amount of ac points the player's ac is decreased |
| 193 |
|
|
|
| 194 |
|
|
=item wc <integer> |
| 195 |
|
|
|
| 196 |
|
|
the amount of wc points the player's ac is decreased |
| 197 |
|
|
|
| 198 |
|
|
=back |
| 199 |
|
|
|
| 200 |
|
|
=head4 Player inherits following flags from weapons: |
| 201 |
|
|
|
| 202 |
|
|
FLAG_LIFESAVE, FLAG_REFL_SPELL, FLAG_REFL_MISSILE, FLAG_STEALTH, |
| 203 |
|
|
FLAG_XRAYS, FLAG_BLIND, FLAG_SEE_IN_DARK, FLAG_UNDEAD |