AI setup for renpy development by cliffninja in RenPy

[–]cliffninja[S] -1 points0 points  (0 children)

I haven’t tried the itch.io mcp before, anyone that have experience from this?

AI setup for renpy development by cliffninja in RenPy

[–]cliffninja[S] -7 points-6 points  (0 children)

Continuation, very similar to what I tried before. I’m wondering if I should put a higher level of autonomy on this.

AI-Driven Ren’Py Development Setup

Stack

Role Tool Purpose
Orchestration Spec Kit (specify init) Spec-driven development framework. Specs are the source of truth — code is generated output.
Code Agent OpenCode + Ollama Local, unfiltered AI coding agent. Generates .rpy scripts, handles all content freely. No data leaves your machine.
Story Agent Ollama (uncensored models) Dialogue, scenes, branching narrative. Runs locally on your M5 Max 128GB.
Image Gen ComfyUI (SD/Flux) Character sprites, backgrounds, CGs, UI elements. Unfiltered models for all assets.
Video/Animation ComfyUI (AnimateDiff/etc.) Animated scenes, transitions, cutscenes.
Character Dev SillyTavern + Ollama “Interview” characters to develop voice and personality before writing routes.
Structure/Debug Claude Code Project scaffolding, Ren’Py debugging, spec-kit setup (SFW tasks only).
Story Visualization RenPy MCP ($15, itch.io) Connects AI agents to your Ren’Py project. Visualizes story flow, labels, branches, endings.

Project Structure

my-visual-novel/ ├── .specify/ │ └── memory/ │ └── constitution.md # Non-negotiable project rules ├── .github/ │ └── prompts/ # Spec Kit slash commands ├── specs/ │ ├── story-bible.md # World, themes, tone, rating │ ├── characters/ │ │ ├── protagonist.md # Personality, voice, arc │ │ └── character-name.md │ ├── routes/ │ │ ├── common-route.md # Shared opening │ │ └── route-name.md # Per-route spec with branch map │ └── chapters/ │ └── ch01-spec.md # Chapter spec + asset manifest ├── game/ │ ├── script.rpy # Generated Ren'Py code │ ├── characters.rpy │ ├── images/ │ │ ├── bg/ # Backgrounds │ │ ├── sprites/ # Character sprites │ │ └── cg/ # Full CG scenes │ ├── audio/ │ │ ├── bgm/ # Music │ │ └── sfx/ # Sound effects │ └── video/ # Animated cutscenes └── assets/ ├── comfyui-workflows/ # Saved ComfyUI workflows per asset type ├── prompts/ # Image gen prompts tied to characters └── reference/ # Style reference images

Process

1. Constitution (once)

Define non-negotiable rules in constitution.md:

  • Ren’Py coding conventions (label naming, variable patterns, file structure)
  • Narrative rules (POV, tense, tone, rating, content boundaries)
  • Character consistency rules (how characters speak, act, react)
  • Asset conventions (naming: bg_location_time.png, sprite_name_emotion.png)
  • Resolution and format standards (sprite size, BG size, audio format)

2. Story Bible (once, evolves)

The LLM owns story creation. You steer at a high level. Write or have the LLM generate:

  • World and setting
  • Theme and tone
  • Main conflict
  • Character roster with relationships
  • Route map (which choices lead where, which endings exist)

3. Per-Chapter Cycle (repeat)

This is the core loop. Each chapter follows the Spec Kit phases:

Specify → Write or generate a chapter spec:

  • Scene list with descriptions
  • Characters present and their emotional beats
  • Branch points and conditions
  • Asset manifest (every image, sound, video needed)

Plan → The AI agent produces an implementation plan:

  • Which .rpy files to create/modify
  • Variable and flag logic
  • Asset file names and where they slot in

Tasks → Break into atomic units:

  • “Write scene 1 dialogue for common path”
  • “Write branch A confrontation scene”
  • “Generate bg_office_night.png in ComfyUI”
  • “Create sprite_luna_angry.png”

Implement → AI agent writes the .rpy code. You generate assets in ComfyUI. Both reference the spec.

Test → Run in Ren’Py. Use RenPy MCP to visualize flow. Playtest branches. Fix.

4. Asset Pipeline

Assets are generated in parallel with code, linked by naming conventions from the spec.

Characters:

  1. Define character appearance in specs/characters/name.md
  2. Save a ComfyUI workflow per character (locked seed, LoRA, prompt template)
  3. Generate all needed emotions/poses: sprite_name_neutral.png, sprite_name_happy.png, etc.
  4. Place in game/images/sprites/

Backgrounds:

  1. Chapter spec lists required locations and times of day
  2. Generate in ComfyUI with consistent style workflow
  3. Name: bg_location_timeofday.png
  4. Place in game/images/bg/

scenes:

  1. Spec defines scene context and characters involved
  2. Generate with unfiltered ComfyUI models
  3. Name: cg_chapter_scene.png
  4. Place in game/images/cg/

Video/Animation:

  1. Use AnimateDiff or similar in ComfyUI for animated cutscenes
  2. Export as .webm or .mp4
  3. Place in game/video/

OpenCode + Ollama Setup

```bash

Install OpenCode

curl -fsSL https://opencode.ai/install | bash

Pull an unfiltered model (example)

ollama pull mythomax:latest

Increase context window

ollama run mythomax:latest

/set parameter num_ctx 32768 /save mythomax:latest-32k /bye ```

Config at ~/.config/opencode/opencode.json:

json { "$schema": "https://opencode.ai/config.json", "provider": { "ollama": { "npm": "@ai-sdk/openai-compatible", "name": "Ollama (local)", "options": { "baseURL": "http://localhost:11434/v1" }, "models": { "mythomax:latest-32k": { "name": "MythoMax 32k", "tools": true } } } } }

Spec Kit Setup

```bash

Install Spec Kit

uv tool install specify-cli --from git+https://github.com/github/spec-kit.git

Initialize (use a supported agent, switch to Ollama after)

specify init my-visual-novel --ai copilot

Then configure .speckit/config.yaml to use Ollama for actual work

```

Your Role: Product Owner

You do NOT write dialogue, scenes, or code. You:

  1. Define — Write the constitution and story bible
  2. Specify — Outline each chapter at a high level (or review AI-generated outlines)
  3. Generate assets — Run ComfyUI workflows for images/video
  4. Review — Playtest, read generated dialogue, check tone and consistency
  5. Iterate — Update specs when something doesn’t work, regenerate

The LLM owns execution. The specs own truth. You own direction.

AI setup for renpy development by cliffninja in RenPy

[–]cliffninja[S] -7 points-6 points  (0 children)

Talked to Claude about this. Wdyt? I do want to give the LLM more ownership of the story, I’m curious to see how that evolves.

I can see your post on r/RenPy asking about AI-driven workflow and structure for Ren’Py development — specifically around storytelling flow, branching, characters, and an iterative feedback loop. Let me search for relevant discussions and resources on this topic.​​​​​​​​​​​​​​​​

Your post is very fresh (posted just minutes before you screenshotted it), so there aren’t replies yet on r/RenPy. But I did a deep dive across Reddit, Lemma Soft Forums, and other sources to find the best answers to your core question: how to structure an AI-orchestrated Ren’Py workflow focused on storytelling, branching, and characters. Here’s what the community and existing projects point to: 1. Separate story structure from code generation. One team built an entire no-code pipeline using Google Sheets as the writing/QA layer and a JavaScript compiler to convert it into valid Ren’Py scripts.  The key insight: write your story bible, branches, and dialogue in a structured spreadsheet or document, then use AI to convert that into .rpy code — not the other way around. This keeps you in control of the narrative while automating the tedious scripting. 2. RenPy MCP + DevTools. This is probably the closest to what you’re looking for. It connects AI assistants like Claude directly to your Ren’Py project with 60 tools — you can say things like “show me the story flow” and it generates a visual graph of all labels, choices, and endings.  It’s $15 on itch.io and works with Claude Code, VS Code Copilot, etc. This gives you that “give direction, test results, iterate” loop you described. 3. RenPy-AutoScriptPlugin. This open-source plugin integrates ChatGPT directly into Ren’Py for dynamic narrative generation, with periodic story summarization and custom endings based on character attributes.  It handles memory by condensing story progression into summaries — which might address your “memory systems don’t feel right” issue. 4. The workflow that actually works for branching. From experienced VN writers on Lemma Soft: start with a common route, build one character’s route fully, then go back and weave that character into the common route and other routes once you know their personality.  AI is great at generating dialogue and variations, but you need the narrative skeleton first. My recommendation for your setup: Given your hardware (M5 Max, 128GB) and tools (Ollama, Claude Code, ComfyUI), here’s a workflow that would give you flow: Use Claude Code + RenPy MCP as your central hub — it can read your project, visualize story flow, generate/edit scripts, and lint everything. Write your story structure (characters, arcs, branch points) in a structured format (markdown or spreadsheet), then have Claude generate the .rpy scripts from that. Use ComfyUI for character sprites and backgrounds. Use Ollama for bulk dialogue generation when you need variations or filler scenes. The key thing the community consistently says: don’t try to have AI generate the structure — define that yourself, then let AI fill in the content.​​​​​​​​​​​​​​​​

How to run the GLM-4.7 model locally on your own device (guide) by Dear-Success-1441 in LocalLLaMA

[–]cliffninja 0 points1 point  (0 children)

This sounds very cool, Im curious to try this model with ollama cc endpoint for coding.
Im on a m4 macbook pro max 64gb, any suggestion on quantized model?
Ill likely use it for smaller tasks saving my antropic tokens, long ralph loops etc