Buffs and debuffs that alter attributes. Supports one-shot, duration-based, and DoT/HoT effects.
attributeModifiers#
Defines changes to attributes: the +10 ATK from an Iron Sword, the -5 HP/s for 6s from Poison, the ×1.5 SPD from a speed buff.
Why it matters#
Without a unified modifier model, every feature implements its own (items, skills, events, classes). That leads to an engine with 5 incompatible buff systems. Here you define once, and any feature that needs to "change an attribute" references an entry from this addon.
Where it usually lives#
- Equipment page (
⚔️ Items with effects) — effects applied when the item is equipped. - Skill page (
⚡ Skills) — effects the skill applies to the target. - Character page (
👤 Characters) — passive class effects. - Blank page — a generic pool of reusable modifiers.
Singleton — 1 addon per page. Each addon can hold N entries, so a Skills page can hold all the effects for its skills.
Schema#
| Campo | Tipo | Padrão | Descrição |
|---|---|---|---|
idYes | string | Internal addon ID. | |
nameYes | string | Friendly name. | |
definitionsRef | string (sectionId) | Page with attributeDefinitions. Filters which keys the panel offers. | |
modifiersYes | AttributeModifierEntry[] | List of entries — each one is an atomic effect. |
AttributeModifierEntry#
| Campo | Tipo | Padrão | Descrição |
|---|---|---|---|
idYes | string | Internal ID. | |
name | string | Human-readable name (e.g. Fireball Impact). When absent, the UI auto-generates a label like +10 ATK 30s. | |
attributeKeyYes | string | Key of the attribute to change (comes from definitionsRef). | |
modeYes | "add" | "mult" | "set" | add: adds (negative = damage). mult: multiplies (×1.5 = +50%). set: forces an exact value. | |
valueYes | number | boolean | The value to apply. Boolean only makes sense with mode=set on boolean attributes. | |
temporary | boolean | false | When true, the modifier expires after durationSeconds. When false, it's permanent (e.g. HP damage that doesn't regen). |
durationSeconds | number | Total effect duration (in seconds). Accepts decimals (1.5s). | |
tickIntervalSeconds | number | Interval between applications for DoT/HoT. Trailing tick convention: first tick at t=N, total = floor(duration/interval). | |
stackingRule | "unique" | "refresh" | "stack" | unique: second cast is ignored if still active. refresh: each cast renews the duration. stack: stacks as separate instances. | |
category | "buff" | "debuff" | "neutral" | For dispel/resistance systems in the engine. | |
tags | string[] | Free tags for grouping (fire, poison, magical). Auto-lowercased and deduplicated. |
Examples#
One-shot: instant damage#
{
"id": "fire-impact",
"name": "Fireball Impact",
"attributeKey": "hp",
"mode": "add",
"value": -30,
"stackingRule": "stack"
}
No temporary, so it's permanent — the HP damage stays until the player heals.
Duration-based: 30s buff#
{
"id": "berserk",
"name": "Berserk",
"attributeKey": "atk",
"mode": "mult",
"value": 1.5,
"temporary": true,
"durationSeconds": 30,
"stackingRule": "refresh",
"category": "buff"
}
mult: 1.5 = +50% ATK for 30s. refresh means recasting resets the timer.
DoT: burn#
{
"id": "burn",
"name": "Burn",
"attributeKey": "hp",
"mode": "add",
"value": -2,
"temporary": true,
"durationSeconds": 6,
"tickIntervalSeconds": 1,
"stackingRule": "unique",
"category": "debuff",
"tags": ["fire", "dot"]
}
Applies -2 HP every 1s for 6s = 6 ticks × -2 = -12 HP total. unique prevents out-of-control stacking when the player spams the skill.
Tick convention#
DoT/HoT follows the trailing tick convention:
- Duration = 10s, tick = 1s → 10 ticks applied at t=1, 2, ..., 10
- Total ticks =
floor(durationSeconds / tickIntervalSeconds)
Does not fire at t=0. If your engine uses a leading tick (t=0, 1, ..., 10 = 11 ticks), it will deal 10% more damage than the GDD specifies. Make sure to document this convention clearly for your programming team.
Who points to this addon#
skills.SkillEffectRef— skill effects point to specific entries here (on the same page, by design).- Equipment (via
equipmentItempage type) — modifiers apply when the item is equipped.
Wizard#
No dedicated wizard (it's not a primary page type). But it is seeded automatically by:
👤 Characters⚔️ Items with effects⚡ Skills
All of them seed the addon empty with definitionsRef already filled in — you just add entries.
UI behavior#
- Panel: one collapsible block per entry, drag-and-drop to reorder, dependent dropdowns (key → available values).
- Read-only: lists entries with category badge + tag chips + timing breakdown (s, tick).
- Skills checklist: each entry appears in the effect picker for a skill on the same page. The
name(when set) is highlighted in bold.