thedivergentai/godot-genre-visual-novel
Expert blueprint for visual novels (Doki Doki Literature Club, Phoenix Wright, Steins;Gate) focusing on branching narratives, dialogue systems, choice consequences, rollback mechanics, and persistent flags. Use when building story-driven, choice-based, or dating sim games. Keywords visual novel, dialogue system, branching narrative, typewriter effect, rollback, bbcode, RichTextLabel.
npx skills add https://github.com/thedivergentai/GD-Agentic-Skills --skill godot-genre-visual-novel
Branching narratives, meaningful choices, and quality-of-life features define visual novels.
[shake], [wave]) to add visual weight.ResourceLoader.load_threaded_request() to prevent transition stutters.StringName (&"met_alice") for faster dictionary lookups._process for letter-by-letter animation; strictly use a Tween on visible_ratio for smooth, frame-independent reveals.z_index for Control node priority if input handling is required; strictly use move_to_front() to ensure draw order and input propagation match.visible_ratio to 1.0 instantly on input.queue_free() when actors exit the stage to prevent memory leaks.ImageUnit API — width_in_percent removed in 4.7.> MANDATORY before implementing undo / branching / presentation:
> 1. vn_rollback_manager.gd — history stack (flags/backgrounds/index)
> 2. story_manager.gd — flag-aware dialog orchestration
> 3. dialogue_ui.gd — typewriter + choice UI
> 4. visual_novel_patterns.gd — BBCode, choice filtering, sprite layering
visible_ratio) and choice-window generation.| Approach | When to choose | Notes |
|----------|----------------|-------|
| JSON / CSV scripts | Writers edit outside Godot; rapid iteration | Load via FileAccess or threaded ResourceLoader; validate schema in StoryManager |
| Custom Resource dialogue trees | Designer Inspector editing, typed fields | Peer godot-resource-data-patterns; MANDATORY story_manager.gd |
| Dialogic (plugin) | Full VN suite (timelines, characters, themes) with editor tooling | Prefer when shipping a large route graph fast; still keep rollback + flag discipline. Skip building a second StoryManager if Dialogic already owns timelines |
| Build lightweight custom | Tiny kinetic novel / learning project | Use scripts in this skill; do not re-stub StoryManager inline |
Do not paste incomplete JSON StoryManager demos — implement from MANDATORY story_manager.gd.
{line_index, flags, background, music} *before* flag writes.visible_ratio 0→1; on skip/advance input set visible_ratio = 1.0 and kill the tween.requires StringName flags pass; apply choice → mutate flags → jump label (visual_novel_patterns.gd + story_manager.gd).move_to_front() on Control actors (not z_index alone) + dim inactive.ResourceLoader.load_threaded_request for backgrounds; never sync-parse huge scripts on the main thread.# Choice handler shape (flags after snapshot)
func make_choice(choice_id: StringName) -> void:
rollback_manager.push_snapshot() # BEFORE mutate
match choice_id:
&"be_nice":
flags[&"relationship_alice"] = int(flags.get(&"relationship_alice", 0)) + 1
story_manager.jump_to_label(&"alice_happy")
&"be_mean":
flags[&"relationship_alice"] = int(flags.get(&"relationship_alice", 0)) - 1
story_manager.jump_to_label(&"alice_sad")
| Topic | Reference / script |
|-------|-------------------|
| Story driver & typewriter UI | architecture-overview.md |
| Branching / rollback / focus | key-mechanics.md |
| RichText / async loads | godot-tips.md |
> Progressive disclosure: open Official Documentation links only when researching a specific API; load Related Skills when routing to a peer domain — do not preload the whole lattice.
Take thedivergentai/godot-genre-visual-novel from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.