Loremaster — Devlog Part 2 of 3: The DM Screen
Part 1 was about giving every note in my vault a home — type-aware cards, dossiers, the whole "the vault made visible" story. That was foundation.
Part 2 is where it stopped being a browser and started being a thing I can actually run a session from. Everything here is session-focused: how session notes display, what sits next to them at the table, and how the tools I use during play got pulled into the same window.
The problem, session edition
Running a session with Obsidian open goes something like this: you're mid-scene, an NPC gets mentioned, you Cmd+O to open their note, you lose your place, you fumble back to the session document, someone rolls initiative, you need to check the party's passives, someone else asks what happened last week and you're pawing through five recap files. Cognitive load. Tab-switching. Broken flow.
I wanted the session note itself to be the DM screen. Everything I need should be on the same page as the prose I'm reading, or one click away without leaving it.
Unifying sessions
First problem: my vault had two note types tangled up. type: session (the actual play-text — Opening, Investigating, all the scene prose) and type: recap (a concise "what happened" summary written up after). They were showing as two separate sections on the home page, which was silly — they're the same thing conceptually, just two views of one session.
So they got unified into a single Sessions section: a list grouped by campaign, sorted oldest-first, with date + party-level pills on each entry. The session note is the primary row you open. The matching recap hangs underneath as a collapsible child, closed by default, click the caret to see it. Pairing works on campaign + session_number — both note types carry those, so I can rename files freely without breaking anything.
Previously, on…
Every session note now has a ":book: Previously — Session N Recap" pill sitting between the metadata panel and the body. Collapsed by default. Click it and it expands its own window showing the previous session's recap text inline — with an "open full recap →" link if you want to jump to the complete note.
The logic: same campaign, previous date. So opening Session 5 pulls Session 4's recap. First session in a campaign correctly gets no panel. It's campaign-aware — a session in "Dungeons of Mayhem" pulls the previous Mayhem recap, never one from "Echoes."
This is exactly the "wait, what happened last time?" panel I always wanted. No file-fumbling. It's right there.
Header pills, revisited
Body headings in every note render as color-coded pills sized by heading level — H1 gold and largest, H2 rose, H3 periwinkle, etc. This shows up on session notes especially well because sessions have deep structure (Scene → Beat → Aside).
All open by default; fold what you don't need. Folds persist per-note in localStorage — fold a section, come back later, still folded. Fold it in another note, this note stays how you left it. Browser-local memory, keyed by the note's URL.
The DM cue
I use Obsidian's ==highlight== syntax in session notes to mark moments where I need to prompt the players — "roll initiative," "Perception check DC 15," "give me an Investigation check." Loremaster now renders these as crimson inline pills with a d20 icon in front. Deliberately unlike the gold header pills, so the eye locks onto them as do a thing at the table rather than this is structure.
They size to their text — a two-word cue is a small pill; a full sentence cue is a longer pill. Standalone on their own line becomes visually prominent. Inside a sentence stays inline. Whatever fits the writing.
The side panel: only what's on screen
This is the piece I'm most excited about, and it took two passes to get right.
The idea: as you scroll through a session note, the right side of the page shows compact reference cards for every wikilink currently visible on screen. Scroll into a scene where the party meets Vaeriel at the Temple of Sehanine, and cards for Vaeriel Duskwoven, the Crescent Veil, and the Temple appear on the right. Scroll into the next scene about the Loreforge District, those cards leave and new ones pop in. You're always looking at reference for where your eye actually is.
Under the hood, this is the browser's IntersectionObserver watching every wikilink in the prose body. As they cross the viewport edge, a Map of visible targets updates, and the panel shows the matching mini-cards.
Each card is type-aware and compact: - NPCs get race, role, faction chip, and AC/HP tiles - Locations get the tier label (City / Village / etc.) - Orgs get the org type; entities get their rank; lore gets its category - Colored left-edge stripe by type — blue for NPCs, rose for PCs, amber for locations, purple for orgs, sage for lore, gold for entities - Orphan links (wikilinks to notes that don't exist yet) show as dashed dim cards, so you spot them without losing them
Hover any mini-card and a richer preview pops up to the left, showing the portrait and more useful info — for an NPC, the full stat strip, faction, location, alignment, and a personality trait quote. Enough that you don't need to click through to the full dossier for a quick reference.
The dynamic cap
Original design was "cap at 6 visible cards, +N more." Changed my mind partway through — a hard number felt arbitrary. Better rule: show all cards whose links are on screen, but never let the panel grow taller than the visible viewport. If they'd overflow, trim from the bottom and show a "+N more on screen" indicator for the rest.
So the cap is now tied to your actual screen height. On a tall monitor you might see 9 cards; on a laptop, 4. It recalculates on window resize. Feels right — the panel earns its space naturally instead of being arbitrarily walled off.
The tool integration
Two things I use constantly while running sessions: my NPC Conjurer (generates NPCs with names, personalities, and voice cues by region — for when the party talks to a random innkeeper I hadn't planned) and my Loot Roller (rolls treasure by party level and rarity from a ~1000-item catalog). Both are standalone HTML apps I built earlier. Both were tabs I kept flipping to during play.
Now they live inside the session panel, below the linked-cards section, as collapsible iframe panels. Closed by default so they don't dominate the page. Click :performing_arts: to expand the NPC Conjurer, click :moneybag: for the Loot Roller. Each opens right there, fully functional, with all their own CSS and interactivity intact. A small ⧉ pop-out link on each opens the tool in a new tab if I need it full-screen.
Two nice properties of the iframe approach: the tools stay isolated (their styles can't collide with Loremaster's), and they stay updatable independently — I can improve the NPC Conjurer as a standalone app and just drop the new HTML in without touching Loremaster's code.
The iframes are also lazy-loaded — no fetch until you expand the panel. Session pages stay fast even with heavy tools sitting there ready.
Expand state persists per-session in localStorage, same pattern as the header folds. If I had the loot roller open on Session 3 and reload the page, it's still open. Open Session 4, both default closed again.
What this actually feels like at the table
The workflow is now: open the session note, and everything I need is right there. The metadata panel tells me what session, what date, what party level. The "Previously" pill gives me last week's recap without leaving. The header pills let me navigate scenes at a glance, folding what's done. The prose body reads naturally with crimson d20 cues telling me when to prompt for rolls. The right panel shows me who's in the current scene, with hover previews for stats. When I need to roll loot or generate a random NPC, I expand the tool below and roll right there.
Zero context switches. One page. The vault, my session, my tools, and my references — one integrated screen.
What's next
The foundation and the DM screen are both done. What I'm thinking about next:
- Session Mode (Step 4 in my original plan): a live initiative tracker + HP tracker overlay for combat, using the AC/HP/init we already surface on the mini-cards
- Child-locations panel on location dossiers (a Region note auto-listing its cities and villages)
- Light/dark toggle — the theme is already CSS-variable-driven, just needs the switch
- Rolling Companions (
type: companion) into their own section like PCs got
But honestly, the version that exists now is already what I set out to build. It's the DM screen I've always wanted. Everything past this is polish.
If you're a DM using Obsidian and any of this sounds like your problem too — let me know. I'll clean up the code and share it when the base is stable.