Vehicles: part colours per configuration, option lists followed #71
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/holdmysocks--SixNG!71
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/71/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@holdmysocks on GitHub · 2026-11-23 19:05 UTC · original
holdmysocks:claude/config-looks→master· +170 −24 · 6 files · 1 commits · merged 2026-11-23 19:10 UTCPicking a configuration in the viewer now changes the vehicle's part colours, and the cause of comet7's black rear deck is fixed at the source.
Option lists
f5e9d7df.bf340aab: paint finishes, trims). These were not followed.Colours per configuration
vehicle_parts.json(format 7) maps model -> configuration key -> part set. The key is FNV-1a of the configuration's part list;vehicles.jsonwrites it asparts_key(format8).model.jsonpart_coloursgainslooks(256 x RGBA per distinct result, as hex),configs(parts_key-> look) anddefault(the look baked into the GLB). Exports are version 5, so the viewer exports vehicles again.--config <n>picks one for automation.Checked
Not decoded
Two things about a configuration's part colours. 1. Option lists. A configuration part can be a list of parts to choose one from (f5e9d7df.bf340aab: paint finishes, trims). They were not followed, so configurations that reach their body-paint bindings through such a list kept unpainted panels (comet7's first configuration showed a black rear deck). The first part of each list is now followed. With that, all 17 comet7 configurations paint the rear deck. 2. Colours follow the chosen configuration. Every distinct result is a part set of its own, and an export records them: - vehicle_parts.json (format 7): config_sets, model -> configuration key -> part set. The key is FNV-1a of the configuration's part list; vehicles.json writes it per configuration as parts_key ("format" 8). - model.json part_colours: looks (256 x RGBA per distinct result, as hex, encoded like COLOR_0), configs (parts_key -> look) and default (the look baked into the GLB, the one most configurations give). Exports are version 5, so the viewer exports vehicles again. - Viewer: choosing a configuration recolours the vehicle's parts from its look (the part id is in the raw vertex colour alpha). --config <n> picks a configuration for automation. comet7 has 16 distinct looks over 17 configurations: paint, a fabric or gloss black roof, interior differences. Checked in the viewer on comet7 in four configurations. 137 core tests pass. Not decoded: which part of an option list the game picks (the first is taken); the other modifier kinds (dirt level, liveries, decal layers). Mod part models keep one look.