Python object fields

List of the object fields and their meaning.

Name Type Details Flags Notes
below object Pointer to the object stacked below this one  (readonly)
above object Pointer to the object stacked above this one Note: stacked in the *same* environment  (readonly)
inv object Pointer to the first object in the inventory  (readonly)
env object Pointer to the object which is the environment. This is typically the container that the object is in. If env == NULL then the object is on a map or in the nirvana.  (readonly)
map map Pointer to the map in which this object is present  (readonly)
name string The name of the object, obviously...  (player readonly)
title string Of foo, etc
race string Human, goblin, dragon, etc
slaying string Which race to do double damage to. If this is an exit, this is the filename
msg string If this is a book/sign/magic mouth/etc
artifact string Artifact name that was applied to this object by give_artifact_abilities().
weight integer Attributes of the object - the weight
weight_limit integer Weight-limit of object - player and container should have this... perhaps we can substitute it?
carrying integer How much weight this object contains (of objects in inv). This is not copied by memcpy(), since the memcpy() doesn't actually copy over the inventory either, so it would create bogus carrying weight in some cases.
path_attuned integer Paths the object is attuned to
path_repelled integer Paths the object is repelled from
path_denied integer Paths the object is denied access to
value integer How much money it is worth (or contains)
nrof integer How many of the objects
enemy object Monster/player to follow even if not closest  (readonly)
attacked_by object This object starts to attack us! Only player & monster  (readonly)
owner object Pointer to the object which controls this one.Owner should not be referred to directly - get_owner() should be used instead.  (readonly)
x integer X position in the map for this object  (readonly)
y integer Y position in the map for this object  (readonly)
attacked_by_distance integer Needed to target the nearest enemy
last_damage integer The damage sent with map2
terrain_type integer type flags for different enviroment (tile is under water, firewalk,...) A object which can be applied GIVES this terrain flags to his owner
terrain_flag integer The object can move over/is unaffected from this terrain type
material integer What materials this object consists of
material_real integer This holds the real material value like what kind of steel
last_heal integer Last healed. Depends on constitution
last_sp integer As last_heal, but for spell points
last_grace integer as last_sp, except for grace
last_eat integer How long since we last ate
animation_id integer An index into the animation array
inv_animation_id integer An index into the animation array for the client inv
magic integer Any magical bonuses to this item
state integer How the object was last drawn (animation)
level integer the level of this object (most used for mobs & player)  (player readonly)
direction integer Means the object is moving that way.
facing integer Object is oriented/facing that way.
quick_pos integer quick pos is 0 for single arch, xxxx0000 for a head or x/y offset packed to 4 bits for a tail warning: change this when include > 15x15 monster
quickslot integer Quickslot ID this object goes in  (readonly)
type integer PLAYER, BULLET, etc. See define.h
sub_type integer Sub type definition - this will be sent to client too
item_quality integer Quality of an item in range from 0-100
item_condition integer Condition of repair of an item - from 0 to 100% item_quality
item_race integer Item crafted from race x. "orcish xxx", "dwarven xxxx"
item_level integer Level needed to use or apply this item
item_skill integer if set and item_level, item_level in this skill is needed
glow_radius integer Object is a light source
move_status integer What stage in attack mode
move_type integer What kind of movement
anim_enemy_dir integer special shadow variable: show dir to targeted enemy
anim_moving_dir integer sic: shows moving dir or -1 when object do something else
anim_enemy_dir_last integer if we change facing in movement, we must test for update the anim
anim_moving_dir_last integer sic:
anim_last_facing integer The last direction this monster was facing
anim_last_facing_last integer The last direction this monster was facing backbuffer
anim_speed integer Animation speed in ticks
last_anim integer Ticks between animation-frames
behavior integer Various behavior flags.
run_away integer Monster runs away if its hp goes below this percentage.
layer integer the layer in a map, this object will be sorted in
speed float The overall speed of this object  (player readonly)
speed_left float How much speed is left to spend this round
weapon_speed float new weapon speed system. swing of weapon
weapon_speed_left float Weapon speed left
weapon_speed_add float Weapon speed add
exp integer Experience.
hp integer Hit points.
maxhp integer Max hit points.  (player readonly)
sp integer Spell points. Used to cast mage spells.
maxsp integer Max spell points.  (player readonly)
grace integer Grace. Used to invoke clerical prayers.
maxgrace integer Max grace.  (player readonly)
food integer How much food in stomach. 0 = starved.
dam integer How much damage this object does when hitting.  (player readonly)
wc integer Weapon class.  (player readonly)
ac integer Armour class.  (player readonly)
wc_range integer Random value range we add to wc value of attacker: wc + (random() % wc_range). If it's higher than defender's AC then we can hit our enemy.
Str integer Strength.  (player fix)
Dex integer Dexterity.  (player fix)
Con integer Constitution.  (player fix)
Wis integer Wisdom.  (player fix)
Cha integer Charisma.  (player fix)
Int integer Intelligence.  (player fix)
Pow integer Power.  (player fix)
arch archetype Pointer to archetype

Generated by  doxygen 1.6.2