Story Progression Framework

planner and test harness - nothing installed, nothing uploaded script and page by Oratorian

Story Progression Framework is an AI Dungeon script by

Oratorian

The script, its guide and its hook files live in the project:
github.com/Oratorian/Story-Progression-Framework

This page lays your story out in forms, writes the finished library.js for you, and then plays turns against it so you can see it work before you paste anything into AI Dungeon. Nothing you load leaves your browser.

Start here

Pick a starting point, or drop your own library.js onto this box.

Use my own file The library.js you are already playing with.

...or paste the script text instead

Paste the whole LIBRARY file, then press Run.

Where the story is

Take a turn

Turn log

Everything the loaded script knows about your world, in plain English. Places and people are spotted in what the AI writes; the word lists at the bottom are matched against what you type.

Fill these in and the page writes the finished library.js for you. The engine at the bottom of the file is copied straight from the script you loaded, so it is never out of date. Press Use this and check it to load what you have built back into the harness and test it.

This is the part that makes it a story rather than a list. Every few turns the engine walks this ladder from the top and injects the first beat whose conditions all hold. Rules near the top win; the bottom of the ladder is where the "nothing else applied" beats live.

Plays a whole game against the loaded script without you typing anything, so you can see the pacing: how long until the story leaves its early phase, which beats carry it, and which ones never fire at all.

What is the seed for?

A run like this is full of dice. Which of your keywords the pretend player types this turn, whether the pretend AI does what the injected beat asked, and every Math.random() coin flip in your own ladder - all of it is chance. Press Run it twice on genuinely random dice and you get two different stories, and no way to tell whether the difference came from your script or from luck.

The seed is the number those dice are wound back to before the run starts. The same seed always plays out exactly the same eighty turns. So when you change a rung, re-run on the same seed and every difference you see is caused by your change and nothing else. That is the whole point of it.

Then change the seed - or press try another player - to get a completely different run from the same settings. A ladder that only works on seed 1 is a ladder that only works for one lucky player; if the places still get reached and the phases still arrive across three or four seeds, the pacing is genuinely sound rather than a fluke.

Everything that quietly goes wrong in this framework, checked in one press: beats that point at places you renamed, keywords that will fire on the wrong word, rules the ladder can never reach, and a full play-through to prove the whole thing runs.

What the AI is being sent

The engine prepends one bracketed line to the whole context, and only on turns where the pacing allows it. This is the last thing it sent.

The settings story card

The engine creates this card by itself on the first turn. Players tune the script by editing it in game - no code. Edit it here and press Apply to test that your values parse.

Raw state

state.memory.storyProgression - everything the script remembers between turns.