The canonical list of game attributes (HP, ATK, DEF...) that other pages reference.
attributeDefinitions#
Defines the game's attributes in a single list that becomes the source of truth for every other page that deals with stats.
Why it matters#
Without this addon, each character page invents its own stats — and six months later you have 4 versions of "attack" (atk, attack, dmg, Attack). Here you define once that hp, atk, and def exist, and everything in the project references those keys.
Where it usually lives#
- A page of type
🎯 Attributes. This is the most common setup. - Blank pages (created manually) also accept the addon.
You typically have just one attributes page in the whole project. Multiple profiles (combat, social, magic) are also possible if you need to keep stat sets separate.
Schema#
| Campo | Tipo | Padrão | Descrição |
|---|---|---|---|
idYes | string | Internal addon ID (auto-generated). | |
nameYes | string | Friendly name for the addon (default: Attribute Definitions). | |
attributesYes | AttributeDefinitionEntry[] | List of attributes. Each entry is a stat. |
AttributeDefinitionEntry#
| Campo | Tipo | Padrão | Descrição |
|---|---|---|---|
idYes | string | Internal entry ID. | |
keyYes | string | Technical key in snake_case (e.g. hp, max_mana). This is the key other pages reference. | |
labelYes | string | Friendly name shown in the UI (e.g. HP, Max Mana). | |
valueTypeYes | "int" | "float" | "percent" | "boolean" | Value type. Determines the input style in the panel and how values are normalized. | |
defaultValueYes | number | boolean | Default value used when a profile doesn't override it. | |
min | number | Minimum acceptable value (optional). Useful for HP that can never go negative. | |
max | number | Maximum value (optional). Useful for percentages between 0–100. | |
unit | string | Visual suffix (e.g. s for seconds, % for percent). Does not affect the exported value. |
Example#
A classic RPG profile:
{
"id": "attr-defs-1",
"name": "Base Attributes",
"attributes": [
{ "id": "1", "key": "hp", "label": "HP", "valueType": "int", "defaultValue": 100, "min": 0 },
{ "id": "2", "key": "atk", "label": "ATK", "valueType": "int", "defaultValue": 10, "min": 0 },
{ "id": "3", "key": "def", "label": "DEF", "valueType": "int", "defaultValue": 5, "min": 0 },
{ "id": "4", "key": "spd", "label": "SPD", "valueType": "int", "defaultValue": 5, "min": 0 }
]
}
Who points to this addon#
Almost every "attribute-aware" addon references an attributeDefinitions via the definitionsRef field:
attributeProfile.definitionsRef— defines which keys the profile can fill inattributeModifiers.definitionsRef— defines which keys the modifier can changeprogressionTable(when used to scale attributes) — references indirectlyskills.SkillCost.definitionsRef(when cost type isattribute) — which profile defines the key
Wizard#
The 🎯 Attributes page type creates this addon pre-populated with 4 common attributes (HP, ATK, DEF, SPD). You can accept, remove, or add more at creation time via the slot picker. Customization options:
- Default slots: checkboxes to toggle HP/ATK/DEF/SPD on or off
- Custom slots: up to N extra fields with
key+label+valueType
All of this becomes the attributes[] array of the final entry.