psin: typed XML view with in-place edits, hashed-name recovery #45

Manually merged
github merged 1 commit from gh-pr/45/head into gh-pr/45/base 2026-11-27 02:32:42 +00:00
Owner

@⁠asm512 on GitHub · 2026-11-22 20:36 UTC · original
asm512:psin-xml → main · +2132 −4 · 4 files · 1 commits · merged 2026-11-22 21:36 UTC

Shows PSIN metadata as typed XML and resolves the hashed struct, field and enum names.

XML view

  • Selecting a PSIN entry shows typed XML (floats, ints, vectors, hashes, enums, strings, pointers) instead of the plain dump.
  • Export XML saves the whole file. "Apply XML file" and "Save edits shown here" write edited values into a patched copy. The copy is always the same size as the original and the archive is never touched.
  • The CHKS section is not recomputed; its algorithm is unknown.

Names

  • Struct, field and enum-value names are joaat of the name as written. The existing lookup lower-cased them, so very few resolved.
  • New name table: built-in names, plus any .txt word list or .tsv name table in %LOCALAPPDATA%\PercyStar\names.
  • "Recover names" matches hashed names against words found in the open archives and combinations of them. Chance matches are measured with decoy hashes, and names built from combinations are shown with a trailing ?.
  • With names.tsv from https://github.com/asm512/gta6-name-recovery in that folder, about 54% of the names in common, script and data.rpf resolve (fMass, fInitialDragCoeff, ...). Method and full list: https://asm512.github.io/gta6-name-recovery/

Testing

  • cargo test --release: 110 pass. vehicle_texture_layers_toggle fails with PERCYSTAR_LEVELS_RPF set, on main as well; fixed separately.
  • 3,236 real PSIN files export to XML and apply back byte-identical (needs PERCYSTAR_PSIN_DIR).
**@⁠asm512** on GitHub · 2026-11-22 20:36 UTC · [original](https://github.com/rpatty-dev/PercyStar/pull/45) `asm512:psin-xml` → `main` · +2132 −4 · 4 files · 1 commits · merged 2026-11-22 21:36 UTC Shows PSIN metadata as typed XML and resolves the hashed struct, field and enum names. **XML view** - Selecting a PSIN entry shows typed XML (floats, ints, vectors, hashes, enums, strings, pointers) instead of the plain dump. - Export XML saves the whole file. "Apply XML file" and "Save edits shown here" write edited values into a patched copy. The copy is always the same size as the original and the archive is never touched. - The CHKS section is not recomputed; its algorithm is unknown. **Names** - Struct, field and enum-value names are joaat of the name as written. The existing lookup lower-cased them, so very few resolved. - New name table: built-in names, plus any .txt word list or .tsv name table in `%LOCALAPPDATA%\PercyStar\names`. - "Recover names" matches hashed names against words found in the open archives and combinations of them. Chance matches are measured with decoy hashes, and names built from combinations are shown with a trailing ?. - With names.tsv from https://github.com/asm512/gta6-name-recovery in that folder, about 54% of the names in common, script and data.rpf resolve (fMass, fInitialDragCoeff, ...). Method and full list: https://asm512.github.io/gta6-name-recovery/ **Testing** - `cargo test --release`: 110 pass. `vehicle_texture_layers_toggle` fails with `PERCYSTAR_LEVELS_RPF` set, on main as well; fixed separately. - 3,236 real PSIN files export to XML and apply back byte-identical (needs `PERCYSTAR_PSIN_DIR`).
- PSIN files are shown and exported as XML with typed values; edited values are patched into a same-size copy
- name table for hashed struct, field and enum names: built-in list, word lists and name tables in the names folder, names recovered from the open archives
- schema names are joaat without lower-casing, which is why they did not resolve before
- recovery combines known words and measures chance matches with decoy hashes; built names are marked with ?

Recovered names and method: https://asm512.github.io/gta6-name-recovery/
Source: https://github.com/asm512/gta6-name-recovery
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 02:32:40 +00:00
github manually merged commit 0a0dec3909 into gh-pr/45/base 2026-11-27 02:32:42 +00:00
Author
Owner

@⁠rpatty-dev on GitHub · 2026-11-22 21:36 UTC · original

Merged and verified (cargo test --release: 120 passed). Awesome work on typed PSIN XML view, in-place patching, and joaat name recovery!

**@⁠rpatty-dev** on GitHub · 2026-11-22 21:36 UTC · [original](https://github.com/rpatty-dev/PercyStar/pull/45#issuecomment-7086184107) Merged and verified (cargo test --release: 120 passed). Awesome work on typed PSIN XML view, in-place patching, and joaat name recovery!
This discussion has been locked. Commenting is limited to contributors.
No description provided.