Part colours: a fitted body kit takes the car's paint #184

Manually merged
github merged 2 commits from gh-pr/184/head into gh-pr/184/base 2026-11-26 20:16:19 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-24 17:24 UTC · original
holdmysocks:claude/kit-paint → master · +112 −8 · 4 files · 2 commits · merged 2026-11-24 17:58 UTC

What

Reported by the user: a wide-body kit fitted by hand stays black while the car takes its paint.

Two causes, both in the part colour tables (vehcolour):

  • A modifier type was not read. A part's modifier list can hold a 51aab7c1 record: a typed reference to something else. With type 5 its data names a library part whose modifiers come along (197 of 198 such records name a library part). The elegy's wide-arch kit (dd804ee6) defines a group for its panels (part id 67) and names, through such a reference, the colour scheme part that binds that group to the body paint. The reference is now followed (up to three levels, like option lists).
  • Parts fitted on top of a configuration did not change colours. The tables only held one part set per vehicle, the result of its usual configuration. They now also hold part_patches: for each of a vehicle's own parts that the usual configuration does not name, what fitting it changes (part id, colour, surface). 156 vehicles have such parts, 2,815 parts in all.

The patches are written to model.json (part_colours.part_patches: part name -> ids and their look entries) and applied by the viewer (Fit / Randomize parts) and by sixng vehicle --with.

Versions: colour tables FORMAT 18 -> 19 (the cached vehicle_parts.json is rebuilt on first use), EXPORT_VERSION 20 -> 21.

Side effect

Following the type 5 references also applies them for the parts a configuration names, so the default colours of 56 of 320 vehicles change, mostly by one or two part ids (elegy: id 113 now takes the paint). The largest: zorrusso (74 ids), lectro (52), marshall (50), bobcatxl (32), yosemite (26), sandkingxt (22).

Checked

  • sixng vehicle elegy --config 4 --with dd804ee6, opened in the viewer: the kit's arches, skirts and bumper panels take the paint; before they were black. The lower lip stays black (its part id is not in the kit's group).
  • Viewer, elegy with the kit fitted (--fit-parts): the kit panels have the body colour.
  • zorrusso, lectro, marshall, bobcatxl, yosemite, sandkingxt rendered with the build before and after, same camera: no part lost its colour; the differences are small (marshall's door handles take the paint).
  • cargo build -p sixng-cli -p sixng-gui passes.

Not decoded / not done

  • The other types of 51aab7c1 (0 to 4) are not read. Type 0 (580 records) and type 1 also name library parts; what they do is not known.
  • When a kit's default colour scheme and a configuration's own scheme part bind the same group with the same priority, the later one in the list wins here; the game's rule is not known.
  • A patch is computed on top of the vehicle's usual configuration. Two fitted parts that change the same part id are applied in the order fitted.
  • The Metal renderer was not built or run.
  • Only the elegy's kit was looked at as a kit; the 56 changed defaults were checked on six vehicles.
**@⁠holdmysocks** on GitHub · 2026-11-24 17:24 UTC · [original](https://github.com/holdmysocks/SixNG/pull/184) `holdmysocks:claude/kit-paint` → `master` · +112 −8 · 4 files · 2 commits · merged 2026-11-24 17:58 UTC ## What Reported by the user: a wide-body kit fitted by hand stays black while the car takes its paint. Two causes, both in the part colour tables (`vehcolour`): - **A modifier type was not read.** A part's modifier list can hold a `51aab7c1` record: a typed reference to something else. With type 5 its `data` names a library part whose modifiers come along (197 of 198 such records name a library part). The elegy's wide-arch kit (`dd804ee6`) defines a group for its panels (part id 67) and names, through such a reference, the colour scheme part that binds that group to the body paint. The reference is now followed (up to three levels, like option lists). - **Parts fitted on top of a configuration did not change colours.** The tables only held one part set per vehicle, the result of its usual configuration. They now also hold `part_patches`: for each of a vehicle's own parts that the usual configuration does not name, what fitting it changes (part id, colour, surface). 156 vehicles have such parts, 2,815 parts in all. The patches are written to `model.json` (`part_colours.part_patches`: part name -> ids and their look entries) and applied by the viewer (Fit / Randomize parts) and by `sixng vehicle --with`. Versions: colour tables `FORMAT` 18 -> 19 (the cached `vehicle_parts.json` is rebuilt on first use), `EXPORT_VERSION` 20 -> 21. ## Side effect Following the type 5 references also applies them for the parts a configuration names, so the default colours of 56 of 320 vehicles change, mostly by one or two part ids (elegy: id 113 now takes the paint). The largest: zorrusso (74 ids), lectro (52), marshall (50), bobcatxl (32), yosemite (26), sandkingxt (22). ## Checked - `sixng vehicle elegy --config 4 --with dd804ee6`, opened in the viewer: the kit's arches, skirts and bumper panels take the paint; before they were black. The lower lip stays black (its part id is not in the kit's group). - Viewer, elegy with the kit fitted (`--fit-parts`): the kit panels have the body colour. - zorrusso, lectro, marshall, bobcatxl, yosemite, sandkingxt rendered with the build before and after, same camera: no part lost its colour; the differences are small (marshall's door handles take the paint). - `cargo build -p sixng-cli -p sixng-gui` passes. ## Not decoded / not done - The other types of `51aab7c1` (0 to 4) are not read. Type 0 (580 records) and type 1 also name library parts; what they do is not known. - When a kit's default colour scheme and a configuration's own scheme part bind the same group with the same priority, the later one in the list wins here; the game's rule is not known. - A patch is computed on top of the vehicle's usual configuration. Two fitted parts that change the same part id are applied in the order fitted. - The Metal renderer was not built or run. - Only the elegy's kit was looked at as a kit; the 56 changed defaults were checked on six vehicles.
A part's modifier list can name a library part (51aab7c1, type 5) whose
modifiers come along: a kit names the colour scheme that binds its panels
to the body paint. The tables now also hold what each of a vehicle's own
parts changes when fitted on top of the usual configuration; the viewer
and sixng vehicle apply it for the parts fitted.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:16:17 +00:00
github manually merged commit 2b25d947e7 into gh-pr/184/base 2026-11-26 20:16:19 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.