The Saga of Midgard

As sung by the skald, from the server's own records

How the saga is made

Nobody writes these chapters by hand. Here is the whole path, from a swing of an axe to a verse on this page.

The ServerValheim, on a small cloud machinethe living worldSagaScribe modwatches the world every few secondsevents.jsonlThe Scribegroups events into play sessionsa finished sessionThe SkaldClaude writes the chaptera chapter in MarkdownSite builderturns chapters into web pagesHTMLThis websitesaga.marzipan-solutions.comSaga Biblenames & grudgesreadsupdates

1. The server

Midgard runs on a small rented cloud machine, in a container with the Valheim dedicated server. It's a private world, password only. The server is the one place that sees everyone, so it's where the record is kept.

2. The SagaScribe mod

A small mod written for this server, loaded with BepInEx, watches the world every few seconds and writes one line to a log file for each thing worth remembering:

Some things the server can't see. A death is worked out on the dying player's own computer, so the record never says what killed you, only who was nearby. The skald is told this, which is why the Greylings are only ever suspected.

3. The Scribe

A small program on the same machine reads that log as it grows and groups it into play sessions. A session ends when the server stops, or ten minutes after the last Viking logs off. A long quiet evening of building stays one chapter.

4. The Skald

When a session ends, the Scribe hands its events to Claude, an AI model made by Anthropic, playing a Norse skald. The skald may dramatize how things happened but may not invent anything that isn't in the log. A chapter runs 300 to 600 words.

5. The Saga Bible

Before writing, the skald reads the Saga Bible, and afterwards a second pass updates it: characters and their epithets, tamed companions, holdings, places found, grudges, unfinished business and the death tally. That's how a nickname coined in chapter one is still used in chapter ten.

6. This website

After every chapter, the pages are rebuilt as plain HTML and served as-is. There are no accounts, trackers or ads. Each session costs about five cents in AI time.