Repository navigation
saves: key hashes are case-sensitive joaat; add tools/save_keys.py (#345 follow-up) - #524
Merged
Merged
Conversation
The $0x... keys in JSAV blocks and ASAV settings are the case-sensitive joaat (seed 0, no lower-casing) of engine/script names, the same rule as the member hashes in docs/world_names.md. Found from structure: the group keys hash names derived from the clear-text JSON wrappers. tools/save_keys.py collects the distinct keys from saves or extract folders and resolves them against strings harvested from any local files (raw bytes and zlib streams), reporting per hash family how many keys resolve and how many are expected by chance; --compose N adds one/two-word names. On the sample set 278 of 1,059 keys resolve with joaat over the game's own data archives; every other family stays at chance level. Only counts are documented; names stay local. Synthetic tests only (tests/test_save_keys.py). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Follow-up to #345 (merged). Answers its open question about the
$0x…key hashes.Finding. Keys in JSAV blocks and ASAV settings JSON are the case-sensitive joaat (seed 0, no lower-casing) of the engine or script name. That's the same rule as the member hashes in
docs/world_names.md. I found it from structure before trying any dictionary: the code and script group keys hash names derived from the clear-text JSON wrappers around them.Counts on the sample set (two story saves plus settings, 1,059 distinct keys), using a dictionary of 1.14 M identifier-like strings harvested from four of the game's own data archives:
--compose 3000)The rest are probably code-only names, so the executable's strings should resolve most of them.
What's in this PR
tools/save_keys.py(stdlib,python -I):collectcounts the distinct keys in saves orsaves.py extractfolders.resolve --dict … [--compose N] [--out FILE]hashes strings harvested from any local files (raw bytes and zlib streams). It reports the count per hash family and how many matches are expected by chance.--outwrites the table for local use only.docs/saves.md: a new "Key names" section with method and counts only. No resolved names, block contents or save bytes are included.tests/test_save_keys.py: reference vectors for each hash family, plus collect/resolve/compose on synthetic containers and names.No overlap with #502 (it touches
saves.pyandtest_saves.pyonly).AI-assisted.
🤖 Generated with Claude Code