Skip to main content

Attributes

This chapter lists all supported attributes for characters and items in Eldiron.

Attributes can be applied to characters, items, or both.


Attributes

active

Item-only attribute.

Represents the active state of an item (on or off). When this attribute is changed, an active event is automatically send to the item to allow the item to sync its visual state.

active = true

blocking

Item-only attribute.

If set to true, the item blocks movement based on its radius.

blocking = true

color

Item-only attribute.

Hex color code that overrides geometry color when item is equipped.

color = "#ff0000"

color_targets

Item-only attribute.

List of geometry node names whose color should be overridden when the item is equipped.

color_targets = ["left_leg", "right_leg"]

geo_targets

Item-only attribute.

List of linedef names to attach this item's geometry to when equipped.
Used only when automatic matching by slot is insufficient.

geo_targets = ["left_shoulder", "right_shoulder"]

inventory_slots

Character-only attribute.

Number of inventory slots the character has. If not specified, defaults to 0.

inventory_slots = 8

facing

Character-only attribute.

Initial facing direction on spawn.
Supported values: "front", "back", "left", "right"
(also accepts "north", "south", "west", "east").

facing = "right"

start_items

Character-only attribute.

List of item template names to add to the character inventory on spawn (not equipped).

start_items = ["Sword", "Potion"]

start_equipped_items

Character-only attribute.

List of item template names to add and auto-equip on spawn.
Items must define a valid slot attribute.

start_equipped_items = ["Shield", "Helmet"]

mode

Character-only attribute.

The current mode of the entity. On startup of characters this is set to "active", took_damage changes this to "dead" when the health attribute is below or equal to 0. Dead characters do not receive events. Healers can set the mode attribute to "active" again.

set_attr("mode", "active")

monetary

Item-only attribute.

If true, the item is considered money. It is not picked up normally, but its worth is added to the wallet.

monetary = true

on_look

General attribute (applies to both characters and items).

Shortcut for the look intent.

If set and the player uses look on the character or item, this text is sent as a system message directly, without requiring script code.

on_look = "You see a sword."

on_pickup

Item-only attribute.

Shortcut for pickup/take behavior on items. on_take is supported as an alias.

If set and the player uses pickup/take on the item:

  • "pickup" (or "take") performs default pickup logic (same as calling take).
  • Any other text is sent as a system message.
on_pickup = "pickup"
# alias:
# on_take = "pickup"
# or:
# on_pickup = "It's stuck in the stone."

on_use

Item-only attribute.

Shortcut for the use intent on items.

If set and the player uses use on the item, this text is sent as a system message directly, without requiring item script code.

on_use = "You cannot use that."

on_drop

Item-only attribute.

Shortcut for the drop intent on items.

If set and the player uses drop on the item (including inventory/equipped item clicks):

  • If empty or "drop", default drop logic runs (drops item to the ground).
  • "You cannot drop that" sends that message and prevents dropping.
  • Any other text sends the message and still drops the item.
on_drop = "You dropped a sword."
# or:
# on_drop = "You cannot drop that."

name

General attribute (applies to both characters and items).

Name of the character or item. Can override the template name.

name = "Golden Key"

player

Character-only attribute.

Marks the character as a player-controlled character that receives input events.

player = true

size

Character-only attribute.

Billboard height/width scale for characters rendered as billboards in 3D views.
Default is 2.0 if no size attribute is set.

size = 2.0

billboard_alignment

Item-only attribute.

Controls how item sprites are aligned in 3D when rendered as billboards.

Supported values:

  • "upright" (default): camera-facing upright billboard
  • "floor": ground-aligned billboard (lies flat on the floor)

Aliases accepted for floor alignment: "ground", "flat".

billboard_alignment = "floor"

radius

General attribute (applies to both characters and items).

Collision radius of the character or item. Default is 0.5.

radius = 0.3

slot

Item-only attribute.

Slot name the item occupies when equipped (e.g. "legs", "head").

slot = "legs"

static

Item-only attribute.

If true, the item is static and cannot be picked up (e.g. doors, campfires).

static = true

tile_id

General attribute (applies to both characters and items).

Tile ID for the visual representation. Use the tile picker to find valid IDs.

tile_id = "abc123"

visible

General attribute (applies to both characters and items).

Whether the character or item is visible in the world.

visible = false

wealth

Character-only attribute.

Inital wealth of the character in base currency.

wealth = 2

worth

Item-only attribute.

Trade value of the item in base currency.

worth = 2

Emitting Light

Both entities and items can emit light by configuring the light group in their data tool.

Light emittance can be set on / off via the set_emit_light command.

[light]
color = "#ffffff" # Light Color
strength = 5.0 # Strength of the Light
range = 3.0 # Range of the light
flicker = 0.4 # Amount of light flickering

Billboard Gate/Door Animation

Item-only attributes; only valid for items linked to Gate/Door sectors that use billboard sprites.

animation

Billboard animation type applied when the sector opens/closes. Valid values: "fade", "up", "down", "left", "right".

animation = "fade"

animation_duration

Duration of the animation in seconds.

animation_duration = 1.0

animation_clock

Timing mode for the animation: "smooth" (time-based) or "tick" (game-tick based).

animation_clock = "smooth"