Vehicles: shared truck beds and other library parts take the colours of the vehicle they are on #136

Manually merged
github merged 1 commit from gh-pr/136/head into gh-pr/136/base 2026-11-26 20:12:33 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-24 11:35 UTC · original
holdmysocks:claude/shared-bed-colours → master · +70 −9 · 3 files · 1 commits · merged 2026-11-24 11:42 UTC

What

The beds and boxes that several trucks share (41 truckbeds_* models), and the other library part models that configurations name, showed in stand-in grey. They have no vehicle of their own, so no part set was found for them.

Their vertices carry part ids like a vehicle's own meshes, and an id means the same piece in every vehicle's part set (the ids the beds use hold the same records in about 150 of the 338 sets). The configuration that fits a bed already recolours those ids in the truck's set. So a shared part takes the colours of the vehicle and configuration it is on.

  • vehicle_parts.json (format 17) gets shared_parts: library part model (joaat of its name) -> the part set of the first configuration that names the part. 980 models.
  • An export of such a model on its own uses that set. model.json part_colours.shared_part is true for it, with a note (part colours version 18, so the viewer exports these models again).
  • The viewer colours the meshes of a fitted part again from the look of the vehicle it is on. Before, a freshly loaded model was taken to show the default look already.

Checked

  • Renders of 16 trucks and pickups before and after. The seven trucks with shared beds (benson, biff, mule, iota, mb210, tiptruck, towtruck) now show bed colours: wooden flatbed decks, a red utility body, an orange headboard frame, black box sides with bright corner rails. The nine pickups with beds of their own are unchanged.
  • Three beds exported on their own (truckbeds_box_01_hi, truckbeds_flatbed_01_hi, truckbeds_tipper_04_lrg_hi): status applied, shared_part true.
  • cargo test -p sixng-core vehcolour passes.

Not decoded / not done

  • Which vehicle a bed on its own should show is a choice of this export (the first configuration found, vehicles in order of their name hash), not data.
  • The box body's sides come out black on every truck (one fixed record in all sets). Whether the game puts a livery or a company colour over them is not known.
  • No part set is named after any of the 41 bed models; 18 part sets in the packs are still not linked to any model.
  • The CLI still has no vehicle export with chosen parts, so the per-vehicle colours of a fitted bed are a viewer feature only.
**@⁠holdmysocks** on GitHub · 2026-11-24 11:35 UTC · [original](https://github.com/holdmysocks/SixNG/pull/136) `holdmysocks:claude/shared-bed-colours` → `master` · +70 −9 · 3 files · 1 commits · merged 2026-11-24 11:42 UTC ## What The beds and boxes that several trucks share (41 `truckbeds_*` models), and the other library part models that configurations name, showed in stand-in grey. They have no vehicle of their own, so no part set was found for them. Their vertices carry part ids like a vehicle's own meshes, and an id means the same piece in every vehicle's part set (the ids the beds use hold the same records in about 150 of the 338 sets). The configuration that fits a bed already recolours those ids in the truck's set. So a shared part takes the colours of the vehicle and configuration it is on. - `vehicle_parts.json` (format 17) gets `shared_parts`: library part model (joaat of its name) -> the part set of the first configuration that names the part. 980 models. - An export of such a model on its own uses that set. `model.json` `part_colours.shared_part` is true for it, with a note (part colours version 18, so the viewer exports these models again). - The viewer colours the meshes of a fitted part again from the look of the vehicle it is on. Before, a freshly loaded model was taken to show the default look already. ## Checked - Renders of 16 trucks and pickups before and after. The seven trucks with shared beds (benson, biff, mule, iota, mb210, tiptruck, towtruck) now show bed colours: wooden flatbed decks, a red utility body, an orange headboard frame, black box sides with bright corner rails. The nine pickups with beds of their own are unchanged. - Three beds exported on their own (`truckbeds_box_01_hi`, `truckbeds_flatbed_01_hi`, `truckbeds_tipper_04_lrg_hi`): status `applied`, `shared_part` true. - `cargo test -p sixng-core vehcolour` passes. ## Not decoded / not done - Which vehicle a bed on its own should show is a choice of this export (the first configuration found, vehicles in order of their name hash), not data. - The box body's sides come out black on every truck (one fixed record in all sets). Whether the game puts a livery or a company colour over them is not known. - No part set is named after any of the 41 bed models; 18 part sets in the packs are still not linked to any model. - The CLI still has no vehicle export with chosen parts, so the per-vehicle colours of a fitted bed are a viewer feature only.
A library part's model has no vehicle of its own, so no part set was found and it kept stand-in grey. Its part ids mean the same piece in every vehicle's part set, and the configuration that fits the part recolours them. The part tables now list these models (shared_parts, format 17) with the set of the first configuration that names each; an export of the model on its own uses it (part_colours.shared_part, version 18). The viewer colours a fitted part again from the look of the vehicle it is on.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:12:31 +00:00
github manually merged commit d9acd241f8 into gh-pr/136/base 2026-11-26 20:12:33 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.