integrate-dialogue-narrative
Installation
SKILL.md
Integrate Dialogue Narrative
Architect and integrate data-driven narrative and dialogue pipelines supporting Yarn Spinner or Ink scripts, sandboxed condition flag evaluation, localized string tables, and responsive typewriter presentation.
Core Rules
- Strict Content-Code Separation: Author all narrative branching, speaker lines, and choice conditions in external data assets (
.yarn,.ink, or structured dialogue graphs). Never hardcode conversation trees or raw display strings inside gameplay scripts. - Stable Localization Keys: Address every dialogue line and UI choice by an immutable localization line ID (e.g.
line:npc_blacksmith_greeting_01) mapped to locale string tables (.csv,.po,Fluent) so translations and typo fixes never break branching logic. - Sandboxed Condition & Command Dispatch: Evaluate narrative variables and trigger scene side-effects (camera cuts, item grants, quest stage updates, animations) through registered, type-checked command bindings rather than arbitrary reflection or
eval(). - Contract Adherence: Emit
contracts/schemas/implementation-result.jsonupon completing dialogue and narrative integrations.
Suggested Process
1. Narrative Runtime & Variable Storage Setup
Integrate the narrative VM (Yarn Spinner, Ink, or custom AST runner) backed by a centralized NarrativeVariableStorage dictionary (bool, int, float, string flags). Synchronize this store directly with the save persistence layer.
2. Command & Function Binding Registration
Register deterministic external functions (HasItem(id), GetFactionRep(faction)) and asynchronous sequence commands (<<camera_focus target>>, <<play_emote actor_id smile>>, <<give_quest quest_id>>) that pause dialogue progression until awaited presentation cues finish.