World Interactions And Activity Boards
What This System Is
World interactions turn a scene trigger into a reusable, data-driven player action. Designers attach an interaction by authoring an Interact trigger whose event is interaction:<interaction_id>. The trigger runtime continues to own facing, overlap priority, cooldown scope, prediction, and authority handoff; the interaction catalog owns the prompt, range, eligibility, lock reason, and typed outcome.
The catalog lives at assets/gameplay/world_interaction_catalog.json. Supported actions are NPC dialogue, NPC services (vendor/crafting/upgrades), encounter lobbies, scene transitions, runtime events, unlocks, and persistent world-object transitions. Target kinds classify NPCs, world objects, service stations, activity boards, and portals for editor filtering without changing runtime semantics.
How Authors Use It
- Add a unique definition to the interaction catalog. Give it a short player-facing
prompt, an authoritativeinteraction_radius_tiles, a cooldown, optional shared gameplay conditions, and a typed action. - In the scene trigger workbench, choose World Interaction or Activity Board. Place the trigger on the object's interaction tile and keep
Interaction Targetoverlap selection. - Set the event to
interaction:<id>. Mirror the catalog cooldown on the scene trigger when a definition uses a non-default cooldown. - Run scene validation and enter gameplay. Facing the target replaces the generic Interact hint with the authored prompt; unmet conditions show the authored lock reason.
The shipped activity_board.slime_core definition opens the existing Slime Infestation encounter lobby. That lobby owns difficulty and mutator selection, party roster, ready check, dungeon run allocation, and replicated board state.
Rules And Invariants
The client never chooses the concrete action. It sends the scene trigger id, the interaction:<id> reference, actor tile, target tile/subtile, and intent sequence. The server:
- resolves the trigger from the hosted runtime scene manifest;
- validates activation and the selected target tile;
- resolves the interaction from the authoritative catalog;
- checks actor-to-target range and shared gameplay conditions against authoritative player facts;
- replaces the reference with the catalog's concrete trigger action;
- dispatches service overlays or encounter lobbies through their existing typed gameplay-action paths.
Unknown definitions, failed conditions, cooldowns, and out-of-range attempts return stable rejection codes through the trigger reconciliation path. This keeps prompts and editor previews responsive while the server remains the source of truth.
Validation And Debugging
Run scene validation after adding a world interaction trigger and validate the gameplay catalog after changing prompts, cooldowns, conditions, or typed actions. Unknown interaction ids, failed conditions, cooldowns, and out-of-range attempts should produce stable rejection codes through trigger reconciliation.
Examples
{
"id": "activity_board.slime_core",
"label": "Slime Infestation Activity Board",
"prompt": "Plan Slime Infestation",
"target_kind": "activity_board",
"interaction_radius_tiles": 2,
"cooldown_ms": 250,
"locked_reason": "The activity is not available yet.",
"conditions": [],
"action": {
"kind": "encounter_lobby",
"encounter_id": "encounter.slime_infestation_core"
}
}
Conditions use the shared authored condition language, including quest flags, inventory counts, party tags, faction reputation, scene variables, unlocks, runtime events, and all/any/not composition.