Atrinik Server  4.0
Python object fields

Python object fields

List of the object fields and their meaning.

Name Type Details Flags Notes
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)
head object Points to the main object of a large body  (readonly)
more object Pointer to the rest of a large body of objects  (readonly)
map map Pointer to the map in which this object is present  (readonly)
name string

The name of the object, obviously...

See Also
obj::name Uses
 (player readonly)
custom_name string
title string

Of foo, etc

See Also
obj::title Uses
race string

Human, goblin, dragon, etc

See Also
obj::race Uses
slaying string

Which race to do double damage to. If this is an exit, this is the filename

See Also
obj::slaying Uses
msg string

If this is a book/sign/magic mouth/etc

See Also
obj::msg Uses
artifact string Artifact name that was applied to this object by give_artifact_abilities().
weight unknown

Attributes of the object - the weight

See Also
obj::weight Uses
count integer Unique object number for this object  (readonly)
weight_limit integer

Weight-limit of object - player and container should have this... perhaps we can substitute it?

See Also
obj::weight_limit Uses
carrying unknown

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.

See Also
obj::carrying Uses
path_attuned integer

Paths the object is attuned to

See Also
obj::path_attuned Uses
path_repelled integer

Paths the object is repelled from

See Also
obj::path_repelled Uses
path_denied integer

Paths the object is denied access to

See Also
obj::path_denied Uses
value unknown

How much money it is worth (or contains)

See Also
obj::value Uses
nrof integer

How many of the objects

See Also
obj::nrof Uses
enemy object Monster/player to follow even if not closest  (player 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.

x unknown X position in the map for this object  (readonly)
y unknown Y position in the map for this object  (readonly)
attacked_by_distance unknown Needed to target the nearest enemy
last_damage integer The damage sent with map2
terrain_type integer

type flags for different environment (tile is under water, firewalk,...) A object which can be applied GIVES this terrain flags to his owner

See Also
obj::terrain_type Uses
terrain_flag integer

The object can move over/is unaffected from this terrain type

See Also
obj::terrain_flag Uses
material integer

What materials this object consists of

See Also
obj::material Uses
material_real unknown

This holds the real material value like what kind of steel

See Also
obj::material_real Uses
last_heal unknown

Last healed. Depends on constitution

See Also
obj::last_heal Uses
last_sp unknown

As last_heal, but for spell points

See Also
obj::last_sp Uses
last_grace unknown

as last_sp, except for grace

See Also
obj::last_grace Uses
last_eat unknown

How long since we last ate

See Also
obj::last_eat Uses
magic unknown

Any magical bonuses to this item

See Also
obj::magic Uses
state integer How the object was last drawn (animation)
level unknown

the level of this object (most used for mobs & player)

See Also
obj::level Uses
 (player readonly)
direction unknown

Means the object is moving that way.

See Also
obj::direction Uses
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

See Also
obj::sub_type Uses
item_quality integer

Quality of an item in range from 0-100

See Also
obj::item_quality Uses
item_condition integer

Condition of repair of an item - from 0 to 100% item_quality

See Also
obj::item_condition Uses
item_race integer

Item crafted from race x. "orcish xxx", "dwarven xxxx"

See Also
obj::item_race Uses
item_level integer

Level needed to use or apply this item

See Also
obj::item_level Uses
item_skill integer

if set and item_level, item_level in this skill is needed

See Also
obj::item_skill Uses
glow_radius unknown

Object is a light source

See Also
obj::glow_radius Uses
move_status unknown What stage in attack mode
move_type integer

What kind of movement

See Also
obj::move_type Uses
anim_speed integer

Animation speed in ticks

See Also
obj::anim_speed Uses
behavior integer

Various behavior flags.

See Also
obj::behavior Uses
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

See Also
obj::layer Uses
sub_layer integer

Sub layer.

See Also
obj::sub_layer Uses
speed float

The overall speed of this object

See Also
obj::speed Uses
 (player readonly)
speed_left float

How much speed is left to spend this round

See Also
obj::speed_left Uses
weapon_speed float

new weapon speed system. swing of weapon

See Also
obj::weapon_speed Uses
weapon_speed_left float Weapon speed left
exp unknown


See Also
liv::exp Uses
hp unknown

Hit points.

See Also
liv::hp Uses
maxhp unknown

Max hit points.

See Also
liv::maxhp Uses
 (player readonly)
sp unknown

Spell points. Used to cast mage spells.

See Also
liv::sp Uses
maxsp unknown

Max spell points.

See Also
liv::maxsp Uses
 (player readonly)
food unknown

How much food in stomach. 0 = starved.

See Also
liv::food Uses
dam unknown

How much damage this object does when hitting.

See Also
liv::dam Uses
 (player readonly)
wc unknown

Weapon class.

See Also
liv::wc Uses
 (player readonly)
ac unknown

Armour class.

See Also
liv::ac Uses
 (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.

See Also
liv::wc_range Uses
Str unknown Strength.  (player fix)
Dex unknown


See Also
liv::Dex Uses
 (player fix)
Con unknown


See Also
liv::Con Uses
 (player fix)
Wis unknown  (player fix)
Cha unknown  (player fix)
Int unknown Intelligence.  (player fix)
Pow unknown


See Also
liv::Pow Uses
 (player fix)
arch archetype Pointer to archetype
z unknown

Z-Position in the map (in pixels) for this object.

For floor (layer 1), this makes the client use tile stretching. All other objects get Y position (height) adjustment on the map (100 = the object moves 100 pixels further to the top, -50 = the object moves 50 pixels to the bottom).

See Also
obj::z Uses
zoom_x unknown

How much to zoom the object horizontally.

0 = 100 = 100% zoom of the object, which means the original (no actual zooming is done). 50 = 50% of the original object's size, 200 = 200% of the original object's size.

See Also
obj::zoom_x Uses
zoom_y unknown

How much to zoom the object vertically.

0 = 100 = 100% zoom of the object, which means the original (no actual zooming is done). 50 = 50% of the original object's size, 200 = 200% of the original object's size.

See Also
obj::zoom_y Uses
rotate unknown

Object's rotation value in degrees.

See Also
obj::rotate Uses
align unknown

X align of the object on the actual map. Similar to object::z, a value of 100 = object is moved 100 pixels to the right, -50 and the object is moved 50 pixels to the left.

See Also
obj::align Uses
alpha integer

Object's alpha value.

See Also
obj::alpha Uses
face face

Struct pointer to the 'face' - the picture(s)

See Also
obj::face Uses
Returns the object's face in a tuple containing the face name as string, and the face ID as integer.
There are a few different ways to set object's face. You can use the face name (obj.face = "eyes.101"), the ID (obj.face = 1000), or the tuple returned by a previous call to obj.face.
animation animation

An index into the animation array

See Also
obj::animation_id Uses
Returns the object's animation in a tuple containing the animation name as string, and the animation ID as integer.
There are a few different ways to set object's animation. You can use the animation name (obj.animation = "raas"), the ID (obj.animation = 100), or the tuple returned by a previous call to obj.animation.
inv_animation animation An index into the animation array for the client inv See notes for object's animation.
other_arch archetype

Pointer used for various things

See Also
obj::other_arch Uses
connected unknown
randomitems unknown

Items to be generated

See Also
obj::randomitems Uses