Visual Novel
v0.1.0Branching visual-novel production for Ren'Py: scenes, branch graph and sprites.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_projects
Registered VN projects with scene counts by status.
register_project
Register a VN project. `game_dir` is the Ren'Py game/ folder (created if absent, with scenes/, images/, audio/). `characters_bible` links a character-panel characters.json for name lookups. Game content must live under a gitignored path — the repo is public.
| Parameter | Type | Description |
|---|---|---|
game_dir * | string | |
name * | string | |
characters_bible | ||
slug |
get_story_state
The resume tool: every scene with status + synopsis line, flags with meanings, note count, and the current check summary.
| Parameter | Type | Description |
|---|---|---|
project |
plan_scene
Create or update a scene's plan (no script yet, or updating metadata). `after` lists the scene ids this follows — advisory until the script's own jumps exist. scene_id is the label and filename: [a-z0-9_].
| Parameter | Type | Description |
|---|---|---|
scene_id * | string | |
synopsis * | string | |
title * | string | |
after | ||
characters | ||
location | ||
project |
get_scene
One scene's record + script text.
| Parameter | Type | Description |
|---|---|---|
scene_id * | string | |
project |
get_scene_context
Scene-start bundle in ONE call: the scene record + script, direct predecessor/successor scenes with synopses, flags set by predecessors, documented flag meanings, the scene's characters with names and registered expressions, and relevant notes. Call once per scene.
| Parameter | Type | Description |
|---|---|---|
scene_id * | string | |
project |
save_scene
Write a scene's .rpy (game/scenes/<id>.rpy), update its record, and parse it immediately — reports the labels found, outgoing jumps, flags touched, and anything unresolved, while context is warm. Refuses to silently demote an approved scene.
| Parameter | Type | Description |
|---|---|---|
scene_id * | string | |
script * | string | |
project | ||
status | string |
check_story
Full validation: dangling jumps, unreachable labels, duplicate labels, flags read-never-set / set-never-read / undocumented, unresolved show and scene displayables, missing audio files, scenes whose file or label is missing, approved scenes changed since approval, untracked labels.
| Parameter | Type | Description |
|---|---|---|
project |
trace_paths
Enumerate simple paths start -> label with flags set along each, for continuity reasoning ('what has the player seen when they arrive here'). Bounded; heavy branching returns a sample and says so.
| Parameter | Type | Description |
|---|---|---|
to_label * | string | |
max_paths | integer | |
project | ||
start | string |
define_flag
Document a story flag's meaning. Every flag a script touches should have one — check_story flags the undocumented.
| Parameter | Type | Description |
|---|---|---|
meaning * | string | |
name * | string | |
project |
record_note
Persist a continuity decision or judgment call so future fresh chats inherit it via get_scene_context. One or two sentences.
| Parameter | Type | Description |
|---|---|---|
note * | string | |
project | ||
scene |
forget_scene
Drop a scene from the database. Refuses approved scenes — those are the author's, same rule as FINAL_* panels. The .rpy is left on disk unless delete_file=True, and even then an approved script is never touched.
| Parameter | Type | Description |
|---|---|---|
scene_id * | string | |
delete_file | boolean | |
project |
register_sprite
Register a character's matted body (installed into the game tree as WebP; the master stays where it is, in whatever format it was made). PREFER `height_cm` — relative cast heights then come out right by construction, and the first one registered fixes the screen reference. `target_height` (fraction of screen) is the fallback for characters with no canonical height. Set mirror_ok=False for asymmetric costumes.
| Parameter | Type | Description |
|---|---|---|
body_path * | string | |
character * | string | |
height_cm | ||
mirror_ok | boolean | |
notes | string | |
project | ||
tag | ||
target_height |
register_expression
Register a hand-drawn face patch at a pixel offset on the body canvas -- the LEGACY expression path. The default since 2026-09-19 is a whole body per expression (register_body). Validates the patch fits. Run preview_expression to eyeball alignment, then emit_sprites.
| Parameter | Type | Description |
|---|---|---|
character * | string | |
expression * | string | |
offset_x * | integer | |
offset_y * | integer | |
patch_path * | string | |
project |
register_body
Register a FULL-BODY expression or pose variant: a matted RGBA render of the same character, shown with `show <tag> <name>`. The DEFAULT way to add an expression. Scaled to the neutral body's height and centered on its canvas; refused if wider. Then emit_sprites.
| Parameter | Type | Description |
|---|---|---|
character * | string | |
name * | string | |
rgba_path * | string | |
project |
preview_expression
Composite body + patch over magenta and save a preview PNG — the alignment check for hand-drawn patches. Look at it; do not trust offsets numerically.
| Parameter | Type | Description |
|---|---|---|
character * | string | |
expression * | string | |
project |
emit_sprites
Regenerate sprites_generated.rpy (one layeredimage per character, zoom from target_height) and the padded expression layers. Run after any register_* call. Never hand-edit the generated file.
| Parameter | Type | Description |
|---|---|---|
project |