Visual Novel

作者 gamedev-skillsd4b0e35550c5无许可证1.3K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库11天前更新

Build a visual novel: a branching script, character and background display, a text box with choices, save/load, backlog, and skip/auto. Use for a VN, dating sim, or branching story game.

AI 生成的概览

用于构建视觉小说的指南:分支脚本、角色与背景呈现、选项、存档/读档、回顾、跳过与自动。

功能
该技能为视觉小说提供设计与实现指南,涵盖分支脚本模型、文本框与角色/背景呈现、由标记控制的选项以及故事状态。它还规定了玩家便利功能,例如随处存档、回顾、跳过、自动推进和文字速度设置,以及按场景播放音频。它是组合式的:定义脚本模型与视觉小说便利功能,而将对话引擎和 UI 层交由其他技能,并指向一份关于脚本与流程的参考文件。
适用场景
当游戏以阅读分支文本为主并配有角色美术与背景时使用,例如视觉小说、恋爱模拟、分支互动小说或剧情选择游戏。它也适合设计选项与路线结构、故事标记,或回顾、跳过、自动推进、随处存档等视觉小说便利功能。它不适用于对话只是大型游戏中一个功能的情况、卡牌或棋盘玩法,也不适用于分支脚本引擎本身。
运行要求
不附带脚本,仅为说明文档。它假定已有对话引擎(如 Ink 或 Yarn Spinner)、UI 层、存档系统和音频支持,并引用一份模型可读文件 references/script-and-flow.md。

Visual Novel

A playbook for visual novels — the branching script, the presentation (text box, characters, backgrounds), choices, and the quality-of-life systems players expect (save anywhere, backlog, skip, auto). This is a compositional skill: it drives a dialogue engine and a UI layer. It does not re-teach the dialogue engine or UI nodes; it defines the script model and the player conveniences that make a VN pleasant to read.

When to use

  • Use when the game is mostly reading branching text with character art and backgrounds: visual novel, dating sim, branching interactive fiction, story-choice game.
  • Use when designing a choice/route structure, story flags, or VN conveniences (backlog, skip, auto-advance, save-anywhere).

When not to use: dialogue as one feature inside a larger game → rpg consuming dialogue-systems. Card/board play → other genres. For the branching-script engine itself, use dialogue-systems (Ink / Yarn Spinner).

Core loop

Read a line → advance → (at a branch) make a choice → the story branches on flags/choices → read on → reach an ending. The "game" is the shape of the branching and whether choices feel consequential; everything else is presentation and convenience.

Must-have systems

  1. Branching script — ordered lines + choices + jumps, with conditions and variables (Ink/Yarn).
  2. Text box — speaker name, body text, typewriter reveal, advance on click/key.
  3. Characters — sprites with expressions/poses, positions, show/hide transitions.
  4. Backgrounds + transitions — scene images, fades/dissolves.
  5. Choices — present options, gate some on flags, record the pick.
  6. Story state — flags/variables that branch the script and unlock content.
  7. Save/load (save-anywhere) — full script position + state; multiple slots; quick save.
  8. VN conveniences — backlog/history, skip (read text), auto-advance, text-speed setting.
  9. Audio — music per scene, SFX, optional voice clips.

Design knobs

KnobEffectNotes
Text speed / instantreading comfortAlways allow instant + a skip.
Auto-advance delayhands-free readingTunable; pause on choices.
Skip scopere-readingSkip read text only by default.
Branch breadth/depthreplay value vs. costBranches multiply writing/art work.
Flag-gated contentreactivityLines/choices that check past decisions.
Route structurestory shapeBranch-and-merge vs. distinct routes (refs).
Choice visibilityfairnessShow locked choices vs. hide them.
Backlog lengthconvenienceKeep enough to re-read recent context.

Patterns

1. Script as data the engine walks

python
# Pseudocode. Lines, choices, and jumps as data — usually authored in Ink/Yarn and stepped# through by that runtime. The engine asks the script for "the next thing to show".node = script.current()if node.kind == "line":    show_text(node.speaker, node.text)        # wait for advance inputelif node.kind == "choice":    options = [o for o in node.options if condition_met(o.condition, flags)]  # gate by flags    show_choices(options)                      # wait for selectionelif node.kind == "set":    flags[node.var] = eval_expr(node.expr, flags)script.advance(selected_option_or_none)

2. Typewriter reveal + advance (skippable)

python
# Pseudocode. Reveal characters over time; a click first completes the line, then advances.def show_text(speaker, text):    name_label.text = speaker    revealed = 0    while revealed < len(text):        if advance_pressed():                  # first press: reveal the whole line instantly            revealed = len(text); break        revealed += chars_per_second * dt        body_label.text = text[:int(revealed)]        push_to_backlog_when_complete(speaker, text)    wait_for_advance()                          # second press: go to the next line

3. Choice sets a flag that branches later content

python
# Pseudocode. Choices write flags; later conditions read them — that is "reactivity".def on_choice(option):    if option.set: flags[option.set] = True     # e.g. flags["helped_npc"] = True    script.jump(option.target)                   # follow the branch
# Elsewhere, a line/choice/ending checks the flag:if flags.get("helped_npc"): play_route("good_ending") else: play_route("neutral_ending")

Pitfalls / failure modes

  • Save that only stores a checkpoint → VNs need save-anywhere. Persist the exact script position and all flags/variables (and seen-text data) so a load resumes the same line.
  • Presentation logic baked into the script → unmaintainable. Keep content (text, choices) in the script and how it looks (sprites, transitions) in the engine layer.
  • No skip/auto/backlog → readers feel trapped, especially on replays. These are expected baseline features, not extras.
  • Skipping unread text → players miss content. Skip should fast-forward read text only.
  • Choices with no consequence → branches that reconverge instantly feel fake. Set flags that visibly change later lines, choices, or endings.
  • Combinatorial branch explosion → unshippable. Prefer branch-and-merge with a few flagged variations over fully distinct trees (refs).
  • Lost reading context → no backlog to re-read the last lines. Keep a history buffer.
  • Hardcoded language → no localization path. Keep text in data keyed for translation.

Composition (build it from these skills)

  • Script engine: dialogue-systems (Ink / Yarn Spinner) — branching, conditions, variables, localization hooks.
  • Presentation: game-ui-ux for text-box/choice-menu layout, scaling, and safe areas; godot-ui-control for the concrete text box, choice menu, name plate, and backlog UI.
  • Persistence: save-systems for save-anywhere slots, seen-text/skip data, and settings.
  • Audio: audio-design for per-scene music, SFX, and voice playback.
  • Visuals: the engine animation/Tween skill for sprite/background transitions; shader-programming for dissolves.
  • Process: prototype-fast to test the branch structure in plain text before adding art.

References

  • For the branching data model, route structures (branch-and-merge vs. routes), flags/variables, save-anywhere + backlog/skip data, and the content/presentation split, read references/script-and-flow.md.

来源与署名

来源:gamedev-skills/awesome-gamedev-agent-skills位于skills/genres/visual-novel提交d4b0e35

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架