[GH-ISSUE #6937] [Feature]: Add a campaign-scoped World History timeline to Game Mode #3887

Closed
opened 2026-10-21 06:08:27 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @SirAdoni on GitHub (Oct 1, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6937

Originally assigned to: @kolacheee on GitHub.

What problem does this solve?

Game campaigns need a readable, durable chronology for events that span sessions. Existing Campaign Memory and the Campaign Wiki organize records, but staging does not provide a dedicated World History timeline with explicit in-world dates, eras, certainty, places, and participants. Chat branching also needs clear rules so a new branch does not silently lose or inherit history that falls on the wrong side of its fork point.

Proposed solution

Add a user-authored World History view to Game Mode using the existing Campaign Memory record and mutation infrastructure. Let players create and maintain dated or undated historical entries, organize them by era/order, and associate entries with campaign characters and locations.

When a player branches a chat, carry forward only history snapshots that can be proven to predate the selected message cutoff. Remap copied character/location references into the new branch, preserve the source unchanged, and report entries that cannot be copied safely rather than guessing or silently dropping them. Keep this as an extension of Campaign Memory and the Campaign Wiki, not a replacement for either.

Alternatives considered

  • Keep chronology in ordinary notes or lorebook prose. This stores the information, but does not provide structured dates, eras, or links to campaign records.
  • Rebuild the timeline from transcripts whenever it is opened. That avoids copying authored records, but makes the result dependent on re-extraction and does not preserve user-reviewed entries as stable records.
  • Share the original records directly with every branch. That risks later edits in one branch affecting another and does not establish what existed at the selected fork point.

Additional context

This request is scoped to an editable campaign history and safe behavior when branching chats. It reuses the existing Campaign Memory mutation journal for persistence and revision history. Entries with ambiguous timestamps, invalid ownership, or unresolved links should remain visible as held items with a reason, not be guessed into the branch.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @SirAdoni on GitHub (Oct 1, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6937 Originally assigned to: @kolacheee on GitHub. ## What problem does this solve? Game campaigns need a readable, durable chronology for events that span sessions. Existing Campaign Memory and the Campaign Wiki organize records, but staging does not provide a dedicated World History timeline with explicit in-world dates, eras, certainty, places, and participants. Chat branching also needs clear rules so a new branch does not silently lose or inherit history that falls on the wrong side of its fork point. ## Proposed solution Add a user-authored World History view to Game Mode using the existing Campaign Memory record and mutation infrastructure. Let players create and maintain dated or undated historical entries, organize them by era/order, and associate entries with campaign characters and locations. When a player branches a chat, carry forward only history snapshots that can be proven to predate the selected message cutoff. Remap copied character/location references into the new branch, preserve the source unchanged, and report entries that cannot be copied safely rather than guessing or silently dropping them. Keep this as an extension of Campaign Memory and the Campaign Wiki, not a replacement for either. ## Alternatives considered - Keep chronology in ordinary notes or lorebook prose. This stores the information, but does not provide structured dates, eras, or links to campaign records. - Rebuild the timeline from transcripts whenever it is opened. That avoids copying authored records, but makes the result dependent on re-extraction and does not preserve user-reviewed entries as stable records. - Share the original records directly with every branch. That risks later edits in one branch affecting another and does not establish what existed at the selected fork point. ## Additional context This request is scoped to an editable campaign history and safe behavior when branching chats. It reuses the existing Campaign Memory mutation journal for persistence and revision history. Entries with ambiguous timestamps, invalid ownership, or unresolved links should remain visible as held items with a reason, not be guessed into the branch. ## Template check - [ ] I DID NOT read this template and provide the requested details.
Author
Owner

@SpicyMarinara commented on GitHub (Oct 1, 2026):

@kolacheee? Want to take a look at this?

<!-- gh-comment-id:5938767282 --> @SpicyMarinara commented on GitHub (Oct 1, 2026): @kolacheee? Want to take a look at this?
Author
Owner

@kolacheee commented on GitHub (Oct 1, 2026):

@SirAdoni, this overlaps with the Game Mode world generation I'm working on. That work is local for now because of the release hold, so here's how it fits before you start.

What mine does

  • A player can opt in to "Make a world" at setup. The Engine then generates places, groups and people, and the world's history from its founding up to "now": foundings, growth, leaders, rivalries, wars, disasters and lost places. Dated events from the chosen lorebooks are fixed points in that history.
  • Each history event has how many years ago it happened, a kind, a line of text, the places and groups involved, and flags for severe, building up, and fixed (from lore).
  • During play the world keeps moving with in-game time. What the party does and new facts are recorded through GM tags in the replies ([world: deed=...], [world: fact=...]). The GM can ask for a place's or a group's past with [history: place=...] / [history: group=...].
  • None of it is stored as records. It is recomputed from the setup seed and the replies, so swipes, branches and checkpoints get the right history without copying anything. A branch only has the messages before its fork, so it only has the deeds from before its fork.
  • Planned next: a World tab in the journal showing news that has reached the party, what is building up, the party's deeds and standing, and the notable past.

Where #6937 overlaps

  1. The view. A "World History" timeline and my "World" journal tab would be two history screens in one game. I'd rather have one. Your timeline could show the world's events next to the player's own entries, marked as coming from the world and read-only. Or my tab could link to your timeline. Either way works for me.
  2. Dates. A generated world counts years back from now, and its setting kit names its own calendar: what a year and a day are called, months, and an era. When a game has a world, it would help if an entry could be dated on that same scale and shown in the kit's calendar words, so player entries and world events fit on one line. Games without a world can keep your own eras.
  3. Places and people. World places and groups have stable ids, and generated people get a worldId on Game Mode's NPC records. If your entries link places and participants, keying on those ids where they exist (and on the stable NPC ids from #6696) would let an entry about a siege point at the actual town.
  4. GM tags. history is a reserved GM tag name in my work. If your feature adds GM tags, please use another name.

Branching

Your copy rules sound right. Some pointers from how staging handles this already:

  • POST /chats/:id/branch copies messages up to the cutoff with new ids. It keeps a sourceToBranchedMessageId map, which is what you'd use to remap anchors.
  • The game journal is trimmed the same way (trimJournalForBranch, by copied message ids and the first left-out message's createdAt).
  • Tying each revision of an entry to the message it was written at (rather than only the entry) would let a branch carry the last revision from before the fork, and drop an edit made after it, instead of all or nothing.

How they could work together

  • Keep your entries as the player's own canon and mine as computed. Neither should write into the other's store. In particular, please don't copy world events into Campaign Memory, or they go stale and double up on branches.
  • Later, on my side: a pinned player entry could become a fixed point for the world, the same way dated lore events already are. All I'd need is a way to read your entries (date, places, participants, certainty). I'd add that once your records are upstream.

I'll open the world PRs after the release (history, the deed ledger, the living world, then the journal tab), and I'll tag you so the exact shapes are visible.

<!-- gh-comment-id:5940288055 --> @kolacheee commented on GitHub (Oct 1, 2026): @SirAdoni, this overlaps with the Game Mode world generation I'm working on. That work is local for now because of the release hold, so here's how it fits before you start. **What mine does** - A player can opt in to "Make a world" at setup. The Engine then generates places, groups and people, and the world's **history** from its founding up to "now": foundings, growth, leaders, rivalries, wars, disasters and lost places. Dated events from the chosen lorebooks are fixed points in that history. - Each history event has how many years ago it happened, a kind, a line of text, the places and groups involved, and flags for severe, building up, and fixed (from lore). - During play the world keeps moving with in-game time. What the party does and new facts are recorded through GM tags in the replies (`[world: deed=...]`, `[world: fact=...]`). The GM can ask for a place's or a group's past with `[history: place=...]` / `[history: group=...]`. - None of it is stored as records. It is recomputed from the setup seed and the replies, so swipes, branches and checkpoints get the right history without copying anything. A branch only has the messages before its fork, so it only has the deeds from before its fork. - Planned next: a **World** tab in the journal showing news that has reached the party, what is building up, the party's deeds and standing, and the notable past. **Where #6937 overlaps** 1. **The view.** A "World History" timeline and my "World" journal tab would be two history screens in one game. I'd rather have one. Your timeline could show the world's events next to the player's own entries, marked as coming from the world and read-only. Or my tab could link to your timeline. Either way works for me. 2. **Dates.** A generated world counts years back from now, and its setting kit names its own calendar: what a year and a day are called, months, and an era. When a game has a world, it would help if an entry could be dated on that same scale and shown in the kit's calendar words, so player entries and world events fit on one line. Games without a world can keep your own eras. 3. **Places and people.** World places and groups have stable ids, and generated people get a `worldId` on Game Mode's NPC records. If your entries link places and participants, keying on those ids where they exist (and on the stable NPC ids from #6696) would let an entry about a siege point at the actual town. 4. **GM tags.** `history` is a reserved GM tag name in my work. If your feature adds GM tags, please use another name. **Branching** Your copy rules sound right. Some pointers from how staging handles this already: - `POST /chats/:id/branch` copies messages up to the cutoff with new ids. It keeps a `sourceToBranchedMessageId` map, which is what you'd use to remap anchors. - The game journal is trimmed the same way (`trimJournalForBranch`, by copied message ids and the first left-out message's `createdAt`). - Tying each revision of an entry to the message it was written at (rather than only the entry) would let a branch carry the last revision from before the fork, and drop an edit made after it, instead of all or nothing. **How they could work together** - Keep your entries as the player's own canon and mine as computed. Neither should write into the other's store. In particular, please don't copy world events into Campaign Memory, or they go stale and double up on branches. - Later, on my side: a pinned player entry could become a fixed point for the world, the same way dated lore events already are. All I'd need is a way to read your entries (date, places, participants, certainty). I'd add that once your records are upstream. I'll open the world PRs after the release (history, the deed ledger, the living world, then the journal tab), and I'll tag you so the exact shapes are visible.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#3887
No description provided.