Attributes
This chapter lists all supported attributes for characters and items in Eldiron.
Attributes can be set via the Code Tool (Python) or Data Tool (TOML).
Attributes are noted in each description as to whether they apply 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
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
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
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
worth
Item-only attribute.
Trade value of the item in base currency.
worth = 12.5
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