forge-effects is the buff/debuff engine. An effect is a definition (id, duration, modifiers, tags)
that, when applied to a character, pushes attribute modifiers into forge-attributes and tags onto
the character for as long as it is active, then removes them cleanly on expiry or removal.
Concepts
- Definition. A stable
effect:<name> with an optional duration_sec, a stack_rule, optional
tags, and modifiers to apply while active.
- Instance. A live application on a character, with a
source_id so you can remove everything
from one source at once.
- Stacking.
replace (re-applying refreshes the timer) or stack (up to max_stacks).
Exports
Registry
Apply & query
Definition shape
Effect modifiers use attribute_id (not attribute). The equip block on items uses
attribute. This is a deliberate but easy-to-miss difference.
Events
Configuration
Ships one neutral default, effect:well_fed, in editable shared/data/effects.lua
(ForgeEffects.DefaultEffects), gated by Config.ShipDefaults. The shipped item:bread grants it
on use. See add an effect.