Repository navigation
Keep a Codex journal per character - #2
Merged
Merged
Conversation
Load a character's discoveries from characters/<character>.yml when its session starts and save them when it ends, so each character discovers places and lore and earns their rewards for itself. Between characters nothing can be discovered. Each account's old players/<account>.yml goes to its RPCharacters heir once heirs are known, or to its most-played living character if it has no reviewed heir; the old file moves to players-migrated/. Other characters start empty. Drop MySQL storage, which neither server used. Saves now run on the main thread. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An entry any of the account's characters has found, alive or dead, now shows unlocked for out-of-character reference, sub-pages included. Its hover text names the living characters who can use it in character, and says when the played character knows it only out of character. Rediscovery, rewards and progress counts stay per character. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Entries known only out of character run click actions only when they have no click cooldown, since the cooldown lives on the character's own entry. - /codex menus need a character in play; between characters they answer noCharacterInPlay and item actions close the menu. - /codex resetplayer * also resets account files not yet moved. - A reviewed heir deleted since the review falls through to the most-played rule; earlier players-migrated/ copies are never replaced. - Warn once if heirs are still unknown after 60 seconds; refresh the out-of-character view after the start-up move; a failed roster lookup falls back to the played character's own journal. - Depend only on TLibs: RPCharacters soft-depends on Codex, so depending on it back would make a load cycle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The old account journals don't record which character found an entry, so no character inherits them. players/<account>.yml stays in place as the account's out-of-character reference: its entries show as readable with "No character can use this in character." until a character finds them again. This removes the heir lookup, the start-up move and players-migrated/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A journal that fails to save when its session ends stays in memory under its character, is retried with every save, is reused if the character returns first, and counts in the account's out-of-character reference. Staff resets apply to it too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ryanbarlow97
force-pushed
the
per-character
branch
from
October 14, 2026 22:14
6487090 to
f464950
Compare
Contributor
Author
|
Reviewed by Astra (GPT-6-Astra) over four read-only rounds (reports kept locally); every finding fixed, the last with tests for its exact scenario. Merging with admin bypass. Not released or deployed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Each roleplay character now has its own Codex journal, so a new character can discover places and lore again and earn the discovery rewards again (for example the 50 Player EXP for a point of interest). Stacked on #1.
How it works. Codex loads a character's journal from
plugins/Codex/characters/<character>.ymlwhen its TLibs character session starts and saves it when the session ends (switch, quit, death or shutdown). Between characters, for example in the selection room, the player has no journal and nothing can be discovered, so no rewards fire without a record. A character's first session creates its file, socharacters/has one file for every character that has played.Out-of-character reference. An entry the account found before this change, or any of its characters has found since (alive or dead), stays unlocked in
/codexand its sub-pages stay openable, so players can still read what they have seen. Click actions on such entries run only when the entry has noclick_actions_cooldown, since that cooldown is stored on the character's own entry. The hover text adds "Aldric and Mira can use this in character." (living characters only, the played one first), or "No character can use this in character." When the played character hasn't found it itself, it also adds "Aldric knows this only out of character." Codex reads the other characters' journals when a session starts; they can't change while the account is playing someone else. The three lines are configurable inmessages.ymland are added to existing files. Rediscovery, rewards, category progress and placeholders stay per character.Existing discoveries. No character inherits them, because the old account journals don't record which character found an entry. Each account's
players/<account>.ymlstays where it is and feeds the out-of-character reference. Its entries show as readable, with "No character can use this in character.", until a character finds them again. Every character, the most-played one included, rediscovers places and earns their rewards again.Other changes. MySQL storage is removed: neither server used it, and making it per character would have been a second rewrite. Old
mysql_databasekeys in a config are ignored. Saves now run on the main thread, which removes upstream's race between the async save task and players joining or leaving. The plugin needs TLibs (depend) and RPCharacters for character sessions. It doesn't list RPCharacters for load order, because RPCharacters soft-depends on Codex./codexwon't open between characters.Follow-ups. RPCharacters'
codex_percent_/codex_holders_placeholders readplugins/Codex/players/. They need to readcharacters/instead, so they count characters. That will be a separate RPCharacters PR, released together with this one.Tests. JUnit and Mockito cover the file store, the out-of-character reference, session open and close, unreadable files and save failures. JaCoCo requires 100% line coverage of
net.tfminecraft.codex.character; upstream code has no tests.mvn clean verifypasses (24 tests).🤖 Generated with Claude Code