Vehicles: coat records (clear coat, flakes, film, sheen) per part and per configuration #253
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!253
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/253/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-25 06:27 UTC · original
holdmysocks:claude/vehicle-coat-data→master· +411 −30 · 4 files · 4 commits · merged 2026-11-25 06:47 UTCWhat
A vehicle paint is layers: a base coat, a clear coat, flakes, a thin film, a sheen. The game keeps them in coat records in the vehicle library (struct
2b84f07e, 56 bytes, 92 records). This reads them and says which coat each part id and each configuration's body paint uses. First part of SIX-202; the viewer does not use them yet.vehcolour::Coatandcoats(): the 20 fields of a record (clear coat on/intensity/roughness, base coat roughness and its override flag, flakes on/coverage/size/orientation, film IOR and thickness, sheen, anisotropy, two unnamed fields). Members are found by name hash and read by their declared type.paintHash), next to the colour record already read;paintType), an assignment a default one (defaultPaintType), and a binding with itspaintTypeflag set passes the channel's coat to its part ids.vehicle_parts.json(a part'scoat, the library'scoats), model.jsonpart_colours.coat(records, per look the coat of each part id and of the body paint), andsixng vehiclereportspaint_coat.Also fixed on the way: the part reference of a configuration was read by field name (
data), which only resolves when the name dictionary is loaded. Without the dictionary no part reference was followed and 1,202 of 3,741 configurations (144 models) got other colours or surfaces. It is now read by member hash; the tables are byte-identical with and without the dictionary.Version bumps:
vehcolour::FORMAT20 to 21 (vehicle_parts.jsonrebuilds) andEXPORT_VERSION24 to 25 (the viewer re-exports vehicles once). vehicles.json is not touched.Checked
clearCoatIntensity,useClearCoat,filmIOR,overrideBaseCoatRoughness,flakeSize,baseCoatRoughness,paintHash,defaultPaintType,paintTypeand the rest; 14 of the 92 record names resolve (default,gloss,metallic,satin solid,matte solid,matte metallic,carbon glossy,sheen_velvet, ...).glossclear coat 1 at roughness 0 over a base of 0.4;metallicthe same with flakes;matte solidclear coat roughness 0.7; 43 records have a film (IOR 2.3, one 2.6).metallic), half floats, the paint type of a channel, and the coat tables. Workspace tests pass.Not decoded / not done
filmThicknessandflakeSizeis not known.b97f4910,9851c9f1) are unnamed. No record is named chrome.sixng vehiclewithpaint_coatcompiles but was not run: the local index was mid-upgrade.paintHash, livery entries'paintPalette, the preset set'swearPresets.