Hair link: read the registries by field hash, and retry the stored link #517

Manually merged
github merged 1 commit from github-bot/gh-517 into gh-pr/517/base 2026-11-27 23:04:44 +00:00 AGit
Owner

@⁠holdmysocks on GitHub · 2026-11-27 22:49 UTC · original
holdmysocks:people/vicki-hair → master · +49 −10 · 2 files · 1 commits · merged 2026-11-27 23:01 UTC

Fixes the Vicki report on #306 (no hair, wrong lashes, in the export and the viewer).

What the reporter sees is the inferred hair table. Their viewer shows percentages (lashes 20 %, brows 45 %, other hair hairlob 86 %), which only the inferred table gives. With the stored link (exact), cs_vicki on master exports and draws her bun, brows and lashes correctly. The inferred walk reproduces the report exactly: the bun's five pieces go to cs_valentina_hairlob (43 %), so cs_vicki_hairbun has no grooms ("Strand hair with no grooms placed"), and lashescat_fr1_001 gets another groom, the ring of strands around the head in their Blender shot.

Two bugs keep a setup on that guess:

  • Since #399 named the registry type field (2d4958cf = shaderId), the inferred reader found no hair assets, so a fresh inferred table could not be built at all. Registry and wardrobe fields are now looked up by hash under either spelling (meta7a::field_name, as pso.rs does). A test covers both spellings.
  • A cached inferred hair_links.json was reused forever (cache version 5 since #290). A cached inferred table now tries the stored link again on each run and replaces the cache when it can be read. Checked: a scratch work dir with an inferred cache comes back exact, with the bun's 5 pieces.

The map entity tint row (3c852527, now tintValue) had the same lookup and read 0. It now uses field_name too.

Not fixed: the inferred walk itself still places Vicki's bun wrongly. Where the stored link cannot be read (another game build, a CPU without AVX2, not Windows x64), hair stays a guess. Tests: core 402, gui 61.

**@⁠holdmysocks** on GitHub · 2026-11-27 22:49 UTC · [original](https://github.com/holdmysocks/SixNG/pull/517) `holdmysocks:people/vicki-hair` → `master` · +49 −10 · 2 files · 1 commits · merged 2026-11-27 23:01 UTC Fixes the Vicki report on #306 (no hair, wrong lashes, in the export and the viewer). **What the reporter sees is the inferred hair table.** Their viewer shows percentages (lashes 20 %, brows 45 %, other hair hairlob 86 %), which only the inferred table gives. With the stored link (exact), cs_vicki on master exports and draws her bun, brows and lashes correctly. The inferred walk reproduces the report exactly: the bun's five pieces go to cs_valentina_hairlob (43 %), so cs_vicki_hairbun has no grooms ("Strand hair with no grooms placed"), and lashescat_fr1_001 gets another groom, the ring of strands around the head in their Blender shot. **Two bugs keep a setup on that guess:** - Since #399 named the registry type field (`2d4958cf` = `shaderId`), the inferred reader found no hair assets, so a fresh inferred table could not be built at all. Registry and wardrobe fields are now looked up by hash under either spelling (`meta7a::field_name`, as pso.rs does). A test covers both spellings. - A cached inferred `hair_links.json` was reused forever (cache version 5 since #290). A cached inferred table now tries the stored link again on each run and replaces the cache when it can be read. Checked: a scratch work dir with an inferred cache comes back exact, with the bun's 5 pieces. The map entity tint row (`3c852527`, now `tintValue`) had the same lookup and read 0. It now uses `field_name` too. Not fixed: the inferred walk itself still places Vicki's bun wrongly. Where the stored link cannot be read (another game build, a CPU without AVX2, not Windows x64), hair stays a guess. Tests: core 402, gui 61.
Without the stored hair link (the table of contents could not be read),
the hair table is inferred from the asset registries. Since #399 named
the registry's type field (2d4958cf = shaderId), the PSO JSON writes it
by that name and the reader, which looked for the hex key, found no hair
assets: the inferred table could not be built at all. Fields are now
looked up by hash under either spelling (meta7a::field_name, as pso.rs
already does), in the registry and the wardrobe tag reader.

A cached inferred hair_links.json was also kept for good: a setup that
once could not read the stored link went on guessing after it could. A
cached inferred table now tries the stored link again on each run and
is replaced when it can be read.

The map entity tint row (3c852527, now named tintValue) had the same
lookup and read 0; it uses field_name too.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 22:53:50 +00:00
github-bot changed target branch from master to gh-pr/517/base 2026-11-27 23:04:43 +00:00
github manually merged commit 58971a2fe9 into gh-pr/517/base 2026-11-27 23:04:44 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.