Sector grids: per-file cell sizes and kinds, map groups switched by world-state rules #210

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

@⁠holdmysocks on GitHub · 2026-11-24 21:10 UTC · original
holdmysocks:claude/sector-grid-ids → master · +179 −68 · 2 files · 2 commits · merged 2026-11-24 21:54 UTC

What

PR #194 was merged with only its first commit. Its second commit, which corrected the format notes after checking all eight grid files, didn't land. This PR brings that commit over and adds the follow-up findings.

From the missing commit:

  • Each grid file has its own cell size: 1024, 512 or 60 m. Master treats every file as 60 m.
  • Grids come in two kinds: cell lists and map-group lists. The 64-bit field is a map group id, not a model id.
  • A cell's origin is its south-west corner.
  • The 32-bit key names a bundle of cells packed in name order.
  • sixng sector-grid reports the kind, cells, bundles and map groups of each grid, and takes --cell-m.

New findings (module docs only):

  • All 277 map group ids are switchable map groups.
    • 67 are a map file's group field 65876a4d.
    • 21 are a map file's own id 8bfb6095.
    • 154 of the other 189 sit in the world-state rules: the Enable/Disable lists of struct 9bc15b47 and the pairs of struct 2d3d070c, in 13 PSO files of levels.rpf and a few in story000.rpf.
    • The remaining 35 appear in no meta resource, PSO or binary file of any indexed archive.
  • Files 4 and 6 are the same file apart from their 75 bundle keys and the checksum.
  • The bundle key isn't a set of map files: only 27 % of map files keep their entities inside one bundle.
    • The keys occur in no other meta resource or PSO file.
    • They aren't joaat(prefix + "<x>_<y>") for any prefix (all 2³² prefix states tried with 140 coordinate spellings).

Checked

  • cargo test -p sixng-core --lib sectorgrid: 6 pass.
  • The release build is clean.
  • sixng sector-grid on the real archive gives the 8 grids with their kinds and cell sizes, all inside the height map's world box.

Not known

  • The bundle key's name (the entry names are in the encrypted table of contents).
  • What the 35 unreferenced map group ids are.
  • What selects file 5's cells.
**@⁠holdmysocks** on GitHub · 2026-11-24 21:10 UTC · [original](https://github.com/holdmysocks/SixNG/pull/210) `holdmysocks:claude/sector-grid-ids` → `master` · +179 −68 · 2 files · 2 commits · merged 2026-11-24 21:54 UTC ## What PR #194 was merged with only its first commit. Its second commit, which corrected the format notes after checking all eight grid files, didn't land. This PR brings that commit over and adds the follow-up findings. From the missing commit: - Each grid file has its own cell size: 1024, 512 or 60 m. Master treats every file as 60 m. - Grids come in two kinds: cell lists and map-group lists. The 64-bit field is a map group id, not a model id. - A cell's origin is its south-west corner. - The 32-bit key names a bundle of cells packed in name order. - `sixng sector-grid` reports the kind, cells, bundles and map groups of each grid, and takes `--cell-m`. New findings (module docs only): - **All 277 map group ids are switchable map groups.** - 67 are a map file's group field `65876a4d`. - 21 are a map file's own id `8bfb6095`. - 154 of the other 189 sit in the world-state rules: the `Enable`/`Disable` lists of struct `9bc15b47` and the pairs of struct `2d3d070c`, in 13 PSO files of levels.rpf and a few in story000.rpf. - The remaining 35 appear in no meta resource, PSO or binary file of any indexed archive. - **Files 4 and 6 are the same file** apart from their 75 bundle keys and the checksum. - **The bundle key isn't a set of map files**: only 27 % of map files keep their entities inside one bundle. - The keys occur in no other meta resource or PSO file. - They aren't `joaat(prefix + "<x>_<y>")` for any prefix (all 2³² prefix states tried with 140 coordinate spellings). ## Checked - `cargo test -p sixng-core --lib sectorgrid`: 6 pass. - The release build is clean. - `sixng sector-grid` on the real archive gives the 8 grids with their kinds and cell sizes, all inside the height map's world box. ## Not known - The bundle key's name (the entry names are in the encrypted table of contents). - What the 35 unreferenced map group ids are. - What selects file 5's cells.
All eight grid files decoded and measured against the placements of every
world map file: 1024, 512 and 60 m levels, each with a cell list and a
map-group list (64-bit field = map file field 65876a4d). The cell origin
is the south-west corner. The 32-bit key names bundles of cells packed in
name order to a content budget. Each grid gets its measured cell size;
sector-grid reports kind, cells, bundles and map groups and takes --cell-m.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:18:24 +00:00
github manually merged commit 9b37e47444 into gh-pr/210/base 2026-11-26 20:18:26 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.