Skip to content

Give each account's old per-character data to its most-played character once - #3

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

ryanbarlow97 merged 3 commits into
mainfrom
seed-most-played

Conversation

@ryanbarlow97

Copy link
Copy Markdown
Contributor

This is the ConditionalEvents half of Codex #3: as a one-off, each account's most-played character keeps what the account did before, and every other character starts fresh.

How it works.

  • When: on an account's first character session after this change.
  • What moves: its account-level one_time flags and cooldowns for events that are now per character move to its most-played living character, or its most-played character if none is alive. That's the same choice Codex makes at the same moment. Account-scoped events, such as Main's catch-up events once they are set to data_scope: account, stay on the account.
  • Merge: if the character already has data for an event, a done event stays done and the later cooldown start wins.
  • Marker: the player file records seeded-to: <character>, so this happens once. If the roster is unknown, the seed waits for a later session.

Effect on Main. The most-played character's research theses and Codex achievements stay done, so using a thesis it already learned still answers "You have already unlocked this Research" and keeps the item. Other characters can earn them.

Tests. mvn clean verify passes (29 tests, coverage gate).

🤖 Generated with Claude Code

…er once

On an account's first session after this change, its account-level
one_time flags and cooldowns for events that are now per character move
to its most-played living character (else its most-played character), the
same character Codex copies the old journal to. Other characters start
fresh. The file records seeded-to, so it happens once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ryanbarlow97 and others added 2 commits October 14, 2026 22:30
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>

ConditionalEvents also reports failed saves: player files are written
through a temporary file, data is marked clean only after a successful
write, and data whose quit save failed stays in memory for the periodic
save instead of being dropped; a rejoin reuses it.
- Player data stays in memory until restart in every setup, so a quick
  reconnect can never lose the object a prelogin reused, and a failed
  quit save is retried by the periodic save. The
  retain_player_data_until_restart setting is gone; an old key is
  ignored.
- /ce reset * now resets only the files of accounts not in memory,
  atomically and under a lock that loading also holds; accounts in
  memory are reset there and saved as usual, so a reset never writes
  over a newer save.

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 36cc303 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