This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
dev:object_fields [2018/04/12 04:12] karl First round of page cleanup. Since the most Meaning: lines contain the comment from the objekt.h , name them in a Comment: line, and Meaning afterwards |
dev:object_fields [2020/11/23 08:34] (current) ryo [anim_suffix] update |
||
---|---|---|---|
Line 3: | Line 3: | ||
This is the description of fields of the object structure, and what they are used to. | This is the description of fields of the object structure, and what they are used to. | ||
+ | The struct [[object_fields_living|living]] and struct [[object_fields_key_value|key_value]] have their own pages. \\ | ||
+ | The term [[Shared Strings]] has it's own page, too. \\ | ||
See also page [[Objects]] . | See also page [[Objects]] . | ||
===== Issues == | ===== Issues == | ||
- | FIXME This page needs complete rebuild. It is unsorted and too large to scroll and to read with almost no content.\\ | + | FIXME \\ |
- | It appears that server internal variables like //next// and //prev// have mixed with archetype attributes. \\ | + | |
**These Object Fields are for now sorted alphabetically [[:arch:arch_attributes:1_index|here]] ** . \\ | **These Object Fields are for now sorted alphabetically [[:arch:arch_attributes:1_index|here]] ** . \\ | ||
Whenever =field= gets changed, please do it in the sorted pages in the :arch:arch_attributes:* namespace. | Whenever =field= gets changed, please do it in the sorted pages in the :arch:arch_attributes:* namespace. | ||
- | |||
- | Jump down to [[#"living" structure fields]] , [[#Key/value fields]] | ||
- | |||
<WRAP lo> | <WRAP lo> | ||
FIXME fill in the blanks :) add sharedstring info | FIXME fill in the blanks :) add sharedstring info | ||
- | FIXME maybe this should be part of the object.h file directly? | + | FIXME make a script to either do object.h -> this page, or this page -> object.h \\ |
- | + | IMHO one should put this data into object.h, in doxygen format, and make a script to do object.h -> this page --- //[[user:rednaxela|Alex Schultz]] 2007/01/03 12:50// | |
- | FIXME make a script to either do object.h -> this page, or this page -> object.h | + | |
- | * IMHO one should put this data into object.h, in doxygen format, and make a script to do object.h -> this page --- //[[user:rednaxela|Alex Schultz]] 2007/01/03 12:50// | + | |
</WRAP> | </WRAP> | ||
Line 224: | Line 220: | ||
} object; | } object; | ||
</code> | </code> | ||
+ | |||
+ | ---- | ||
===== Head Part of Struct == | ===== Head Part of Struct == | ||
Line 393: | Line 391: | ||
Comment: Used to determine combined animations | Comment: Used to determine combined animations | ||
- | Meaning: NEW introduced since ? | + | When a player or a monster attacks or uses a skill, if this suffix is defined on the weapon (combat) or the skill (skill use), the server tries to find an animation named "[player_or_monster_animation]_[anim_suffix]". |
+ | |||
+ | For instance, for a Fenx using an animation "fenx_player" who uses a sword (anim_suffix "sword"), when attacking, the "fenx_player_sword" animation will be used if it exists. | ||
+ | If no suffix is defined or the animation doesn't exist, then nothing happens, else the animation is applied until it finished. | ||
==== title ==== | ==== title ==== | ||
Type: const char * (shared string) | Type: const char * (shared string) | ||
Line 639: | Line 640: | ||
Meaning: Mainly the skill level which a character has to have to successfully cast magic upon monster-with-level . | Meaning: Mainly the skill level which a character has to have to successfully cast magic upon monster-with-level . | ||
+ | |||
+ | ==== last_eat ==== | ||
+ | Type: sint16 | ||
+ | |||
+ | Comment: How long since we last ate | ||
+ | |||
+ | Meaning: | ||
==== last_heal ==== | ==== last_heal ==== | ||
Type: sint32 | Type: sint32 | ||
+ | |||
+ | Comment: Last healed. Depends on constitution | ||
Meaning: | Meaning: | ||
Line 649: | Line 659: | ||
==== last_sp ==== | ==== last_sp ==== | ||
Type: sint32 | Type: sint32 | ||
+ | |||
+ | Comment: As last_heal, but for spell points | ||
Meaning: | Meaning: | ||
Line 657: | Line 669: | ||
* 3: make all monsters fall asleep | * 3: make all monsters fall asleep | ||
* 4: charm all monsters | * 4: charm all monsters | ||
- | * new sp for praying skill when changing god? | ||
- | * FIXME check what it means when praying | ||
* for CHECK_INV, 0 means player must have object, else player must not have object | * for CHECK_INV, 0 means player must have object, else player must not have object | ||
- | * for healing, how many sp to regenerate | + | * for TRIGGER_ALTAR ?? |
- | * for TRIGGER_ALTAR ?? FIXME | + | * FIXME |
- | * for DISEASEs, the SYMPTOM's last_sp FIXME | + | * for DISEASEs, the SYMPTOM's last_sp |
+ | * FIXME | ||
* for objects being thrown, the max number of moves to exist | * for objects being thrown, the max number of moves to exist | ||
* for monsters, regenerate sp | * for monsters, regenerate sp | ||
+ | * for healing, how many sp to regenerate | ||
+ | * new sp for praying skill when changing god? | ||
+ | * FIXME check what it means when praying | ||
==== last_grace ==== | ==== last_grace ==== | ||
Type: sint16 | Type: sint16 | ||
- | Meaning: | + | Comment: As last_sp, except for grace |
- | + | ||
- | ==== last_eat ==== | + | |
- | Type: sint16 | + | |
Meaning: | Meaning: | ||
Line 678: | Line 689: | ||
==== invisible ==== | ==== invisible ==== | ||
Type: sint16 | Type: sint16 | ||
+ | |||
+ | Comment: How much longer the object will be invis | ||
Meaning: | Meaning: | ||
Line 683: | Line 696: | ||
==== pick_up ==== | ==== pick_up ==== | ||
Type: uint8 | Type: uint8 | ||
+ | |||
+ | Comment: See crossfire.doc | ||
Meaning: | Meaning: | ||
Line 689: | Line 704: | ||
Type: sint8 | Type: sint8 | ||
- | Meaning: | + | Comment: Power rating of the object |
+ | |||
+ | Meaning: The character has a limited item power maximum to be able to apply magical items. \\ | ||
+ | If the sum of the item_power of all applied items reaches the allowed maximum, \\ | ||
+ | no more magical item with //item_power > 0// can be wielded / worn. | ||
==== gen_sp_armour ==== | ==== gen_sp_armour ==== | ||
Type: sint8 | Type: sint8 | ||
+ | |||
+ | Comment: Sp regen penalty this object has (was last_heal) | ||
+ | |||
+ | Meaning: | ||
+ | |||
+ | ==== glow_radius ==== | ||
+ | Type: sint8 | ||
+ | |||
+ | Comment: indicates the glow radius of the object | ||
Meaning: | Meaning: | ||
Line 698: | Line 726: | ||
==== weight ==== | ==== weight ==== | ||
Type: sint32 | Type: sint32 | ||
+ | |||
+ | Comment: Attributes of the object | ||
Meaning: | Meaning: | ||
Line 703: | Line 733: | ||
==== weight_limit ==== | ==== weight_limit ==== | ||
Type: sint32 | Type: sint32 | ||
+ | |||
+ | Comment: Weight-limit of object | ||
Meaning: | Meaning: | ||
Line 708: | Line 740: | ||
==== carrying ==== | ==== carrying ==== | ||
Type: sint32 | Type: sint32 | ||
+ | |||
+ | Comment: How much weight this object contains | ||
Meaning: | Meaning: | ||
- | ==== glow_radius ==== | ||
- | Type: sint8 | ||
- | |||
- | Meaning: | ||
==== stats ==== | ==== stats ==== | ||
Type: living | Type: living | ||
+ | |||
+ | Comment: Str, Con, Dex, etc | ||
Meaning: | Meaning: | ||
+ | |||
+ | See [[#"living" structure fields]] on this page. | ||
==== perm_exp ==== | ==== perm_exp ==== | ||
Type: sint64 | Type: sint64 | ||
+ | |||
+ | Comment: Permanent exp | ||
Meaning: | Meaning: | ||
Line 729: | Line 765: | ||
Type: const char * (shared string) | Type: const char * (shared string) | ||
- | Meaning: | + | Comment: |
+ | |||
+ | Meaning: Not anymore included since when ? | ||
==== current_weapon ==== | ==== current_weapon ==== | ||
Type: obj * | Type: obj * | ||
+ | |||
+ | Comment: Pointer to the weapon currently used | ||
Meaning: | Meaning: | ||
Line 738: | Line 778: | ||
==== weapontype ==== | ==== weapontype ==== | ||
Type: uint32 | Type: uint32 | ||
+ | |||
+ | Comment: Type of weapon | ||
Meaning: | Meaning: | ||
Line 744: | Line 786: | ||
Type: uint32 | Type: uint32 | ||
- | Meaning: | + | Comment: |
+ | |||
+ | Meaning: Not included anymore since when ? | ||
==== body_info ==== | ==== body_info ==== | ||
Type: sint8[NUM_BODY_LOCATIONS] | Type: sint8[NUM_BODY_LOCATIONS] | ||
+ | |||
+ | Comment: Body info as loaded from the file | ||
Meaning: | Meaning: | ||
Line 753: | Line 799: | ||
==== body_used ==== | ==== body_used ==== | ||
Type: sint8[NUM_BODY_LOCATIONS] | Type: sint8[NUM_BODY_LOCATIONS] | ||
+ | |||
+ | Comment: Calculated value based on items equipped | ||
Meaning: | Meaning: | ||
Line 758: | Line 806: | ||
==== owner ==== | ==== owner ==== | ||
Type: obj * | Type: obj * | ||
+ | |||
+ | Comment: Pointer to the object which controls this one. Owner should not be referred to directly - object_get_owner() should be used instead. | ||
Meaning: | Meaning: | ||
Line 763: | Line 813: | ||
==== ownercount ==== | ==== ownercount ==== | ||
Type: tag_t | Type: tag_t | ||
+ | |||
+ | Comment: What count the owner had (in case owner has been freed) | ||
Meaning: | Meaning: | ||
Line 768: | Line 820: | ||
==== enemy ==== | ==== enemy ==== | ||
Type: obj * | Type: obj * | ||
+ | |||
+ | Comment: Monster/player to follow even if not closest | ||
Meaning: | Meaning: | ||
Line 773: | Line 827: | ||
==== attacked_by ==== | ==== attacked_by ==== | ||
Type: obj * | Type: obj * | ||
+ | |||
+ | Comment: This object start to attack us! only player & monster | ||
Meaning: | Meaning: | ||
Line 779: | Line 835: | ||
Type: tag_t | Type: tag_t | ||
- | Meaning: | + | Comment: The tag of attacker, so we can be sure |
- | + | ||
- | ==== randomitems ==== | + | |
- | Type: treasureliststruct * | + | |
Meaning: | Meaning: | ||
Line 788: | Line 841: | ||
==== run_away ==== | ==== run_away ==== | ||
Type: uint16 | Type: uint16 | ||
+ | |||
+ | Comment: Monster runs away if it's hp goes below this percentage. | ||
Meaning: | Meaning: | ||
+ | |||
+ | ==== randomitems ==== | ||
+ | Type: treasureliststruct * | ||
+ | |||
+ | Comment: Items to be generated | ||
+ | |||
+ | Meaning: | ||
+ | |||
==== chosen_skill ==== | ==== chosen_skill ==== | ||
Type: obj * | Type: obj * | ||
+ | |||
+ | Comment: The skill chosen to use | ||
Meaning: | Meaning: | ||
Line 798: | Line 863: | ||
==== hide ==== | ==== hide ==== | ||
Type: uint32 | Type: uint32 | ||
+ | |||
+ | Comment: The object is hidden, not invisible | ||
Meaning: | Meaning: | ||
Line 803: | Line 870: | ||
==== move_status ==== | ==== move_status ==== | ||
Type: sint32 | Type: sint32 | ||
+ | |||
+ | Comment: What stage in attack mode | ||
Meaning: | Meaning: | ||
Line 808: | Line 877: | ||
==== attack_movement ==== | ==== attack_movement ==== | ||
Type: uint16 | Type: uint16 | ||
+ | |||
+ | Comment: What kind of attack movement | ||
Meaning: | Meaning: | ||
Line 813: | Line 884: | ||
==== will_apply ==== | ==== will_apply ==== | ||
Type: uint8 | Type: uint8 | ||
+ | |||
+ | Comment: See crossfire.doc and @ref WILL_APPLY_xxx | ||
Meaning: | Meaning: | ||
+ | |||
+ | ==== sound_chance ==== | ||
+ | Type: sint8 | ||
+ | |||
+ | Comment: Probability, 0 to 100, of the object emitting a sound. | ||
+ | |||
+ | Meaning: NEW since when ? | ||
==== spellitem ==== | ==== spellitem ==== | ||
Type: obj * | Type: obj * | ||
+ | |||
+ | Comment: Spell ability monster is choosing to use | ||
Meaning: | Meaning: | ||
Line 823: | Line 905: | ||
==== expmul ==== | ==== expmul ==== | ||
Type: double | Type: double | ||
+ | |||
+ | Comment: needed experience = (calc_exp*expmul) - means some races/classes can need less/more exp to gain levels | ||
Meaning: | Meaning: | ||
- | ==== duration ==== | + | ==== casting_time ==== |
Type: sint16 | Type: sint16 | ||
- | Meaning: | + | Comment: Time left before spell goes off |
- | + | ||
- | ==== duration_modifier ==== | + | |
- | Type: uint8 | + | |
Meaning: | Meaning: | ||
- | ==== casting_time ==== | + | ==== duration ==== |
Type: sint16 | Type: sint16 | ||
+ | |||
+ | Comment: How long the spell lasts | ||
Meaning: | Meaning: | ||
- | ==== spell ==== | + | ==== duration_modifier ==== |
- | Type: obj * | + | Type: uint8 |
+ | |||
+ | Comment: how level modifies duration | ||
Meaning: | Meaning: | ||
- | ==== start_holding ==== | + | ==== range ==== |
- | Type: uint16 | + | Type: sint8 |
+ | |||
+ | Comment: Range of the spell | ||
Meaning: | Meaning: | ||
- | ==== spellarg ==== | + | ==== range_modifier ==== |
- | Type: char * | + | Type: uint8 |
+ | |||
+ | Comment: How going up in level effects range | ||
Meaning: | Meaning: | ||
Line 858: | Line 947: | ||
==== dam_modifier ==== | ==== dam_modifier ==== | ||
Type: uint8 | Type: uint8 | ||
+ | |||
+ | Comment: How going up in level effects damage | ||
Meaning: | Meaning: | ||
- | ==== range ==== | + | |
- | Type: sint8 | + | ==== spell ==== |
+ | Type: obj * | ||
+ | |||
+ | Comment: Spell that was being cast | ||
Meaning: | Meaning: | ||
- | ==== range_modifier ==== | + | ==== spellarg ==== |
- | Type: uint8 | + | Type: char * |
+ | |||
+ | Comment: No comment available | ||
Meaning: | Meaning: | ||
+ | |||
+ | ==== start_holding ==== | ||
+ | Type: uint16 | ||
+ | |||
+ | Comment: | ||
+ | |||
+ | Meaning: Not included anymore ? | ||
+ | |||
==== arch ==== | ==== arch ==== | ||
Type: archt * | Type: archt * | ||
+ | |||
+ | Comment: Pointer to archetype | ||
Meaning: | Meaning: | ||
Line 878: | Line 984: | ||
==== other_arch ==== | ==== other_arch ==== | ||
Type: archt * | Type: archt * | ||
+ | |||
+ | Comment: Pointer used for various things - mostly used for what this objects turns into or what this object creates | ||
Meaning: | Meaning: | ||
+ | |||
==== flags ==== | ==== flags ==== | ||
Type: uint32[4] | Type: uint32[4] | ||
+ | |||
+ | Comment: Various flags | ||
Meaning: | Meaning: | ||
Line 888: | Line 999: | ||
==== animation_id ==== | ==== animation_id ==== | ||
Type: uint16 | Type: uint16 | ||
+ | |||
+ | Comment: An index into the animation array | ||
Meaning: | Meaning: | ||
Line 893: | Line 1006: | ||
==== anim_speed ==== | ==== anim_speed ==== | ||
Type: uint8 | Type: uint8 | ||
+ | |||
+ | Comment: Ticks between animation-frames | ||
Meaning: | Meaning: | ||
+ | |||
==== last_anim ==== | ==== last_anim ==== | ||
Type: uint8 | Type: uint8 | ||
+ | |||
+ | Comment: Last sequence used to draw face | ||
Meaning: | Meaning: | ||
+ | |||
+ | |||
+ | ==== temp_animation_id ==== | ||
+ | Type: uint16 | ||
+ | |||
+ | Comment: An index into the temporary animation array | ||
+ | |||
+ | Meaning: | ||
+ | |||
+ | ==== temp_anim_speed ==== | ||
+ | Type: uint8 | ||
+ | |||
+ | Comment: Ticks between temporary animation-frames | ||
+ | |||
+ | Meaning: | ||
+ | |||
==== elevation ==== | ==== elevation ==== | ||
Type: sint32 | Type: sint32 | ||
+ | |||
+ | Comment: Elevation of this terrain - used in weather code | ||
Meaning: | Meaning: | ||
Line 908: | Line 1044: | ||
==== smoothlevel ==== | ==== smoothlevel ==== | ||
Type: uint8 | Type: uint8 | ||
+ | |||
+ | Comment: how to smooth this square around | ||
Meaning: | Meaning: | ||
Line 913: | Line 1051: | ||
==== map_layer ==== | ==== map_layer ==== | ||
Type: uint8 | Type: uint8 | ||
+ | |||
+ | Comment: What level to draw this on the map | ||
Meaning: | Meaning: | ||
+ | |||
==== move_type ==== | ==== move_type ==== | ||
Type: MoveType | Type: MoveType | ||
+ | |||
+ | Comment: Type of movement this object uses | ||
Meaning: | Meaning: | ||
Line 925: | Line 1068: | ||
Type: MoveType | Type: MoveType | ||
- | Meaning: Prevents a character or monster from moving onto a tile occupied by the object. | + | Comment: What movement types this blocks |
- | * Each part of a multi-tile object may have a unique setting, unlike many other modifiers that are omitted or ignored in non-head parts. | + | Meaning: Prevents a character or monster from moving onto a tile occupied by the object. \\ |
+ | Each part of a multi-tile object may have an unique setting, unlike many other modifiers \\ | ||
+ | that are omitted or ignored in non-head parts. | ||
See also [[objects#move_block]] on the [[objects]] page. | See also [[objects#move_block]] on the [[objects]] page. | ||
+ | |||
+ | |||
==== move_allow ==== | ==== move_allow ==== | ||
Type: MoveType | Type: MoveType | ||
+ | |||
+ | Comment: What movement types explicitly allowed | ||
Meaning: | Meaning: | ||
Line 937: | Line 1086: | ||
==== move_on ==== | ==== move_on ==== | ||
Type: MoveType | Type: MoveType | ||
+ | |||
+ | Comment: Move types affected moving on to this space | ||
Meaning: | Meaning: | ||
Line 942: | Line 1093: | ||
==== move_off ==== | ==== move_off ==== | ||
Type: MoveType | Type: MoveType | ||
+ | |||
+ | Comment: Move types affected moving off this space | ||
Meaning: | Meaning: | ||
Line 947: | Line 1100: | ||
==== move_slow ==== | ==== move_slow ==== | ||
Type: MoveType | Type: MoveType | ||
+ | |||
+ | Comment: Movement types this slows down | ||
Meaning: | Meaning: | ||
Line 952: | Line 1107: | ||
==== move_slow_penalty ==== | ==== move_slow_penalty ==== | ||
Type: float | Type: float | ||
+ | |||
+ | Comment: How much this slows down the object | ||
Meaning: | Meaning: | ||
+ | |||
==== custom_name ==== | ==== custom_name ==== | ||
Type: const char * (shared string) | Type: const char * (shared string) | ||
+ | |||
+ | Comment: Custom name assigned by player | ||
Meaning: | Meaning: | ||
Line 962: | Line 1122: | ||
==== key_values ==== | ==== key_values ==== | ||
Type: key_value * | Type: key_value * | ||
+ | |||
+ | Comment: Fields not explictly known by the loader. | ||
Meaning: | Meaning: | ||
Line 969: | Line 1131: | ||
Type: uint8 | Type: uint8 | ||
- | Meaning: | + | Comment: |
+ | Meaning: Not included anymore ? | ||
+ | |||
+ | ---- | ||
====== "living" structure fields ===== | ====== "living" structure fields ===== | ||
+ | |||
==== Str ==== | ==== Str ==== |