Conversas ramificadas, condições e variáveis, falas prontas para localização.
Spec — Dialogue system
Status: draft · Created: 2026-11-10
1. Context and goal
Writers build branching conversations with conditions on game state, and the game plays them in any language without code changes.
2. Functional requirements (EARS)
- FR-1: THE SYSTEM SHALL load conversations from data files as nodes with a speaker, a line key and the choices that lead to other nodes.
- FR-2: WHEN a node offers choices, THE SYSTEM SHALL show only those whose conditions on game variables are true, up to 6 at once.
- FR-3: WHEN the player picks a choice, THE SYSTEM SHALL apply its variable changes and move to the next node within one frame.
- FR-4: THE SYSTEM SHALL store every line as a localization key, with no displayed text in conversation logic.
- FR-5: IF a line key has no translation in the active language, THEN THE SYSTEM SHALL show the source language line and log the missing key.
- FR-6: THE SYSTEM SHALL validate every conversation at build time and fail the build on a missing node, an unreachable node or an unknown variable.
- FR-7: THE SYSTEM SHALL save the current node and the conversation variables with the game save.
3. Out of scope
- A visual editor for writers.
- Voice-over recording and lip sync.