Skip to main content

Trait concepts

A trait gives a character behavior while a bound affect is present. Use one for a condition, a counter, or a change at a formula position. For an unconditional flat point bonus, use an affect point.

A definition describes behavior. A binding associates that definition with an affect type and formulas. Adding an affect of that type opens the gate; removing the last one closes it. See Traits foundations for the model.

Glossary​

TermMeaning
DefinitionThe trait's ID, hooks, stage, and counter declarations.
BindingAn association between a definition and an affect type, with named formulas.
GateThe presence of an affect of a bound type on a character.
HookA callback invoked for a subscribed event or position.
Transform hookA hook that can change the damage or heal being computed.
Observer hookA hook that observes an event without changing its computed value.
ctxThe per-character, per-binding context for state and operations.
StageAscending order among traits at a staged formula position.
Formula positionA point in an engine calculation or decision where traits participate.
Bump pointTemporarily add to a character point during a guarded damage computation.
Trigger maskBits identifying the events a trait subscribes to.
ForgeThe environment that loads and runs the Lua definition.
Native traitA C++ implementation registered with the native registry.
Lua traitA definition and hooks registered through Forge Lua.

Where to go next​