Vehicles: brakes per axle; drum brakes come from the brake slots #220

Manually merged
github merged 2 commits from gh-pr/220/head into gh-pr/220/base 2026-11-26 20:19:12 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-24 22:52 UTC · original
holdmysocks:claude/brake-colours → master · +133 −31 · 3 files · 2 commits · merged 2026-11-24 23:04 UTC

What

Brakes are chosen per axle, and drum brakes are recognised. Before, the viewer and sixng vehicle only saw brake models a configuration names by model (brakedisc_*, caliper_*) and put one disc and one caliper on every wheel. A configuration whose brakes come through a part (all drums do) had none of its own, so the viewer borrowed another configuration's: reclaimerclassic's drum-brake pickups showed a sport disc and a red six-pot caliper.

Four slot hashes are joaat of plain names:

slot name holds
814a6407 brakediscs disc or drum
ee557cc2 brakediscs_rear disc or drum
98b9b49a calipers_front caliper
c98dbea6 calipers_rear caliper

A part in one of them has one element (bone 0) naming a brakedisc_*, drumbrake_* or caliper_* model by joaat of the name without _hi.

vehexport::brake_axles (used by both the export and the viewer):

  • front: the disc/caliper named by model, else the part in brakediscs / calipers_front;
  • rear: the part in brakediscs_rear / calipers_rear, else what the front has; a rear drum without a rear caliper part gets no caliper.

The viewer still borrows another configuration's brakes, but only when the configuration has no brake part at all (before, disc and caliper were borrowed separately, which gave drum configurations a caliper). The export's result gains wheels.brakes_by_axle; brake-slot parts no longer appear under left_out.

Also in passing: the rear bumper slot 8d48fd33 is joaat bumper_r (not used in code here).

Checked

  • Count over 4,063 configurations: a model-named disc and a brakediscs part never occur together; no slot holds more than one brake model; 1,820 of 1,932 configurations with a named caliper and a calipers_rear part have a different (smaller) caliper at the rear, e.g. dominator 4-pot front / 2-pot rear, coquette 6-pot / 4-pot.
  • sixng vehicle: reclaimerclassic configuration 0 fits drumbrake_001 on four wheels and no caliper (before: no brakes, the drum listed under left_out); configuration 8, dominator 2 and coquette 3 fit one disc on four wheels and the front and rear calipers on their own axles.
  • Viewer: reclaimerclassic configurations 0 and 4 show drums and no red calipers (before/after renders).
  • New unit test brakes_per_axle; cargo test --workspace --locked passes.

Not decoded / not done

  • Where a configuration has both a named caliper and a calipers_front part (44 configurations, e.g. walton: 1-pot stock named, 2-pot in the slot) the named one is taken; which the game uses is not known.
  • That the model-named parts are the front axle's is inferred from the caliper sizes, not read from data.
  • Slots 439fddac and 2ba6699f hold caliper_rimlight / drumbrake_rimlight models (49 configurations); their names and purpose are not known and they are still not fitted.
  • The split calipers were checked in the export's piece list, not by eye in the viewer (too small in the renders taken).
  • The Metal renderer was not built or run.
**@⁠holdmysocks** on GitHub · 2026-11-24 22:52 UTC · [original](https://github.com/holdmysocks/SixNG/pull/220) `holdmysocks:claude/brake-colours` → `master` · +133 −31 · 3 files · 2 commits · merged 2026-11-24 23:04 UTC ## What Brakes are chosen per axle, and drum brakes are recognised. Before, the viewer and `sixng vehicle` only saw brake models a configuration names by model (`brakedisc_*`, `caliper_*`) and put one disc and one caliper on every wheel. A configuration whose brakes come through a part (all drums do) had none of its own, so the viewer borrowed another configuration's: reclaimerclassic's drum-brake pickups showed a sport disc and a red six-pot caliper. Four slot hashes are joaat of plain names: | slot | name | holds | |---|---|---| | `814a6407` | `brakediscs` | disc or drum | | `ee557cc2` | `brakediscs_rear` | disc or drum | | `98b9b49a` | `calipers_front` | caliper | | `c98dbea6` | `calipers_rear` | caliper | A part in one of them has one element (bone 0) naming a `brakedisc_*`, `drumbrake_*` or `caliper_*` model by joaat of the name without `_hi`. `vehexport::brake_axles` (used by both the export and the viewer): - front: the disc/caliper named by model, else the part in `brakediscs` / `calipers_front`; - rear: the part in `brakediscs_rear` / `calipers_rear`, else what the front has; a rear drum without a rear caliper part gets no caliper. The viewer still borrows another configuration's brakes, but only when the configuration has no brake part at all (before, disc and caliper were borrowed separately, which gave drum configurations a caliper). The export's result gains `wheels.brakes_by_axle`; brake-slot parts no longer appear under `left_out`. Also in passing: the rear bumper slot `8d48fd33` is joaat `bumper_r` (not used in code here). ## Checked - Count over 4,063 configurations: a model-named disc and a `brakediscs` part never occur together; no slot holds more than one brake model; 1,820 of 1,932 configurations with a named caliper and a `calipers_rear` part have a different (smaller) caliper at the rear, e.g. dominator 4-pot front / 2-pot rear, coquette 6-pot / 4-pot. - `sixng vehicle`: reclaimerclassic configuration 0 fits `drumbrake_001` on four wheels and no caliper (before: no brakes, the drum listed under `left_out`); configuration 8, dominator 2 and coquette 3 fit one disc on four wheels and the front and rear calipers on their own axles. - Viewer: reclaimerclassic configurations 0 and 4 show drums and no red calipers (before/after renders). - New unit test `brakes_per_axle`; `cargo test --workspace --locked` passes. ## Not decoded / not done - Where a configuration has both a named caliper and a `calipers_front` part (44 configurations, e.g. walton: 1-pot stock named, 2-pot in the slot) the named one is taken; which the game uses is not known. - That the model-named parts are the front axle's is inferred from the caliper sizes, not read from data. - Slots `439fddac` and `2ba6699f` hold `caliper_rimlight` / `drumbrake_rimlight` models (49 configurations); their names and purpose are not known and they are still not fitted. - The split calipers were checked in the export's piece list, not by eye in the viewer (too small in the renders taken). - The Metal renderer was not built or run.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:19:11 +00:00
github manually merged commit 2aa179915f into gh-pr/220/base 2026-11-26 20:19:12 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.