Scene tools and shared objects
Add input tools or bounded visual presentations without taking over the map renderer.
A scene tool declares an interaction the host can own: icon, cursor, shape, mode, emitted topic, and optional actions. The host captures pointer input and publishes a validated event to the mod. A background mod can then request an authoritative scene write.
#Maintained fog path
mods/fog-of-war/public/mod.json contributes Hide and Reveal brush tools plus a Clear action. The
host emits scene.input; mods/fog-of-war/src/main.ts subscribes, keeps a bounded list of regions,
and invokes scene.draw. The server validates, persists, and broadcasts the fog capability. The
host renderer draws it.
The mod never receives the renderer or writes the scene store directly. Non-GM writes are rejected, even if a client fabricates a bridge message.
#Shared scene objects
The scene.objects capability creates bounded temporary visuals in viewport or map space. The SDK
contract covers primitive or verified-model geometry, transforms, material, animation keyframes,
group cleanup, and lifecycle events. Host limits cap objects, animations, duration, and command
size.
mods/dice-roller is the production first-party example. It subscribes to projected roll
presentations, derives a deterministic visual plan from the authoritative result, creates dice,
animates them to the recorded faces, waits briefly, and removes the group. Escape or a map action
can dismiss the group, and reduced-motion users receive the landed state.
Build and test both paths:
bun run --filter @aether/mod-fog-of-war build
bun run --filter @aether/mod-dice-roller build
bun test mods/dice-roller/testShared objects are a presentation surface. They do not become game documents and cannot make a roll authoritative after the fact.