Skip to content

Senpy v0.2.11

Choose a tag to compare

@Xilleet Xilleet released this 21 Oct 10:00
· 23 commits to main since this release

This update introduces Mermaid.js story flow visualization, expands the semantic ruleset from 23 to 29 rules, upgrades audio resolution, and completely refactors the core engine architecture for lightning-fast LSP performance.


New Feature: Visual Story Flow Graphs

You can now export your visual novel’s branching narrative into clean, interactive Mermaid.js diagrams!

  • Preview your story transitions, branches, and endings directly inside VS Code's Markdown preview.
  • Highlight dead-ends and missing jump targets automatically.
  • Run via CLI: senpy --graph or save directly with senpy --graph-file story.md.

6 New Semantic Rules (Now 29 Rules Total)

  • RPY001 (Indentation Tabs): Detects accidental \t tab characters in indentation and provides an instant 4-space QuickFix auto-replacement.
  • RPY002 (Smart Quotes): Catches typographical curly quotes (“ ” ‘ ’ « ») pasted from Google Docs/Word that break Python syntax, with one-click ASCII conversion.
  • RPY206 (Premature Action Call): Warns when functions are invoked directly with parentheses inside screen actions (action my_func()), preventing side-effects during screen prediction.
  • RPY307 (Duplicate Labels): Catches duplicate label declarations across files before runtime crashes with ScriptError: Name defined twice.
  • RPY308 (Label Fallthrough): Warns when scenes terminate without an explicit return or jump, preventing story flow from bleeding into the next label.
  • RPY503 (Unused Assets): Detects dead/unreferenced images and audio files sitting on disk to help trim your game distribution size.

Upgraded Audio Engine (RPY501)

  • Full support for Ren'Py's native unquoted audio syntax: play sound click, play music audio.ambient.
  • Automatic discovery of files in the game/audio/ directory (.ogg, .mp3, .opus, .wav, .flac).
  • Support for define audio.* alias declarations.

Architecture & Performance

  • Modular Engine: Decomposed the monolithic core into specialized domain modules (assets, python_ast, flow, text_tags, models).
  • Ultra-low LSP Latency: Instantaneous (~15ms) diagnostics on every keystroke in VS Code without IDE stutters.
  • Streamlined CLI: Overhauled --help menu categorized into clean sections (Rules, Autofix, Visualization, Tools).
  • Expanded Russian and English Tsundere-mode dialogue lines.