# Attribute Reference

### Attribute description

Attribute descriptions are in the following format: section.attributename, `valuetype`, short attribute description

#### Valuetype syntax

`[val1, ...]`, Multiple values between a set of square brackets denotes possible types/values for a single field.

`"..."`, Anything between double quotes is a string literal. This is mostly used in conjunction with the above square brackets syntax.

`list(...)`, Lists are a series of values that can repeat on a single line, separated by commas/semicolons. Example of list(int, bool): "1,false;2,true"

`repeatable(...)`, Repeatable keys can be used for multiple lines. An example of this would be an item with multiple "bonus" lines.

#### List of available valuetypes

`bool`, a string value of `true` or `false`

`int`, a signed integer value

`string`, a text string value

`float`, a floating point number

`item_id`, specifies an integer item identifer (greater than 0)

`power_id`, specifies an integer power identifer (greater than 0)

`icon_id`, specifies an integer icon identifer (greater than or equal to 0)

`point`, defined as: `int, int : X, Y`

`rectangle`, defined as: `int, int, int, int : X, Y, Width, Height`

`filename`, a string path to a file relative to the base of the mod directory (e.g. "animations/hero.txt")

`color`, defined as: `int, int, int : Red, Green, Blue`

`predefined_string`, same as a string, but uses a value defined elsewhere

`alignment`, defined as: `["topleft", "top", "topright", "left", "center", "right", "bottomleft", "bottom", "bottomright"]`

`direction`, defined as: `["N", "NE", "E", "SE", "S", "SW", "W", "NW", int]`. If defined as an integer, the value must be between 0-7 inclusive.

`duration`, durations can be specified in seconds and milliseconds with integer suffix s, ms (eg. 20s, 20000ms)

`label`, defined as: `"hidden"` or `int, int, ["left", "right", "center"], ["top", "center", "bottom"], string : X, Y, Justify, Vertical Align, Font style`. The font style can be any style defined in engine/font_settings.txt.

`loot`, defined as: `filename` or `["currency", item_id], ["fixed", int], int, int : Item, Drop chance, Min quantity, Max quantity`. There is a limitation when defining as part of a list(...): filenames can only be used in the first list element.

`raw`, This is plain text, including line breaks. It is used only for map layer data.

#### AnimationSet

Description of animations in animations/

image | `filename` | Filename of sprite-sheet image.

position | `int` | Number of frames to the right to use as the first frame. Unpacked animations only.

frames | `int` | The total number of frames

duration | `duration` | The duration of the entire animation in 'ms' or 's'.

type | `["play_once", "back_forth", "looped"]` | How to loop (or not loop) this animation.

render_size | `int, int : Width, Height` | Width and height of animation.

render_offset | `int, int : X offset, Y offset` | Render x/y offset.

active_frame | `[list(int), "all"]` | A list of frames marked as "active". Also, "all" can be used to mark all frames as active.

frame | `int, int, int, int, int, int, int, int : Index, Direction, X, Y, Width, Height, X offset, Y offset` | A single frame of a compressed animation.

#### Avatar: Step sounds

Description of items/step_sounds.txt

id | `string` | An identifier name for a set of step sounds.

step | `filename` | Filename of a step sound effect.

#### Avatar: Hero layers

Description of engine/hero_layers.txt

layer | `direction, list(string) : Direction, Layer name(s)` | Defines the hero avatar sprite layer

#### CombatText

Description of engine/combat_text.txt

duration | `duration` | Duration of the combat text in 'ms' or 's'.

speed | `int` | Motion speed of the combat text.

offset | `int` | The vertical offset for the combat text's starting position.

#### CursorManager

Description of engine/mouse_cursor.txt

normal | `filename` | Filename of an image for the normal cursor.

interact | `filename` | Filename of an image for the object interaction cursor.

talk | `filename` | Filename of an image for the NPC interaction cursor.

attack | `filename` | Filename of an image for the cursor when attacking enemies.

#### EnemyGroupManager

Description of enemies in enemies/

level | `int` | Level of the enemy

rarity | `["common", "uncommon", "rare"]` | Enemy rarity

categories | `list(predefined_string)` | Comma separated list of enemy categories

#### EventManager

Description of events in maps/ and npcs/

event.type | `string` | (IGNORED BY ENGINE) The "type" field, as used by Tiled and other mapping tools.

event.activate | `["on_trigger", "on_load", "on_leave", "on_mapexit", "on_clear", "static"]` | Set the state in which the event will be activated (map events only).

event.location | `rectangle` | Defines the location area for the event.

event.hotspot | `["location", rectangle]` | Event uses location as hotspot or defined by rect.

event.cooldown | `duration` | Duration for event cooldown in 'ms' or 's'.

event.reachable_from | `rectangle` | If the hero is inside this rectangle, they can activate the event.

event.tooltip | `string` | Tooltip for event

event.power_path | `["hero", point]` | Event power path

event.power_damage | `int, int : Min, Max` | Range of power damage

event.intermap | `filename, int, int : Map file, X, Y` | Jump to specific map at location specified.

event.intramap | `int, int : X, Y` | Jump to specific position within current map.

event.mapmod | `list(predefined_string, int, int, int) : Layer, X, Y, Tile ID` | Modify map tiles

event.soundfx | `filename, int, int, bool : Sound file, X, Y, loop` | Filename of a sound to play. Optionally, it can be played at a specific location and/or looped.

event.loot | `list(loot)` | Add loot to the event.

event.loot_count | `int, int : Min, Max` | Sets the minimum (and optionally, the maximum) amount of loot this event can drop. Overrides the global drop_max setting.

event.msg | `string` | Adds a message to be displayed for the event.

event.shakycam | `duration` | Makes the camera shake for this duration in 'ms' or 's'.

event.requires_status | `list(string)` | Event requires list of statuses

event.requires_not_status | `list(string)` | Event requires not list of statuses

event.requires_level | `int` | Event requires hero level

event.requires_not_level | `int` | Event requires not hero level

event.requires_currency | `int` | Event requires atleast this much currency

event.requires_not_currency | `int` | Event requires no more than this much currency

event.requires_item | `list(item_id)` | Event requires specific item (not equipped)

event.requires_not_item | `list(item_id)` | Event requires not having a specific item (not equipped)

event.requires_class | `predefined_string` | Event requires this base class

event.requires_not_class | `predefined_string` | Event requires not this base class

event.set_status | `list(string)` | Sets specified statuses

event.unset_status | `list(string)` | Unsets specified statuses

event.remove_currency | `int` | Removes specified amount of currency from hero inventory

event.remove_item | `list(item_id)` | Removes specified item from hero inventory

event.reward_xp | `int` | Reward hero with specified amount of experience points.

event.reward_currency | `int` | Reward hero with specified amount of currency.

event.reward_item | `item_id, int : Item, Quantity` | Reward hero with y number of item x.

event.restore | `["hp", "mp", "hpmp", "status", "all"]` | Restore the hero's HP, MP, and/or status.

event.power | `power_id` | Specify power coupled with event.

event.spawn | `list(predefined_string, int, int) : Enemy category, X, Y` | Spawn an enemy from this category at location

event.stash | `bool` | If true, the Stash menu if opened.

event.npc | `filename` | Filename of an NPC to start dialog with.

event.music | `filename` | Change background music to specified file.

event.cutscene | `filename` | Show specified cutscene by filename.

event.repeat | `bool` | If true, the event to be triggered again.

event.save_game | `bool` | If true, the game is saved when the event is triggered. The respawn position is set to where the player is standing.

event.book | `filename` | Opens a book by filename.

event.script | `filename` | Loads and executes an Event from a file.

#### GameStateConfigBase

Description of menus/config.txt

listbox_scrollbar_offset | `int` | Horizontal offset from the right of listboxes (mods, languages, etc) to place the scrollbar.

music_volume | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Music Volume" slider relative to the frame.

sound_volume | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Sound Volume" slider relative to the frame.

language | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Language" list box relative to the frame.

combat_text | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Show combat text" checkbox relative to the frame.

show_fps | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Show FPS" checkbox relative to the frame.

colorblind | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Colorblind Mode" checkbox relative to the frame.

hardware_cursor | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Hardware mouse cursor" checkbox relative to the frame.

dev_mode | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Developer Mode" checkbox relative to the frame.

loot_tooltips | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Always show loot labels" checkbox relative to the frame.

statbar_labels | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Always show stat bar labels" checkbox relative to the frame.

auto_equip | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Automatically equip items" checkbox relative to the frame.

activemods | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Active Mods" list box relative to the frame.

inactivemods | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Available Mods" list box relative to the frame.

activemods_shiftup | `point` | Position of the button to shift mods up in "Active Mods" relative to the frame.

activemods_shiftdown | `point` | Position of the button to shift mods down in "Active Mods" relative to the frame.

activemods_deactivate | `point` | Position of the "Disable" button relative to the frame.

inactivemods_activate | `point` | Position of the "Enable" button relative to the frame.

#### GameStateConfigDesktop

Description of menus/config.txt

fullscreen | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Full Screen Mode" checkbox relative to the frame.

mouse_move | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Move hero using mouse" checkbox relative to the frame.

hwsurface | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Hardware surfaces" checkbox relative to the frame.

vsync | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "V-Sync" checkbox relative to the frame.

texture_filter | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Texture Filtering" checkbox relative to the frame.

change_gamma | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Allow changing gamma" checkbox relative to the frame.

gamma | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Gamma" slider relative to the frame.

hws_note | `point` | Position of the "Disable for performance" label (next to Hardware surfaces) relative to the frame.

dbuf_note | `point` | Position of the "Disable for performance" label (next to Double buffering) relative to the frame.

test_note | `point` | Position of the "Experimental" label relative to the frame.

enable_joystick | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Use joystick" checkbox relative to the frame.

joystick_device | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Joystick" list box relative to the frame.

mouse_aim | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Mouse aim" checkbox relative to the frame.

no_mouse | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Do not use mouse" checkbox relative to the frame.

joystick_deadzone | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Joystick Deadzone" slider relative to the frame.

handheld_note | `point` | Position of the "For handheld devices" label relative to the frame.

secondary_offset | `point` | Offset of the second (and third) columns of keybinds.

keybinds_bg_color | `color` | Background color for the keybindings scrollbox.

scrollpane | `rectangle` | Position of the keybinding scrollbox relative to the frame.

scrollpane_contents | `int` | The vertical size of the keybinding scrollbox's contents.

cancel | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Cancel" keybind relative to the keybinding scrollbox.

accept | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Accept" keybind relative to the keybinding scrollbox.

up | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Up" keybind relative to the keybinding scrollbox.

down | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Down" keybind relative to the keybinding scrollbox.

left | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Left" keybind relative to the keybinding scrollbox.

right | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Right" keybind relative to the keybinding scrollbox.

bar1 | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Bar1" keybind relative to the keybinding scrollbox.

bar2 | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Bar2" keybind relative to the keybinding scrollbox.

bar3 | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Bar3" keybind relative to the keybinding scrollbox.

bar4 | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Bar4" keybind relative to the keybinding scrollbox.

bar5 | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Bar5" keybind relative to the keybinding scrollbox.

bar6 | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Bar6" keybind relative to the keybinding scrollbox.

bar7 | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Bar7" keybind relative to the keybinding scrollbox.

Bar8 | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Bar8" keybind relative to the keybinding scrollbox.

bar9 | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Bar9" keybind relative to the keybinding scrollbox.

bar0 | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Bar0" keybind relative to the keybinding scrollbox.

main1 | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Main1" keybind relative to the keybinding scrollbox.

main2 | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Main2" keybind relative to the keybinding scrollbox.

character | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Character" keybind relative to the keybinding scrollbox.

inventory | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Inventory" keybind relative to the keybinding scrollbox.

powers | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Powers" keybind relative to the keybinding scrollbox.

log | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Log" keybind relative to the keybinding scrollbox.

ctrl | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Ctrl" keybind relative to the keybinding scrollbox.

shift | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Shift" keybind relative to the keybinding scrollbox.

alt | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Alt" keybind relative to the keybinding scrollbox.

delete | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Delete" keybind relative to the keybinding scrollbox.

actionbar | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "ActionBar Accept" keybind relative to the keybinding scrollbox.

actionbar_back | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "ActionBar Left" keybind relative to the keybinding scrollbox.

actionbar_forward | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "ActionBar Right" keybind relative to the keybinding scrollbox.

actionbar_use | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "ActionBar Use" keybind relative to the keybinding scrollbox.

developer_menu | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Developer Menu" keybind relative to the keybinding scrollbox.

#### Cutscene

Description of cutscenes in cutscenes/

scale_gfx | `bool` | The graphics will be scaled to fit screen width

caption_margins | `float, float : X margin, Y margin` | Percentage-based margins for the caption text based on screen size

vscroll_speed | `float` | The speed at which elements will scroll in 'vscroll' scenes.

menu_backgrounds | `bool` | This cutscene will use a random fullscreen background image, like the title screen does

scene.caption | `string` | A caption that will be shown.

scene.image | `filename` | Filename of an image that will be shown.

scene.pause | `duration` | Pause before next component in 'ms' or 's'.

scene.soundfx | `filename` | Filename of a sound that will be played

vscroll.text | `string` | A single, non-wrapping line of text.

vscroll.image | `filename` | Filename of an image that will be shown.

vscroll.separator | `int` | Places an invisible gap of a specified height between elements.

#### GameStateLoad

Description of menus/gameload.txt

button_new | `point` | Position of the "New Game" button.

button_load | `point` | Position of the "Load Game" button.

button_delete | `point` | Position of the "Delete Save" button.

portrait | `rectangle` | Position and dimensions of the portrait image.

gameslot | `rectangle` | Position and dimensions of the first game slot.

name | `label` | The label for the hero's name. Position is relative to game slot position.

level | `label` | The label for the hero's level. Position is relative to game slot position.

class | `label` | The label for the hero's class. Position is relative to game slot position.

map | `label` | The label for the hero's current location. Position is relative to game slot position.

loading_label | `label` | The label for the "Entering game world..."/"Loading saved game..." text.

sprite | `point` | Position for the avatar preview image in each slot

visible_slots | `int` | The maximum numbers of visible save slots.

#### GameStateNew: Layout

Description of menus/gamenew.txt

button_prev | `point` | Position of button to choose the previous preset hero.

button_next | `point` | Position of button to choose the next preset hero.

button_permadeath | `point` | Position of checkbox for toggling permadeath.

name_input | `point` | Position of the hero name textbox.

portrait_label | `label` | Label for the "Choose a Portrait" text.

name_label | `label` | Label for the "Choose a Name" text.

permadeath_label | `label` | Label for the "Permadeath?" text.

classlist_label | `label` | Label for the "Choose a Class" text.

portrait | `rectangle` | Position and dimensions of the portrait image.

class_list | `point` | Position of the class list.

show_classlist | `bool` | Allows hiding the class list.

#### GameStateNew: Hero options

Description of engine/hero_options.txt

option | `string, string, filename, string : Base, Head, Portrait, Name` | A default body, head, portrait, and name for a hero.

#### GameStatePlay: Titles

Description of engine/titles.txt

title.title | `string` | The displayed title.

title.level | `int` | Requires level.

title.power | `power_id` | Requires power.

title.requires_status | `string` | Requires status.

title.requires_not_status | `string` | Requires not status.

title.primary_stat | `predefined_string, predefined_string : Primary stat, Lesser primary stat` | Required primary stat(s). The lesser stat is optional.

#### GameStateTitle

Description of menus/gametitle.txt

logo | `filename, int, int, alignment : Image file, X, Y, Alignment` | Filename and position of the main logo image.

play_pos | `int, int, alignment : X, Y, Alignment` | Position of the "Play Game" button.

config_pos | `int, int, alignment : X, Y, Alignment` | Position of the "Configuration" button.

credits_pos | `int, int, alignment : X, Y, Alignment` | Position of the "Credits" button.

exit_pos | `int, int, alignment : X, Y, Alignment` | Position of the "Exit Game" button.

#### GameSwitcher: Default music

Description of engine/default_music.txt

music | `filename` | Filename of a music file to play during game states that don't already have music.

#### GameSwitcher: Background images

Description of engine/menu_backgrounds.txt

background | `repeatable(filename)` | Filename of a background image to be added to the pool of random menu backgrounds

#### GameSwitcher: FPS counter

Description of menus/fps.txt

position | `int, int, alignment : X, Y, Alignment` | Position of the fps counter.

color | `color` | Color of the fps counter text.

#### IconManager

Description of engine/icons.txt

icon_set | `repeatable(icon_id, filename) : First ID, Image file` | Defines an icon graphics file to load, as well as the index of the first icon.

text_offset | `point` | A pixel offset from the top-left to place item quantity text on icons.

#### ItemManager: Items

Description about the class and it usage, items/items.txt...

id | `item_id` | An uniq id of the item used as reference from other classes.

name | `string` | Item name displayed on long and short tooltips.

flavor | `string` | A description of the item.

level | `int` | The item's level. Has no gameplay impact. (Deprecated?)

icon | `icon_id` | An id for the icon to display for this item.

book | `filename` | A book file to open when this item is activated.

quality | `predefined_string` | Item quality matching an id in items/qualities.txt

item_type | `predefined_string` | Equipment slot matching an id in items/types.txt

equip_flags | `list(predefined_string)` | A comma separated list of flags to set when this item is equipped. See engine/equip_flags.txt.

dmg_melee | `int, int : Min, Max` | Defines the item melee damage, if only min is specified the melee damage is fixed.

dmg_ranged | `int, int : Min, Max` | Defines the item ranged damage, if only min is specified the ranged damage is fixed.

dmg_ment | `int, int : Min, Max` | Defines the item mental damage, if only min is specified the ranged damage is fixed.

abs | `int, int : Min, Max` | Defines the item absorb value, if only min is specified the absorb value is fixed.

requires_level | `int` | The hero's level must match or exceed this value in order to equip this item.

requires_stat | `repeatable(predefined_string, int) : Primary stat name, Value` | Make item require specific stat level ex. requires_stat=physical,6 will require hero to have level 6 in physical stats

requires_class | `predefined_string` | The hero's base class (engine/classes.txt) must match for this item to be equipped.

bonus | `repeatable(predefined_string, int) : Stat name, Value` | Adds a bonus to the item by stat name, example bonus=hp, 50

soundfx | `filename` | Sound effect filename to play for the specific item.

gfx | `filename` | Filename of an animation set to display when the item is equipped.

loot_animation | `repeatable(filename, int, int) : Loot image, Min quantity, Max quantity` | Specifies the loot animation file for the item. The max quantity, or both quantity values, may be omitted.

power | `power_id` | Adds a specific power to the item which makes it usable as a power and can be placed in action bar.

replace_power | `repeatable(int, int) : Old power, New power` | Replaces the old power id with the new power id in the action bar when equipped.

power_desc | `string` | A string describing the additional power.

price | `int` | The amount of currency the item costs, if set to 0 the item cannot be sold.

price_per_level | `int` | Additional price for each player level above 1

price_sell | `int` | The amount of currency the item is sold for, if set to 0 the sell prices is prices*vendor_ratio.

max_quantity | `int` | Max item count per stack.

pickup_status | `string` | Set a campaign status when item is picked up, this is used for quest items.

stepfx | `predefined_string` | Sound effect when walking, this applies only to armors.

disable_slots | `list(predefined_string)` | A comma separated list of equip slot types to disable when this item is equipped.

quest_item | `bool` | If true, this item is a quest item and can not be dropped, stashed, or sold.

#### ItemManager: Types

Definition of a item types, items/types.txt...

type.id | `string` | Item type identifier.

type.name | `string` | Item type name.

#### ItemManager: Qualities

Definition of a item qualities, items/types.txt...

quality.id | `string` | Item quality identifier.

quality.name | `string` | Item quality name.

quality.color | `color` | Item quality color.

#### ItemManager: Sets

Definition of a item sets, items/sets.txt...

id | `int` | A uniq id for the item set.

name | `string` | Name of the item set.

items | `list(item_id)` | List of item id's that is part of the set.

color | `color` | A specific of color for the set.

bonus | `repeatable(int, string, int) : Required set item count, Stat name, Value` | Bonus to append to items in the set.

#### Loot

Description of engine/loot.txt

tooltip_margin | `int` | Vertical offset of the loot tooltip from the loot itself.

autopickup_currency | `bool` | Enable autopickup for currency

autopickup_range | `float` | Minimum distance the player must be from loot to trigger autopickup.

vendor_ratio | `int` | Prices ratio for vendors

sfx_loot | `filename` | Filename of a sound effect to play for dropping loot.

drop_max | `int` | The maximum number of random item stacks that can drop at once

drop_radius | `int` | The distance (in tiles) away from the origin that loot can drop

#### Map

Description of maps/

title | `string` | Title of map

width | `int` | Width of map

height | `int` | Height of map

tileset | `filename` | Filename of a tileset definition to use for map

music | `filename` | Filename of background music to use for map

hero_pos | `point` | The player will spawn in this location if no point was previously given.

tilewidth | `int` | Inherited from Tiled map file. Unused by engine.

tileheight | `int` | Inherited from Tiled map file. Unused by engine.

layer.type | `string` | Map layer type.

layer.format | `string` | Format for map layer, must be 'dec'

layer.data | `raw` | Raw map layer data

enemygroup.type | `string` | (IGNORED BY ENGINE) The "type" field, as used by Tiled and other mapping tools.

enemygroup.category | `predefined_string` | The category of enemies that will spawn in this group.

enemygroup.level | `int, int : Min, Max` | Defines the level range of enemies in group. If only one number is given, it's the exact level.

enemygroup.location | `rectangle` | Location area for enemygroup

enemygroup.number | `int, int : Min, Max` | Defines the range of enemies in group. If only one number is given, it's the exact amount.

enemygroup.chance | `int` | Percentage of chance

enemygroup.direction | `direction` | Direction that enemies will initially face.

enemygroup.waypoints | `list(point)` | Enemy waypoints; single enemy only; negates wander_radius

enemygroup.wander_radius | `int` | The radius (in tiles) that an enemy will wander around randomly; negates waypoints

enemygroup.requires_status | `list(string)` | Status required for loading enemies

enemygroup.requires_not_status | `list(string)` | Status required to be missing for loading enemies

npc.type | `string` | (IGNORED BY ENGINE) The "type" field, as used by Tiled and other mapping tools.

npc.filename | `string` | Filename of an NPC definition.

npc.requires_status | `list(string)` | Status required for NPC load. There can be multiple states, separated by comma

npc.requires_not_status | `list(string)` | Status required to be missing for NPC load. There can be multiple states, separated by comma

npc.location | `point` | Location of NPC

#### MenuActionBar

Description of menus/actionbar.txt

slot | `repeatable(int, int, int) : Index, X, Y` | Index (max 10) and position for power slot.

slot_M1 | `point` | Position for the primary action slot.

slot_M2 | `point` | Position for the secondary action slot.

char_menu | `point` | Position for the Character menu button.

inv_menu | `point` | Position for the Inventory menu button.

powers_menu | `point` | Position for the Powers menu button.

log_menu | `point` | Position for the Log menu button.

#### MenuActiveEffects

Description of menus/activeeffects.txt

vertical | `bool` | True is vertical orientation; False is horizontal orientation.

#### MenuBook

Description of books in books/

close | `point` | Position of the close button.

background | `filename` | Filename for the background image.

image.image_pos | `point` | Position of the image.

image.image | `filename` | Filename of the image.

text.text_pos | `int, int, int, ["left", "center", "right"] : X, Y, Width, Text justify` | Position of the text.

text.text_font | `color, string : Font color, Font style` | Font color and style.

text.text | `string` | The text to be displayed.

#### MenuCharacter

Description of menus/character.txt

close | `point` | Position of the close button.

label_title | `label` | Position of the "Character" text.

upgrade_primary | `predefined_string, point : Primary stat name, Button position` | Position of the button used to add a stat point to this primary stat.

statlist | `point` | Position of the scrollbox containing non-primary stats.

statlist_rows | `int` | The height of the statlist in rows.

statlist_scrollbar_offset | `int` | Right margin in pixels for the statlist's scrollbar.

label_name | `label` | Position of the "Name" text.

label_level | `label` | Position of the "Level" text.

label_primary | `predefined_string, label : Primary stat name, Text positioning` | Position of the text label for this primary stat.

name | `rectangle` | Position of the player's name and dimensions of the tooltip hotspot.

level | `rectangle` | Position of the player's level and dimensions of the tooltip hotspot.

primary | `predefined_string, rectangle : Primary stat name, Hotspot position` | Position of this primary stat value display and dimensions of its tooltip hotspot.

unspent | `label` | Position of the label showing the number of unspent stat points.

show_resists | `bool` | Hide the elemental "Resistance" stats in the statlist if set to false.

show_stat | `string, bool : Stat name, Visible` | Hide the matching stat in the statlist if set to false.

#### Menu

Description of menus in menus/

pos | `rectangle` | Menu position and dimensions

align | `alignment` | Position relative to screen edges

soundfx_open | `filename` | Filename of a sound to play when opening this menu.

soundfx_close | `filename` | Filename of a sound to play when closing this menu.

#### MenuDevConsole

Description of menus/devconsole.txt

close | `point` | Position of the close button.

label_title | `label` | Position of the "Developer Console" label.

confirm | `point` | Position of the "Execute" button.

input | `point` | Position of the command entry widget.

history | `rectangle` | Position and dimensions of the command history.

#### MenuEnemy

Description of menus/enemy.txt

bar_pos | `rectangle` | Position and dimensions of the health bar.

text_pos | `label` | Position of the text displaying the enemy's name and level.

#### MenuExit

Description of menus/exit.txt

title | `label` | Position of the "Paused" text.

exit | `point` | Position of the "Save and Exit" button.

continue | `point` | Position of the "Continue" button.

music_volume | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Music Volume" slider relative to the frame.

sound_volume | `int, int, int, int : Label X, Label Y, Widget X, Widget Y` | Position of the "Sound Volume" slider relative to the frame.

#### MenuInventory

Description of menus/inventory.txt

close | `point` | Position of the close button.

equipment_slot | `repeatable(int, int, string) : X, Y, Slot Type` | Position and item type of an equipment slot.

carried_area | `point` | Position of the first normal inventory slot.

carried_cols | `int` | The number of columns for the normal inventory.

carried_rows | `int` | The number of rows for the normal inventory.

label_title | `label` | Position of the "Inventory" label.

currency | `label` | Position of the label that displays the total currency being carried.

help | `rectangle` | A mouse-over area that displays some help text for inventory shortcuts.

#### MenuLog

Description of menus/log.txt

label_title | `label` | Position of the "Log" text.

close | `point` | Position of the close button.

tab_area | `rectangle` | The position of the row of tabs, followed by the dimensions of the log text area.

#### MenuMiniMap

Description of menus/minimap.txt

map_pos | `rectangle` | Position and dimensions of the map.

text_pos | `label` | Position of the text label with the map name.

#### MenuNPCActions

Description of menus/npc.txt

background_color | `color, int : Color, Alpha` | Color and alpha of the menu's background.

topic_normal_color | `color` | The normal color of a generic topic text.

topic_hilight_color | `color` | The color of generic topic text when it's hovered over or selected.

vendor_normal_color | `color` | The normal color of the vendor option text.

vendor_hilight_color | `color` | The color of vendor option text when it's hovered over or selected.

cancel_normal_color | `color` | The normal color of the option to close the menu.

cancel_hilight_color | `color` | The color of the option to close the menu when it's hovered over or selected.

#### MenuNumPicker

Description of menus/num_picker.txt

label_title | `label` | Position of the "Enter amount " text.

confirm | `point` | Position of the "OK" button.

increase | `point` | Position of the button used to increase the value.

decrease | `point` | Position of the button used to decrease the value.

input | `point` | Position of the text input box.

#### MenuPowers: Menu layout

Description of menus/powers.txt

label_title | `label` | Position of the "Powers" text.

unspent_points | `label` | Position of the text that displays the amount of unused power points.

close | `point` | Position of the close button.

tab_area | `rectangle` | Position and dimensions of the tree pages.

#### MenuPowers: Power tree layout

Description of powers/trees/

background | `filename` | Filename of the default background image

tab.title | `string` | The name of this power tree tab

tab.background | `filename` | Filename of the background image for this tab's power tree

power.id | `int` | A power id from powers/powers.txt for this slot.

power.tab | `int` | Tab index to place this power on, starting from 0.

power.position | `point` | Position of this power icon; relative to MenuPowers "pos".

power.requires_primary | `predefined_string, int : Primary stat name, Required value` | Power requires this primary stat to be at least the specificed value.

power.requires_point | `bool` | Power requires a power point to unlock.

power.requires_level | `int` | Power requires at least this level for the hero.

power.requires_power | `power_id` | Power requires another power id.

power.visible_requires_status | `repeatable(string)` | Hide the power if we don't have this campaign status.

power.visible_requires_not_status | `repeatable(string)` | Hide the power if we have this campaign status.

power.upgrades | `list(power_id)` | A list of upgrade power ids that this power slot can upgrade to. Each of these powers should have a matching upgrade section.

upgrade.id | `int` | A power id from powers/powers.txt for this upgrade.

upgrade.requires_primary | `predefined_string, int : Primary stat name, Required value` | Upgrade requires this primary stat to be at least the specificed value.

upgrade.requires_point | `bool` | Upgrade requires a power point to unlock.

upgrade.requires_level | `int` | Upgrade requires at least this level for the hero.

upgrade.requires_power | `int` | Upgrade requires another power id.

upgrade.visible_requires_status | `repeatable(string)` | Hide the upgrade if we don't have this campaign status.

upgrade.visible_requires_not_status | `repeatable(string)` | Hide the upgrade if we have this campaign status.

#### MenuStash

Description of menus/stash.txt

close | `point` | Position of the close button.

slots_area | `point` | Position of the top-left slot.

stash_cols | `int` | The number of columns for the grid of slots.

stash_rows | `int` | The number of rows for the grid of slots.

label_title | `label` | Position of the "Stash" label.

currency | `label` | Position of the label displaying the amount of currency stored in the stash.

#### MenuStatBar

Description of menus/hp.txt, menus/mp.txt, menus/xp.txt

bar_pos | `rectangle` | Position and dimensions of the bar graphics.

text_pos | `label` | Position of the text displaying the current value of the relevant stat.

orientation | `bool` | True is vertical orientation; false is horizontal.

bar_gfx | `filename` | Filename of the image to use for the "fill" of the bar.

bar_gfx_background | `filename` | Filename of the image to use for the base of the bar.

#### MenuTalker

Description of menus/talker.txt

close | `point` | Position of the close button.

advance | `point` | Position of the button to advance dialog.

dialogbox | `rectangle` | Position and dimensions of the text box graphics.

dialogtext | `rectangle` | Rectangle where the dialog text is placed.

text_offset | `point` | Margins for the left/right and top/bottom of the dialog text.

portrait_he | `rectangle` | Position and dimensions of the NPC portrait graphics.

portrait_you | `rectangle` | Position and dimensions of the player's portrait graphics.

font_who | `predefined_string` | Font style to use for the name of the currently talking person.

font_dialog | `predefined_string` | Font style to use for the dialog text.

#### MenuVendor

Description of menus/vendor.txt

close | `point` | Position of the close button.

slots_area | `point` | Position of the top-left slot.

vendor_cols | `int` | The number of columns in the grid of slots.

vendor_rows | `int` | The number of rows in the grid of slots.

label_title | `label` | The position of the text that displays the NPC's name.

#### NPC

Description of NPCs in npcs/

dialog.him | `repeatable(string)` | A line of dialog from the NPC.

dialog.her | `repeatable(string)` | A line of dialog from the NPC.

dialog.you | `repeatable(string)` | A line of dialog from the player.

dialog.voice | `repeatable(string)` | Filename of a voice sound file to play.

dialog.topic | `string` | The name of this dialog topic. Displayed when picking a dialog tree.

dialog.group | `string` | Dialog group.

dialog.allow_movement | `bool` | Restrict the player's mvoement during dialog.

dialog.portrait_him | `repeatable(filename)` | Filename of a portrait to display for the NPC during this dialog.

dialog.portrait_her | `repeatable(filename)` | Filename of a portrait to display for the NPC during this dialog.

dialog.portrait_you | `repeatable(filename)` | Filename of a portrait to display for the player during this dialog.

name | `string` | NPC's name.

gfx | `filename` | Filename of an animation definition.

direction | `direction` | The direction to use for this NPC's stance animation.

talker | `bool` | Allows this NPC to be talked to.

portrait | `filename` | Filename of the default portrait image.

vendor | `bool` | Allows this NPC to buy/sell items.

vendor_requires_status | `list(string)` | The player must have these statuses in order to use this NPC as a vendor.

vendor_requires_not_status | `list(string)` | The player must not have these statuses in order to use this NPC as a vendor.

constant_stock | `repeatable(list(item_id))` | A list of items this vendor has for sale.

status_stock | `repeatable(string, list(item_id)) : Required status, Item(s)` | A list of items this vendor will have for sale if the required status is met.

random_stock | `list(loot)` | Use a loot table to add random items to the stock; either a filename or an inline definition.

random_stock_count | `int, int : Min, Max` | Sets the minimum (and optionally, the maximum) amount of random items this npc can have.

vox_intro | `repeatable(filename)` | Filename of a sound file to play when initially interacting with the NPC.

#### Effects

Description of powers/effects.txt

effect.id | `string` | Unique identifier for the effect definition.

effect.type | `string` | Defines the type of effect

effect.name | `string` | A displayed name that is shown when hovering the mouse over the effect icon.

effect.icon | `icon_id` | The icon to visually represent the effect in the status area

effect.animation | `filename` | The filename of effect animation.

effect.can_stack | `bool` | Allows multiple instances of this effect

effect.render_above | `bool` | Effect is rendered above

#### Powers

Description of powers/powers.txt

power.id | `power_id` | Uniq identifier for the power definition.

power.type | `["fixed", "missile", "repeater", "spawn", "transform", "block"]` | Defines the type of power definiton

power.name | `string` | The name of the power

power.description | `string` | Description of the power

power.icon | `icon_id` | The icon to visually represent the power eg. in skill tree or action bar.

power.new_state | `predefined_string` | When power is used, hero or enemy will change to this state. Must be one of the states ["instant", user defined]

power.state_duration | `duration` | Sets the length of time the caster is in their state animation. A time longer than the animation length will cause the animation to pause on the last frame. Times shorter than the state animation length will have no effect.

power.face | `bool` | Power will make hero or enemy to face the target location.

power.source_type | `["hero", "neutral", "enemy"]` | Determines which entities the power can effect.

power.beacon | `bool` | True if enemy is calling its allies.

power.count | `int` | The count of hazards/effect or spawns to be created by this power.

power.passive | `bool` | If power is unlocked when the hero or enemy spawns it will be automatically activated.

power.passive_trigger | `["on_block", "on_hit", "on_halfdeath", "on_joincombat", "on_death"]` | This will only activate a passive power under a certain condition.

power.meta_power | `bool` | If true, this power can not be used on it's own. Instead, it should be replaced via an item with a replace_power entry.

power.requires_flags | `list(predefined_string)` | A comma separated list of equip flags that are required to use this power. See engine/equip_flags.txt

power.requires_mp | `int` | Restrict power usage to a specified MP level.

power.requires_hp | `int` | Restrict power usage to a specified HP level.

power.sacrifice | `bool` | If the power has requires_hp, allow it to kill the caster.

power.requires_los | `bool` | Requires a line-of-sight to target.

power.requires_empty_target | `bool` | The power can only be cast when target tile is empty.

power.requires_item | `item_id, int : Item, Quantity` | Requires a specific item of a specific quantity in inventory.

power.requires_equipped_item | `item_id, int : Item, Quantity` | Requires a specific item of a specific quantity to be equipped on hero.

power.requires_targeting | `bool` | Power is only used when targeting using click-to-target.

power.requires_spawns | `int` | The caster must have at least this many summoned creatures to use this power.

power.cooldown | `duration` | Specify the duration for cooldown of the power in 'ms' or 's'.

power.animation | `filename` | The filename of the power animation.

power.soundfx | `filename` | Filename of a sound effect to play when the power is used.

power.soundfx_hit | `filename` | Filename of a sound effect to play when the power's hazard hits a valid target.

power.directional | `bool` | The animation sprite sheet contains 8 directions, one per row.

power.visual_random | `int` | The animation sprite sheet contains rows of random options

power.visual_option | `int` | The animation sprite sheet containers rows of similar effects, use a specific option.

power.aim_assist | `bool` | Power is aim assisted.

power.speed | `float` | The speed of missile hazard, the unit is defined as map units per frame.

power.lifespan | `duration` | How long the hazard/animation lasts in 'ms' or 's'.

power.floor | `bool` | The hazard is drawn between the background and the object layer.

power.complete_animation | `bool` | For hazards; Play the entire animation, even if the hazard has hit a target.

power.charge_speed | `float` | Moves the caster at this speed in the direction they are facing until the state animation is finished.

power.use_hazard | `bool` | Power uses hazard.

power.no_attack | `bool` | Hazard won't affect other entities.

power.radius | `float` | Radius in pixels

power.base_damage | `["melee", "ranged", "ment"]` | Determines which of the three primary damage stats will be used to calculate damage.

power.starting_pos | `["source", "target", "melee"]` | Start position for hazard

power.relative_pos | `bool` | Hazard will move relative to the caster's position.

power.multitarget | `bool` | Allows a hazard power to hit more than one entity.

power.multihit | `bool` | Allows a hazard power to hit the same entity more than once.

power.expire_with_caster | `bool` | If true, hazard will disappear when the caster dies.

power.trait_armor_penetration | `bool` | Ignores the target's Absorbtion stat

power.trait_avoidance_ignore | `bool` | Ignores the target's Avoidance stat

power.trait_crits_impaired | `int` | Increases critical hit percentage for slowed/immobile targets

power.trait_elemental | `predefined_string` | Damage done is elemental. See engine/elements.txt

power.target_range | `float` | The distance from the caster that the power can be activated

power.hp_steal | `int` | Percentage of damage to steal into HP

power.mp_steal | `int` | Percentage of damage to steal into MP

power.missile_angle | `int` | Angle of missile

power.angle_variance | `int` | Percentage of variance added to missile angle

power.speed_variance | `float` | Percentage of variance added to missile speed

power.delay | `duration` | Delay between repeats in 'ms' or 's'.

power.transform_duration | `duration` | Duration for transform in 'ms' or 's'.

power.manual_untransform | `bool` | Force manual untranform

power.keep_equipment | `bool` | Keep equipment while transformed

power.untransform_on_hit | `bool` | Force untransform when the player is hit

power.buff | `bool` | Power is cast upon the caster.

power.buff_teleport | `bool` | Power is a teleportation power.

power.buff_party | `bool` | Power is cast upon party members

power.buff_party_power_id | `power_id` | Buffs a power id for all party members

power.post_effect | `predefined_string, int, duration : Effect ID, Magnitude, Duration` | Post effect. Duration is in 'ms' or 's'.

power.post_power | `power_id` | Trigger a power if the hazard did damage.

power.wall_power | `power_id` | Trigger a power if the hazard hit a wall.

power.spawn_type | `predefined_string` | For non-transform powers, an enemy is spawned from this category. For transform powers, the caster will transform into a creature from this category.

power.target_neighbor | `int` | Target is changed to an adjacent tile within a radius.

power.spawn_limit | `["fixed", "stat", "unlimited"], [int, predefined_string] : Mode, Value` | The maximum number of creatures that can be spawned and alive from this power. "fixed" takes an integer. "stat" takes a primary stat as a string (e.g. "physical").

power.spawn_limit | `["default", "fixed", "stat", "level"], [int, predefined_string] : Mode, Value` | The level of spawned creatures. "fixed" and "level" take an integer. "stat" takes a primary stat as a string (e.g. "physical").

power.target_party | `bool` | Hazard will only affect party members.

power.target_categories | `list(predefined_string)` | Hazard will only affect enemies in these categories.

power.modifier_accuracy | `["multiply", "add", "absolute"], int : Mode, Value` | Changes this power's accuracy.

power.modifier_damage | `["multiply", "add", "absolute"], int, int : Mode, Min, Max` | Changes this power's damage. The "Max" value is ignored, except in the case of "absolute" modifiers.

power.modifier_critical | `["multiply", "add", "absolute"], int : Mode, Value` | Changes the chance that this power will land a critical hit.

power.target_movement_normal | `bool` | Power can affect entities with normal movement (aka walking on ground)

power.target_movement_flying | `bool` | Power can affect flying entities

power.target_movement_intangible | `bool` | Power can affect intangible entities

power.walls_block_aoe | `bool` | When true, prevents hazard aoe from hitting targets that are behind walls/pits.

power.script | `["on_cast", "on_hit", "on_wall"], filename : Trigger, Filename` | Loads and executes a script file when the trigger is activated.

#### QuestLog

Description of quest files in quests/

name | `string` | A displayed name for this quest.

quest.requires_status | `list(string)` | Quest requires this campaign status

quest.requires_not_status | `list(string)` | Quest requires not having this campaign status.

quest.requires_level | `int` | Quest requires hero level

quest.requires_not_level | `int` | Quest requires not hero level

quest.requires_currency | `int` | Quest requires atleast this much currency

quest.requires_not_currency | `int` | Quest requires no more than this much currency

quest.requires_item | `list(item_id)` | Quest requires specific item (not equipped)

quest.requires_not_item | `list(item_id)` | Quest requires not having a specific item (not equipped)

quest.requires_class | `predefined_string` | Quest requires this base class

quest.requires_not_class | `predefined_string` | Quest requires not this base class

quest.quest_text | `string` | Text that gets displayed in the Quest log when this quest is active.

#### SDLFontEngine: Font settings

Description of engine/font_settings.txt

font.id | `string` | An identifier used to reference this font.

font.style | `repeatable(["default", predefined_string], filename, int, bool) : Language, Font file, Point size, Blending` | Filename, point size, and blend mode of the font to use for this language. Language can be "default" or a 2-letter region code.

menu_normal | `color` | Basic menu text color. Recommended white.

menu_bonus | `color` | Positive menu text color. Recommended green.

menu_penalty | `color` | Negative menu text color. Recommended red.

widget_normal | `color` | Basic widget text color. Recommended white.

widget_disabled | `color` | Disabled widget text color. Recommended grey.

combat_givedmg | `color` | Enemy damage text color. Recommended white.

combat_takedmg | `color` | Player damage text color. Recommended red.

combat_crit | `color` | Enemy critical damage text color. Recommended yellow.

requirements_no_met | `color` | Unmet requirements text color. Recommended red.

item_bonus | `color` | Item bonus text color. Recommended green.

item_penalty | `color` | Item penalty text color. Recommended red.

item_flavor | `color` | Item flavor text color. Recommended grey.

#### Settings: Tileset config

Description of engine/tileset_config.txt

tile_size | `int, int : Width, Height` | The width and height of a tile.

orientation | `["isometric", "orthogonal"]` | The perspective of tiles; isometric or orthogonal.

#### Settings: Misc

Description of engine/misc.txt

save_hpmp | `bool` | When saving the game, keep the hero's current HP and MP.

corpse_timeout | `duration` | Duration that a corpse can exist on the map in 'ms' or 's'.

sell_without_vendor | `bool` | Allows selling items when not at a vendor via CTRL-Click.

aim_assist | `int` | The pixel offset for powers that use aim_assist.

window_title | `string` | Sets the text in the window's titlebar.

save_prefix | `string` | A string that's prepended to save filenames to prevent conflicts between mods.

sound_falloff | `int` | The maximum radius in tiles that any single sound is audible.

party_exp_percentage | `int` | The percentage of XP given to allies.

enable_ally_collision | `bool` | Allows allies to block the player's path.

enable_ally_collision_ai | `bool` | Allows allies to block the path of other AI creatures.

currency_id | `item_id` | An item id that will be used as currency.

interact_range | `float` | Distance where the player can interact with objects and NPCs.

menus_pause | `bool` | Opening any menu will pause the game.

save_onload | `bool` | Save the game upon changing maps.

save_onexit | `bool` | Save the game upon quitting to the title screen or desktop.

#### Settings: Resolution

Description of engine/resolutions.txt

menu_frame_width | `int` | Width of frame for New Game, Configuration, etc. menus.

menu_frame_height | `int` | Height of frame for New Game, Configuration, etc. menus.

icon_size | `int` | Size of icons.

required_width | `int` | Minimum window/screen resolution width.

required_height | `int` | Minimum window/screen resolution height.

virtual_height | `int` | The height (in pixels) of the game's actual rendering area. The width will be resized to match the window's aspect ration, and everything will be scaled up to fill the window.

ignore_texture_filter | `bool` | If true, this ignores the "Texture Filtering" video setting and uses only nearest-neighbor scaling. This is good for games that use pixel art assets.

#### Settings: Gameplay

Description of engine/gameplay.txt

enable_playgame | `bool` | Enables the "Play Game" button on the main menu.

#### Settings: Combat

Description of engine/combat.txt

absorb_percent | `int, int : Minimum, Maximum` | Limits the percentage of damage that can be absorbed.

resist_percent | `int, int : Minimum, Maximum` | Limits the percentage of damage that can be resisted.

block_percent | `int, int : Minimum, Maximum` | Limits the percentage of damage that can be blocked.

avoidance_percent | `int, int : Minimum, Maximum` | Limits the percentage chance that damage will be avoided.

miss_damage_percent | `int, int : Minimum, Maximum` | The percentage of damage dealt when a miss occurs.

crit_damage_percent | `int, int : Minimum, Maximum` | The percentage of damage dealt when a critical hit occurs.

overhit_damage_percent | `int, int : Minimum, Maximum` | The percentage of damage dealt when an overhit occurs.

#### Settings: Elements

Description of engine/elements.txt

element.id | `string` | An identifier for this element.

element.name | `string` | The displayed name of this element.

#### Settings: Equip flags

Description of engine/equip_flags.txt

flag.id | `string` | An identifier for this equip flag.

flag.name | `string` | The displayed name of this equip flag.

#### Settings: Primary Stats

Description of engine/primary_stats.txt

stat.id | `string` | An identifier for this primary stat.

stat.name | `string` | The displayed name of this primary stat.

#### Settings: Classes

Description of engine/classes.txt

name | `string` | The displayed name of this class.

description | `string` | A description of this class.

currency | `int` | The amount of currency this class will start with.

equipment | `list(item_id)` | A list of items that are equipped when starting with this class.

carried | `list(item_id)` | A list of items that are placed in the normal inventorty when starting with this class.

primary | `predefined_string, int : Primary stat name, Default value` | Class starts with this value for the specified stat.

actionbar | `list(power_id)` | A list of powers to place in the action bar for the class.

powers | `list(power_id)` | A list of powers that are unlocked when starting this class.

campaign | `list(string)` | A list of campaign statuses that are set when starting this class.

power_tree | `string` | Power tree that will be loaded by MenuPowers

#### Settings: Death penalty

Description of engine/death_penalty.txt

enable | `bool` | Enable the death penalty.

permadeath | `bool` | Force permadeath for all new saves.

currency | `int` | Remove this percentage of currency.

xp_total | `int` | Remove this percentage of total XP.

xp_current_level | `int` | Remove this percentage of the XP gained since the last level.

random_item | `bool` | Removes a random item from the player's inventory.

#### Settings: Tooltips

Description of engine/tooltips.txt

tooltip_offset | `int` | Offset in pixels from the origin point (usually mouse cursor).

tooltip_width | `int` | Maximum width of tooltip in pixels.

tooltip_margin | `int` | Padding between the text and the tooltip borders.

npc_tooltip_margin | `int` | Vertical offset for NPC labels.

tooltip_background_border | `int` | The pixel size of the border in "images/menus/tooltips.png".

#### Settings: Loot

Description of engine/loot.txt

currency_name | `string` | Define the name of currency in game

#### StatBlock: Core stats

Description of engine/stats.txt and enemies in enemies/

speed | `float` | Movement speed

cooldown | `int` | Cooldown between attacks in 'ms' or 's'.

cooldown_hit | `duration` | Duration of cooldown after being hit in 'ms' or 's'.

stat | `string, int : Stat name, Value` | The starting value for this stat.

stat_per_level | `predefined_string, int : Stat name, Value` | The value for this stat added per level.

stat_per_primary | `predefined_string, predefined_string, int : Primary Stat, Stat name, Value` | The value for this stat added for every point allocated to this primary stat.

vulnerable | `predefined_string, int : Element, Value` | Percentage weakness to this element.

power_filter | `list(power_id)` | Only these powers are allowed to hit this entity.

#### StatBlock: Sound effects

Description of heroes in engine/avatar/ and enemies in enemies/

sfx_attack | `predefined_string, filename : Animation name, Sound file` | Filename of sound effect for the specified attack animation.

sfx_hit | `filename` | Filename of sound effect for being hit.

sfx_die | `filename` | Filename of sound effect for dying.

sfx_critdie | `filename` | Filename of sound effect for dying to a critical hit.

sfx_block | `filename` | Filename of sound effect for blocking an incoming hit.

sfx_levelup | `filename` | Filename of sound effect for leveling up.

#### StatBlock: Enemies

Description of enemies in enemies/

name | `string` | Name

humanoid | `bool` | This creature gives human traits when transformed into, such as the ability to talk with NPCs.

level | `int` | Level

xp | `int` | XP awarded upon death.

loot | `repeatable(loot)` | Possible loot that can be dropped on death.

loot_count | `int, int : Min, Max` | Sets the minimum (and optionally, the maximum) amount of loot this creature can drop. Overrides the global drop_max setting.

defeat_status | `string` | Campaign status to set upon death.

convert_status | `string` | Campaign status to set upon being converted to a player ally.

first_defeat_loot | `item_id` | Drops this item upon first death.

quest_loot | `string, string, item_id : Required status, Required not status, Item` | Drops this item when campaign status is met.

flying | `bool` | Creature can move over gaps/water.

intangible | `bool` | Creature can move through walls.

facing | `bool` | Creature can turn to face their target.

waypoint_pause | `duration` | Duration to wait at each waypoint in 'ms' or 's'.

turn_delay | `duration` | Duration it takes for this creature to turn and face their target in 'ms' or 's'.

chance_pursue | `int` | Percentage change that the creature will chase their target.

chance_flee | `int` | Percentage chance that the creature will run away from their target.

power | `["melee", "ranged", "beacon", "on_hit", "on_death", "on_half_dead", "on_join_combat", "on_debuff"], power_id, int : State, Power, Chance` | A power that has a chance of being triggered in a certain state.

passive_powers | `list(power_id)` | A list of passive powers this creature has.

melee_range | `float` | Minimum distance from target required to use melee powers.

threat_range | `float, float : Engage distance, Stop distance` | The first value is the radius of the area this creature will be able to start chasing the hero. The second, optional, value is the radius at which this creature will stop pursuing their target and defaults to double the first value.

flee_range | `float` | The radius at which this creature will start moving to a safe distance. Defaults to half of the threat_range.

combat_style | `["default", "aggressive", "passive"]` | How the creature will enter combat. Default is within range of the hero; Aggressive is always in combat; Passive must be attacked to enter combat.

animations | `filename` | Filename of an animation definition.

suppress_hp | `bool` | Hides the enemy HP bar for this creature.

categories | `list(string)` | Categories that this enemy belongs to.

flee_duration | `duration` | The minimum amount of time that this creature will flee. They may flee longer than the specified time.

flee_cooldown | `duration` | The amount of time this creature must wait before they can start fleeing again.

#### StatBlock: Hero stats

Description of engine/stats.txt

max_points_per_stat | `int` | Maximum points for each primary stat.

sfx_step | `string` | An id for a set of step sound effects. See items/step_sounds.txt.

stat_points_per_level | `int` | The amount of stat points awarded each level.

power_points_per_level | `int` | The amount of power points awarded each level.

#### StatBlock: XP table

Description of engine/xp_table.txt

level | `int, int : Level, XP` | The amount of XP required for this level.

#### TileSet

Description of tilesets in tilesets/

img | `filename` | Filename of a tile sheet image.

tile | `int, int, int, int, int, int, int : Index, X, Y, Width, Height, X offset, Y offset` | A single tile definition.

transparency | `color` | An RGB color to key out and treat as transparent.

animation | `list(int, int, int, duration) : Tile index, X, Y, duration` | An animation for a tile. Durations are in 'ms' or 's'.

### Predefined Strings

Below are some strings that are used in various attributes.

#### EffectManager

Description of "type" in powers/effects.txt

damage | Damage per second

damage_percent | Damage per second (percentage of max HP)

hpot | HP restored per second

hpot_percent | HP restored per second (percentage of max HP)

mpot | MP restored per second

mpot_percent | MP restored per second (percentage of max MP)

speed | Changes movement speed. A magnitude of 100 is 100% speed (aka normal speed).

immunity | Applies all immunity effects. Magnitude is ignored.

immunity_damage | Removes and prevents damage over time. Magnitude is ignored.

immunity_slow | Removes and prevents slow effects. Magnitude is ignored.

immunity_stun | Removes and prevents stun effects. Magnitude is ignored.

immunity_hp_steal | Prevents HP stealing. Magnitude is ignored.

immunity_mp_steal | Prevents MP stealing. Magnitude is ignored.

immunity_knockback | Removes and prevents knockback effects. Magnitude is ignored.

immunity_damage_reflect | Prevents damage reflection. Magnitude is ignored.

stun | Can't move or attack. Being attacked breaks stun.

revive | Revives the player. Typically attached to a power that triggers when the player dies.

convert | Causes an enemy or an ally to switch allegiance

fear | Causes enemies to run away

knockback | Pushes the target away from the source caster. Speed is the given value divided by the framerate cap.

${STATNAME} | Increases ${STATNAME}, where ${STATNAME} is any of the base stats. Examples: hp, dmg_melee_min, xp_gain

${ELEMENT}_resist | Increase Resistance % to ${ELEMENT}, where ${ELEMENT} is any found in engine/elements.txt. Example: fire_resist

${PRIMARYSTAT} | Increases ${PRIMARYSTAT}, where ${PRIMARYSTAT} is any of the primary stats defined in engine/primary_stats.txt. Example: physical

death_sentence | Causes sudden death at the end of the effect duration.

shield | Create a damage absorbing barrier based on Mental damage stat. Duration is ignored.

heal | Restore HP based on Mental damage stat.

#### Stats

Description of the base stats, aka "stat name" or ${STATNAME}

hp | Hit points

hp_regen | HP restored per minute

mp | Magic points

mp_regen | MP restored per minute

accuracy | Accuracy %. Higher values mean less likely to miss.

avoidance | Avoidance %. Higher values means more likely to not get hit.

dmg_melee_min | Minimum melee damage

dmg_melee_max | Maximum melee damage

dmg_ranged_min | Minimum ranged damage

dmg_ranged_max | Maximum ranged damage

dmg_ment_min | Minimum mental damage

dmg_ment_max | Maximum mental damage

absorb_min | Minimum damage absorption

absorb_max | Maximum damage absorption

crit | Critical hit chance %

xp_gain | Percentage boost to the amount of experience points gained per kill.

currency_find | Percentage boost to the amount of gold dropped per loot event.

item_find | Increases the chance of finding items in loot.

stealth | Decrease the distance required to alert enemies by %

poise | Reduced % chance of entering "hit" animation when damaged

reflect_chance | Percentage chance to reflect missiles

return_damage | Deals a percentage of the damage taken back to the attacker

hp_percent | Base HP altered by percentage

mp_percent | Base MP altered by percentage