# Regional free-roam event-group filter, r397

The XP guest graphics adapter cannot render NFSU2, so this work does not use
the VM as a gameplay or visual reference. It reads the installed retail files
from the VM disk, exports their static city data, and checks the WebGL result
in host Chrome.

## Source validation

Each installed `L4R*.BUN` companion bundle contains a `0x34107` override table
and a `0x34108` named-group table. Group member indices map to override rows;
each override row names a section and placement-row index in the matching
`STREAML4R*.BUN`. Across the eight regions, all 21,342 override rows map to
unique existing stream placements, and every copied flag matches its stream
record.

The named groups include `SMOKEABLE`, `FREE_ROAM`, `BARRIERS_<id>` and
`PLAYER_BARRIERS_<id>`. The exporter omits a placement only when every group
that names it matches a numeric `BARRIERS_<id>` or `PLAYER_BARRIERS_<id>` name.
It keeps shared placements, `FREE_ROAM`, smokeable, nonnumeric, ungrouped, and
otherwise unknown rows. Placement flags are validated against the source but
are not used as a behavior proxy.

| Region | Override rows | Event-only rows omitted |
| --- | ---: | ---: |
| L4RA | 6,431 | 5,697 |
| L4RB | 1,428 | 1,364 |
| L4RC | 1,568 | 1,568 |
| L4RD | 998 | 369 |
| L4RF | 5,621 | 5,609 |
| L4RG | 4,827 | 4,823 |
| L4RH | 469 | 0 |
| L4RR | 0 | 0 |

Only L4RA and L4RD contain a named `FREE_ROAM` group in their sidecars (54
member references each). L4RB, L4RC, L4RF, L4RG, L4RH, and L4RR do not. The
separate route exports contain 832 L4RA route records and 26 L4RD route
records, while four other streams also contain route records but no named
`FREE_ROAM` scenery group. These labels are source clues, not proof of which
group is active at runtime; the executable's group activation state has not
been captured live.

The eight separate regional GLBs were rebuilt and their inventory is recorded
in `city-region-export-manifest.json`. No prototype geometry or retained
placement transform was changed. Some removed placement rows do not resolve to
visible geometry in that region's exported stream, so filtering thousands of
records can yield only a small triangle-count reduction.

## Browser review

The packaged L4RA view loaded all 223 nearby textures in host Chrome with no
page errors. The [screenshot feed](../webgl-city/review/) records the view and
its limits. This removes a verified source of race-only scenery from the
regional free-roam exports. It does not prove that all buildings are in the
right place or that the eight streams form a continuous city. Car materials,
lighting, traffic runtime behavior, and player physics remain unfinished.

## Rebuild

```sh
python3 tools/export_nfsu2_world.py /path/to/STREAML4RA.BUN \
  reverse-engineering/city-l4ra-textured-clean.glb \
  --texture-pack /path/to/GLOBALB.BUN \
  --texture-pack /path/to/InGameCommon.bun \
  --dynamic-texture-pack /path/to/LOC4DYNTEX.BIN \
  --companion-track /path/to/L4RA.BUN
python3 tools/package_webgl_dist.py
```
