Addons
Addons are the layer between YAGE’s engine plugins (@yagejs/core,
@yagejs/renderer, …) and your game: installable, opinionated implementations of
one cohesive gameplay pattern each — dialogue, inventory, combat — designed so
their opinions stay overridable without forking.
They live under the @yagejs-addons npm scope (a separate org from the
engine’s @yagejs scope) and are independently versioned, so an engine
release never forces an addon bump and vice-versa.
How an addon is layered
Section titled “How an addon is layered”Each addon separates concerns so each layer is opinionated at its own level and replaceable independently:
- Model — headless logic + events. No renderer/pixi import, fully unit-testable.
- Component — a
@yagejs/coreComponent the game spawns; bridges model events to entity events. The host owns focus and pause. - Presenters — presentation behind capability-channel interfaces, with a
default presenter, reachable only via a
/presenterssubpath so the headless path never pulls a renderer.
This is what makes “logic installed, presentation swappable, copy-paste/eject for UI only” actually hold.
Available addons
Section titled “Available addons” Dialogue Branching dialogue runner, typewriter box & speech bubbles, inline markup, and swappable themeable presenters.