Foreground Script
In private developmentWrite the scene. The pipeline builds it. Foreground Script by Studio Foreground is a writing workspace and a scene compiler for RPG Maker MZ. You develop a scene in prose with an AI collaborator that knows your game. Foreground Script turns the approved scene into native event commands in your project.

From idea to scene
- Explore. Talk the scene through with the assistant. Sessions save and resume, so a scene can grow over several sittings.
- Draft. Generate several drafts side by side and keep the best one, or turn your own outline and rough notes into formatted scene prose.
- Interpret. The approved prose becomes a structured scene description: who speaks, with which expression, who moves where, what plays.
- Compile. Ordinary code, not AI, writes that description into your project as standard MZ event commands.

An assistant that has read your game
The writing assistant works from your project's real canon. It uses the switches, variables and events found by Foreground Lore, your own reference notes, and a running memory of decisions you have approved. It selects what's relevant to the scene at hand. It keeps established facts apart from open speculation, so a brainstorm doesn't quietly become canon.
For long projects, you can set out the story's backbone as a story skeleton. The assistant keeps new scenes consistent with it.
You approve every step
Drafts are chosen by you. Story facts enter the project memory only after you approve them. Nothing is written into the game until you send it.

Deterministic where it matters
The step that writes engine files is plain, testable code:
- Same input, same output. The compiler produces the same event commands from the same scene description, every time.
- No invented commands. Anything the compiler does not recognise is written as a clearly marked comment and reported, never guessed at.
- Checked against real data. The compiler's output has been compared, command by command, with events built by hand in the MZ editor.
- Checked before and after. A scene description is checked before it is written. After writing, the scene is linted against your project's names and canon, and the project is rescanned.
- Nothing AI in the finished game. What ships is ordinary MZ event data. Players need nothing extra installed.
A direction pass can add staging, such as music, sound effects, screen effects and pauses. It is checked automatically so that it never changes the dialogue text or its order. If the check fails, the original scene is kept.
An agent harness built for writers, not coders
AI agents for software are now common: a model works in a loop, uses tools, checks its own results and repeats. Foreground Script applies that design to creative writing instead of code:
- A retrieval agent decides which parts of your game's canon and notes the current scene needs.
- Multi-pass chains split the work into planning, drafting, interpreting and staging. Each pass has its own focused prompt.
- Automatic checks follow each pass. Their results come back to you, or to the model, before anything moves on.
Where a coding agent runs on its own, this harness stops where a writer's judgement matters.
Your models, your choice
Foreground Script works with any model provider that offers the standard OpenAI-compatible API. That covers most hosted services, and models running on your own machine. You switch providers in a configuration file, not in code. Prompts are modular and editable, with profiles for each model.
Proprietary software. The language system is built for several languages. Chinese is the first one we are tuning the writing prompts for, and English and Japanese come next. Automatic choice of art and audio files from your asset library, and a guided mode for drafting long scenes in approved segments, are also in development. See the roadmap.
Interested in Foreground Script? Contact us.