Lightweight dialogue & narrative system inspired by Dialogic, stripped down to the essentials.
- Character-based text events with portrait & color support
- Branching choices with conditions and fallback actions
- Sequence runner with signal-driven architecture
- Decoupled UI layer — swap the display without touching logic
` NarrativeSequence (Resource) ├── NarrativeTextEvent (text + character) ├── NarrativeChoiceEvent (choices + jump targets) └── ...
│ loaded by
▼
NarrativeRunner (Node) ├── signal text_event(text, character, append) ├── signal choice_event(choices, prompt) ├── signal sequence_started / finished │ ▼ listened by NarrativeDisplay (Control) ├── NameLabel, TextLabel (RichText) └── Choices (dynamic buttons) `
`gdscript
var seq = NarrativeSequence.new() seq.sequence_id = "intro" seq.events = [ create_text("???: 你醒了...", null), create_text("老者: 这里是初始之地", elder_char), create_choice([ make_choice("你是谁?", 0), make_choice("我在哪?", 0), make_choice("...", -1), ]), ]
.start_sequence(seq)
.connect_runner() `
| Dialogic | Narrative Engine |
|---|---|
| 30K+ lines, editor-heavy | ~250 lines, code-first |
| .dtl timeline files | NarrativeSequence Resource |
| Complex subsystem architecture | Single Runner + signals |
| Built-in UI only | Decoupled display (swap freely) |
- Godot 4.2+
- No dependencies
MIT — extracted & adapted from concepts in dialogic-godot/dialogic (MIT)