=head1 CROSSFIRE+ OBJECT AND INTERNALS DOCUMENTATION Here is all information about the object types Crossfire+ supports at the moment. This is not a complete documentation (yet) and browsing the source is still recommended to learn about the objects that aren't documented here. This documentation is in a sketchy state. It's mostly used to collect notes about the internal behaviour of the objects. =head2 About archetypes and objects Field denotes an attribute of an archetype. This is an example of an archetype: Object button_trigger name button type 30 face button_sma.111 anim button_sma.111 button_sma.112 mina is_animated 0 exp 30 no_pick 1 walk_on 1 walk_off 1 editable 48 visibility 50 weight 1 end This archetype has the name 'button_trigger' and the objects that inherit from this archetype have the name 'button'. The next field 'type' decides the main behaviour of this archetype. For a comprehensive list of types see include/define.h. For this case you might find a line like: #define TRIGGER_BUTTON        30 The server internally works with objects that 'inherit' attributes from an archetype. They have a similar set of attributes. The following documentation will also document the meaning of code internal attributes of objects. These attributes are marked as '(internal)' and can't or shouldn't be set by an archetype. If the internal names differs the external name (for the archetypes) for the attribute is written behind it. =head2 Description of generic archetype and object attributes =over 4 =back =head2 Description of type specific attributes The beginning of the headers of the following subsection are the server internal names for the objects types, see include/define.h. The numeric values are maybe not 100% accurate, as the code is a changing target, please consult include/define.h in doubt :-) =head3 WEAPON - type 15 - Weapons This type is for general hack and slash weapons like swords, maces and daggers and and .... =over 4 =item weapontype decides what attackmessages are generated, see include/define.h =item attacktype bitfield which decides the attacktype of the damage, see include/attackinc.h =item dam amount of damage being done with the attacktype =item item_power the itempower of this weapon. =item name the name of the weapon. =item level (internal) The improvement state of the weapon. If this field is greater than 0 the 'name' field starts with the characters name who improved this weapon. =item last_eat (internal) seems to be the amount of improvements of a weapon, the formular for equipping a weapon seems to be (server/apply.C:check_weapon_power): ((who->level / 5) + 5) >= op->last_eat =item last_sp the weapon speed (see magic description) =item food addition to food regeneration of the player =item hp addition to health regeneration =item sp addition to mana regeneration =item grace addititon to grace regeneration =item gen_sp_armour the players gen_sp_armour field (which is per default 10) is added the amount. gen_sp_armour seems to be a factor with which gen_sp in do_some_living() is multiplied: gen_sp *= 10/ meaning: values > 10 of gen_sp_armour limits the amout of regenerated spellpoints. generally this field on weapons is in ranges of 1-30 and decides the slowdown of the sp regeneration. =item body_ the part of the body you need to use this weapon, possible values should be looked up in common/item.C at body_locations. =item resist_ this is the factor with which the difference of the players resistancy and 100% is multiplied, something like this: additional_resistancy = (100 - current_resistanct) * (/100) if is negative it is added to the total vulnerabilities, and later the total resistance is decided by: 'total resistance = total protections - total vulnerabilities' see also common/living.C:fix_player =item patch_(attuned|repelled|denied) this field modifies the pathes the player is attuned to, see include/spells.h PATH_* for the pathes. =item luck this luck is added to the players luck =item move_type if the weapon has a move_type set the player inherits it's move_type =item exp the added_speed and bonus_speed of the player is raised by /3. if < 0 then the added_speed is decreased by =item weight the weight of the weapon =item magic the magic field affects the amounts of the following fields: - wc : the players wc is adjusted by: player->wc -= (wc + magic) - ac : the players ac is lowered by (ac + magic) if (player->ac + magic) > 0 - dam: the players dam is adjusted by: player->dam += (dam + magic) - weapon speed (last_sp): weapon_speed is calculated by: (last_sp * 2 - magic) / 2 (minium is 0) =item ac the amount of ac points the player's ac is decreased =item wc the amount of wc points the player's ac is decreased =back =head4 Player inherits following flags from weapons: FLAG_LIFESAVE, FLAG_REFL_SPELL, FLAG_REFL_MISSILE, FLAG_STEALTH, FLAG_XRAYS, FLAG_BLIND, FLAG_SEE_IN_DARK, FLAG_UNDEAD