Skip to main content

Attributes

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

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

This page covers individual attributes such as tile_id, radius, or timeout. Gameplay rules such as weapon damage, spell cooldowns, intent ranges, class permissions, armor categories, and progression belong in the effective ruleset: the official ruleset plus Game / Rules project overrides.

Some character configuration in the Attributes editor also uses top-level TOML tables instead of single attributes, for example:


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

autodamage

Character-only attribute.

If set to true, incoming damage is applied directly by the server and the damaged event is skipped. Use this for simple NPCs/targets that should not run custom damage scripts. On lethal damage, the server also applies death state automatically (mode = "dead" and visible = false).

autodamage = true

autodrop

Character-only attribute.

If set to true, the character automatically drops all inventory and equipped items to the floor on death. With the official ruleset active, death loot is placed into a lootable corpse container instead. Empty corpse containers despawn by default. Non-empty corpses use the ruleset corpse lifetime, and NPC corpses disappear shortly before their owner respawns.

NPCs automatically respawn through the official ruleset unless disabled. The default NPC respawn restores health to full, restores startup loadout and behavior state, and removes that NPC's corpse. Add respawn_seconds = 120 to an NPC instance to change the timer, or respawn = false to opt out. Player death stays script-controlled.

autodrop = true

blocking

Item-only attribute.

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

blocking = true

class

Character-only attribute.

Optional gameplay role or archetype for a character.

The class name selects a class definition from the effective ruleset. Class rules, progression, abilities, equipment permissions, and cooldowns should be defined in the ruleset, not repeated on the character.

class = "Warrior"

When LEVEL is set on a character, Eldiron applies the class progression rules for that level during spawn/load. Ruleset-managed values such as maximum HP/MP, primary attributes, abilities, and spells are derived from the class definition; explicit character attributes remain overrides.


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"]

facing

Character-only attribute.

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

facing = "right"

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"]

hold_speed

Character-only attribute.

Sustained movement speed used for held grid movement input after the first tile. This applies to grid-based player movement such as 2d_grid and firstp_grid. If omitted, it falls back to speed.

hold_speed = 3.0

Example:

speed = 8.0
hold_speed = 3.0

This gives a fast first tile while keeping held movement smooth and continuous.


inventory_slots

Character-only attribute.

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

inventory_slots = 8

party_index

Character-only attribute.

Optional UI/runtime party order for party-bound screen widgets. Lower numbers come first, so 0 is typically the leader.

party_index = 0

party_role

Character-only attribute.

Optional named role used by party-bound screen widgets. This is useful for stable bindings such as "leader", "tank", or "healer".

party_role = "leader"

portrait_tile_id

Character-only attribute.

Static portrait tile used by screen button widgets with portrait = true. This is separate from runtime avatar rendering and is intended for classic portrait/head UI graphics.

You can store it the same way other tile-based attributes are authored: as a tile UUID, a tile alias, or a palette index.

portrait_tile_id = "01234567-89ab-cdef-0123-456789abcdef"
portrait_tile_id = "hero_portrait"
portrait_tile_id = "2"

start_items

Character-only attribute.

List of item template names to add to the character inventory on spawn (not equipped). When omitted, the active ruleset class can provide its default inventory.

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. When omitted, the active ruleset class can provide its default equipped weapons, armor, and clothing.

start_equipped_items = ["Shield", "Helmet"]

mode

Character-only attribute.

The current mode of the entity. On startup of characters this is set to "active". When the ruleset health attribute drops to zero or below, the server changes it to "dead" automatically. Dead characters do not receive events. Healers can set the mode attribute to "active" again. If health is still zero, set_attr("mode", "active") restores it to 1.

set_attr("mode", "active")

route

Character-only attribute.

Patrol route definition used by patrol. Each entry is a linedef name that belongs to the patrol path.

route = ["GuardRouteA", "GuardRouteB"]

You can also use a single route name:

route = "GuardRouteA"

route_mode

Character-only attribute.

Controls route traversal mode for patrol. Default is "loop".

route_mode = "loop"

Supported values:

  • loop: restart from the first point after the last point.
  • pingpong: reverse direction at the route ends.

timeout

Character-only attribute.

Generic NPC interaction timeout used by scripts when temporarily interrupting background behavior such as NPC sequences.

timeout = 10

Typical use:

  • pause a sequence during talk
  • wait for the player to finish interacting
  • resume the sequence when the interaction ends or times out

This attribute is authoring data for your scripts. It does not automatically pause or resume anything by itself.

NPC background workflows themselves are defined separately in the character Attributes editor under behavior.sequences. See NPC Sequences.


Spell Attributes

Spell gameplay is ruleset data.

Define spell mode, costs, cooldowns, target rules, range, damage or healing, visuals, audio, reagents, and messages in the effective ruleset. Use Game / Rules when this project needs to change the official spell rules. Project item data should only carry concrete asset/state information for a materialized spell item.


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. The official ruleset defines the currency table. In v1, all monetary worth values are base copper units and are displayed as copper, silver, and gold by the UI.

monetary = true
currency = "gold"
amount = 1

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"

race

Character-only attribute.

Optional race/species identity for a character.

The race name selects a race definition from the effective ruleset. Race relations, reputation defaults, progression, bonuses, and visual defaults should be defined in the ruleset.

race = "Orc"

player

Character-only attribute.

Marks the character as a player-controlled character.

player = true

input

Player character input mapping (top-level table in the character Attributes editor).

Maps keys to player actions/intents. See Input Mapping for syntax and supported commands.

player = true

[input]
w = "action(forward)"
a = "action(left)"
s = "action(backward)"
d = "action(right)"
u = "intent(use)"

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

size_2d

Character-only attribute.

2D avatar scale for characters rendered from an avatar in 2D views.
Default is 1.0 if no size_2d attribute is set.

Unlike size, this only affects 2D avatar rendering. It does not change gameplay position, grid alignment, collision, or pathing.

size_2d = 1.25

speed

Character-only attribute.

Movement speed multiplier used by server-driven character movement such as goto(), random_walk(), patrol(), and grid tile traversal. Higher values make each tile or movement step complete faster. Default: 1.0.

speed = 1.0

Example:

speed = 8.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.

Accepted forms:

  • tile UUID
  • tile alias
  • palette index

Examples:

tile_id = "03160f57-90e3-4455-a16e-f0b8edfaa415"
tile_id = "player_tile"
tile_id = 2
tile_id = "2"

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.

Initial wallet balance for the character, measured in the ruleset economy's base unit. In the official v1 ruleset, this is copper. For example, 125 displays as 1g 2s 5c. Player characters use the ruleset player starting wealth when this attribute is not present.

wealth = 50

worth

Item-only attribute.

Trade value of the item in the ruleset economy's base unit. In the official v1 ruleset, this is copper.

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"