Atrinik Server  4.0
Data Fields
obj Struct Reference

#include <object.h>

Data Fields

struct objactive_next
 
struct objactive_prev
 
struct objbelow
 
struct objabove
 
struct objinv
 
struct objenv
 
struct objmore
 
struct objhead
 
struct mapdefmap
 
tag_t count
 
uint32_t damage_round_tag
 
uint32_t carrying
 
void * custom_attrset
 
const char * name
 
const char * title
 
const char * race
 
const char * slaying
 
const char * msg
 
shstr * artifact
 
shstr * custom_name
 
shstr * glow
 
struct objenemy
 
struct objattacked_by
 
struct objowner
 
struct objchosen_skill
 
struct objexp_obj
 
tag_t enemy_count
 
tag_t ownercount
 
tag_t attacked_by_count
 
struct archetypearch
 
struct archetypeother_arch
 
struct treasure_listrandomitems
 
New_Faceface
 
New_Faceinv_face
 
int64_t value
 
uint32_t event_flags
 
uint32_t weight
 
uint32_t weight_limit
 
uint32_t path_attuned
 
uint32_t path_repelled
 
uint32_t path_denied
 
uint32_t nrof
 
uint32_t update_tag
 
uint32_t flags [NUM_FLAGS_32]
 
int16_t x
 
int16_t y
 
int16_t z
 
int16_t attacked_by_distance
 
int16_t last_damage
 
uint16_t terrain_type
 
uint16_t terrain_flag
 
uint16_t material
 
int16_t material_real
 
int16_t last_heal
 
int16_t last_sp
 
int16_t last_grace
 
int16_t last_eat
 
uint16_t animation_id
 
uint16_t inv_animation_id
 
int16_t align
 
int16_t rotate
 
int8_t glow_radius
 
int8_t magic
 
uint8_t state
 
int8_t level
 
int8_t direction
 
uint8_t quick_pos
 
uint8_t type
 
uint8_t sub_type
 
uint8_t item_quality
 
uint8_t item_condition
 
uint8_t item_race
 
uint8_t item_level
 
uint8_t item_skill
 
int8_t move_status
 
uint8_t move_type
 
uint8_t attack_move_type
 
uint8_t anim_flags
 
uint8_t anim_speed
 
uint8_t last_anim
 
uint8_t behavior
 
uint8_t run_away
 
uint8_t layer
 
uint8_t sub_layer
 
uint8_t quickslot
 
uint8_t block
 
uint8_t absorb
 
uint8_t attack [NROFATTACKS]
 
int8_t protection [NROFATTACKS]
 
int8_t item_power
 
int16_t zoom_x
 
int16_t zoom_y
 
uint8_t alpha
 
uint8_t glow_speed
 
double speed
 
double speed_left
 
double weapon_speed
 
double weapon_speed_left
 
living stats
 
key_value_tkey_values
 

Detailed Description

Object structure.

Definition at line 94 of file object.h.

Field Documentation

struct obj* obj::above

Pointer to the object stacked above this one Note: stacked in the same environment

Definition at line 120 of file object.h.

uint8_t obj::absorb

Amount of damage that is absorbed by this item.

Definition at line 421 of file object.h.

struct obj* obj::active_next

Next object in the 'active' list This is used in process_events so that the entire object list does not need to be gone through.

Definition at line 103 of file object.h.

struct obj* obj::active_prev

Previous object in the 'active' list This is used in process_events so that the entire object list does not need to be gone through.

Definition at line 111 of file object.h.

obj::align

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

Definition at line 332 of file object.h.

obj::alpha

Object's alpha value.

See Also
obj::alpha Uses

Definition at line 463 of file object.h.

uint8_t obj::anim_flags

Combination of animation flags.

Definition at line 390 of file object.h.

obj::anim_speed

Animation speed in ticks

See Also
obj::anim_speed Uses

Definition at line 393 of file object.h.

obj::animation_id

An index into the animation array

See Also
obj::animation_id Uses

Definition at line 322 of file object.h.

struct archetype* obj::arch

Pointer to archetype

Definition at line 225 of file object.h.

shstr* obj::artifact

Artifact name that was applied to this object by give_artifact_abilities().

Definition at line 187 of file object.h.

uint8_t obj::attack[NROFATTACKS]

our attack values - range from 0%-125%. (negative values makes no sense). Note: we can in theory allow 300% damage for a attacktype. all we need is to increase sint8 to sint16. That's true for resist & protection too. But it will be counter the damage calculation. Think about a way a player deals only 10 damage at base but can grab so many items that he does 3000% damage. that's not how this should work. More damage should come from the stats.dmg value - NOT from this source. The "125% max border" should work nice and the 25% over 100% should give a little boost. I think about to give player crafters the power to boost items to 100%+.

Definition at line 436 of file object.h.

obj::attack_move_type

What kind of attack movement

See Also
obj::attack_move_type Uses

Definition at line 387 of file object.h.

struct obj* obj::attacked_by

This object starts to attack us! Only player & monster

Definition at line 199 of file object.h.

tag_t obj::attacked_by_count

The tag of attacker, so we can be sure

Definition at line 222 of file object.h.

int16_t obj::attacked_by_distance

Needed to target the nearest enemy

Definition at line 289 of file object.h.

obj::behavior

Various behavior flags.

See Also
obj::behavior Uses

Definition at line 399 of file object.h.

struct obj* obj::below

Pointer to the object stacked below this one

Definition at line 114 of file object.h.

uint8_t obj::block

Chance to block a blow.

Definition at line 416 of file object.h.

obj::carrying

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

Definition at line 157 of file object.h.

struct obj* obj::chosen_skill

The skill chosen to use

Definition at line 210 of file object.h.

tag_t obj::count

Unique object number for this object

Definition at line 142 of file object.h.

void* obj::custom_attrset

Type-dependant extra data.

Definition at line 160 of file object.h.

shstr* obj::custom_name

Custom name assigned by player.

Definition at line 190 of file object.h.

uint32_t obj::damage_round_tag

Needed for the damage info for client in map2. Also used for unmodified carrying weight of magical containers to prevent rounding errors.

Definition at line 149 of file object.h.

obj::direction

Means the object is moving that way.

See Also
obj::direction Uses

Definition at line 350 of file object.h.

struct obj* obj::enemy

Monster/player to follow even if not closest

Definition at line 196 of file object.h.

obj::enemy_count

What count the enemy has

See Also
obj::enemy_count Uses

Definition at line 216 of file object.h.

struct obj* obj::env

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.

Definition at line 130 of file object.h.

uint32_t obj::event_flags

flags matching events of event objects inside object ->inv

Definition at line 243 of file object.h.

struct obj* obj::exp_obj

The exp. obj (category) associated with this object

Definition at line 213 of file object.h.

obj::face

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

See Also
obj::face Uses

Definition at line 234 of file object.h.

uint32_t obj::flags[NUM_FLAGS_32]

Various flags

Definition at line 270 of file object.h.

shstr* obj::glow

Glow color.

Definition at line 193 of file object.h.

obj::glow_radius

Object is a light source

See Also
obj::glow_radius Uses

Definition at line 338 of file object.h.

uint8_t obj::glow_speed

Object's glowing speed.

Definition at line 466 of file object.h.

struct obj* obj::head

Points to the main object of a large body

Definition at line 136 of file object.h.

struct obj* obj::inv

Pointer to the first object in the inventory

Definition at line 123 of file object.h.

uint16_t obj::inv_animation_id

An index into the animation array for the client inv

Definition at line 325 of file object.h.

New_Face* obj::inv_face

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

Definition at line 237 of file object.h.

obj::item_condition

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

See Also
obj::item_condition Uses

Definition at line 369 of file object.h.

obj::item_level

Level needed to use or apply this item

See Also
obj::item_level Uses

Definition at line 375 of file object.h.

obj::item_power

Power rating of the object.

See Also
obj::item_power Uses

Definition at line 442 of file object.h.

obj::item_quality

Quality of an item in range from 0-100

See Also
obj::item_quality Uses

Definition at line 366 of file object.h.

obj::item_race

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

See Also
obj::item_race Uses

Definition at line 372 of file object.h.

obj::item_skill

if set and item_level, item_level in this skill is needed

See Also
obj::item_skill Uses

Definition at line 378 of file object.h.

key_value_t* obj::key_values

Fields not explicitly known by the loader.

Definition at line 484 of file object.h.

uint8_t obj::last_anim

Last animated tick.

Definition at line 396 of file object.h.

int16_t obj::last_damage

The damage sent with map2

Definition at line 292 of file object.h.

obj::last_eat

How long since we last ate

See Also
obj::last_eat Uses

Definition at line 319 of file object.h.

obj::last_grace

as last_sp, except for grace

See Also
obj::last_grace Uses

Definition at line 316 of file object.h.

obj::last_heal

Last healed. Depends on constitution

See Also
obj::last_heal Uses

Definition at line 310 of file object.h.

obj::last_sp

As last_heal, but for spell points

See Also
obj::last_sp Uses

Definition at line 313 of file object.h.

obj::layer

the layer in a map, this object will be sorted in

See Also
obj::layer Uses

Definition at line 405 of file object.h.

obj::level

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

See Also
obj::level Uses

Definition at line 347 of file object.h.

obj::magic

Any magical bonuses to this item

See Also
obj::magic Uses

Definition at line 341 of file object.h.

struct mapdef* obj::map

Pointer to the map in which this object is present

Definition at line 139 of file object.h.

obj::material

What materials this object consists of

See Also
obj::material Uses

Definition at line 304 of file object.h.

obj::material_real

This holds the real material value like what kind of steel

See Also
obj::material_real Uses

Definition at line 307 of file object.h.

struct obj* obj::more

Pointer to the rest of a large body of objects

Definition at line 133 of file object.h.

int8_t obj::move_status

What stage in attack mode

Definition at line 381 of file object.h.

obj::move_type

What kind of movement

See Also
obj::move_type Uses

Definition at line 384 of file object.h.

obj::msg

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

See Also
obj::msg Uses

Definition at line 183 of file object.h.

obj::name

The name of the object, obviously...

See Also
obj::name Uses

Definition at line 168 of file object.h.

obj::nrof

How many of the objects

See Also
obj::nrof Uses

Definition at line 264 of file object.h.

obj::other_arch

Pointer used for various things

See Also
obj::other_arch Uses

Definition at line 228 of file object.h.

struct obj* obj::owner

Pointer to the object which controls this one.

Owner should not be referred to directly - get_owner() should be used instead.

Definition at line 207 of file object.h.

tag_t obj::ownercount

What count the owner had (in case owner has been freed)

Definition at line 219 of file object.h.

obj::path_attuned

Paths the object is attuned to

See Also
obj::path_attuned Uses

Definition at line 255 of file object.h.

obj::path_denied

Paths the object is denied access to

See Also
obj::path_denied Uses

Definition at line 261 of file object.h.

obj::path_repelled

Paths the object is repelled from

See Also
obj::path_repelled Uses

Definition at line 258 of file object.h.

int8_t obj::protection[NROFATTACKS]

Resistance against attacks in % - range from -125 to 125

Definition at line 439 of file object.h.

uint8_t obj::quick_pos

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

Definition at line 357 of file object.h.

uint8_t obj::quickslot

Quickslot ID this object goes in

Definition at line 411 of file object.h.

obj::race

Human, goblin, dragon, etc

See Also
obj::race Uses

Definition at line 174 of file object.h.

obj::randomitems

Items to be generated

See Also
obj::randomitems Uses

Definition at line 231 of file object.h.

obj::rotate

Object's rotation value in degrees.

See Also
obj::rotate Uses

Definition at line 335 of file object.h.

uint8_t obj::run_away

Monster runs away if its hp goes below this percentage.

Definition at line 402 of file object.h.

obj::slaying

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

See Also
obj::slaying Uses

Definition at line 180 of file object.h.

obj::speed

The overall speed of this object

See Also
obj::speed Uses

Definition at line 469 of file object.h.

obj::speed_left

How much speed is left to spend this round

See Also
obj::speed_left Uses

Definition at line 472 of file object.h.

uint8_t obj::state

How the object was last drawn (animation)

Definition at line 344 of file object.h.

living obj::stats

Str, Con, Dex, etc

Definition at line 481 of file object.h.

obj::sub_layer

Sub layer.

See Also
obj::sub_layer Uses

Definition at line 408 of file object.h.

obj::sub_type

Sub type definition - this will be sent to client too

See Also
obj::sub_type Uses

Definition at line 363 of file object.h.

obj::terrain_flag

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

See Also
obj::terrain_flag Uses

Definition at line 301 of file object.h.

obj::terrain_type

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

Definition at line 298 of file object.h.

obj::title

Of foo, etc

See Also
obj::title Uses

Definition at line 171 of file object.h.

uint8_t obj::type

PLAYER, BULLET, etc. See define.h

Definition at line 360 of file object.h.

uint32_t obj::update_tag

This is used from map2 update!

Definition at line 267 of file object.h.

obj::value

How much money it is worth (or contains)

See Also
obj::value Uses

Definition at line 240 of file object.h.

obj::weapon_speed

new weapon speed system. swing of weapon

See Also
obj::weapon_speed Uses

Definition at line 475 of file object.h.

double obj::weapon_speed_left

Weapon speed left

Definition at line 478 of file object.h.

obj::weight

Attributes of the object - the weight

See Also
obj::weight Uses

Definition at line 246 of file object.h.

obj::weight_limit

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

See Also
obj::weight_limit Uses

Definition at line 252 of file object.h.

int16_t obj::x

X position in the map for this object

Definition at line 273 of file object.h.

int16_t obj::y

Y position in the map for this object

Definition at line 276 of file object.h.

obj::z

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

Definition at line 286 of file object.h.

obj::zoom_x

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

Definition at line 451 of file object.h.

obj::zoom_y

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

Definition at line 460 of file object.h.


The documentation for this struct was generated from the following files: