The Lost Realms

A Field Guide · Player · Dungeon Master · Game Master

A living, AI-narrated realm of ancient mysteries and hidden treasures — and everything you need to play it, run it, and understand the machinery beneath.

Getting StartedWhat is this game?

The Lost Realms is a browser-based fantasy roleplaying game whose storyteller is a large language model. You type what you want to do in plain language — "pry open the rusted grate and peer down" — and the GM narrates the result, then quietly updates the world behind the scenes: your health, your inventory, the time of day, an NPC's opinion of you, a secret passage newly revealed.

There is no rules sheet to memorize and no branching dialogue menu to pick through. The game itself is a single HTML page you open in a browser, and the only thing it needs from the outside world is a key for the AI that plays the Game Master — either your own Anthropic key, pasted in on the title screen, or one held for you by a Server Vault if you are playing on a realm that is hosted rather than opened from disk.

What makes it unusualThe world is authored data — rooms, characters, items, quests, lore — but it is narrated live by the AI, which improvises within the canon it is given and records the consequences as structured changes the engine can apply. Play, world-building, and the AI engine are three distinct layers, and this guide has a part for each.
The main play screen showing a room banner, a narrated scene, and the character sidebar
The game at a glance. A narrated scene with its banner art, clickable exits and names, and the live character sidebar on the right.

Quick start

  1. Open the game (text_adventure.html) in a modern browser. Serving it over http://localhost works best — see Installing & troubleshooting for why file:// is limited.
  2. On the title screen, enter a character name, pick a class, and paste your Claude API key (from console.anthropic.com). The key is stored only in this browser and sent only to Anthropic.
  3. Leave Dungeon Master and New Game unchecked for a normal first playthrough, then press Begin Your Journey.
  4. When the opening scene appears, type what you want to do in the bar at the bottom and press Enter. That's the whole game — the rest is exploration.
TipSpeak in intentions, not commands. "Search the altar for anything hidden" works better than search altar. The GM understands natural language and rewards curiosity.

The three roles

This guide is organized around the three ways you can relate to the Realms. Most people only ever need Part I.

Player

You explore, converse, fight, and solve. You issue intentions in plain language and live with the consequences. Part I →

Dungeon Master

You author and edit the world — its rooms, beings, items, quests and lore — and can forge whole new worlds. Part II →

Game Master

The AI (Claude) that narrates every turn and translates fiction into game state. Not a person — the engine. Part III →

A note on namesThe DM is a human author (you, with the Dungeon Master box checked). The GM is the AI narrator. They are different things, and this guide keeps them strictly apart.

SecurityAPI key security

This section is out-of-character — it is about your real API keys, not your adventurer. The Lost Realms can run two ways, and which one you are playing on decides where the keys live — or whether you hold any at all.

Two ways to run

  • Direct — the app calls Anthropic and the media providers straight from your browser, so the Claude key you paste in (and any optional image/voice provider keys) live entirely on your device. This is the default, and it is what you get from a plain static host or a file opened from disk. Everything below describes this mode.
  • Served by a Server Vault — the game is hosted by a small server that holds the provider keys itself and makes the calls on your behalf. No key ever reaches your browser, and there is nothing for you to paste.

You can tell the two apart at a glance on the title screen. In Vault mode the Claude API Key field and the API Keys button are simply gone — the server owns them — and an Admin button appears for whoever runs it. If the vault has been placed behind a sign-in, a small Logged in as … · Sign out line sits at the foot of the screen. You still choose which model narrates your game; the operator decides which models you may choose from.

Where your keys live

In Direct mode:

  • Keys are kept only in this browser, on this device — in its local storage and IndexedDB. They are never uploaded to us or to any third party; there is no account and no backend of ours that receives them.
  • Each key is sent only to the service that owns it, directly from your browser: your Claude key goes to Anthropic's API for narration; the optional provider tokens go to their own image/voice services when you generate media. Nothing else ever sees them.

Encrypted at rest

Keys are encrypted before they are written to storage and decrypted only for the instant of a single API call. The app uses AES-GCM with a non-extractable key kept in your browser's IndexedDB — its raw bytes cannot be exported, even by the app itself. The copies the app holds while running are the encrypted form, not the plaintext. If you used an earlier version that saved a key in plain text, it is migrated to the encrypted form automatically the next time you load the app.

In practiceIf you open your browser's developer tools and inspect this site's stored data, you will see ciphertext beginning with enc:v1: — not your key.

Isolated from other websites

Browsers enforce the same-origin policy: a page or script from any other website — a different domain, or plain http versus httpscannot read this app's stored data. Modern browsers also partition storage by site, so the keys cannot be reached by a third-party frame either. This isolation is the browser's doing, not the encryption's; the encryption is an extra layer on top of it.

What this does not protect against

In Direct mode the app calls the providers straight from your browser, so the plaintext key must be reconstructed in memory for the moment of each request. Encryption-at-rest hardens the passive cases — someone reading your stored data — but it cannot defend against code that is already running as this site:

  • a malicious browser extension with access to this site, or a script injected into the page, runs with the app's own privileges and could invoke the same decrypt path;
  • anyone with full access to your device and browser profile can simply drive the app.
Bottom lineTreat these keys the way you would any secret pasted into a web app. Prefer the official HTTPS-hosted version, and do not enter your keys on a shared or untrusted computer.

Good habits

  • Remove or replace a key at any time: clear the field on the login screen (or in the API Keys dialog) and save — that erases the stored, encrypted value. Clearing this site's data in your browser removes them too.
  • Rotate a key at the provider (Anthropic, or the image/voice services) if you suspect it was exposed; the old value stops working immediately.
  • Set a spend limit on your Anthropic key — and any paid provider keys — so a mistake or exposure cannot run up an unbounded bill.
  • Where your provider allows it, use a key scoped to this use rather than a shared production key.
Keys off the browserThe Server Vault is the answer to everything in this section, and it is built. It hosts the game and proxies its AI calls, holding every provider key encrypted at rest on the server under a master secret from its own environment, refusing any destination not on its allow-list, and offering an admin page — behind its own sign-in — to add, replace, or remove keys without ever displaying them again. If you are playing on a vault-hosted realm, none of the browser-side exposures above apply to you: there is no key in your browser to reach. If you are playing Direct, the on-device encryption described above is the protection in place.
Part I · The Player

PlayerLogin & setup

The title screen plays a looping background video behind a small panel bearing the crossed-swords sigil, the world's name, and its tagline. A Prologue link opens the world's opening text; a small speaker icon (🔇/🔊) unmutes the background video (browsers block sound until you click it).

The title screen with name, class, and API key fields and the Begin button
The title screen. Enter a name, choose a class, paste your Claude API key, then Begin. Import Game and New World sit alongside the Dungeon Master and New Game checkboxes.

The fields

  • Your Name — your character's name (up to 24 characters). Blank defaults to Traveler. The small disk button beside it opens a menu of your saved games (one per world + character, shown as "Character — World"); pick one to load that playthrough instead of starting or continuing here. Your games are saved automatically as you play, so this lets you switch between adventures in different worlds. Each row also has a 🗑 delete button — click it and the row asks to confirm (✓ / ✗) before removing that save.
  • Class — the built-in world offers Warrior, Rogue, Mage, and Ranger, each with a one-line description. An imported world replaces this list with its own classes.
  • Claude API Key — required to play. It is saved in this browser's local storage on this device and sent only to Anthropic's API. Get one at console.anthropic.com. On a realm served by a Server Vault this field is absent — the server holds the key and you need none (see API key security).
  • Model — a dropdown beneath the key that chooses which Claude model narrates your game: Claude Sonnet 5 (the default — fast and economical), Claude Opus 5, or Claude Opus 4.8 (deeper, more deliberate storytelling). Your choice is remembered on this device and used for every GM call, story and authoring alike. On a vault-served realm you still choose, but only from the models its operator permits.

The buttons & checkboxes

  • API Keys — opens a dialog of optional provider keys (see below).
  • Import Game — open a .json file from your drive. A saved game file (written by Export Game in the toolbar) loads and continues that playthrough; a world file (from the editor's Export World) starts a fresh game on that world instead of the built-in one.
  • New World — opens the world-forging editor (covered in Part II; anyone can reach it).
  • Dungeon Master — reveals the authoring tools. Leave unchecked to play normally.
  • New Game — unchecked by default. When a compatible save exists and this is unchecked, the button reads Continue Your Journey and resumes it; check it to discard the save and start fresh.
  • World — checking New Game reveals a World dropdown just beneath the checkboxes. Pick which world to begin: Default (the built-in starter world) or any world you saved from the World Editor (its Save World library — authored worlds, not saved games). Selecting a world updates the title and the Class list to match it. The first time you must choose one before Begin; after that your last choice is remembered and pre-selected the next time you check New Game.

The optional API Keys dialog

A card per provider, each optional and stored on-device: Pollinations (image generation; blank uses the free keyless tier), Nano Banana Pro (Google's Gemini image model), Higgsfield, OpenAI (the GPT Image models), fal.ai (the SANA models), ElevenLabs (sound), Runware (video), and Tripo (item 3D models).

Which ones you actually needNone of them, to play. Pollinations works with no key at all, and it is both the default and the fallback: choose another provider in Settings without giving it a key and generation quietly uses Pollinations instead, saying so. Fill in only the cards for the providers you mean to select. On a Server Vault realm this dialog is gone entirely — the operator holds the keys on the server.
The optional API Keys dialog with provider fields
Optional API keys. One card per image, sound, video, and 3D provider — all optional; Pollinations alone works keyless.

Starting, saving & resuming

Pressing Begin seeds the world (built-in, or an imported one if staged), anchors the game clock, places NPCs according to their daily routines, opens the Story tab, and prints your opening scene.

Your entire session — location, inventory, world and NPC changes, discovered lore, story history, and the clock — is snapshotted continuously to your browser's IndexedDB storage. A save also fires whenever you leave or hide the tab. When a write is in progress the bottom status bar shows an animated "Saving game… do not close the browser." shimmer.

Refreshing the page while logged in drops you straight back into the same session (auto-resume). Logging out returns you to the title screen but keeps your save, so you can Continue later. If a save can't be resumed (for example, the built-in world changed versions), the title screen tells you why.

TipBecause saves are keyed to this browser on this device, they don't follow you between machines. To move a world (not a save) elsewhere, a DM can export it.

The screen

The interface is a grid: a slim header on top, the story and a sidebar in the middle, a command bar, and a status bar along the bottom.

Header

Left: the world's title. Center: your current location. Right: an in-world clock (12-hour), a time-of-day icon and label, and the logout button (⏻).

Tabs

Players see five: Story, Character, Maps, Journal, and Compendium. (Two more — Editor and Logs — appear only for a DM.) At the right end of the tab bar sit three controls: to choose which sidebar blocks are visible, for settings, and to hide or show the whole sidebar.

The story & the command bar

The Story tab is a scrolling log of the tale so far (older passages load as you scroll up). Beneath it, the command bar carries a prompt and an input placeholder reading "What do you do?". Type there and press Enter (or the ENTER button) to take your turn.

Story-panel tools

A small row of icon buttons sits at the story panel's bottom-right corner, each a self-contained convenience that never spends a turn:

🎲 Dice bagOpens a little popup of the classic polyhedral dice — D4, D6, D8, D10, D12, D20 — as clickable shapes. Click one to roll it; the result prints as a note in the narration. Purely for when you want to settle something with a die of your own. If the Show Dice Roll Video setting is on, a short die-roll clip plays (with sound) as it lands.
🎙️ Voice inputA toggle that dictates your next move into the command box using the browser's speech recognition. Turn it on and speak your intention; it's transcribed into the input, and once you pause it's submitted automatically — dictate-and-go. Turning voice off before it fires leaves the text in the box for you to edit and send by hand. (Availability depends on your browser.)
📖 Make a BookOpens a little menu with two ways to bind the story so far into an illustrated PDF (via your browser's print → Save as PDF): Transcript reproduces the story panel's narration verbatim, a chapter per scene; Story has the Game Master retell your adventure as chapter-based prose that reads like a novel (needs an API key). Both add an illustrated appendix of the people, beasts, and relics you've met.
− / +Scales only the narrative text (not the whole interface); your chosen size persists.

The sidebar

Seven collapsible blocks, each with an ⓘ info button, give an at-a-glance read of your situation:

CharacterPortrait (click for the full sheet), name/title/class/level, and HP · MP · XP · WT bars, with collapsible Stats and Statuses.
WealthGold / Silver / Copper (1 gold = 10 silver = 100 copper).
InventoryWhat you're carrying.
MagicYour spells and abilities.
ItemsItems lying on the floor of the current room.
PeopleBeings present in the room.
ExitsDirections you can travel from here.

Status bar

Bottom-left shows the engine's state (Ready, Typing…, Thinking…, or a saving shimmer). Center shows the map-data version. Bottom-right shows the moon phase (☽, hover for its name) and the in-world date.

How to play

Every turn is the same simple rhythm: you describe an intention, the GM narrates the outcome and applies its consequences, and the world moves on.

Issuing intentions

Write naturally. Attacking, examining, taking, dropping, using, sneaking, persuading, bartering — there are no special command words. The GM interprets your sentence into a game action, resolves it against the world's rules and your character's abilities, and narrates a couple of vivid sentences in the second person.

Movement & clickable links

  • Exits appear as clickable links in the scene and in the sidebar's Exits block. Clicking one is exactly like typing go <direction>.
  • Item and person names in the story, sidebar, Compendium, and on the map are clickable — but they open a detail popup rather than taking a turn, so you can inspect without acting.

Combat

There is no separate battle screen. Combat is narrated by the GM and resolved through the changes it returns — your HP shifting, a foe falling, a status like bleeding taking hold, XP awarded. Your class and level inform how hard you hit.

Slash commands: / and //

Almost anything you type is a story intention for the GM — unless it begins with a slash. A slash marks the line out-of-character (OOC): it's handled instantly, with no GM turn, no narration, and no time passing. The number of slashes decides who it speaks to:

  • A single / — ask the Field Guide. /how do I learn a spell? puts your question to the built-in Field Guide: a helper for the app itself — its tabs, buttons, and systems — grounded in this very guide and answered in a small popup. It is not the Game Master and never touches the story or your character. A bare / (nothing after it) lists every player command; /guide opens the full guide in its own window, and /handbook opens the Player's Handbook. Available to everyone.
  • /hint — ask for a nudge. When you're unsure what to do next, /hint asks the Game Master for a short, in-world hint toward the nearest thread worth pulling — often someone nearby worth speaking to. It's a gentle steer, never a walkthrough, and like the Field Guide it costs no turn and changes nothing.
  • A double // — DM meta-commands. // heal, // give me a torch, // set dex 14 reach past the fiction to change the live game state directly, for testing and debugging (with a GM fallback for free-form requests). These are Dungeon-Master-only: a regular player who types one is simply told the feature is DM-only. See Part II for the full family; a bare // lists them in play, and // guide opens the Dungeon Master's Guide.

So the rule of thumb: no slash talks to the world (the GM), one slash asks the app for help, two slashes are the DM's debug console. A few plain phrases are also handled instantly without a GM turn — verbose on / verbose off lengthens or tightens the GM's narration (the slashed /verbose on / /verbose off does the same).

The world keeps its own timeTime advances continuously (see Time & the world), so an NPC may have wandered off, or a room may read differently, between one turn and the next. The realm doesn't pause for you.

Your character

The Character tab carries six subtabs: Profile (where it opens), Equipment (see What you wear & wield), Spellbook (see Spellbook & magic), Skills (see Skills), Progression (see Progression), and Statistics — a lifetime tally of your deeds across the Realms, grouped into cards, kept as you play and saved with your journey. The Profile sheet holds:

  • Portrait — beneath it sit three buttons: ⬆ upload your own image, ♻ regenerate one (the GM paints a fresh portrait), and a magnifier (enlarge), which opens the portrait full-size in a modal. You can also just ask in the request bar. A collapsible Gallery section keeps every portrait you generate (type a variation prompt and press Generate to add more); enlarge any gallery image and press its Use button to make it your portrait, or drag a thumbnail straight onto the portrait frame.
  • Identity — name, a title (starting at Adventurer), your level and class, your Fame label, your Alignment (see below), a Gender dropdown (Unspecified / Female / Male / Non-binary / Other, fed to the GM so it portrays you correctly), a Race dropdown (default Human, plus whatever peoples the world defines), and a click-to-edit one-line summary.
  • Abilities — a section listing your character's special abilities together with any inherited from your race; the racial ones carry a Racial badge.
  • Background — click-to-edit prose, plus a ✨ Generate background button that asks the GM to write one for you.
  • Vitals, Attributes, Statuses, Wealth, Inventory — the full readouts described below.
  • Factions — the orders and organizations your character belongs to, shown as a row of 🛡️ chips. Click one to open its portrait-and-details popup. The section only lists factions you've actually joined; it reads "Not a member of any faction" until you do. (See Factions.)
  • Magic — a two-column glance: Items (the magical items you carry) beside Spells (the ones you know). The full grimoire lives on the Spellbook subtab.
  • Spellbooks — the spellbook tomes you carry, each listing the spell(s) it teaches; reading one learns them (see Spellbook & magic).
  • Skills — a compact list of the proficiencies you've learned, mirroring the Spells glance. Full cards are on the Skills subtab.
  • Treasure — coveted trophies you keep to admire rather than use (a jewelled crown, a golden idol); acquiring them also raises your Fame.
AlignmentYour character has a moral alignment — one of the nine classic positions (Lawful Good through Chaotic Evil), starting at True Neutral. You don't set it directly; the GM shifts it, quietly and one step at a time, when your conduct over recent play shows a durable pattern — repeated mercy or cruelty, keeping or betraying your word, upholding or flouting law. Hover the value on the sheet for the current alignment's description. The valid alignments (and their descriptions) are defined per-world and can be edited by a DM.

At the foot of the sheet is a request bar: "Ask the GM to paint your portrait or rewrite your background — e.g. 'paint my portrait' or 'rewrite my background as a disgraced knight'."

The character sheet showing portrait, identity, background, and vitals
The character sheet. Portrait (upload/regenerate), identity and gender, an editable background with a ✨ generate button, vitals, attributes, and the Ask-GM bar.

What you wear & wield

The Equipment subtab of the Character tab is where carried gear becomes worn gear. Thirteen slots make up the body: Head, Amulet, Armor, Clothing, Weapon, Sidearm, Shield, Gloves, Belt, Leggings, Bracers, Ring, and Boots. A world's classes may add their own on top — a Mage's Spellbook slot is the built-in example, and a field spellbook always lands there (see Spellbook & magic).

An item fits exactly the slots it declares — nothing is inferred to make it fit. That is what lets a two-handed sword be weapon-only while a dagger declares both Weapon and Sidearm, so you may run it as your main arm or off-hand it beside a heavier blade.

Why it mattersEquipping is not cosmetic. Your Armor Class — the number an attacker must beat to hit you — is base 10 + your DEX modifier or the base your equipped armour sets, plus any magical bonuses; and when a blow lands, the damage dice rolled are the equipped weapon's. Gear you are merely carrying does neither. See Stats, combat & reputation.

Changing gear in a fight

Out of combat, swapping gear is free — take as long as you like. In a fight it costs you the round. Equip or stow anything mid-combat and that is your action: your foes still get theirs, and you do not also swing. The change itself always goes through — what you reached for is in your hand — but the fumble at your belt is an opening, and an enemy may take it.

The skill Quick Draw (DEX, open to any class) closes that opening: with it the change is clean and nothing can interrupt it. It does not make the change free — you still spend the round. Plan the swap for a round you can afford to lose, or learn to do it under a blade.

Stats, combat & reputation

Vitals & attributes

You track HP (health), MP (mana), XP (toward the next level), and WT (carry weight). Your six attributes are STR, DEX, INT, WIS, CHA, CON. Three derived values matter often:

Recovering HP & MP — rest, sleep & campHealth and mana don't return on their own — you regain them by taking time to rest, sleep, or camp. Say what you do ("I rest," "I sleep until dawn," "I make camp") and time passes. Each restores some of both pools (never a full heal), and the longer you rest the more you recover, up to each tier's ceiling.
DowntimeDurationRestores HP & MPNotes
Resta short whileup to 35%A quick breather; keeps your prepared spells.
Sleepa full 8 hrs65%Real sleep; clears a caster's loadout.
Campa full 8 hrs90%Food & fire — the most restorative. Outdoors only; clears the loadout.
Sleeping or camping is a full 8-hour commitment — you earn the recovery only by seeing the night through, and a pleasing notice shows the hours passing on a little clock. A short rest is flexible and only partial. (A sleep can be disturbed by a random encounter — coming soon.)
Fatigue — the cost of skipping sleepThe flip side of recovery: go too long without sleep and fatigue sets in, showing in your Statuses and dulling your attributes in stages. Because these are real attribute penalties, fatigue weakens everything you do. Resting eases it, a sleep clears most of it, and a full camp resets you — so bed down before a long journey or a hard fight.
Time awakeStageToll on your attributes
~18 hTired−1 DEX, −1 INT
~30 hFatigued−2 STR / DEX / INT, −1 WIS
~42 hExhausted−3 STR / DEX / INT, −2 CON
Carry weight (WT)Every item has a weight. The WT bar (beneath XP on the sidebar and the Profile) shows what you're carrying against your capacity — a maximum derived from your STR and CON (so a strength buff lets you haul more). The bar fills as you pick things up and empties as you drop them; carry more than your capacity and it turns red. Going over capacity makes you Encumbered — an amber condition that appears in your Statuses and, crucially, is passed to the GM: physically demanding feats (jumping a gap, climbing a wall, sprinting, swimming, squeezing through a tight space) will be hindered or fail until you lighten your load. Drop weight and the condition clears at once.
  • Armor Class (AC) — shown at the foot of the attribute block, the number an attacker must beat to hit you: base 10 + your DEX modifier, or the base your equipped armor sets, plus any AC bonuses.
  • Persuasion — a bonus from CHA that increases the reputation you gain with NPCs.
  • Fortitude — a bonus from CON that helps you resist poison, disease, exhaustion, and environmental hazards (distinct from raw HP).
Assigning stat pointsYou place three unspent points across your attributes when you create a character, and gain one more at every level-up. A stat-allocation dialog opens to spend them — nudge any attributes up with its + / − controls, and confirm once every point is placed.

Attributes can drift: acting in character quietly trains them, and at a level-up that hidden progress can surface as a permanent trained ±N bonus. Temporary buffs and debuffs from status effects show as a status ±N tag and expire against the game clock.

Reputation

Every NPC holds a numeric opinion of you, shown as a tier. How much they'll tell you — small talk, personal history, motives, secrets — is gated by how far you've earned their trust.

TierScoreWhat it unlocks
Devoted≥ 40Will share their deepest secrets.
Friendly≥ 20Shares history and motivations.
Warm≥ 5Open and helpful.
Neutral−4 to 4Polite, guarded.
Wary−5 to −19Reluctant, terse.
Hostile−20 to −39Antagonistic.
Enemybelow −39Attacks on sight.
TipTreat NPCs like people, not vending machines. Reputation moves with how you speak and act, a high CHA amplifies gains, and the juiciest lore (and its XP) is locked behind genuine rapport.

Aggression

Separate from reputation, and easy to confuse with it. Reputation is what a being thinks of you and moves with what you do; aggression is what it is like — how readily it starts a fight at all — and does not move. A shopkeeper who has come to loathe you is Hostile by reputation and still Passive by aggression: they will not swing at you, they will simply refuse to trade.

AggressionWhat it means
PassiveWill not fight unless attacked.
DefensiveFights back, and defends its own.
AggressivePicks fights when it likes the odds.
Hostile on sightAttacks the moment it sees you.

It appears on a being's detail popup whenever it has been set, and only then — a being with nothing stated is not "Passive", it is simply a being nobody has decided about yet, and the engine treats it as no kind of fighter. The Game Master weighs it when judging whether a creature in the room turns on you, alongside its reputation and its classes: a being carrying the enemy class is hostile regardless.

Dungeon MasterSet it on the Entities tab, on any NPC, monster or animal card. It is a trait of the kind, not of the individual: changing it writes through to every living being of that name and to the catalogue entry, so the next one to appear inherits it. Race, next to it on the same card, works the opposite way — that one is personal.

Spellbook & magic

The Character › Spellbook subtab is your grimoire. It lists spells as collapsible cards — a cropped icon of the spell's portrait, its name, and tags for its school, level, and MP cost — with a Filter by name box and collapse/expand controls, exactly like the other card views. A scope toggle switches between Known (the spells you've learned) and All (the whole world grimoire, so you can see every spell and where to learn it).

Open a card for its description, effect, its Spellbooks field (below), and — for a spell you already know — its action buttons:

  • Cast · N MP — spends the spell's mana and applies its effect. Healing, restoration, and self-buffs resolve mechanically; damage and utility magic are narrated and adjudicated by the GM. The button is disabled when you're short on mana or down.
  • Forget — lets a known spell slip from memory.

Your MP pool (on the Vitals readout and the sidebar) is the fuel; it regenerates as the world's rules allow. The Magic sidebar block and the Profile's two-column Magic glance both mirror what you carry and know at a glance. Magical items are a distinct item type — they're filed under the Compendium's Magic tab and the Magic glance rather than plain Inventory.

Spellbooks are the only way to learn a spellThere is no free "Learn" button — spells are acquired solely by reading spellbooks: items of type spellbook (with book among their classes) that name the spell or spells they inscribe. Carry one and a Read button appears on its detail popup; reading learns every listed spell you don't already know. Unlike a skill book, a spellbook is never consumed — it stays in your pack as a permanent reference you can re-read or pass on. Each spell card's Spellbooks field shows which tomes teach that spell (click a chip to open the tome); if none exists, a DM sees a Generate button that authors one. Your carried tomes are also gathered in a Spellbooks section on the Profile, beneath Magic. And wherever the GM's narration names a spell or a spellbook, that name is a clickable link that opens its popup.

Skills

A skill is a learned proficiency — Lockpicking, Herbalism, Swordsmanship — that you either begin with or read out of a book, and then sharpen through use. The Character › Skills subtab shows a card for each skill you know: its icon and name, the governing attribute with your current modifier, its level and tier (Novice → Master), and an xp-to-next-level bar. Until you've learned any, the tab reads "No Skills Yet."

Where your first skills come from — inherent class skills

Every class begins knowing one to three signature skills that fit its playstyle — a Warrior starts with Swordsmanship, a Rogue with Lockpicking, Sneak, and Surprise Attack, a Mage with Spellcasting. Skill-reliant, lightly-armored classes carry more; armor-and-weapon front-liners carry fewer. These inherent skills are part of world design, defined per class, so a DM has the final say and can add or change them for their world (via the Classes editor); when the GM invents a new class it assigns fitting signature skills the same way.

Learning more skills — from books

Beyond your inherent skills, new ones are taught by book-type items. Carry a book that teaches a skill and a Read button appears on its detail popup (or simply tell the GM you read it). Grasping the lesson isn't automatic — it takes an Intellect check: the engine rolls d20 + your INT modifier against the skill's difficulty and shows a Skill Study card. Succeed and the skill unlocks at Level 1, a card appears on the Skills tab, and the book is consumed. Fail and the book stays in your pack.

One attempt per levelYou may attempt each skill only once per character level, pass or fail. A failed read locks that skill until you level up — then the Read button works again and you can retry. (A higher INT makes the check easier, so your smartest characters learn from books most reliably.)
Class-gated booksSome skills are open to anyone; others are restricted to a class. If a book teaches a skill your class can't hold, the read is refused ("These techniques are closed to your discipline") and the book is not consumed — hold onto it for a character who can use it.

How a check is rolled

When you describe an action a learned skill covers, the GM rolls the check for you. It sets a difficulty (DC) from the situation and rolls d20 + your ability modifier + skill proficiency against it. Because the modifier reads off your live attribute, any buff or affliction bends the odds automatically — a Cat's Grace buff or a crippled condition changes every relevant check with no extra bookkeeping. One action can trigger several checks at once (picking a lock and staying hidden).

DifficultyDCOutcomeWhen
Easy8Criticaltotal ≥ DC + 10, or a natural 20 — clean result, bonus xp
Moderate12Successtotal ≥ DC
Hard16Partialwithin 2 below DC — succeeds at a cost
Very Hard20Failureotherwise, or a natural 1
Formidable25

The GM's reply shows a compact skill-check manifest — every check it rolled this turn, with the die, your modifiers, the DC, the outcome, and any xp gained — printed just above the narration, so the dice are honest and legible. A successful use earns that skill xp (a critical earns more); cross a threshold and the skill levels up, its proficiency bonus growing with it.

No skill for it? The 5% floorIf your action maps to no skill you've learned, the GM doesn't roll — it simply decides the outcome as fiction. But the door is never fully shut: an unskilled long-shot always keeps a flat 5% chance of a lucky break. Learning the right skill is how you turn a long-shot into a real, repeatable ability.
Roll them yourselfThe Auto-roll skill checks setting (on by default) controls who throws the die. Turn it off in Settings and, instead of rolling for you, the GM asks you to roll: a Roll Called For card names the skill and DC and opens the dice bag, and your d20 is sent back to the GM to settle the check.

Progression

A skill is something you go and earn; an ability is something you have. Progression is the third lane: the milestones your class itself promises you, charted level by level and paid out as you reach them. The Character › Progression subtab draws your class's path as a vertical timeline, earliest level first.

The header names the class and your current level, with the title you're wearing beside it. Each stop on the timeline is a beat — a numbered level marker, a header (the beat's name, or just Level N where it has none), and the rewards it carries. A status rail on the left reads Achieved for a beat behind you, Next for the one you're climbing toward, and Later for the rest.

Beats are sparse and front-loaded by design — not every level has one. A class charted across twenty levels typically carries four to eight in total, clustered close together early and spaced out afterwards, so the later ones are worth the wait. Level 1 is character creation; beats begin at level 2.

What a beat grants

RewardEffect
Class skillA skill specific to your discipline, learned outright at Level 1 and sharpened through use like any other. The GM authors it alongside the timeline if the world doesn't already have it.
SkillAn existing open-gated skill any class may hold, granted the same way.
AttributeA permanent bump to one of the six — usually +1, applied to your sheet immediately.
Stat pointsExtra unspent points added to your pool, spent through the usual allocation dialog.
BoonA named, mechanical gift — extra max HP or MP, a resistance, a standing check modifier. Where it carries a typed effect the engine applies it as a status; otherwise it is recorded as a labelled note.

Rewards are gameplay-rooted only — the GM is explicitly forbidden from paying out a beat in flavor. Each reward announces itself in the story as it lands ("✦ STR 13 → 14", "✦ Class skill gained — Shield Wall").

A skill with no check to passA skill granted by a beat bypasses the book-and-Intellect-check route entirely: no book, no d20 + INT roll, and it doesn't consume your one attempt for the level. Your class simply teaches you what it was always going to teach you.

Titles — the honorific you wear

The meatier beats carry a nameSkirmisher, Vanguard, Scholar, Nightblade — and reaching one earns it as your title. A gilt Title Earned banner announces it in the story, and the title then shows beneath your name in the sidebar and on the Profile sheet, replacing the Adventurer you started as. The most recently earned named beat is the one you wear.

The title is also fed to the GM as part of who you are ("a level 4 Warrior (Skirmisher)"), so narration and NPCs can address you by what you've become. Unnamed beats grant no title — they're pure mechanics.

What's visible ahead

A beat you've reached always renders in full. One still ahead renders only if the DM flagged it revealed; otherwise the timeline shows its level and the line "A milestone yet to be revealed." Reaching the level reveals it permanently. If your class has no timeline charted, the tab says so and points at the DM, who shapes each class's path.

Granted exactly onceEach beat pays out the first time you reach its level and never again — the engine keeps a per-class ledger of which levels have already been applied, so no later level-up or reload can re-grant it. Loading an older save runs a silent catch-up first: every beat at or below your current level that was never applied is granted at once, without the story banners.

Saving throws

A saving throw is a roll the world forces on you — the moment something threatens and you have a chance to resist it. A basilisk's gaze, a gout of dragonfire, a lungful of poison gas, a spell that would seize your mind: each calls for a save. Where a skill check measures something you attempt, a saving throw measures whether you withstand what is done to you.

Unlike a skill check, a save is always yours to roll, and the engine — not the GM — does the whole calculation. When a save is called for, a Saving Throw Called For card names what you're resisting and the governing attribute, and the dice bag opens. You throw the d20, and the engine computes:

Your total
d20  +  your governing-stat modifier  +  any of your saving-throw ability bonuses that apply

— then grades it against the difficulty on the same ladder skill checks use (Critical / Success / Partial / Failure), shows a manifest with the full formula (e.g. d20 12 · WIS 14 (+2) · Warded Mind +2 = 16 vs DC 15), and hands the resolved outcome back to the GM to narrate the consequence. Because the stat modifier reads off your live attribute, any buff or affliction bends a save exactly as it bends a check.

The saving-throw ability bonuses above come from your abilities — inherent, racial, or granted by worn gear — that carry a bonus "to your saving throws". A bonus that always applies is folded in automatically; one that's situational (say "+2 to saving throws · against fear") is added only when the threat genuinely fits. You never have to track or claim these — the engine applies every bonus you're due.

Who decides what — the roll is yours, the ruling is the GM'sA saving throw sits on a clean division of labour. The GM reads the whole moment — your stated intent, what the monster or NPC is doing, what the room affords — and rules on the things only judgement can settle: whether a save is even required this turn, which attribute governs it, how hard it is, and whether a situational ability truly bears on the threat at hand. The engine then owns everything objective: you roll the die, and it does the arithmetic and grades the result off your real character sheet — nothing fudged, nothing forgotten. The GM never rolls your save for you and never quietly adds or drops a bonus; it decides if and when, the engine decides how it lands. That's why a bonus "to saving throws" lives in the engine now rather than in the GM's narration: only the GM can weigh the context before the dice, but once the dice are called, the maths is the engine's.
In a fightSaves also happen mid-combat — a creature's special attack may force one. There the save rides the combat dice flow instead of a separate card, but the engine folds in your saving-throw ability bonuses just the same and states the adjusted roll.

Time & the world

The realm runs on its own accelerated, decoupled clock: roughly one real-world hour equals one in-world day. It keeps ticking while you read and type. A new game begins at 09:00 on the 1st of Frostmark, Year 437.

The day is divided into six periods, each with its own icon:

PeriodHours
Dawn 🌅05:00–08:00The clock also drives a custom calendar of twelve months (Frostmark, Emberwane, Thawmoot, Greentide, Bloomrest, Suncrest, Highflame, Embergold, Harvestfall, Witherfall, Graymist, Hollowtide), seven weekdays, and an eight-phase moon shown in the status bar.
Morning 🌤️08:00–12:00
Afternoon ☀️12:00–17:00
Evening 🌇17:00–20:00
Dusk 🌆20:00–22:00
Midnight 🌙22:00–05:00

When the period changes, NPCs move to wherever their routine puts them, and if a room actually reads differently at the new hour the scene is reprinted (its title tagged like "Market Row : Afternoon", with fresh banner art if the world provides it). Otherwise you just see a quiet note like "◈ It is now afternoon."

The Compendium

Your growing record of the world, in ten subtabs: People, Places, Items, Monsters, Flora, Fauna, Races, Magic, Lore, Factions. Entries fill in through play — entering a room records the place, everyone present, and the notable items on the floor; each is filed under the right tab by its kind. (Flora collects plant-type things — herbs, fungi, trees; Fauna collects wild animals; Races collects the peoples of the world — a card is added the first time you encounter each.)

Every entry shows a thumbnail (its own art, or for a Place the room's live banner), a description, and its discovery date. People entries also show your current reputation and cross-link to any Journal beats that mention them.

The Factions tabThe Factions subtab lists the orders and organizations you've discovered, each as a card with its emblem, alignment, and description. Unlike the other tabs, factions aren't catalogued on sight — a faction stays a secret until the GM decides you've genuinely uncovered it in play (see Factions). Like People and the rest, the tab carries a Filter by name box, and a DM's Reveal all toggle exposes every faction the world defines, discovered or not.
How Lore unlocksThe Lore tab works differently from every other. The others fill by encounter — walk into a place, meet a person, pick up an item, and it's catalogued automatically. Lore is earned: a piece appears only when you draw out a specific, hidden piece of the world's history or secrets through real conversation and investigation — asking the right questions, earning an NPC's trust or reputation, or piecing clues together. Facts freely volunteered, small talk, and common knowledge don't count, and some lore stays locked behind a person's trust until you've raised your standing with them. When you uncover a piece, a gold "📜 Lore uncovered" line appears in the story (click it to jump to the entry) and you're granted a one-time +N XP reward — larger for knowledge that was harder to prise loose. Both people and items can yield lore.

Click a person or item name to open its detail popup; the Items tab even lets you open two side by side to compare.

The Magic tabThe Magic subtab has its own inner tabs along the bottom — Items, Spells, and Spellbooks — mirroring the Editor's Magic tab. Items is the discovered magic-type items; Spells lists every spell you've learned; Spellbooks lists the tomes you've obtained. Each behaves like any other Compendium tab — a thumbnail, name, and description per entry, the shared Filter by name box, and a DM's Reveal all (which fills Spells with the whole grimoire and Spellbooks with every tome the world defines). Click a spell to open its spell popup, or a spellbook to open its item popup. Spellbook cards also carry the date the tome was obtained at the top (like the other Compendium cards) and, for a DM, the same authoring controls as the other cards: ⬆ Upload / ♻ Regenerate portrait buttons under the thumbnail, a collapsible Prompt section (with a ✨ to have the GM write one), and a collapsible Lore section for the tome's hidden history and its unlock condition.
A thing's own loreDistinct from the Lore tab, individual items, people, monsters, and places can each carry their own hidden history — an object's provenance and the secret of its making, a person's or creature's origins, what truly happened in a place. It stays invisible in that entry's detail popup until it is unlocked, and only then does it read in the details. Items you can unlock through play — examining the object closely, researching it, asking a knowledgeable NPC who would rightly know, or passing the right skill/stat check surfaces a gold "🔍 Item lore unlocked" line (click it to open the item). A person's, creature's, or place's lore is revealed as the story unfolds and your DM sees fit. A casual glance never gives any of it away.
Incidental thingsNot everything you can touch is catalogued. Mundane props — utensils, clutter, a scrap of paper — can be real, examinable objects that are deliberately kept out of the Compendium so it stays a record of what matters. You'll never miss them; they simply don't clutter your collection.
The Compendium tab with discovered entries
The Compendium. Your record of the world across ten subtabs, filled in through play. (Shown with a DM's Reveal all on, so undiscovered types are visible too.)

The Journal

Five subtabs: Quests, Factions, Professions, Legends, Tasks. Four are working today. Quests is a chronological timeline of the story beats you've unlocked, each stamped with its in-world date, parent thread, title, and text. Factions is a matching timeline of the faction discoveries you've made — one entry per faction, recorded the moment you first come to know of it (through the person who reveals it), stamped with the in-world date. Tasks collects the jobs you've taken on as cards — each showing its giver, its description, and its milestones, a state badge that advances Accepted → Started → Completed, and the XP it awards once complete — with a toolbar to filter, collapse, and import or export them. Legends is where a story arc goes once it ends: one dated entry per resolved thread, told in the world's own voice as a chronicler would tell it rather than as a stats dump, carrying the outcome it reached, the renown it earned you, and chips for the spoils it won — click one and the item or place it names opens. (Professions is reserved for a future system and still shows an empty-state placeholder.)

Crucially, there is no visible quest list telling you what to do. Quests are curated threads whose beats stay hidden until you organically satisfy their conditions in play — helping the right person, reaching a place, earning enough trust. When a beat unlocks it's woven into the narration, and only then does it appear in your Journal. You discover the story by living it, not by reading objectives.

The Journal tab with its five subtabs
The Journal. Five subtabs; Quests, Factions, Tasks and Legends are the working views — unlocked beats, discovered factions, the jobs you've taken on, and the arcs you've already brought to an end. They begin empty and fill in as the story surfaces.

Factions

The world is threaded with factions — guilds, orders, watches, cults, and other organizations that its people belong to. A being can serve one or several, each with a role (member, captain, initiate…) and its own standing. You, too, can belong to factions, and your memberships show as chips on your Character sheet.

Discovery is earned, never automaticCrucially, a faction is not catalogued the instant you meet one of its members. Its very existence is a secret the GM keeps until you genuinely draw it out in play — asking an aligned NPC about their duties or the group they answer to, piecing together a banner's meaning, or otherwise uncovering it through conversation and investigation. Until then a guard is just "a guard," never "a member of the Grey Watch." When the GM judges you've earned the reveal, it weaves the discovery into the narration (never as a system announcement), records it once in your Journal › Factions timeline, and drops a gold "◈ Faction discovered" line into the story you can click to jump there. Every faction carries a hidden reveal condition — authored by the DM or the GM — that spells out exactly how it comes to light; you never see it, but it's what the GM adjudicates against.

Once discovered, a faction turns up in several places, all sharing one faction popup (its emblem, alignment, and description, with a gold Compendium button that jumps to its full card):

  • The Compendium › Factions tab — its permanent card, alongside every other faction you've uncovered.
  • An NPC's detail popup — a Factions field lists the orders that NPC belongs to (only the ones you've discovered), each a link that opens the faction popup beside the NPC's.
  • Your Character sheet — the 🛡️ chips for factions you belong to; clicking one opens the same popup.
TipIf you suspect someone answers to a larger power, ask them about it directly and with real interest — allegiances are prised out through rapport, exactly like lore. Some are hidden in plain sight until you think to look.

Maps

The Maps tab shows a node-graph of the places you've visited — a World overview, a Region subtab showing the map of the region you're currently in, plus a subtab for each interior structure you've entered. Drag to pan, scroll to zoom, and use + / − / ⟲ to zoom in, out, or reset. Multi-level buildings show one level at a time with a legend. Click a room name to open the same room detail popup you see elsewhere; item and being icons along a node's bottom edge open their own detail popups.

Inside that room popup, the Items and Present (occupant) names are themselves clickable: click one and its detail opens in a second popup beside the room popup, so you can inspect a person or object without losing the room in view — exactly the two-panel behaviour of the DM Editor's map. (The World-map room popup omits the exit list, since the map already draws every exit as a line between rooms.)

The World map with a room popup open and an item detail popup beside it
Two popups side by side. Clicking a room name opens its popup (right); clicking an Item or Present name inside it opens that detail beside it (left) — inspect without leaving the room. The room popup lists no exits; the map already draws them.
The Maps tab showing the visited starting room as a node
Maps. Only visited places are drawn — here, the starting square with your marker. The graph grows as you explore. (A DM sees the whole world revealed; see Part II.)

Settings & comfort

The button opens Settings. Player options today:

  • Theme › Appearance — a Dark / Light picker for the whole app (default Dark, the classic parchment-on-black look). Light flips the palette to ink-on-parchment. The choice is remembered across sessions.
  • Logout after Inactivity (off by default) with a minutes stepper (1–240, default 15); any activity resets the countdown, and a timeout logs you out (your save is kept).
  • Dice › Show Dice Roll Video (off by default) — when on, rolling a die from the story panel's Dice bag plays a short clip of that die tumbling (with sound) in the centre of the screen — each die has its own video — and when the clip ends the rolled number flashes large in the centre of the screen for a couple of seconds before fading out. The result is also recorded as a note in the narration.
  • Dice › Auto-roll skill checks (on by default) — controls who rolls a skill check. Left on, the GM rolls each check itself and reports the result. Turn it off and the GM instead asks you to roll: when an action calls for a check, a Roll Called For card names the skill and DC and opens the Dice bag, and the d20 you throw is sent back to the GM to settle the outcome — same odds and manifest, your hand on the die.
  • Voice Input › Silence window — a seconds stepper (0.3–5, default 1.2) for how long voice input waits after you stop speaking before it auto-submits the dictated move. Shorten it for snappier dictation, lengthen it if it cuts you off mid-thought.

The dialog also holds the Image AI and Sound AI provider pickers.

Two more comfort controls live on the tab bar: opens a checklist to show or hide individual sidebar blocks, and ▶/◀ collapses or restores the whole sidebar. Every sidebar section (and the Stats/Statuses subsections) can be collapsed on its own. All of these preferences persist.

The Settings popup with the inactivity logout option
Settings. The ⚙ popup — an optional inactivity auto-logout with a minutes stepper (default 15).

Images & installing

The art you see

Generated images come from pollinations.ai. Your character portrait is made on demand — ask the GM ("paint my portrait"), click ♻, or upload your own. Room banners are not auto-generated during play: if a room has no art for the current time of day you'll see a "🎨 Artwork Not Yet Generated" placeholder; where banners do exist they expand to full width (and can swap to an animated variant if the world provides one).

Install as an app

The game ships a web manifest and service worker, so on a secure origin you can install it as a standalone app.

The file:// caveat

Serve it, don't open itOpening the file directly from disk (file://) makes browsers treat it as an isolated origin, which can break save/resume and the DM's detached editor. If you hit trouble, serve the folder over a local web server — e.g. run python -m http.server 8000 in the folder and open http://localhost:8000/text_adventure.html. The title screen shows this advice automatically when it detects file://.
Part II · The Dungeon Master

Dungeon MasterBecoming a DM

There's no password — checking Dungeon Master on the title screen is the whole gate. That choice is remembered for next time and reveals the authoring surfaces: the Editor and Logs tabs, the Compendium's Reveal all toggle and per-type art/prompt controls, the full Quests view, and assorted DM-only fields.

Switching roles on the way inYour login checkbox overrides the saved role when you press Continue: uncheck it to resume an existing save as an ordinary player, or check it to take the reins. (A plain refresh keeps whatever role the save last held.)
Building a whole world? Read the DM's GuideThis Part is a reference to the authoring surfaces. For a start-to-finish walkthrough of making a world — conceiving it, the World Builder, a section on every Editor tab, and prompt & image generation — see the dedicated Dungeon Master's Guide.

The Editor

The DM Editor tab holds fifteen subtabs. Most of them present the world as read-only cards; you make content changes by describing them in a "Tell the GM to create or change…" box and pressing Apply, which hands the request to the AI. The exceptions are Classes (with editable stat fields), skill and spell descriptions (editable in place), and the per-card portrait/prompt controls, which you edit directly.

#SubtabWhat it's for
1MapA fully-revealed, zoomable map with drill-down; click rooms/beings for read-only detail. Inspection and navigation.
2QuestsThe full quest timeline (locked + unlocked), with a confirmation step for edits that touch already-seen beats.
3NPCsA card per non-hostile being; filter, collapse/expand, portrait & prompt controls, GM edit box.
4MonstersSame, for hostile beings.
5RoomsRoom cards (descriptions, exits, banners, contents) + GM edit box, with a Region select and a name filter (see Editing rooms).
6ClassesCharacter classes with editable base-stat inputs, plus a GM edit box. Each class also carries its inherent (signature) skills — the skills a character of that class begins knowing; ask the GM to add or change them here ("give the Warrior an inherent Shield Wall skill"). When the GM authors a brand-new class it assigns 1–3 fitting class skills, at least one inherent, scaled to how much the class leans on skills vs gear — and you can revise its choices. Each class card also carries a ✦ Progression button opening its level-milestone timeline (see Charting a class progression).
7ItemsItem catalog cards, image & prompt controls, GM edit box. Excludes magic- and spellbook-type items (those live on the Magic tab). Beside the name box a funnel button filters by the card's own fields — type, equipment slot, and whether a portrait or icon exists — as checkbox groups; each group's title is itself a tick-all/none box, so isolating a single type is none then the one you want. Only groups that can tell two things apart are offered. A badge on the funnel counts what is switched off, and Show all clears it.
8MagicThree inner subtabs — Items (magical items, with their special naming), Spells (the world grimoire: cards with school/level/MP, portrait & prompt, editable description), and Spellbooks (the tomes that teach spells — an Items-style catalog scoped to spellbook-type items). See Editing magic & skills.
9SkillsA card per world skill — governing stat, class gate, default DC, and an editable description — with filter, collapse/expand, import/export, and a GM edit box. See Editing magic & skills.
10EnvironmentTwo inner subtabs — Flora (plant-type items) and Fauna (animal-type items) — each a catalog view like Items, matching the Compendium's Flora and Fauna tabs.
11ArtA dashboard of everything still missing portrait art, with one-click batch generation. See The Art tab.
12EncountersWandering/ambient encounter definitions, portrait & prompt, GM edit box.
13FactionsA card per faction — description, hidden reveal condition, emblem & prompt, lore, and an Add to Player button — with filter, collapse/expand, and a GM edit box. See Editing factions.
14RacesA card per character race, with filter and a GM edit box.
15WorldThree bottom inner tabs: Profile (the world's framing — Name, Theme & Premise, Tone, Scope, Art Style, World Rules, Prologue — pre-filled from the world; everything read-only except World Rules and Prologue, which are editable here), Chunks (paste-and-merge world chunks, generate regions with the GM, Export the world), and Regions (the region map, plus a Region Builder for authoring one region at a time — see below).

A DM-only Logs tab sits outside the editor and records the engine's activity, including every GM hand-off — invaluable when authoring.

The DM Editor with its subtabs and the fully-revealed map
The Editor. Its subtabs run across the top; the Map view shows the whole world revealed (unlike the player's visited-only map).
The Classes editor with editable base-stat fields
Direct editing on Classes. Most subtabs are read-only cards edited via the GM box; Classes is the exception, with editable base-stat inputs.

Editing beings (NPCs & Monsters)

NPCs and monsters share one card design. What you edit directly is their art; what you shape through the GM is their character.

Portraits — three image fields

  • compendiumImage — the canonical portrait; the Generate, ⬆ Upload, and ♻ Regenerate buttons all write it.
  • portraitPrompt — the text-to-image prompt, in a collapsible Portrait Prompt section with a button that asks the GM to write one.
  • conversationImages — optional per-location close-ups; the game prefers the one matching where the NPC is, then falls back to the canonical portrait.

Character, routines & location

The card also shows vitals, attributes (including CON, the constitution stat every being now carries), profile, and a Routine (prose plus a per-time-of-day table of where the being is and what it's doing). Current/Home locations are clickable, opening the room popup. If the being belongs to any factions, their names appear as links (both on the card and in the being's detail popup) that open the faction popup; instruct the GM to enroll or move a being between factions just as you would edit any other field.

Data-only fieldsTwo important fields — classes (a being's kind labels, e.g. undead, humanoid) and lore (its private history) — are real and consequential (see the GM section) but are not editable directly on the card. Change them by asking the GM ("make the Bog Wraith incorporeal — classes undead, spirit"). A being's lore — plus its unlock condition and the "unlocked for the player" toggle — can also be authored by hand (or with a GM Generate button) from the Compendium's People and Monsters tabs, exactly like item lore.
An NPC editor card with portrait, profile, attributes, and the GM edit bar
A being's card. Portrait controls, vitals, attributes, routine, and profile — with the natural-language GM edit bar at the foot.

Editing items

An item carries a type (its one mechanical slot: weapon/armor/consumable/key/misc, plus book and magic), description, value (in copper), weight (which counts toward the player's carry weight; defaults to 1), quantity, icon, a close-up image with its own Portrait Prompt (Generate/Upload/Regenerate + ✨), a condition label, a classes taxonomy, and private lore. As with beings, classes and lore are shaped through the GM edit box rather than on the card.

Two special item typesA magic item is catalogued and shown under the Compendium's and Editor's Magic surfaces rather than plain Items (magical items usually carry unique names — Firebrand, Ring of Invisibility — rather than generic ones). A book item teaches a skill: it carries a teaches field naming the skill id it unlocks, and reading it (on a successful, class-eligible read) learns that skill and consumes the book. Author books and their teaches link through the GM edit box.
Item lore & its unlockAn item's lore is its hidden history, and it stays hidden from the player until unlocked. Two companion fields govern that: loreKey — a short note on how the player earns it (e.g. "close examination of the maker's mark", "researched in the temple archives") — and loreUnlocked, the flag the engine flips once the player satisfies the key. During play the GM decides, turn by turn, whether the player's action meets the key and unlocks the lore. You can also manage all three directly from the Compendium: on any Items/Plants/Animals/Magic entry, a DM-only Lore section lets you write the lore, set its unlock condition, and toggle "Unlocked for the player" by hand. A DM always sees an item's lore (flagged 🔒 locked while the player hasn't earned it); the player only ever sees it once unlocked. Edits apply to the item type and every copy of it in the world. The very same Lore section now appears on People, Monsters, and Places entries too — see the Compendium as a DM.

Minor (incidental) items

Room dressing that stays out of the wayAn item marked "minor": true is a fully interactable object — the player can examine, take, and use it — but it is deliberately kept out of the item catalog and the Compendium. It's meant for the mundane props a room logically contains (utensils, plates, a stray tool, a small puzzle bit) that shouldn't clutter the player's collection. Because they aren't catalogued, minor items don't appear as cards in the Items editor; you author them inline in a room. The GM is instructed to reach for minor items for one-off flavor and reserve catalog items for things that recur or matter.
{ "name": "Chipped Clay Plate", "type": "misc",
  "description": "A cracked dinner plate, long unwashed.",
  "minor": true }
The Items editor cards with image and prompt controls
The Items editor. Catalog items with their details, image controls, and a collapsible Portrait Prompt. Incidental minor items are authored inline in a room and don't appear here.

Editing magic & skills

Both the world's spells and its skills are DM-editable catalogs, edited on their own tabs the same way the other catalogs are — filter, collapse/expand-all, import/export, and a natural-language GM edit box — with the card description editable directly in place.

Magic

The Magic tab has three inner subtabs. Items is the magical-item catalog (the magic-type items excluded from the plain Items tab); its GM box is primed to give magical items the unique, evocative names they warrant. Spellbooks is a third subtab that behaves like the Items tab (filter, Import/Export, Collapse/Expand, GM box) but is scoped to spellbook-type items — the tomes that teach spells (see Spellbook & magic). Its card is laid out for a tome: the portrait and Details/Classes share the top row, with the Description and Detailed Description full-width below, a collapsible Teaches section (a chip per spell it inscribes — click one to open that spell's detail popup), then the Portrait and Lore sections. Its GM box authors tomes with a teaches spell id (or list) and an evocative title. Spells is the world grimoire — a card per spell with its school, level, and MP cost, an editable description, a portrait image with its own prompt (a ✨ button asks the GM to write a prompt from the spell's name and description), and a collapsible Spellbooks section (the tomes that teach the spell, plus a Generate button to author one) beneath the Portrait. Anything you author here is what players see and can learn on the Spellbook. (For the full spell model — and where it could grow — see the design doc under Designs/spells-and-scrolls.html.)

Skills

The Skills tab is a card per world skill: its icon and name, a tag for the governing attribute and one for its class gate (anyone, or the named classes), an editable description, and read-only details (governing stat, gate, default DC, id). Describe changes in the GM box — "add a Pickpocketing skill for Rogues governed by DEX", "make Herbalism open to anyone" — and Apply. A skill's classes list is the single source of truth for gating: empty means anyone may learn it; naming classes restricts it. To have players actually learn a skill, pair it with a book that teaches it. Which skills a class begins with (its inherent/signature skills) is set on the Classes tab, not here — this tab defines the skills themselves; the Classes tab decides which class starts with which. Either way, you are the final arbiter: the GM assigns sensible skills to classes when it authors a world, and you can add, change, or remove them before players engage. (For the full model, see the design doc under Designs/character-skills.html.)

Charting a class progression

Every class card on the Classes tab carries a ✦ Progression button, with a count of the milestones already charted. It opens that class's timeline — the level-by-level path its players will read on their Progression subtab. The DM view shows every beat, named and unnamed, revealed and hidden, with a hidden tag on any the player can't see yet.

Two controls sit beneath it. Generate asks the GM to draft a complete timeline from scratch; if one already exists it confirms first, because generating replaces the current chart wholesale. The ask bar below applies a natural-language revision — "add a level-6 milestone that grants +1 STR and a shield skill", "reveal the level-8 beat", "drop the nickname from the level-4 beat" — and the GM returns the complete updated timeline, so edits and generation land the same way. Neither is a story turn; both are authoring hand-offs, logged like any other.

The GM is held to a specific shape. Beats must be sparse and front-loaded — roughly four to eight across twenty levels, clustered early and spread out later, never one per level. Beats start at level 2 (level 1 is character creation). Nicknames are optional and reserved for the meatier periodic milestones, since a name becomes both the beat's header and an honorific the player wears; naming every level cheapens it, so unnamed in-between beats carry a smaller reward and no title. Rewards must be gameplay-rooted — a class skill, an open skill, an attribute bump, extra stat points, or a mechanical boon — never pure flavor.

New skills are authored in the same passWhere a beat grants a class skill the world doesn't have yet, the GM authors it into the world's skill catalog and references it by id from the reward — the same define-then-reference flow the inherent class skills use. The dialog reports how many new skills came back alongside the milestone count, and they appear on the Skills tab like any other.
Revealing a beatA beat's revealed flag decides whether players see it before reaching its level; reaching it reveals it permanently regardless. Set it through the ask bar. Leaving later beats hidden is the default and keeps the path a surprise — flip one open when you want to dangle what's coming.

You are the final arbiter here as everywhere: add, retune, reorder, hide, or reveal any beat before players engage. (For the full model, see the design doc under Designs/player-progression.html.)

Editing rooms

Room cards surface everything the engine knows: region tags, the base description plus a Descriptions by time of day table, Exits and hidden exits (direction → destination + description), floor items and resident beings, containment (which building a room is part of, and any interiors it holds), and a Banner section reporting how many of the six time-of-day art slots are filled, alongside the banner prompt.

Room content is edited via the GM box. Room banner art is generated from the Compendium's Places subtab — and that same Places subtab is where a room's own lore (its hidden history, its unlock condition, and the unlocked toggle) is authored, just like item and being lore.

Filtering by regionAbove the room cards sit two controls that narrow the list. A Region select (default "No Region" — every room) filters the cards to a single region; the Filter by name box then searches for matching room names within the chosen region. Together they make a large world's rooms quick to navigate.
A room editor card showing descriptions, exits, and banner info
A room card. Time-of-day descriptions, exits and hidden exits, contents, containment, and the banner art-slot summary.

Editing factions

The Factions subtab is where you author the world's organizations. Like the other catalog tabs it carries a Filter by name box and collapse/expand-all controls, and a bottom "Tell the GM to create or change factions" box drives most edits — factions live in the world as an id-keyed map, so the GM creates, edits, and removes them by id, strictly scoped (it won't touch rooms, beings, items, or quests from this box).

Each faction card carries:

  • Description & Detailed Description — click-to-edit prose with a GM-generate button, exactly like a being or item.
  • Reveal — a small text box holding the faction's hidden reveal condition: how the player is meant to discover it in play. It is GM-only and never shown to the player; a button asks the GM to write one. Every faction should have one so discovery has a trigger (see Factions).
  • Emblem & Portrait Prompt — Generate / ⬆ Upload / ♻ Regenerate for the faction's image, plus a collapsible Portrait prompt with its own ✨.
  • Lore — the same DM-only Lore section found on beings, items, and places (hidden history, unlock condition, and the "Unlocked for the player" toggle).
  • Add to Player — a gold button in a toolbar at the foot of the card that enrolls the current player in this faction. It won't duplicate a membership you already hold (it reads "Added ✓" and disables once joined), and the new membership appears immediately as a chip on the Character sheet.
Discovered vs. authoredThe Factions editor shows every faction the world defines; the player's Compendium › Factions tab shows only the ones they've discovered in play — unless a DM flips Reveal all. Authoring a faction here does not reveal it to the player; that still happens through the GM's reveal adjudication (or your Add to Player for a membership).

Encounters

Encounters are the chance meetings that populate the world as the player moves. Each defines a chance, an interval, a despawn rule, the entities it can spawn (by reference), a where table (which rooms, with per-time-of-day probabilities), and optional ambient behaviors (little scripted moments — a line of speech or an action — triggered periodically or on a status change). Encounter cards also carry their own portrait and Portrait Prompt (Generate/Upload/Regenerate + ✨). Edits go through the GM box.

An encounter editor card with chance, interval, entities, and placement
An encounter. Its chance, interval and despawn rule, the entities it can spawn, per-room/time placement, and any ambient behaviors.

Quests

The DM Quests view shows the complete timeline — every beat, locked and unlocked, with its hidden trigger and any reward, under a Dungeon Master view banner. Editing quests goes through the GM box; because reshaping a thread can affect beats the player has already seen, the editor computes the impact and asks you to confirm before applying anything destructive, preserving unlocked state by beat id.

The DM Quests view showing the full beat timeline
The DM quest view. Every beat, locked and unlocked, with its hidden trigger and reward — the author's-eye view the player never sees.

The Art tab

The Art subtab is a production dashboard for filling in missing portrait art across the whole world in one place. It has two bottom inner tabs — Missing and Review — sitting at the foot of the panel like the World tab's Chunks/Regions tabs.

  • Missing gathers every catalogued thing that still has no image — people, monsters, items, flora, fauna, magic, and places — as cards, each with its details and (where present) its portrait prompt. A Filter by name box in the upper-left narrows the list.
  • A toolbar pinned to the bottom holds a single right-aligned gold Generate button. Pressing it batch-generates art for exactly the cards currently shown (anything filtered out is skipped), working one card at a time from the top. For a card with no prompt it first asks the GM to write one, then paints the image from it; each step is logged to the Logs tab and echoed in the status bar, and the card being worked shows an animated indicator in its header.
  • While a batch runs the button reads Stop — click it to halt after the current card. Each card's own collapsed/expanded state is preserved throughout, so you can open the ones you want to watch and leave the rest closed.
  • As each card finishes, its new prompt and image appear in place. When the batch completes, the button turns into a green Confirm: the freshly-arted cards stay on the tab for review until you press it, at which point they drop off the Missing list (they have art now) and the filter box clears.
TipFilter to a slice — say, just the monsters, or one region's places — then Generate, to art the world in reviewable batches rather than all at once. The Review inner tab is reserved for a forthcoming review workflow.

The Compendium as a DM

As a DM the Compendium gains authoring power over types, not just discovered instances:

  • Reveal all — a toggle that lists every world-defined entry, discovered or not, so you can curate the whole catalog. Undiscovered entries are badged as such. It reaches the Factions tab too, exposing every faction the world defines.
  • Per-type art & prompts — for People, Monsters, Items, Flora, Fauna, Magic, Places, and Factions, each entry gets ⬆/♻ portrait controls and a collapsible Prompt section with a ✨ GM-suggest button. These edit the shared type (the catalog template), not one live creature.
  • Places — a place's "type" is the live room; its prompt is the room's bannerPrompt and its portrait is the room banner (wide frame, painted across all six time-of-day slots).
  • Per-entry Lore — every catalogued kind (People, Monsters, Places, Factions, and the item-backed Items / Flora / Fauna / Magic) now carries a collapsible, DM-only Lore section: a box for the hidden lore, a box for the unlock condition, an "Unlocked for the player" toggle, and a Generate button that asks the GM to write both from the world's canon. Edits write to the type and every live copy by name. This is the being/place counterpart of the item lore described under Editing items.
BackfillWhen you set a type's image or prompt for the first time, the engine gently seeds it onto any blank same-named live instances — without ever overwriting a portrait or prompt you've already given a specific creature.
Two different "lores," kept apartThe per-entry Lore section above (a specific being/place/item's own hidden history, revealed in its detail popup once unlocked) is not the Lore subtab. The subtab is the player's growing record of world knowledge they've drawn out in play; it has no portrait, prompt, or authoring controls, and each entry shows the +N XP it awarded. Authoring a person's Lore section does not create a Lore-subtab entry, and vice-versa.
A People entry in the Compendium with its collapsible DM Lore section expanded
Per-entry lore for beings and places. A People card (DM view) with its Lore section open — the hidden lore, its unlock condition, an "Unlocked for the player" toggle, and a Generate button. The same section now sits on Monsters and Places entries too, mirroring Items.
Lore, as a DMThe Lore subtab behaves unlike the others. Lore entries have no portrait or prompt controls — they're pure knowledge, each shown with the +N XP it awarded. They aren't authored here at all: a player unlocks them only through earned conversation (the GM's loreDiscover; see Part III). The canon lore you seed when forging or expanding a world (the world's lore array of {title, text} entries) is behind-the-scenes fuel for the GM — it is not shown to players directly; it surfaces into a player's Lore tab only as they draw pieces of it out in play. With Reveal all on, a DM additionally sees the world's canon lore listed as "Undiscovered", so you can review everything the GM has to work with.

Growing the world

You can ask the GM to author a brand-new region on the fly. It returns a self-contained world chunk — a few new rooms with fresh ids and exits, plus optional new beings, items, lore, quests, encounters, and classes — and an exitPatches object that stitches one new exit onto an existing "anchor" room so the region is reachable. The merge is strictly additive: it never overwrites existing rooms or quests.

{ "rooms": { "salt_marsh_edge": { "name": "Salt Marsh Edge", "description": "...", "exits": {...} } },
  "exitPatches": { "market_row": { "west": { "to": "salt_marsh_edge", "description": "a reeking track" } } },
  "entities": {...}, "items": {...}, "encounters": {...} }

You can trigger this from the World subtab (generate with the GM, or paste a chunk and Merge) or, in play, with the DM-only command expand the world <brief>. DMs also have two other in-play commands: unlock the quest beat <name> and lock the quest beat <name>.

The World subtab for merging chunks, generating regions, and exporting
The World subtab. Generate a region with the GM, paste and merge a world chunk, or export the whole world.

Building one region: the Region Builder

Where a world chunk grows the map in general, the Region Builder (World › Regions, select a region, then Build Region) develops one region on its own terms. It's a brief — description, climate, theme & premise, tone, scope, art style, rules of this place, prologue, narrative, and the beings that belong there — that steers what the GM writes for this region only; any field left blank inherits the world's own answer. Pressing Build Region asks the GM to write that region's rooms, beings, items, quests, encounters, and (optionally) lore from the brief, and merges the result straight into your world. The brief itself is authoring context and is never shown to the GM during play. Export Region / Import Region save or load a region — its brief and everything in the world that belongs only to it — as its own JSON file; a region file doesn't yet carry dungeons, which are built and placed separately with the Dungeon Builder.

OOC meta-commands (//)

For testing and debugging, a DM can prefix a line with // to issue an out-of-character directive that changes the live game state directly — no story turn, no GM call, no time passing. These are instant and DM-only: a non-DM who types one is simply told the feature is DM-only (the engine refuses it — no state ever changes). This is the DM half of the two slash commands: a single / asks the Field Guide (app help, open to everyone), while the double // is this DM debug console. Type a bare // in play for the full list, or // guide to open the Dungeon Master's Guide.

WhatExamples
Attributes// str +2 · // set dex 14 · // raise con by 3
Health & mana// set hp 50 · // mp +5 · // set maxhp 200 · // heal · // kill
Coin, XP, fame// gold +100 · // xp +150 · // level up · // set fame 500
Status effects// add status poisoned con -2 for 30 · // remove status poisoned · // clear statuses
Spells & skills// learn spell fireball · // forget spell light · // learn skill lockpicking
Alignment & travel// set alignment Lawful Good · // goto village_square · // teleport The Old Mill
Build world & beings// add an abandoned house to the east · // add a goblin warlord with a rusted axe · // spawn two skeleton guards
Inspect & delete// list the chest · // list goblin · // delete gold ring · // delete goblin warlord
Recolour the app// make this world's interface frozen and blue · // reset the palette

Each directive echoes in the story panel and prints a one-line confirmation of what changed; the phrasing is forgiving (set … to N, … +N, raise … by N, and bare … N all work). Status effects added this way carry the same optional stat modifiers and timed durations the GM can assign, so they flow into effective attributes and expire on the world clock exactly like ones earned in play. Learning a skill via // bypasses the class gate so any system can be exercised.

Inspect & delete// list <object> dumps every data field of an in-scene thing — a being or item named in your current room (containers are searched), or room/player/world — as a collapsible table, for low-level debugging. // delete <object> permanently removes a named item, NPC, or monster from your current room (a being is matched first, then a floor item, including one tucked inside a container). Both are instant, local, and need no API key. Deletion can't be undone, so it's an authoring/testing tool — a being that's part of an active fight must have the fight ended first.
GM fallbackAnything the built-in parser doesn't recognize is handed to the GM to interpret (this one needs an API key). The GM translates your free-form request into the same debug directive the engine applies — no narration, no turn, no in-fiction refusals — so open-ended asks work too: // give me a flaming greatsword and poison me for an hour, or // max out my stats and make me legendary. It sees the current character state plus the valid alignment, spell, skill, and room names, and reports exactly what it changed. Without a key, an unrecognized line just points you at // help.
Building the world by walking itA // line that adds a place in a direction// add an abandoned house to the east, // build a shrine cave down — has the GM author that location (its rooms, the NPCs and items inside, descriptions, lore, and image prompts) and stitch it onto your current room in the named direction, with a return exit back. It merges straight into the live playthrough and persists, so you can grow the map by travelling into what you just made and building onward from there. Needs an API key. If that direction is already an exit, the DM is asked to pick a free one; the connection is always guaranteed even if the GM's stitching is imperfect.
Populating a room with beingsA // line that adds a creature or NPC with no direction// add a goblin warlord with a rusted axe, // spawn two skeleton guards, // add an npc herbalist named Mara — has the GM author the being(s) you describe (full stats, class abilities, inventory, aggression, kind labels, lore, and a portrait prompt) and drop them straight into your current room, ready to fight or talk to. Lead with a kind word the parser knows — monster, creature, beast, enemy, npc, guard, merchant, undead, spirit, goblin… — or a common creature type; naming a direction instead builds a new room (above). Needs an API key. The being spawns live and is saved with the world, and the DM editor's NPC/Monster tabs can refine it further.
Recolouring the appA // line asking to change the interface's look — // make this world's interface frozen and blue, // give the UI a warmer, autumnal palette — has the GM author a palette for the sixteen editable CSS colour variables (the app's chrome, not the world's art style — those are different things) and applies it live. Only variables the palette editor itself offers are accepted, and only values it would accept; anything else is dropped and named in the confirmation rather than silently ignored, and the GM is told the result must stay readable (no setting text and background to the same colour). It rides with the save like the rest of the palette, so it never touches the login screen or the world's own built-in look. // reset the palette returns to the default. Needs an API key.

Forging a new world

The New World button on the title screen opens a standalone editor — "Forge a New World" — for building a world from scratch (anyone can reach it, not just DMs). You give it a Name, a Theme & Premise, a Tone (Dark Fantasy, High Fantasy, Grimdark, Heroic Adventure, Gothic Mystery, or Whimsical Folklore), a Scope (Small 4–6 or Medium 8–12 rooms), an optional World Rules, an optional Prologue, and an optional Narrative.

These sections build on one another, each grounding the next so the setting stays cohesive: the Tone informs the Name; the Name informs the Theme & Premise; the Theme & Premise informs the Art Style and the World Rules; the World Rules inform the Prologue; and the Prologue informs the Narrative. When you forge a world with only a Tone chosen, the Game Master invents each field in that order. The Narrative is your loose summary of the world's stories, plots, and quests — an over-arching narrative and its threads. It is never shown to the player; the Game Master draws on it heavily when crafting quests and plots (and the people, places, and items they hinge on), both at generation and during play. Each optional section carries its own ✨ Generate button to have the GM draft it from everything above it.

  • Create Prologue — the GM drafts a 2–4 paragraph prologue, inventing a Name/Theme first if you left them blank.
  • Narrative → ✨ Generate — the GM drafts the world's narrative from the name, theme, tone, World Rules, and (especially) the Prologue, which informs it.
  • Generate World — the GM forges the whole world; the result fills an editable World JSON box (a syntax-highlighted code editor, themed to match the game, with a plain-textarea fallback if the editor library can't load).
  • Save World — validates the JSON (it must actually load as a world, with a starting room and at least one class), then keeps it in your browser's saved-worlds library (IndexedDB), keyed by the world's Name. These are authored worlds you can reload into the editor later — not saved games. Give the world a real name first (the placeholder "Untitled Realm" is rejected); saving the same name again overwrites that library entry.
  • Export World (the darker button beside Save) — validates the same way, then downloads the world as a file on your drive. That file is what you Import Game from the title screen to play.
  • Import World (the darker button beside Export) — opens a file dialog and loads a world JSON previously written by Export World straight back into the editor. It does not build or start the world — it drops the saved world JSON verbatim into the box and repopulates the form fields (Name, Theme & Premise, Tone, Scope, Art Style, Prologue) from the saved editor block, so you can pick up exactly where you left off. Any validation issues (missing starting room, no classes, …) are surfaced so you can fix them before saving or editing.
  • Back to Login — returns to the title screen, where you can Import what you saved.
The Forge a New World editor
Forge a New World. Describe the theme, tone, and scope; have the GM draft a prologue and generate the world; review the JSON; then Save.

Import / Export

From the Editor's World subtab, Export World downloads the active world in a versioned envelope; Import Game on the title screen loads one back (it also accepts a bare world object). Importing a world always starts a fresh game on it — whereas importing a saved game file (from the toolbar's Export Game) continues that playthrough.

{ "format": "thelostrealms.world", "formatVersion": 1,
  "worldVersion": "1.0.0", "exportedAt": "2026-07-05T12:00:00Z",
  "world": { /* rooms, catalogs, classes, lore, quests, encounters, ... */ } }

Where a world's pictures live

A world's art and sound are the bulk of its weight. A generated banner, item icon or music track can be stored two ways: inline, as the bytes themselves written into the world file, or as a reference — a short link to a copy the vault is keeping for you. Both play identically. The difference is what happens to the file on your drive, and it is large: one measured world weighed 43 MB inline and about a quarter of a megabyte once its art moved to the vault.

That is why the detached editor's header has two buttons that both download a world:

  • Export World — writes a portable file. Any art held as a vault reference is pulled back and embedded on the way out, so the file is self-contained: it will open on another machine, on someone else's vault, or on none at all. It is also big.
  • Download World — writes the world as it stands, leaving vault references as references. Small and quick, and the right choice for a backup or for version control. It needs that vault to be reachable to show its art, so it is not the file to hand to someone else.
TipSharing a world, or archiving it somewhere the vault may not outlive? Export World. Keeping your own copy, committing it, or moving it between your own sessions? Download World.

Tools › Remote Embedded Media is what moves art the other way. It walks the loaded save, uploads every embedded picture and sound to the vault once, and swaps in references — it counts them separately before it starts, so you can see what you are about to move. Identical files are stored once no matter how many places use them — an item's icon usually appears on the catalogue entry and on every copy of the item lying in a room — so a world often shrinks by more than its art alone would suggest. Media already stored as a remote link is left alone: the tool moves embedded bytes, it does not fetch other people's URLs.

When it finishes it says what is still embedded, by field. That last part is not decoration: the tool only knows to move a fixed list of fields, so anything carrying data in a field nobody listed would otherwise sit there invisibly while the save looked clean. The Logs tab lists every offending field path.

NoteA world whose pictures point at someone else's image service costs nothing to store and is not really yours — if that service changes or disappears, the art goes with it. Uploading your own images, or generating and then remoting them, keeps a world whole.

The detached editor

Right-click the Editor tab and choose Detach to pop the editor into its own window — a second view of the same session, handy on a second monitor. Because the session snapshot lives in IndexedDB (which fires no cross-window change event), each save also writes a tiny signal that the detached window watches; it then re-reads the snapshot and rebuilds only the world, leaving the main window's play (your character, story, clock) untouched. Under file:// the two windows can't share storage, so serve over http://localhost for Detach to work.

Part III · The Game Master

Game MasterWhat the GM is

The Game Master is not a person — it's the AI that narrates every turn. The game calls Anthropic's Messages API directly from your browser, using your own API key and the model you pick at login — claude-sonnet-5 (the default) or claude-opus-4-8. Story turns carry the recent conversation history (trimmed to the last 40 messages) so the tale stays coherent; the many authoring calls (writing a background, forging a region, suggesting an image prompt) are standalone single-message calls that never disturb the ongoing story.

Security note (by design, for local play)The API call runs in the browser with anthropic-dangerous-direct-browser-access, meaning your key is used client-side. This is convenient for playing solo on your own machine, and the code itself flags that a shared or public deployment should route calls through a backend proxy instead of exposing the key.

The dossier

Before every call the game assembles a fresh system prompt — the GM's briefing — from live state. It includes:

  • Role & tone — that it is the Game Master of this dark-fantasy world, must enforce the rules, and must reply with structured JSON. A verbosity directive reflects the player's verbose toggle.
  • Canon — the world's prologue and a summary of its lore, for flavor and NPC dialogue (never to be info-dumped).
  • Quest threads (GM eyes only) — every quest, its private summary, and each beat's locked/unlocked status, hidden trigger, and reward note.
  • Current state — your name, level, class, gender; the in-world date, time, and time-of-day windows; HP/MP/wealth; your six attributes and the derived persuasion/fortitude bonuses; inventory; the current room and its time-aware description; its exits (with a count of undiscovered secret ones); and its items.
  • Per-being dossiers — stats, kind classes, abilities and gear for each present creature; for NPCs, also routine, appearance, personality, speech style, and reputation-gated history/motivation/secrets, plus GM-only lore.
  • Item lore (GM eyes only) — for every item in the room or your inventory that carries lore, its hidden history, whether it's already unlocked, and — while still locked — the unlock condition the player must satisfy, so the GM knows when to fire itemLoreUnlock.
  • Factions in the room (GM eyes only) — every faction represented by a present being, each flagged revealed or hidden. A hidden faction is a secret the GM must not name, confirm, or hint at until its reveal condition is met; the dossier includes that condition so the GM knows exactly when to fire factionReveal.
  • The world map — every room and its connections, so the GM can reason about routes beyond the next door.

The rules it plays by

The dossier injects a numbered ruleset. The ones you'll feel most as a player:

  • Narration — interpret natural language into an action; answer in 2–4 second-person sentences; wrap NPC speech in quotes; never invent an exit that isn't listed.
  • Secret exits — reveal a hidden passage only when you genuinely search/examine, and then via a revealExit (not by silently moving you).
  • Combat & durability — damage scales by class and level; CON governs resistance to hazards distinctly from HP.
  • Creature-kind feasibility — the being's classes govern what's physically possible: you can disarm or dismember a humanoid skeleton, but a blade passes through an incorporeal spirit; constructs and undead don't bleed or take poison; beasts can't be reasoned with.
  • Reputation — interactions emit proportional reputation changes and honor the disclosure tiers; a high CHA increases gains.
  • Quests — check the threads each turn and unlock at most one beat when its trigger is truly met, weaving it into the prose (never announcing "quest unlocked"), and deliver its reward that turn.
  • Faction reveals — a faction is discovered through play, never on sight of a member: reveal one (via factionReveal) only when the player's action genuinely satisfies that faction's hidden reveal condition — typically drawing it out in conversation — and weave it into the prose rather than announcing it. Until then, treat a member as just themselves, never as belonging to a named order.
  • Time, discovery & conditions — pass time when the fiction calls for it; record first encounters into the Compendium and hard-won knowledge as lore (with XP); apply player status conditions with optional stat effects and durations.

The language of change

Each story turn, the GM returns a single JSON object. The prose the player reads is just the narration field; everything else is machinery the engine applies to the world. A trimmed example:

{
  "narration": "The grate shrieks open. Cold air rises from the dark below, and the ...",
  "stateChanges": { "revealExit": "down", "hpDelta": -3, "xpGain": 15 },
  "reputationChange": { "entityName": "Aldric", "delta": 4 },
  "compendiumDiscover": { "category": "places", "id": "cellar", "name": "The Cellar", "description": "..." }
}

The complete field vocabulary is catalogued in Appendix A. In brief: top-level fields carry the narration and the higher-order effects (reputation, quest unlocks, discoveries, lore, player/NPC status, skill-check results, who's speaking); a nested stateChanges object carries the concrete adjustments (HP/MP/currency deltas, time skips, XP, movement, exit reveals, picking up / adding / dropping items, alignment drift, a skill learned in-fiction); and a nested roomUpdates object handles removing or killing beings.

Skill checks & alignmentWhen the player attempts something a learned skill covers, the GM fills the top-level skillChecks array — one entry per skill tested, each with the DC it chose, the d20 it rolled, and the outcome. The engine recomputes the totals from the player's real modifiers (so the arithmetic is honest), renders the manifest, and awards xp on success. An action with no matching skill leaves skillChecks null and takes the flat 5% floor instead. Separately, stateChanges.alignment lets the GM quietly nudge the player's moral alignment one step when their conduct has durably shifted it — never announced in the prose.
Discovery vs. LoreTwo different fields feed the Compendium, and the GM is told to keep them distinct. compendiumDiscover is for cataloguing — it fires on any genuine first encounter (a person met, a place entered, an item found, a creature fought) and files the entry under the matching tab. loreDiscover is for knowledge earned — it fires only when the player draws out a specific, hard-won piece of history, secret, or legend through real questioning: asking the right things, earning enough trust or reputation, or piecing clues together. The GM is explicitly instructed not to award lore for facts freely volunteered, small talk, common knowledge, or anything the player already learned, and to honor reputation gates — if an NPC wouldn't reveal something yet, no lore is emitted. Each piece is granted once, with an XP value proportional to how hard it was to extract: roughly ~5 for something minor coaxed out easily, ~10–20 for a real secret that took trust or clever questioning, and ~30–50 for a deeply guarded or pivotal revelation. A single turn may emit both fields. Both NPCs and some items hold lore.

Authoring directives

Beyond narration, the GM is the engine behind every "ask the GM to…" affordance. Each is a focused, standalone call with a strict JSON contract:

When you…The GM is told to…
Create a being or itemAuthor a classes taxonomy (1–3 kind labels used for UI grouping and action-feasibility) and a private lore line consistent with canon.
Populate a roomUse inline "minor": true items for incidental dressing (kept out of the catalog/Compendium) and reserve catalog items + references for things that recur or matter.
Expand the worldReturn a self-contained region as a world chunk with exitPatches stitching it onto an anchor room.
Generate a portrait/banner promptWrite one vivid text-to-image prompt from the subject's name and details, shaped for a portrait, an object study, or a wide scene.
Write your background / summaryReturn strictly one of: a portrait prompt, a background+summary, a summary, or a polite decline — never touching stats, items, or the world.
Edit quests / classes / encountersReturn scoped JSON for just that system, preserving unlocked quest state by id.

Images

Prompts become pictures via pollinations.ai, which the game then actually loads before committing (so a failed generation never sticks). Three frame shapes are used: portraits 512×640, item studies 512×512, and room banners a wide 896×512. A Pollinations token, if set, unlocks the authenticated tier; otherwise the free keyless tier is used.

A turn, end to end

  1. You type an intention and press Enter; your words are echoed into the story.
  2. A few phrases are handled locally (like verbose on); otherwise the input locks, the typing indicator appears, and the status bar reads Thinking….
  3. The request — system dossier plus recent history — is sent to the model.
  4. The reply's text is extracted and parsed (tolerantly — stray prose around the JSON is stripped).
  5. Hidden stat-training is banked; then stateChanges are applied before the prose prints (so a time-skip banner appears above the narration); expired statuses are swept; the speaking NPC's close-up is shown.
  6. The narration prints, followed by reputation, status, quest, Compendium, and lore updates as discreet notices — and the sidebar, character sheet, journal, and compendium re-render.

Throughout, the status bar narrates what's happening: "GM is painting a new portrait…", "GM is writing your background…", "GM is authoring a new region…", and so on.

The DM Logs tab recording engine and GM activity
The engine's ledger. The DM-only Logs tab records every GM hand-off and state change — the clearest window onto what the Game Master actually did each turn.

Robustness & known quirks

  • Tolerant parsing — the engine extracts the outermost balanced JSON object even if the model wraps it in stray text or code fences, and every handler guards its inputs (checking arrays, verifying that a target room/item/being exists, clamping numbers) before mutating anything.
  • Graceful failure — a bad HTTP response (e.g. a rejected key) surfaces a clear message; a failed authoring call returns an error with the raw text rather than corrupting state; a failed image load is simply never committed.
  • Two quirks worth knowingentityKilled is only applied when the reply also includes a roomUpdates object, and removeItem appears only as a "do not use" note, not as a handled field. Both are edge cases you're unlikely to hit in normal play.
Appendices

Appendix AChange-field reference

The full vocabulary the GM can emit on a story turn. Top-level fields first, then the nested objects.

Top-level

FieldShapeEffect
narrationstringThe prose shown to the player.
stateChangesobjectConcrete world adjustments (see below).
roomUpdatesobjectRoom-level being removal (see below).
reputationChange{entityName, delta}Shift an NPC's opinion; positive deltas get your CHA bonus, clamped to ±100.
questUpdate{questId, beatId, npcs[]}Unlock one beat, stamp its time, tag involved NPCs, update Journal/Compendium.
compendiumDiscover{category, id, name, description, imageUrl}Add a Compendium entry (deduped by id).
loreDiscover{id, title, text, xp}Record lore and award its XP once.
itemLoreUnlockitem nameUnlock a locked item's hidden lore once the player earns it; reveals it in the item's details.
factionReveal{ref, entityName}Reveal a still-hidden faction (by id) the player has genuinely discovered this turn; records it once in the Journal › Factions timeline and shows a discovery note.
statEffects[{stat, delta, reason}]Bank hidden stat-training progress.
skillChecks[{skill, dc, roll, outcome}]One entry per learned skill the action tested. The engine recomputes total = d20 + live ability modifier + proficiency, renders the check manifest, and awards skill xp on success. Null when no learned skill applies (then the unskilled 5% floor governs).
statusChanges[{entityName, status}]Override an NPC's live status.
playerStatusChanges{add[], remove[]}Add/remove player conditions (optionally with stat effects & a duration).
speakingNpcstringName the NPC speaking this turn (triggers the close-up portrait).

Nested in stateChanges

FieldEffect
hpDelta / mpDeltaAdjust health / mana (clamped).
goldDelta / silverDelta / copperDeltaAdjust the three currency pools.
timeSkipUntilAdvance the clock to a named time of day (engine does the arithmetic).
timeSkipHoursAdvance the clock by a relative number of hours.
xpGainAward XP (handles level-ups and the hidden stat review).
fameDelta / fameNudge the hidden Fame value for a notable deed / override the derived Fame label.
alignmentSet the player's moral alignment to one of the world's exact alignment names — used sparingly, one step at a time, only after a durable behavioural shift. Never announced in narration.
skillLearnedA skill id the player just learned in-fiction (a mentor's lesson, a tome finished in the narration). Adds it at Level 1, honoring the class gate. Usually null — normal book-reading is handled by the engine.
moveToRoomMove the player to a room (if it exists).
revealExitPromote a hidden exit into a real one.
pickupItem / dropItemMove a named item between the floor and inventory.
addItemMint a brand-new item into inventory ({name,type,description,value,quantity,icon,classes,lore,loreKey}). Any lore starts locked; loreKey notes how the player unlocks it.

Nested in roomUpdates

FieldEffect
removeEntityMark a being gone.
entityKilledMark a being slain (only applied when roomUpdates is present).

Appendix BReputation & time at a glance

Reputation tiers

TierScore
Devoted≥ 40
Friendly≥ 20
Warm≥ 5
Neutral−4 to 4
Wary−5 to −19
Hostile−20 to −39
Enemybelow −39

Times of day

PeriodHours
Dawn 🌅05–08
Morning 🌤️08–12
Afternoon ☀️12–17
Evening 🌇17–20
Dusk 🌆20–22
Midnight 🌙22–05

Calendar: twelve months — Frostmark, Emberwane, Thawmoot, Greentide, Bloomrest, Suncrest, Highflame, Embergold, Harvestfall, Witherfall, Graymist, Hollowtide. Seven weekdays — Sunsday, Moonsday, Ashday, Wyrmday, Thornday, Forgeday, Hallowday. Time runs at ~24× real time; a new game starts 09:00, 1st of Frostmark, Year 437.

Appendix CGlossary

GMGame Master — the AI (Claude) that narrates and adjudicates. Not a person.
DMDungeon Master — a human author with the DM box checked; edits and builds worlds.
CompendiumYour discovered bestiary, catalog, gazetteer, and lore, filled in through play.
JournalThe timeline of story beats you've unlocked; no visible objective list.
BeatA single unlockable step of a curated quest thread.
FactionAn organization beings (and the player) can belong to, each membership carrying a role. Discovered only through play, via the GM's reveal, and gated by a hidden reveal condition.
SkillA learned proficiency (Lockpicking, Herbalism…) read from a book, gated by class or open to all. It levels with successful use; the GM rolls its checks against your live attributes. See Skills.
ProficiencyA skill's level-based bonus added to its checks (Level 1 → +2, up to Level 5 → +6).
SpellA magical effect from the world grimoire; learned and cast (for an MP cost) on the Spellbook.
AlignmentThe player's moral position — one of the nine classic alignments, starting True Neutral — drifted one step at a time by the GM in response to durable conduct.
classesA being's or item's kind labels (e.g. undead, humanoid) — used for grouping and action feasibility. Distinct from type. On a skill, the class gate: empty = anyone may learn; naming classes restricts it.
typeAn item's single mechanical slot (weapon/armor/consumable/key/misc, plus book and magic) or a being's role (npc/enemy/merchant).
teachesOn a book item, the id of the skill reading it unlocks (the book is consumed on a successful read).
minor itemIncidental, interactable room dressing kept out of the catalog and Compendium.
World chunkA JSON fragment of new rooms/beings/items that merges additively into the world.
exitPatchesThe part of a world chunk that connects a new region to an existing room.
BannerA room's wide scene art, stored per time of day.

Appendix DAbout this guide

The Lost Realms is an HTML game (text_adventure.html), optionally served — with its keys — by the Server Vault in server/, and with the Dungeon Builder living alongside it in Modules/Dungeons/. This guide is a companion document, styled in the game's own palette and typefaces (Cinzel and Fira Code, with EB Garamond for long-form reading). It's fully self-contained bar the web fonts, which fall back gracefully offline.

A living documentThe Realms evolve. This guide describes the game as it stands and should be revisited when systems change — the Journal's Professions subtab and the additional image/voice providers are the seams where the game is most likely to grow next. Legends, Tasks and the Equipment tab have since stopped being placeholders and are written up under The Journal and What you wear & wield. When in doubt, the source file is the final authority.

The Lost Realms · Field Guide · styled after the game itself.

↑ Top