Vehicles: export the game's wear records per part (SIX-212) #283

Manually merged
github merged 2 commits from gh-pr/283/head into gh-pr/283/base 2026-11-26 20:24:22 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-25 14:49 UTC · original
holdmysocks:claude/vehicle-wear-records → master · +219 −4 · 2 files · 2 commits · merged 2026-11-25 15:22 UTC

SIX-212.

What

  • The vehicle material library holds the game's wear data, which the export did not read. Each part id's surface record names a wear ladder (e9aaa040) and a detail set (detailMapsHash).
  • model.json part_colours.wear_records now has:
    • ladder_by_look, detail_by_look: per look, each part id's index into ladders and details (256 x 2 hex digits, ff = none).
    • ladders: six surfaces (materialPresets) and six wear presets (wearPresets) each.
    • presets: dust, rust, primer and control intensities, plus about 35 unnamed bytes.
    • ages (sun and base bleach, scratches, tiling) and age_ranges (min and max wear), named by a preset's ageWearHash.
    • edges (7f1fe0a2) and colour_ranges (879774bd, 02a27216).
    • details: detail indices, tiles and strengths.
    • global: the library's shared dirt settings.
  • Records are written as stored. Links between records are 8 hex digits; fields without a name keep their hash.
  • The parts table format goes 21 -> 22 (the index's vehicle_parts.json is rebuilt on first use), and EXPORT_VERSION 26 -> 27 (cached vehicles re-export).

Checked

  • Workspace tests pass (318; one new test for the links and for which records a vehicle reaches).
  • Fresh exports of five vehicles (two cars, a pickup, a truck, a motorbike) in a private work dir with its own parts table. No errors, and the shared index was not written.
  • In every export:
    • every part id has a ladder in the default look, and all but one or none have a detail set;
    • 29 to 37 ladders, 24 to 37 detail sets, and 136 to 166 presets are reached;
    • every preset a ladder names is found, and on the sports car 160 of 161 age links resolve.
  • model.json grows by about 270 to 300 KB per vehicle (to 1.5 to 2.3 MB).

Not decoded / not done

  • Which of a ladder's six entries a vehicle uses, and its dirt level. No per-vehicle value was found.
  • What the vehicle shader does with any of these values. Nothing is applied to the GLB or drawn in the viewer.
  • The detail texture arrays that detailIndex0 / 1 probably index are bound by no material, and were not located.
  • Many preset and age fields have no name.
  • Not compared with the game.
**@⁠holdmysocks** on GitHub · 2026-11-25 14:49 UTC · [original](https://github.com/holdmysocks/SixNG/pull/283) `holdmysocks:claude/vehicle-wear-records` → `master` · +219 −4 · 2 files · 2 commits · merged 2026-11-25 15:22 UTC SIX-212. ## What - The vehicle material library holds the game's wear data, which the export did not read. Each part id's surface record names a wear ladder (`e9aaa040`) and a detail set (`detailMapsHash`). - model.json `part_colours.wear_records` now has: - `ladder_by_look`, `detail_by_look`: per look, each part id's index into `ladders` and `details` (256 x 2 hex digits, `ff` = none). - `ladders`: six surfaces (`materialPresets`) and six wear presets (`wearPresets`) each. - `presets`: dust, rust, primer and control intensities, plus about 35 unnamed bytes. - `ages` (sun and base bleach, scratches, tiling) and `age_ranges` (min and max wear), named by a preset's `ageWearHash`. - `edges` (`7f1fe0a2`) and `colour_ranges` (`879774bd`, `02a27216`). - `details`: detail indices, tiles and strengths. - `global`: the library's shared dirt settings. - Records are written as stored. Links between records are 8 hex digits; fields without a name keep their hash. - The parts table format goes 21 -> 22 (the index's `vehicle_parts.json` is rebuilt on first use), and `EXPORT_VERSION` 26 -> 27 (cached vehicles re-export). ## Checked - Workspace tests pass (318; one new test for the links and for which records a vehicle reaches). - Fresh exports of five vehicles (two cars, a pickup, a truck, a motorbike) in a private work dir with its own parts table. No errors, and the shared index was not written. - In every export: - every part id has a ladder in the default look, and all but one or none have a detail set; - 29 to 37 ladders, 24 to 37 detail sets, and 136 to 166 presets are reached; - every preset a ladder names is found, and on the sports car 160 of 161 age links resolve. - model.json grows by about 270 to 300 KB per vehicle (to 1.5 to 2.3 MB). ## Not decoded / not done - Which of a ladder's six entries a vehicle uses, and its dirt level. No per-vehicle value was found. - What the vehicle shader does with any of these values. Nothing is applied to the GLB or drawn in the viewer. - The detail texture arrays that `detailIndex0` / `1` probably index are bound by no material, and were not located. - Many preset and age fields have no name. - Not compared with the game.
Each part id's surface names a wear ladder and a detail set in the vehicle
material library. model.json part_colours.wear_records gives per look the
ladder and detail set of each part id, and the records they reach as
stored: ladders, wear presets, age and age range records, edge records,
colour range records, detail sets and the library's shared dirt settings.

Which ladder entry a vehicle uses, its dirt level and what the shader
does with the values are not decoded; nothing is applied to the GLB.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:24:21 +00:00
github manually merged commit 7a02b41a82 into gh-pr/283/base 2026-11-26 20:24:22 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.