Skip to main content

EntityRef

Wraps an entity instance

Properties

id

EntityRef.id: string

Get the entity id type

Only some entity types have a special identifier. It is mostly for internal usage.

val

EntityRef.val: string

Get/Set the value store identifier

time_elapsed

EntityRef.time_elapsed: number

Get/Set the elapsed entity time

time_to_live

EntityRef.time_to_live: number

Get/Set the duration after which the entity is killed

A negative number means disabled.

time_fract

EntityRef.time_fract: number

Get/Set the amount of time was elapsed relative to the time to live. This property yields a value in the range [0,1]

time_multiplier

EntityRef.time_multiplier: number

Get/Set the number that the elapsed time gets multiplied with. A value of 0.5 means the entity is simulated at 50% speed.

behavior_tree

EntityRef.behavior_tree: string

Get/Set the behavior tree by identifier

behavior_tree_delta

EntityRef.behavior_tree_delta: number

Get/Set the delta time between behavior tree steps

instrument

EntityRef.instrument: string

Get/Set the entity instrument.

Instruments

Value Color Description
Kick Red The explosion instrument
Snare Yellow The shooting instrument
Extra1 - Usage specific
Extra2 - Usage specific

persistence_key

EntityRef.persistence_key: string

Get the persistence key of the entity

persistence_store

EntityRef.persistence_store: string

Get/Set the persistence store of the entity This can be used to store information of an entity permanently

positional_hash

EntityRef.positional_hash: number

Get the positional hash of the entity

hovered

EntityRef.hovered: boolean

Get the hovered state of the entity An entity can be hovered with the mouse cursor

skin

EntityRef.skin: string

Get/Set the skin of the entity by identifier

animation

EntityRef.animation: string

Get/Set the animation of the entity by path

image

EntityRef.image: string

Get/Set the image of the entity by path This loads an animation with a single frame.

char

EntityRef.char: string

Get/Set the alternate display single character A relict of the time when the game was a more classic roguelike

color_fg

EntityRef.color_fg: table

Get/Set the foreground color The table must contain r, g, b numeric [0, 255] integers

color_bg

EntityRef.color_bg: table

Get/Set the background color The table must contain r, g, b numeric [0, 255] integers

draw_order

EntityRef.draw_order: string

Get/Set the draw order by quick setting identifier The getter may not work reliably with other settings

Draw Orders

Name
normal
foreground
background
overlay

dead

EntityRef.dead: boolean

Get/Set the death state

stuck

EntityRef.stuck: boolean

Get/Set the stuck state

health_abs

EntityRef.health_abs: number

Get/Set the absolute health number

health_rel

EntityRef.health_rel: number

Get/Set the relative health number

health_max

EntityRef.health_max: number

Get/Set the maximum health number

pos

EntityRef.pos: table

Get/Set the entity position as named table

Entity.player.pos = {x=79, y=29} -- works
x = Entity.player.pos.x -- works
Entity.player.pos.x = x -- no effect
Entity.player.x = x -- works

x

EntityRef.x: number

Get/Set the horizontal coordinate

y

EntityRef.y: number

Get/Set the vertical coordinate

speed

EntityRef.speed: table

Get/Set the entity speed as named table

Works the same as pos.

speed_x

EntityRef.speed_x: number

Get/Set the horizontal entity speed

speed_y

EntityRef.speed_y: number

Get/Set the vertical entity speed

velocity

EntityRef.velocity: table

Get/Set the entity velocity as named table

Works the same as pos.

velocity_x

EntityRef.velocity_x: number

Get/Set the horizontal entity velocity

velocity_y

EntityRef.velocity_y: number

Get/Set the vertical entity velocity

dir

EntityRef.dir: number

Get/Set the entity direction in range [0; 1]

parent

EntityRef.parent: EntityRef

Get/Set the parent of the entity

moving

EntityRef.moving: boolean

Check or clear the entity movement.

hitbox

EntityRef.hitbox: --table

Get/Set the entity hitbox

collision

EntityRef.collision: boolean

Get/Set the collision flag

collision_disable

EntityRef.collision_disable: boolean

Get/Set the collision_disable flag

movement_collision

EntityRef.movement_collision: boolean

Get/Set the movement_collision flag

static_collision

EntityRef.static_collision: boolean

Get/Set the static_collision flag

player_collision

EntityRef.player_collision: boolean

Get/Set the player_collision flag

bullet_collision

EntityRef.bullet_collision: boolean

Get/Set the bullet_collision flag

bullet_cancel

EntityRef.bullet_cancel: boolean

Get/Set the bullet cancel flag

Entities with this flag remove all bullets on death

animation_oneshot

EntityRef.animation_oneshot: boolean

Get/Set the animation_oneshot flag

animation_sync

EntityRef.animation_sync: boolean

Get/Set the animation_sync flag

animation_loop

EntityRef.animation_loop: boolean

Get/Set the animation_loop flag

animation_mirror

EntityRef.animation_mirror: boolean

Get/Set the animation_mirror flag

animation_mirror_ver

EntityRef.animation_mirror_ver: boolean

Get/Set the animation_mirror_ver flag

animation_live

EntityRef.animation_live: boolean

Get/Set the animation_live flag

dissolve_kill

EntityRef.dissolve_kill: boolean

Get/Set the dissolve_kill flag

pushable

EntityRef.pushable: boolean

Get/Set the pushable flag

flying

EntityRef.flying: boolean

Get/Set the flying flag

gravity_force

EntityRef.gravity_force: boolean

Get/Set the gravity_force flag

invisible

EntityRef.invisible: boolean

Get/Set the invisible flag

invincible

EntityRef.invincible: boolean

Get/Set the invincible flag

background

EntityRef.background: boolean

Get/Set the background flag

foreground

EntityRef.foreground: boolean

Get/Set the foreground flag

overlay

EntityRef.overlay: boolean

Get/Set the overlay flag

top

EntityRef.top: boolean

Get/Set the top flag

effect_text

EntityRef.effect_text: boolean

Get/Set the effect_text flag

effect_immune

EntityRef.effect_immune: boolean

Get/Set the effect_immune flag

effect_visible

EntityRef.effect_visible: boolean

Get/Set the effect_visible flag

laser_sensitive

EntityRef.laser_sensitive: boolean

Get/Set the laser_sensitive flag

boss_bar

EntityRef.boss_bar: boolean

Get/Set the boss_bar flag

boss_damage

EntityRef.boss_damage: boolean

Get/Set the boss_damage flag

boss_damage_disable

EntityRef.boss_damage_disable: boolean

Get/Set the boss_damage_disable flag

target_disable

EntityRef.target_disable: boolean

Get/Set the target_disable flag

damage_text

EntityRef.damage_text: boolean

Get/Set the damage_text flag

health_bar

EntityRef.health_bar: boolean

Get/Set the health_bar flag

health_bar_force

EntityRef.health_bar_force: boolean

Get/Set the health_bar_force flag

continue_clear

EntityRef.continue_clear: boolean

Get/Set the continue_clear flag

transcending

EntityRef.transcending: boolean

Get/Set the transcending flag

enemy

EntityRef.enemy: boolean

Get/Set the enemy flag

buddy

EntityRef.buddy: boolean

Get/Set the buddy flag

aggro

EntityRef.aggro: boolean

Get/Set the aggro flag

boss

EntityRef.boss: boolean

Get/Set the boss flag

sight

EntityRef.sight: boolean

Get/Set the sight flag

order

EntityRef.order: boolean

Get/Set the order flag

time_force

EntityRef.time_force: boolean

Get/Set the time_force flag

This controls wether the entity updates using elapsed time when e.g. dialogs are open and the world is not progressing in time.

aura_intensity

Player
EntityRef.aura_intensity: number

Get/Set the player aura intensity

life_mode

Player
EntityRef.life_mode: string

Get/Set the player life mode

Life Modes

Name Description
health Normal mode with health
reset Reset the room on hit

kick_follow

Player
EntityRef.kick_follow: boolean

Get/Set the kick follow flag for the player

chara

Player
EntityRef.chara: CharaRef

Get the associated character reference

energy

Player
EntityRef.energy: number

energy_use

Player
EntityRef.energy_use: number

flashlight_force

Player
EntityRef.flashlight_force: boolean

Get/Set the flashlight force flag

When set to true, the flashlight will be on permanently, even when the player is currently not allowed to move.

flashlight_intensity

Player
EntityRef.flashlight_intensity: number

Get/Set the flashlight intensity

flashlight_color

Player
EntityRef.flashlight_color: table

Get the current flashlight color

flashlight_color_normal

Player
EntityRef.flashlight_color_normal: table

Get the normal flashlight color

flashlight_color_aim

Player
EntityRef.flashlight_color_aim: table

Get the aim flashlight color

move_lock

Player
EntityRef.move_lock: boolean

Get/Set the movement lock flag

Functions

collides_pos

EntityRef.collides_pos(
xnumber,--

horizontal coordinate

ynumber--

vertical coordinate

) → boolean--

true if entity collides with position

Return true if entity collides with position

collides_rect

EntityRef.collides_rect(
areatable--

rectangle table with x1, y1, x2, y2

) → boolean--

true if entity collides with rectangle

Return true if entity collides with rectangle

collides_entity

EntityRef.collides_entity(
targetEntityRef--

target entity

) → boolean--

true if entity collides with target entity

Return true if entity collides with target entity

val_get_num

EntityRef:val_get_num(
pathstring--

path to value (e.g. "movement/damage")

) → number

Retrieve a number from the value store

val_get_str

EntityRef:val_get_str(
pathstring--

path to value (e.g. "movement/damage")

) → string

Retrieve a string from the value store

val_get_bool

EntityRef:val_get_bool(
pathstring--

path to value (e.g. "movement/damage")

) → boolean

Retrieve a bool from the value store

val_set_num

EntityRef:val_set_num(
pathstring,--

path to value (e.g. "movement/damage")

valuenumber--

numeric value

) → ()

Override a number in the value store

val_set_str

EntityRef:val_set_str(
pathstring,--

path to value (e.g. "movement/damage")

valuestring--

string value

) → ()

Override a string in the value store

val_set_bool

EntityRef:val_set_bool(
pathstring,--

path to value (e.g. "movement/damage")

valueboolean--

boolean value

) → ()

Override a bool in the value store

instrument_compatible

EntityRef:instrument_compatible(
instrumentstring--

the instrument to check for (e.g. "Kick")

) → ()

Check if the given instrument is compatible with the entity instrument The neutral instrument is compatible with all other instruments.

instrument_match

EntityRef:instrument_match(
instrumentstring--

the instrument to check for (e.g. "Kick")

) → ()

Check if the given instrument matches with the entity instrument The neutral instrument matches no instruments. Only non-neutral instruments match when equal.

item_drop

EntityRef:item_drop(
itemstring,--

item identifier string (e.g. "Shuriken")

optionstable | nil--

settings

) → ()

Drops an item next to the entity

sound

EntityRef:sound(
optionstable--

settings

) → ()

Play a sound effect at the entity position

Options

Name Type Default Description
path string - sound file path
vol number 1 sound volume
pan number 0 pan value in range [-1, 1]
loops number - amount of additional loops

effect_push

EntityRef:effect_push(
effectstring,--

effect identifier string (e.g. "Fire")

strengthnumber | nil--

effect strength (default 1.0)

) → ()

Adds an effect to the entity

effect_check

EntityRef:effect_check(
effectstring--

effect identifier string (e.g. "Fire")

) → boolean--

true if affected

Checks if the entity is currently affected

effect_consume

EntityRef:effect_consume(
effectstring--

effect identifier string (e.g. "Fire")

) → boolean--

true if removed

Removes an effect from the entity

effect_resistant_get

EntityRef:effect_resistant_get(
effectstring--

effect identifier string (e.g. "Fire")

) → boolean--

true if resistant

Check if entity is resistant against the given effect

effect_resistant_set

EntityRef:effect_resistant_set(
effectstring--

effect identifier string (e.g. "Fire")

) → ()

Add resistance for given effect to entity

effect_weak_get

EntityRef:effect_weak_get(
effectstring--

effect identifier string (e.g. "Fire")

) → boolean--

true if weak

Check if entity is weak against the given effect

effect_weak_set

EntityRef:effect_weak_set(
effectstring--

effect identifier string (e.g. "Fire")

) → ()

Add weakness for given effect to entity

animation_wait

EntityRef:animation_wait() → ()

Waits until the entity animation is complete

dissolve

EntityRef:dissolve() → ()

Dissolves an entity resulting in a particle effect

kill

EntityRef:kill() → ()

Kill the entity

purge

EntityRef:purge() → ()

Purges an entity by removing without dissolving nor death

damage_abs

EntityRef:damage_abs(
valuenumber--

absolute damage value

) → ()

Applies damage by absolute value to the entity

damage_rel

EntityRef:damage_rel(
valuenumber--

relative damage value

) → ()

Applies damage by relative value to the entity

heal

EntityRef:heal() → ()

Heals the entity to maximum health

heal_abs

EntityRef:heal_abs(
valuenumber--

absolute health value

) → ()

Apply heal by absolute value to the entity

heal_rel

EntityRef:heal_rel(
valuenumber--

relative health value

) → ()

Apply heal by relative value to the entity

set

EntityRef:set(
xnumber,--

horizontal coordinate

ynumber--

vertical coordinate

) → ()

Sets the entity position to the specified coordinates

at

EntityRef:at(
xnumber,--

horizontal coordinate

ynumber--

vertical coordinate

) → boolean--

true if coordinates match

Check if the entity center is at the specified coordinates

inside

EntityRef:inside(
areatable--

area data

) → boolean--

true if center inside area

Check if the entity center is inside the given area

center

EntityRef:center() → ()

Moves the entity into the center of the room

speed_set

EntityRef:speed_set(
xnumber,--

horizontal component

ynumber--

vertical component

) → ()

Sets the speed to the specified components

velocity_set

EntityRef:velocity_set(
xnumber,--

horizontal component

ynumber--

vertical component

) → ()

Sets the velocity to the specified components

dir_reset

EntityRef:dir_reset() → ()

Reset the entity direction

find_buddy

EntityRef:find_buddy(
optionstable--

settings

) → EntityRef--

entity different to own

Find a buddy entity in range

Buddies are entities with the buddy flag set. However, for enemies, only other enemies are buddies. The player is a buddy as well.

Options

Name Type Default Description
dx number 0 Preferred horizontal direction
dy number 0 Preferred vertical direction

find_target

EntityRef:find_target(
optionstable--

settings

) → EntityRef--

entity different to own

Find a target entity in range

Targets are entities with the enemy flag set. However, for enemies, only buddies are targets. The player is a buddy as well.

Options

Name Type Default Description
dx number 0 Preferred horizontal direction
dy number 0 Preferred vertical direction

attach

EntityRef:attach(
parentEntityRef--

parent to set

) → boolean--

true if no parent was set

Make the specified entity the parent

Children entities die if their parents die. If a parent was set before, this function does not set the new parent.

release

EntityRef:release() → boolean--

true if a parent was set

Release the entity from a parent

push

EntityRef:push(
dxnumber,--

horizontal push amount

dynumber--

vertical push amount

) → ()

Pushes the entity into a given direction

move

EntityRef:move(
xnumber,--

horizontal coordinate

ynumber,--

vertical coordinate

speednumber,--

step delay (s) is 1.0 / speed

optionstable--

settings

) → ()

Moves the entity to a specified position

Options

Name Type Default Description
damage number 0 collision damage
range_min number 0 minimum range for movement
range_max number 0 maximum range for movement
range_aggro number 0 range for aggressive flag
path bool true path-finding enabled
path_step bool false path-finding special mode
target_once bool false target-once special mode

move_wait

EntityRef:move_wait() → ()

Waits for the entity movement to complete

stop

EntityRef:stop() → ()

Stops the entity movement

follow

EntityRef:follow(
targetEntityRef,--

entity to follow

speednumber,--

step delay (s) is 1.0 / speed

optionstable--

settings

) → ()

Follows an entity

If the speed is below zero, the target position is copied instantly.

Options

Name Type Default Description
damage number 0 collision damage
range_min number 0 minimum range for movement
range_max number 0 maximum range for movement
range_aggro number 0 range for aggressive flag
path bool true path-finding enabled
path_step bool false path-finding special mode
target_once bool false target-once special mode
attach bool false make target the entity parent

distance_pos

EntityRef:distance_pos(
xnumber,--

horizontal coordinate

ynumber--

vertical coordinate

) → number--

distance to position

Calculate distance to a specified position

distance_rect

EntityRef:distance_rect(
x1number,--

minimum horizontal coordinate

y1number,--

minimum vertical coordinate

x2number,--

maximum horizontal coordinate

y2number--

maximum vertical coordinate

) → number--

distance to rectangle

Calculate distance to a specified rectangle

distance_entity

EntityRef:distance_entity(
targetEntityRef--

target entity

) → number--

distance to entity

Calculate distance to a specified entity

hitbox_pos

EntityRef:hitbox_pos(
xnumber,--

horizontal coordinate

ynumber--

vertical coordinate

) → number--

distance from hitbox to position

Calculate distance from hitbox to position

hitbox_rect

EntityRef:hitbox_rect(
x1number,--

minimum horizontal coordinate

y1number,--

minimum vertical coordinate

x2number,--

maximum horizontal coordinate

y2number--

maximum vertical coordinate

) → number--

distance from hitbox to rectangle

Calculate distance from hitbox to rectangle

histbox_entity

EntityRef:histbox_entity(
targetEntityRef--

target entity

) → number--

distance from hitbox to entity

Calculate distance from hitbox to entity

angle_pos

EntityRef:angle_pos(
xnumber,--

horizontal coordinate

ynumber--

vertical coordinate

) → number--

angle to position

Calculate angle to position

angle_entity

EntityRef:angle_entity(
targetEntityRef--

target entity

) → number--

angle to entity

Calculate angle to entity

flag_get

EntityRef:flag_get(
flagstring--

flag name (e.g. "invisible")

) → boolean--

state of flag

Gets a flag by identifier name

flag_set

EntityRef:flag_set(
flagstring,--

flag name (e.g. "invisible")

valueboolean--

new flag value

) → ()

Sets a flag by identifier name

energy_consume

Player
EntityRef:energy_consume(
optionstable--

settings

) → ()

Consumes energy with optional draining features

Options

Name Type Default Description
drain bool true Use remaining energy on fail
drain_use bool false Use drained energy
drain_gen bool false Generates drain on consumption

skin_push

Player
EntityRef:skin_push(
idstring--

skin identifier

) → ()

Pushes a skin onto the stack This does nothing if the skin is already on the stack.

skin_pop

Player
EntityRef:skin_pop(
idstring--

skin identifier

) → boolean--

true if skin was on stack

Removes a skin from the stack

skin_check

Player
EntityRef:skin_check(
idstring--

skin identifier

) → boolean--

true if skin is on stack

Checks if a skin is on the stack

skin_reset

Player
EntityRef:skin_reset() → ()

Clears the skin stack

Show raw api
{
    "functions": [
        {
            "name": "val_get_num",
            "desc": "Retrieve a number from the value store",
            "params": [
                {
                    "name": "path",
                    "desc": "path to value (e.g. \"movement/damage\")",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 30,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "val_get_str",
            "desc": "Retrieve a string from the value store",
            "params": [
                {
                    "name": "path",
                    "desc": "path to value (e.g. \"movement/damage\")",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 40,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "val_get_bool",
            "desc": "Retrieve a bool from the value store",
            "params": [
                {
                    "name": "path",
                    "desc": "path to value (e.g. \"movement/damage\")",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 50,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "val_set_num",
            "desc": "Override a number in the value store",
            "params": [
                {
                    "name": "path",
                    "desc": "path to value (e.g. \"movement/damage\")",
                    "lua_type": "string"
                },
                {
                    "name": "value",
                    "desc": "numeric value",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 60,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "val_set_str",
            "desc": "Override a string in the value store",
            "params": [
                {
                    "name": "path",
                    "desc": "path to value (e.g. \"movement/damage\")",
                    "lua_type": "string"
                },
                {
                    "name": "value",
                    "desc": "string value",
                    "lua_type": "string"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 69,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "val_set_bool",
            "desc": "Override a bool in the value store",
            "params": [
                {
                    "name": "path",
                    "desc": "path to value (e.g. \"movement/damage\")",
                    "lua_type": "string"
                },
                {
                    "name": "value",
                    "desc": "boolean value",
                    "lua_type": "boolean"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 78,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "instrument_compatible",
            "desc": "Check if the given instrument is compatible with the entity instrument\nThe neutral instrument is compatible with all other instruments.",
            "params": [
                {
                    "name": "instrument",
                    "desc": "the instrument to check for (e.g. \"Kick\")",
                    "lua_type": "string"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 148,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "instrument_match",
            "desc": "Check if the given instrument matches with the entity instrument\nThe neutral instrument matches no instruments.\nOnly non-neutral instruments match when equal.",
            "params": [
                {
                    "name": "instrument",
                    "desc": "the instrument to check for (e.g. \"Kick\")",
                    "lua_type": "string"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 158,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "item_drop",
            "desc": "Drops an item next to the entity",
            "params": [
                {
                    "name": "item",
                    "desc": "item identifier string (e.g. \"Shuriken\")",
                    "lua_type": "string"
                },
                {
                    "name": "options",
                    "desc": "settings",
                    "lua_type": "table | nil"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 197,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "sound",
            "desc": "Play a sound effect at the entity position\n\n### Options\n| Name            | Type        | Default | Description                    |\n|-----------------|-------------|---------|--------------------------------|\n| path            | string      |       - | sound file path                |\n| vol             | number      |       1 | sound volume                   |\n| pan             | number      |       0 | pan value in range [-1, 1]     |\n| loops           | number      |       - | amount of additional loops     |",
            "params": [
                {
                    "name": "options",
                    "desc": "settings",
                    "lua_type": "table"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 213,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "effect_push",
            "desc": "Adds an effect to the entity",
            "params": [
                {
                    "name": "effect",
                    "desc": "effect identifier string (e.g. \"Fire\")",
                    "lua_type": "string"
                },
                {
                    "name": "strength",
                    "desc": "effect strength (default 1.0)",
                    "lua_type": "number | nil"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 222,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "effect_check",
            "desc": "Checks if the entity is currently affected",
            "params": [
                {
                    "name": "effect",
                    "desc": "effect identifier string (e.g. \"Fire\")",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "true if affected",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 231,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "effect_consume",
            "desc": "Removes an effect from the entity",
            "params": [
                {
                    "name": "effect",
                    "desc": "effect identifier string (e.g. \"Fire\")",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "true if removed",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 241,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "effect_resistant_get",
            "desc": "Check if entity is resistant against the given effect",
            "params": [
                {
                    "name": "effect",
                    "desc": "effect identifier string (e.g. \"Fire\")",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "true if resistant",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 251,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "effect_resistant_set",
            "desc": "Add resistance for given effect to entity",
            "params": [
                {
                    "name": "effect",
                    "desc": "effect identifier string (e.g. \"Fire\")",
                    "lua_type": "string"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 260,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "effect_weak_get",
            "desc": "Check if entity is weak against the given effect",
            "params": [
                {
                    "name": "effect",
                    "desc": "effect identifier string (e.g. \"Fire\")",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "true if weak",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 269,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "effect_weak_set",
            "desc": "Add weakness for given effect to entity",
            "params": [
                {
                    "name": "effect",
                    "desc": "effect identifier string (e.g. \"Fire\")",
                    "lua_type": "string"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 278,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "animation_wait",
            "desc": "Waits until the entity animation is complete",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 299,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "dissolve",
            "desc": "Dissolves an entity resulting in a particle effect",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 353,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "kill",
            "desc": "Kill the entity",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 359,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "purge",
            "desc": "Purges an entity by removing without dissolving nor death",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 365,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "damage_abs",
            "desc": "Applies damage by absolute value to the entity",
            "params": [
                {
                    "name": "value",
                    "desc": "absolute damage value",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 407,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "damage_rel",
            "desc": "Applies damage by relative value to the entity",
            "params": [
                {
                    "name": "value",
                    "desc": "relative damage value",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 415,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "heal",
            "desc": "Heals the entity to maximum health",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 422,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "heal_abs",
            "desc": "Apply heal by absolute value to the entity",
            "params": [
                {
                    "name": "value",
                    "desc": "absolute health value",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 429,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "heal_rel",
            "desc": "Apply heal by relative value to the entity",
            "params": [
                {
                    "name": "value",
                    "desc": "relative health value",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 437,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "set",
            "desc": "Sets the entity position to the specified coordinates",
            "params": [
                {
                    "name": "x",
                    "desc": "horizontal coordinate",
                    "lua_type": "number"
                },
                {
                    "name": "y",
                    "desc": "vertical coordinate",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 460,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "at",
            "desc": "Check if the entity center is at the specified coordinates",
            "params": [
                {
                    "name": "x",
                    "desc": "horizontal coordinate",
                    "lua_type": "number"
                },
                {
                    "name": "y",
                    "desc": "vertical coordinate",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "true if coordinates match",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 484,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "inside",
            "desc": "Check if the entity center is inside the given area",
            "params": [
                {
                    "name": "area",
                    "desc": "area data",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "true if center inside area",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 494,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "center",
            "desc": "Moves the entity into the center of the room",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 502,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "speed_set",
            "desc": "Sets the speed to the specified components",
            "params": [
                {
                    "name": "x",
                    "desc": "horizontal component",
                    "lua_type": "number"
                },
                {
                    "name": "y",
                    "desc": "vertical component",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 519,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "velocity_set",
            "desc": "Sets the velocity to the specified components",
            "params": [
                {
                    "name": "x",
                    "desc": "horizontal component",
                    "lua_type": "number"
                },
                {
                    "name": "y",
                    "desc": "vertical component",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 552,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "dir_reset",
            "desc": "Reset the entity direction",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 580,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "find_buddy",
            "desc": "Find a buddy entity in range\n\nBuddies are entities with the buddy flag set.\nHowever, for enemies, only other enemies are buddies.\nThe player is a buddy as well.\n\n### Options\n| Name            | Type        | Default | Description                    |\n|-----------------|-------------|---------|--------------------------------|\n| dx              | number      |       0 | Preferred horizontal direction |\n| dy              | number      |       0 | Preferred vertical direction   |",
            "params": [
                {
                    "name": "options",
                    "desc": "settings",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "entity different to own",
                    "lua_type": "EntityRef"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 598,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "find_target",
            "desc": "Find a target entity in range\n\nTargets are entities with the enemy flag set.\nHowever, for enemies, only buddies are targets.\nThe player is a buddy as well.\n\n### Options\n| Name            | Type        | Default | Description                    |\n|-----------------|-------------|---------|--------------------------------|\n| dx              | number      |       0 | Preferred horizontal direction |\n| dy              | number      |       0 | Preferred vertical direction   |",
            "params": [
                {
                    "name": "options",
                    "desc": "settings",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "entity different to own",
                    "lua_type": "EntityRef"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 618,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "attach",
            "desc": "Make the specified entity the parent\n\nChildren entities die if their parents die.\nIf a parent was set before, this function does not set the new parent.",
            "params": [
                {
                    "name": "parent",
                    "desc": "parent to set",
                    "lua_type": "EntityRef"
                }
            ],
            "returns": [
                {
                    "desc": "true if no parent was set",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 631,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "release",
            "desc": "Release the entity from a parent",
            "params": [],
            "returns": [
                {
                    "desc": "true if a parent was set",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 640,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "push",
            "desc": "Pushes the entity into a given direction",
            "params": [
                {
                    "name": "dx",
                    "desc": "horizontal push amount",
                    "lua_type": "number"
                },
                {
                    "name": "dy",
                    "desc": "vertical push amount",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 655,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "move",
            "desc": "Moves the entity to a specified position\n\n### Options\n| Name            | Type        | Default | Description                    |\n|-----------------|-------------|---------|--------------------------------|\n| damage          | number      |       0 | collision damage               |\n| range_min       | number      |       0 | minimum range for movement     |\n| range_max       | number      |       0 | maximum range for movement     |\n| range_aggro     | number      |       0 | range for aggressive flag      |\n| path            | bool        |    true | path-finding enabled           |\n| path_step       | bool        |   false | path-finding special mode      |\n| target_once     | bool        |   false | target-once special mode       |",
            "params": [
                {
                    "name": "x",
                    "desc": "horizontal coordinate",
                    "lua_type": "number"
                },
                {
                    "name": "y",
                    "desc": "vertical coordinate",
                    "lua_type": "number"
                },
                {
                    "name": "speed",
                    "desc": "step delay (s) is 1.0 / speed",
                    "lua_type": "number"
                },
                {
                    "name": "options",
                    "desc": "settings",
                    "lua_type": "table"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 677,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "move_wait",
            "desc": "Waits for the entity movement to complete",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 691,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "stop",
            "desc": "Stops the entity movement",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 697,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "follow",
            "desc": "Follows an entity\n\nIf the speed is below zero, the target position is copied instantly.\n\n### Options\n| Name            | Type        | Default | Description                    |\n|-----------------|-------------|---------|--------------------------------|\n| damage          | number      |       0 | collision damage               |\n| range_min       | number      |       0 | minimum range for movement     |\n| range_max       | number      |       0 | maximum range for movement     |\n| range_aggro     | number      |       0 | range for aggressive flag      |\n| path            | bool        |    true | path-finding enabled           |\n| path_step       | bool        |   false | path-finding special mode      |\n| target_once     | bool        |   false | target-once special mode       |\n| attach          | bool        |   false | make target the entity parent  |",
            "params": [
                {
                    "name": "target",
                    "desc": "entity to follow",
                    "lua_type": "EntityRef"
                },
                {
                    "name": "speed",
                    "desc": "step delay (s) is 1.0 / speed",
                    "lua_type": "number"
                },
                {
                    "name": "options",
                    "desc": "settings",
                    "lua_type": "table"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 720,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "distance_pos",
            "desc": "Calculate distance to a specified position",
            "params": [
                {
                    "name": "x",
                    "desc": "horizontal coordinate",
                    "lua_type": "number"
                },
                {
                    "name": "y",
                    "desc": "vertical coordinate",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "distance to position",
                    "lua_type": "number"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 730,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "distance_rect",
            "desc": "Calculate distance to a specified rectangle",
            "params": [
                {
                    "name": "x1",
                    "desc": "minimum horizontal coordinate",
                    "lua_type": "number"
                },
                {
                    "name": "y1",
                    "desc": "minimum vertical coordinate",
                    "lua_type": "number"
                },
                {
                    "name": "x2",
                    "desc": "maximum horizontal coordinate",
                    "lua_type": "number"
                },
                {
                    "name": "y2",
                    "desc": "maximum vertical coordinate",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "distance to rectangle",
                    "lua_type": "number"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 743,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "distance_entity",
            "desc": "Calculate distance to a specified entity",
            "params": [
                {
                    "name": "target",
                    "desc": "target entity",
                    "lua_type": "EntityRef"
                }
            ],
            "returns": [
                {
                    "desc": "distance to entity",
                    "lua_type": "number"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 753,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "hitbox_pos",
            "desc": "Calculate distance from hitbox to position",
            "params": [
                {
                    "name": "x",
                    "desc": "horizontal coordinate",
                    "lua_type": "number"
                },
                {
                    "name": "y",
                    "desc": "vertical coordinate",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "distance from hitbox to position",
                    "lua_type": "number"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 764,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "hitbox_rect",
            "desc": "Calculate distance from hitbox to rectangle",
            "params": [
                {
                    "name": "x1",
                    "desc": "minimum horizontal coordinate",
                    "lua_type": "number"
                },
                {
                    "name": "y1",
                    "desc": "minimum vertical coordinate",
                    "lua_type": "number"
                },
                {
                    "name": "x2",
                    "desc": "maximum horizontal coordinate",
                    "lua_type": "number"
                },
                {
                    "name": "y2",
                    "desc": "maximum vertical coordinate",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "distance from hitbox to rectangle",
                    "lua_type": "number"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 777,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "histbox_entity",
            "desc": "Calculate distance from hitbox to entity",
            "params": [
                {
                    "name": "target",
                    "desc": "target entity",
                    "lua_type": "EntityRef"
                }
            ],
            "returns": [
                {
                    "desc": "distance from hitbox to entity",
                    "lua_type": "number"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 787,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "angle_pos",
            "desc": "Calculate angle to position",
            "params": [
                {
                    "name": "x",
                    "desc": "horizontal coordinate",
                    "lua_type": "number"
                },
                {
                    "name": "y",
                    "desc": "vertical coordinate",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "angle to position",
                    "lua_type": "number"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 798,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "angle_entity",
            "desc": "Calculate angle to entity",
            "params": [
                {
                    "name": "target",
                    "desc": "target entity",
                    "lua_type": "EntityRef"
                }
            ],
            "returns": [
                {
                    "desc": "angle to entity",
                    "lua_type": "number"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 808,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "collides_pos",
            "desc": "Return true if entity collides with position",
            "params": [
                {
                    "name": "x",
                    "desc": "horizontal coordinate",
                    "lua_type": "number"
                },
                {
                    "name": "y",
                    "desc": "vertical coordinate",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "true if entity collides with position",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 825,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "collides_rect",
            "desc": "Return true if entity collides with rectangle",
            "params": [
                {
                    "name": "area",
                    "desc": "rectangle table with x1, y1, x2, y2",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "true if entity collides with rectangle",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 835,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "collides_entity",
            "desc": "Return true if entity collides with target entity",
            "params": [
                {
                    "name": "target",
                    "desc": "target entity",
                    "lua_type": "EntityRef"
                }
            ],
            "returns": [
                {
                    "desc": "true if entity collides with target entity",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 845,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "flag_get",
            "desc": "Gets a flag by identifier name",
            "params": [
                {
                    "name": "flag",
                    "desc": "flag name (e.g. \"invisible\")",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "state of flag",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 855,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "flag_set",
            "desc": "Sets a flag by identifier name",
            "params": [
                {
                    "name": "flag",
                    "desc": "flag name (e.g. \"invisible\")",
                    "lua_type": "string"
                },
                {
                    "name": "value",
                    "desc": "new flag value",
                    "lua_type": "boolean"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 865,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "energy_consume",
            "desc": "Consumes energy with optional draining features\n\n### Options\n| Name            | Type        | Default | Description                    |\n|-----------------|-------------|---------|--------------------------------|\n| drain           | bool        |    true | Use remaining energy on fail   |\n| drain_use       | bool        |   false | Use drained energy             |\n| drain_gen       | bool        |   false | Generates drain on consumption |",
            "params": [
                {
                    "name": "options",
                    "desc": "settings",
                    "lua_type": "table"
                }
            ],
            "returns": [],
            "function_type": "method",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1239,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "skin_push",
            "desc": "Pushes a skin onto the stack\nThis does nothing if the skin is already on the stack.",
            "params": [
                {
                    "name": "id",
                    "desc": "skin identifier",
                    "lua_type": "string"
                }
            ],
            "returns": [],
            "function_type": "method",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1292,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "skin_pop",
            "desc": "Removes a skin from the stack",
            "params": [
                {
                    "name": "id",
                    "desc": "skin identifier",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "true if skin was on stack",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1302,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "skin_check",
            "desc": "Checks if a skin is on the stack",
            "params": [
                {
                    "name": "id",
                    "desc": "skin identifier",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "true if skin is on stack",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1313,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "skin_reset",
            "desc": "Clears the skin stack",
            "params": [],
            "returns": [],
            "function_type": "method",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1322,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "id",
            "desc": "Get the entity id type\n\nOnly some entity types have a special identifier.\nIt is mostly for internal usage.",
            "lua_type": "string",
            "source": {
                "line": 16,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "val",
            "desc": "Get/Set the value store identifier",
            "lua_type": "string",
            "source": {
                "line": 23,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "time_elapsed",
            "desc": "Get/Set the elapsed entity time",
            "lua_type": "number",
            "source": {
                "line": 87,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "time_to_live",
            "desc": "Get/Set the duration after which the entity is killed\n\nA negative number means disabled.",
            "lua_type": "number",
            "source": {
                "line": 96,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "time_fract",
            "desc": "Get/Set the amount of time was elapsed relative to the time to live.\nThis property yields a value in the range [0,1]",
            "lua_type": "number",
            "source": {
                "line": 104,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "time_multiplier",
            "desc": "Get/Set the number that the elapsed time gets multiplied with.\nA value of 0.5 means the entity is simulated at 50% speed.",
            "lua_type": "number",
            "source": {
                "line": 112,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "behavior_tree",
            "desc": "Get/Set the behavior tree by identifier",
            "lua_type": "string",
            "source": {
                "line": 119,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "behavior_tree_delta",
            "desc": "Get/Set the delta time between behavior tree steps",
            "lua_type": "number",
            "source": {
                "line": 126,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "instrument",
            "desc": "Get/Set the entity instrument.\n\n### Instruments\n| Value  | Color  | Description              |\n|--------|--------|--------------------------|\n| Kick   | Red    | The explosion instrument |\n| Snare  | Yellow | The shooting instrument  |\n| Extra1 | -      | Usage specific           |\n| Extra2 | -      | Usage specific           |",
            "lua_type": "string",
            "source": {
                "line": 141,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "persistence_key",
            "desc": "Get the persistence key of the entity",
            "lua_type": "string",
            "source": {
                "line": 167,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "persistence_store",
            "desc": "Get/Set the persistence store of the entity\nThis can be used to store information of an entity permanently",
            "lua_type": "string",
            "source": {
                "line": 175,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "positional_hash",
            "desc": "Get the positional hash of the entity",
            "lua_type": "number",
            "source": {
                "line": 182,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "hovered",
            "desc": "Get the hovered state of the entity\nAn entity can be hovered with the mouse cursor",
            "lua_type": "boolean",
            "source": {
                "line": 190,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "skin",
            "desc": "Get/Set the skin of the entity by identifier",
            "lua_type": "string",
            "source": {
                "line": 287,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "animation",
            "desc": "Get/Set the animation of the entity by path",
            "lua_type": "string",
            "source": {
                "line": 294,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "image",
            "desc": "Get/Set the image of the entity by path\nThis loads an animation with a single frame.",
            "lua_type": "string",
            "source": {
                "line": 308,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "char",
            "desc": "Get/Set the alternate display single character\nA relict of the time when the game was a more classic roguelike",
            "lua_type": "string",
            "source": {
                "line": 316,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "color_fg",
            "desc": "Get/Set the foreground color\nThe table must contain r, g, b numeric [0, 255] integers",
            "lua_type": "table",
            "source": {
                "line": 324,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "color_bg",
            "desc": "Get/Set the background color\nThe table must contain r, g, b numeric [0, 255] integers",
            "lua_type": "table",
            "source": {
                "line": 332,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "draw_order",
            "desc": "Get/Set the draw order by quick setting identifier\nThe getter may not work reliably with other settings\n\n### Draw Orders\n| Name      |\n|-----------|\n|normal     |\n|foreground |\n|background |\n|overlay    |",
            "lua_type": "string",
            "source": {
                "line": 348,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "dead",
            "desc": "Get/Set the death state",
            "lua_type": "boolean",
            "source": {
                "line": 373,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "stuck",
            "desc": "Get/Set the stuck state",
            "lua_type": "boolean",
            "source": {
                "line": 380,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "health_abs",
            "desc": "Get/Set the absolute health number",
            "lua_type": "number",
            "source": {
                "line": 387,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "health_rel",
            "desc": "Get/Set the relative health number",
            "lua_type": "number",
            "source": {
                "line": 394,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "health_max",
            "desc": "Get/Set the maximum health number",
            "lua_type": "number",
            "source": {
                "line": 401,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "pos",
            "desc": "Get/Set the entity position as named table\n\n```lua\nEntity.player.pos = {x=79, y=29} -- works\nx = Entity.player.pos.x -- works\nEntity.player.pos.x = x -- no effect\nEntity.player.x = x -- works\n```",
            "lua_type": "table",
            "source": {
                "line": 453,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "x",
            "desc": "Get/Set the horizontal coordinate",
            "lua_type": "number",
            "source": {
                "line": 469,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "y",
            "desc": "Get/Set the vertical coordinate",
            "lua_type": "number",
            "source": {
                "line": 476,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "speed",
            "desc": "Get/Set the entity speed as named table\n\nWorks the same as `pos`.",
            "lua_type": "table",
            "source": {
                "line": 512,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "speed_x",
            "desc": "Get/Set the horizontal entity speed",
            "lua_type": "number",
            "source": {
                "line": 529,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "speed_y",
            "desc": "Get/Set the vertical entity speed",
            "lua_type": "number",
            "source": {
                "line": 536,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "velocity",
            "desc": "Get/Set the entity velocity as named table\n\nWorks the same as `pos`.",
            "lua_type": "table",
            "source": {
                "line": 545,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "velocity_x",
            "desc": "Get/Set the horizontal entity velocity",
            "lua_type": "number",
            "source": {
                "line": 561,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "velocity_y",
            "desc": "Get/Set the vertical entity velocity",
            "lua_type": "number",
            "source": {
                "line": 568,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "dir",
            "desc": "Get/Set the entity direction in range [0; 1]",
            "lua_type": "number",
            "source": {
                "line": 575,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "parent",
            "desc": "Get/Set the parent of the entity",
            "lua_type": "EntityRef",
            "source": {
                "line": 648,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "moving",
            "desc": "Check or clear the entity movement.",
            "lua_type": "boolean",
            "source": {
                "line": 686,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "hitbox",
            "desc": "Get/Set the entity hitbox",
            "lua_type": "-- table",
            "source": {
                "line": 817,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "collision",
            "desc": "Get/Set the collision flag",
            "lua_type": "boolean",
            "source": {
                "line": 874,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "collision_disable",
            "desc": "Get/Set the collision_disable flag",
            "lua_type": "boolean",
            "source": {
                "line": 881,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "movement_collision",
            "desc": "Get/Set the movement_collision flag",
            "lua_type": "boolean",
            "source": {
                "line": 888,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "static_collision",
            "desc": "Get/Set the static_collision flag",
            "lua_type": "boolean",
            "source": {
                "line": 895,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "player_collision",
            "desc": "Get/Set the player_collision flag",
            "lua_type": "boolean",
            "source": {
                "line": 902,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "bullet_collision",
            "desc": "Get/Set the bullet_collision flag",
            "lua_type": "boolean",
            "source": {
                "line": 909,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "bullet_cancel",
            "desc": "Get/Set the bullet cancel flag\n\nEntities with this flag remove all bullets on death",
            "lua_type": "boolean",
            "source": {
                "line": 918,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "animation_oneshot",
            "desc": "Get/Set the animation_oneshot flag",
            "lua_type": "boolean",
            "source": {
                "line": 925,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "animation_sync",
            "desc": "Get/Set the animation_sync flag",
            "lua_type": "boolean",
            "source": {
                "line": 932,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "animation_loop",
            "desc": "Get/Set the animation_loop flag",
            "lua_type": "boolean",
            "source": {
                "line": 939,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "animation_mirror",
            "desc": "Get/Set the animation_mirror flag",
            "lua_type": "boolean",
            "source": {
                "line": 946,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "animation_mirror_ver",
            "desc": "Get/Set the animation_mirror_ver flag",
            "lua_type": "boolean",
            "source": {
                "line": 953,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "animation_live",
            "desc": "Get/Set the animation_live flag",
            "lua_type": "boolean",
            "source": {
                "line": 960,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "dissolve_kill",
            "desc": "Get/Set the dissolve_kill flag",
            "lua_type": "boolean",
            "source": {
                "line": 967,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "pushable",
            "desc": "Get/Set the pushable flag",
            "lua_type": "boolean",
            "source": {
                "line": 974,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "flying",
            "desc": "Get/Set the flying flag",
            "lua_type": "boolean",
            "source": {
                "line": 981,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "gravity_force",
            "desc": "Get/Set the gravity_force flag",
            "lua_type": "boolean",
            "source": {
                "line": 988,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "invisible",
            "desc": "Get/Set the invisible flag",
            "lua_type": "boolean",
            "source": {
                "line": 995,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "invincible",
            "desc": "Get/Set the invincible flag",
            "lua_type": "boolean",
            "source": {
                "line": 1002,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "background",
            "desc": "Get/Set the background flag",
            "lua_type": "boolean",
            "source": {
                "line": 1009,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "foreground",
            "desc": "Get/Set the foreground flag",
            "lua_type": "boolean",
            "source": {
                "line": 1016,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "overlay",
            "desc": "Get/Set the overlay flag",
            "lua_type": "boolean",
            "source": {
                "line": 1023,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "top",
            "desc": "Get/Set the top flag",
            "lua_type": "boolean",
            "source": {
                "line": 1030,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "effect_text",
            "desc": "Get/Set the effect_text flag",
            "lua_type": "boolean",
            "source": {
                "line": 1037,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "effect_immune",
            "desc": "Get/Set the effect_immune flag",
            "lua_type": "boolean",
            "source": {
                "line": 1044,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "effect_visible",
            "desc": "Get/Set the effect_visible flag",
            "lua_type": "boolean",
            "source": {
                "line": 1051,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "laser_sensitive",
            "desc": "Get/Set the laser_sensitive flag",
            "lua_type": "boolean",
            "source": {
                "line": 1058,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "boss_bar",
            "desc": "Get/Set the boss_bar flag",
            "lua_type": "boolean",
            "source": {
                "line": 1065,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "boss_damage",
            "desc": "Get/Set the boss_damage flag",
            "lua_type": "boolean",
            "source": {
                "line": 1072,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "boss_damage_disable",
            "desc": "Get/Set the boss_damage_disable flag",
            "lua_type": "boolean",
            "source": {
                "line": 1079,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "target_disable",
            "desc": "Get/Set the target_disable flag",
            "lua_type": "boolean",
            "source": {
                "line": 1086,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "damage_text",
            "desc": "Get/Set the damage_text flag",
            "lua_type": "boolean",
            "source": {
                "line": 1093,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "health_bar",
            "desc": "Get/Set the health_bar flag",
            "lua_type": "boolean",
            "source": {
                "line": 1100,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "health_bar_force",
            "desc": "Get/Set the health_bar_force flag",
            "lua_type": "boolean",
            "source": {
                "line": 1107,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "continue_clear",
            "desc": "Get/Set the continue_clear flag",
            "lua_type": "boolean",
            "source": {
                "line": 1114,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "transcending",
            "desc": "Get/Set the transcending flag",
            "lua_type": "boolean",
            "source": {
                "line": 1121,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "enemy",
            "desc": "Get/Set the enemy flag",
            "lua_type": "boolean",
            "source": {
                "line": 1128,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "buddy",
            "desc": "Get/Set the buddy flag",
            "lua_type": "boolean",
            "source": {
                "line": 1135,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "aggro",
            "desc": "Get/Set the aggro flag",
            "lua_type": "boolean",
            "source": {
                "line": 1142,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "boss",
            "desc": "Get/Set the boss flag",
            "lua_type": "boolean",
            "source": {
                "line": 1149,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "sight",
            "desc": "Get/Set the sight flag",
            "lua_type": "boolean",
            "source": {
                "line": 1156,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "order",
            "desc": "Get/Set the order flag",
            "lua_type": "boolean",
            "source": {
                "line": 1163,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "time_force",
            "desc": "Get/Set the time_force flag\n\nThis controls wether the entity updates using elapsed time when e.g. dialogs\nare open and the world is not progressing in time.",
            "lua_type": "boolean",
            "source": {
                "line": 1173,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "aura_intensity",
            "desc": "Get/Set the player aura intensity",
            "lua_type": "number",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1181,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "life_mode",
            "desc": "Get/Set the player life mode\n\n### Life Modes\n| Name    | Description             |\n|---------|-------------------------|\n| health  | Normal mode with health |\n| reset   | Reset the room on hit   |",
            "lua_type": "string",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1195,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "kick_follow",
            "desc": "Get/Set the kick follow flag for the player",
            "lua_type": "boolean",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1203,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "chara",
            "desc": "Get the associated character reference",
            "lua_type": "CharaRef",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1211,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "energy",
            "desc": "",
            "lua_type": "number",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1218,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "energy_use",
            "desc": "",
            "lua_type": "number",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1225,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "flashlight_force",
            "desc": "Get/Set the flashlight force flag\n\nWhen set to true, the flashlight will be on permanently,\neven when the player is currently not allowed to move.",
            "lua_type": "boolean",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1252,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "flashlight_intensity",
            "desc": "Get/Set the flashlight intensity",
            "lua_type": "number",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1260,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "flashlight_color",
            "desc": "Get the current flashlight color",
            "lua_type": "table",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1268,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "flashlight_color_normal",
            "desc": "Get the normal flashlight color",
            "lua_type": "table",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1276,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "flashlight_color_aim",
            "desc": "Get the aim flashlight color",
            "lua_type": "table",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1284,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "move_lock",
            "desc": "Get/Set the movement lock flag",
            "lua_type": "boolean",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1331,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        }
    ],
    "types": [],
    "name": "EntityRef",
    "desc": "Wraps an entity instance",
    "source": {
        "line": 5,
        "path": "../../res/data/script/lib/system/entity_ref.lua"
    }
}