Vehicles: body-paint groups from the configuration, rim size from the wheel fitment #60
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!60
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/60/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 17:28 UTC · original
holdmysocks:claude/rim-size→master· +280 −28 · 4 files · 2 commits · merged 2026-11-23 17:45 UTCTwo commits on the same library reader: a follow-up to the part colours (#59) and the rim size.
Body-paint groups (follow-up to #59)
With the default part set alone, some body panels stayed on the "black" colour record: buffalo6's rear doors and mirrors, the whole ambulance box. The game paints them through the configuration's modifier records.
0caef606records, in the library and in the vehicle's own pack. Each lists modifier records.6225734f, group name + part ids), bindings of a group to a channel (501ff112, with a priority and colour / surface flags) and assignments of a colour and surface record to a channel (b94308f5).Rim size
39d5e253lists a9a172293record whose3d37e0dfis rim radius / tyre radius: 0.82 on comet7, 0.74 on buffalo6, 0.65 on bison4 and the ambulance.vehicles.jsonwrites it per configuration asrim_ratio(format5); 2,328 of 4,063 configurations have one.Checked
Not decoded
7ed76b9fis the body paint is an inference.wheelScaleis still not understood. It is not the rim radius.Follow-up to the part colours. A vehicle's default part set leaves some body panels on the "black" colour record (buffalo6's rear doors and mirrors, the whole ambulance box); the game paints them through the modifier records of the configuration. - A configuration's part list (51019114.e89b8540) names 0caef606 records: in the library (data.rpf) and in the vehicle's own pack. Each lists modifier records (61e1e572). Three kinds are applied, for a model's first configuration: - 6225734f, a group definition: 662d9b79 group name, e9bf9f2d part ids. The vehicle's own part records list the definitions that hold for it; the library also has named groups 000639e9 whose 3acbce85 is a byte array of part ids (pool reference, u16 count). - 501ff112, a binding: group 662d9b79 -> channel 178cc382, priority 1470edc0, flags c8d27281 (colour) and 7a84e7bf (surface). - b94308f5, an assignment: channel ca2065a9 -> colour record 2c89a8d2 and surface record 7a84e7bf. Bindings are applied in priority order. Body panel groups (names resolve: bodywork, doors, Mirrors, and the bone names bonnet, boot, bumper_f, bumper_r) are bound to channel 7ed76b9f at priority 1 over a default; nothing assigns that channel a colour, so it is taken as the body paint. - The model's part set becomes its own copy with these applied (vehicle_parts.json format 4; exports are version 3, so the viewer exports vehicles again). 240 of 319 linked models get changes: buffalo6 goes from 10 to 25 body-paint part ids, bison4 from 7 to 18, the ambulance from 0 to 17. - The colour record 2a13d29a resolves to the name "black". - Wheel fitment: the configuration part in slot 39d5e253 lists a 9a172293 record whose 3d37e0df is rim radius / tyre radius (0.82 and 0.86 on comet7, 0.74 to 0.79 on buffalo6, 0.58 to 0.68 on bison4, 0.65 on the ambulance). vehicles.json writes it per configuration as rim_ratio ("format" 5); 2,328 of 4,063 configurations have one. Checked in the viewer on buffalo6, ambulance, bison4 and comet7. 137 core tests pass. Not decoded: the other modifier kinds (08b2439a with a mask and a level on a slot that covers all 256 ids, liveries and decal layers 51aab7c1 / 44cc9d8c / d62c0436 / ed9cf5df, option lists f5e9d7df, c328e66e, 84f5099b, 1f6c6730); fitment records with 0341ff8f set, which hold offsets other slots add to the rim ratio and are not applied; which configuration a spawned vehicle uses (the first is taken); that channel 7ed76b9f is the body paint is an inference.