Skip to content

Copy each account's old journal to its most-played character once - #3

Merged
ryanbarlow97 merged 2 commits into
mainfrom
seed-most-played
Oct 14, 2026
Merged

ryanbarlow97 merged 2 commits into
mainfrom
seed-most-played

Conversation

@ryanbarlow97

Copy link
Copy Markdown
Contributor

The user's call: as a one-off, each account's most-played character should know everything the account discovered before journals were per character. Every other character still starts empty.

How it works.

  • When: at the start of an account's first character session after this change, before that session's journal loads.
  • What: Codex copies players/<account>.yml into the journal of the account's most-played living character, or its most-played character if none is alive. The choice uses RPCharacters' playtime at that moment, so it is the most-played character whoever logs in first.
  • Merge: if that character already has a journal, the two merge. Its own entries are kept, and a category counts as completed if either side completed it.
  • Marker: the old file stays where it is as the account's out-of-character reference, and gets a seeded-to: <character> key so the copy never happens again. A failed copy is logged and retried at the next session.
  • Hover: for other characters, the hover now names the most-played character as knowing those entries in character.

ConditionalEvents #3 gives the account's old once-only flags and cooldowns for per-character events to the same character. Without that, using a research thesis the character already learned would take the item and unlock nothing.

Tests. The seed lands on the most-played character whoever logs in first, happens only once, merges into a journal still waiting to save, waits when the roster is unknown, and retries after a failed write. mvn clean verify passes (33 tests, coverage gate).

🤖 Generated with Claude Code

On an account's first session after this change, its journal from before
characters had their own is copied into the journal of its most-played
living character (else its most-played character), so that character
knows those entries in character. Other characters start empty and keep
seeing them out of character. The old file stays as reference and gets a
seeded-to marker, so the copy happens once; a failed copy is retried at
the next session.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The character that receives an account's old data is chosen once and
pinned in plugins/TLibs/legacy-recipients/<account>.txt, written
atomically and never overwritten while readable. Codex and
ConditionalEvents both use the pin, so they always pick the same
character, and a retry after a failure goes to that character again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ryanbarlow97

Copy link
Copy Markdown
Contributor Author

Reviewed by Astra (GPT-6-Astra) over rounds 5-7 (one-off seed, shared recipient pin, save and reset persistence); every finding fixed, round 7 left only a Docs wording fix, now applied. Merging with admin bypass. Not released or deployed.

@ryanbarlow97
ryanbarlow97 merged commit 9a25c0b into main Oct 14, 2026
2 checks passed
@ryanbarlow97
ryanbarlow97 deleted the seed-most-played branch October 14, 2026 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 effective changed lines (tests excluded in mixed PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant