Vehicles: a part element names its model by asset id; pickup beds from their part #118

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

@⁠holdmysocks on GitHub · 2026-11-24 04:39 UTC · original
holdmysocks:claude/part-asset-ids → master · +124 −26 · 4 files · 1 commits · merged 2026-11-24 04:46 UTC

Decodes the link from a vehicle part to its models, which was the missing step for pickup beds.

What

  • Asset id. A mod part element (77f2b89e) of a vehicle pack names its model in asset (8605bf0e, 64 bits). It is the first half of MurmurHash3 x64 128, seed 0, of the model's lower-case name without LOD suffix. meta7a::asset_id computes it; vehicles.json now gives it per element as asset (format 12; model is unchanged). In the library the field is 32 bits and stays the joaat of the name.
  • Viewer. A part's models are found by asset id first, by name hash for library parts. A pickup's bed is fitted by a part of the vehicle's own pack (slot 1c9dd6fe: the bed at mod_bed_attach and usually the rear bumper), and the configurations list that part. So the bed no longer depends on the <vehicle>_pickup name guess, and a configuration that names another body gets it. All parts of that slot form one "body" choice. The name guess stays as a fallback where no part names the model.
  • Two parts can fit the same first model (reclaimerclassic has two flatbed parts); the option now answers to both part names.
  • The chassis part lists every stock alternative (bonnets, aerials, roof lights) and the rules that pick among them are not decoded, so it is left to its name as before.
  • An automated screenshot (--screenshot --exit) now waits for the parts reload a configuration asks for.

Checked

  • One pickup's pack (declasse500): all 69 elements resolve to an existing model by asset id.
  • All vehicle packs, by the low half that vehicles.json already held: 13,274 of 13,349 elements resolve to a model name.
  • All 23 pickup / flatbed models are named by a part of slot 1c9dd6fe, and for each the part is in the vehicle's configurations.
  • Renders: the 16 trucks and pickups of the earlier check all have their bodies; reclaimerclassic shows a tow bed in configuration 1, a flatbed in configuration 4 and the pickup bed in the others; benson, iota, mule and mb210 now also get side guards and a tail lift from their body parts.
  • cargo test -p sixng-core -p sixng-gui: 149 + 12 passed, with a new test of four known name / id pairs.

Not decoded / not done

  • Which of the chassis part's alternatives the game shows (records 6191ddc2 / deade5a9 name elements, not read).
  • The 75 elements that resolve to no model name (not looked at).
  • The name of slot 1c9dd6fe.
  • Bed part colours: beds still take the stock grey on most pickups. The asset id is also the name of a model's part set, which could give them their colours; not done here.
  • reclaimerclassic's off-road front bumper in configuration 4 has a piece hanging askew (seen in the render; not looked into).
  • The side guards and tail lifts were checked by eye from two angles only.
**@⁠holdmysocks** on GitHub · 2026-11-24 04:39 UTC · [original](https://github.com/holdmysocks/SixNG/pull/118) `holdmysocks:claude/part-asset-ids` → `master` · +124 −26 · 4 files · 1 commits · merged 2026-11-24 04:46 UTC Decodes the link from a vehicle part to its models, which was the missing step for pickup beds. ## What - **Asset id.** A mod part element (`77f2b89e`) of a vehicle pack names its model in `asset` (`8605bf0e`, 64 bits). It is the first half of MurmurHash3 x64 128, seed 0, of the model's lower-case name without LOD suffix. `meta7a::asset_id` computes it; `vehicles.json` now gives it per element as `asset` (format 12; `model` is unchanged). In the library the field is 32 bits and stays the joaat of the name. - **Viewer.** A part's models are found by asset id first, by name hash for library parts. A pickup's bed is fitted by a part of the vehicle's own pack (slot `1c9dd6fe`: the bed at `mod_bed_attach` and usually the rear bumper), and the configurations list that part. So the bed no longer depends on the `<vehicle>_pickup` name guess, and a configuration that names another body gets it. All parts of that slot form one "body" choice. The name guess stays as a fallback where no part names the model. - Two parts can fit the same first model (reclaimerclassic has two flatbed parts); the option now answers to both part names. - The chassis part lists every stock alternative (bonnets, aerials, roof lights) and the rules that pick among them are not decoded, so it is left to its name as before. - An automated screenshot (`--screenshot --exit`) now waits for the parts reload a configuration asks for. ## Checked - One pickup's pack (declasse500): all 69 elements resolve to an existing model by asset id. - All vehicle packs, by the low half that vehicles.json already held: 13,274 of 13,349 elements resolve to a model name. - All 23 pickup / flatbed models are named by a part of slot `1c9dd6fe`, and for each the part is in the vehicle's configurations. - Renders: the 16 trucks and pickups of the earlier check all have their bodies; reclaimerclassic shows a tow bed in configuration 1, a flatbed in configuration 4 and the pickup bed in the others; benson, iota, mule and mb210 now also get side guards and a tail lift from their body parts. - `cargo test -p sixng-core -p sixng-gui`: 149 + 12 passed, with a new test of four known name / id pairs. ## Not decoded / not done - Which of the chassis part's alternatives the game shows (records `6191ddc2` / `deade5a9` name elements, not read). - The 75 elements that resolve to no model name (not looked at). - The name of slot `1c9dd6fe`. - Bed part colours: beds still take the stock grey on most pickups. The asset id is also the name of a model's part set, which could give them their colours; not done here. - reclaimerclassic's off-road front bumper in configuration 4 has a piece hanging askew (seen in the render; not looked into). - The side guards and tail lifts were checked by eye from two angles only.
- A mod part element's `asset` in a vehicle pack is a 64-bit id of its
  model: the first half of MurmurHash3 x64 128 (seed 0) of the model's
  lower-case name without LOD suffix (`meta7a::asset_id`). vehicles.json
  gives it per element (`asset`, format 12).
- The viewer finds a part's models by it. A pickup's bed is fitted by a
  part of the vehicle's own pack (bed at mod_bed_attach plus the rear
  bumper), which the configurations list: the bed no longer needs the
  name guess, and a configuration that names a flatbed or tow bed gets
  that body. Parts of that slot are one "body" choice.
- Two parts can fit the same first model; the option answers to both.
- The chassis part lists every stock alternative and is left as it was.
- An automated screenshot waits for a parts reload a configuration asked
  for.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:11:06 +00:00
github manually merged commit ef4e08597e into gh-pr/118/base 2026-11-26 20:11:09 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.