
Turning NPC conversation logs into readable devlog posts
The game exports every conversation as JSON. Here is how I get those onto the devlog without reformatting a thing.
Every conversation in the game gets logged as structured JSON: who was there, what each line was, and any context the engine fed the model. When something funny or revealing happens in a playtest, I want it on the devlog. The question was how, without it becoming a chore.
The options I did not take
A screenshot is the obvious move, and it is the worst one. You cannot read it on a phone, a screen reader gets nothing, and you cannot copy a line out of it to quote later.
Hand-formatting each transcript as Markdown blockquotes is the other obvious move. It works, but every post ends up slightly different, and you lose the visual difference between the player talking, an NPC talking, and the engine’s internal notes.
MDX does the boring part
This site’s posts are not Markdown files, they are MDX files. MDX is Markdown that can also import and render components. Astro’s content collections are happy to treat an .mdx file as a blog entry, which means inside a post I can write normal prose and then drop a real component between two paragraphs.
So I wrote one component, <DevDiary>. It takes the export more or less as-is: a day label, and a list of conversations, each with its participants and a transcript. Player lines, NPC lines, and “context memory” notes each render in their own style.
Here is one, rendered from about a dozen lines of data pasted straight into this post:
Chronicles: Day 1
forum Encounters
Spoke with Lyra
[08:16]Lyra has heard the rumor about shadows biting near the forest edge. She is heading home to rest.
Oh, hello there. It's been a strange day, what with people whispering about shadows near the forest edge. You aren't planning on heading that way tonight, are you?
What's wrong with this place?
It has a way of unsettling even the locals. If you're looking for answers, keep to the main paths. The woods aren't what they used to be.
Why this shape is worth it
The export format and the component’s props are nearly the same thing, so posting a clip is paste-and-wrap. Nothing gets retyped, so nothing drifts.
When I want a new kind of content in a post, a stat block, a schedule, a before-and-after, I write one small component and every future post can use it. The post itself stays plain text: it diffs cleanly in git, it degrades to something readable if the component ever breaks, and eventually it is the kind of thing I can paste into a browser CMS and publish without touching the repo.
That last part is the actual goal. This was the first thing I built on Astro, mostly to see if the idea held up. It did.