Names: natural-ground surface names recovered by hash #99
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!99
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/99/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?
@Snorps37 on GitHub · 2026-11-24 01:38 UTC · original
Snorps37:surface-terrain-names→master· +64 −4 · 2 files · 1 commits · merged 2026-11-24 02:27 UTCsixng annotatenow names 31 more collision surface ids inlevels.rpf: the natural-ground materials (TERRAIN_*) from the first block of the material XML, which is not read. Named ids go from 226 to 257 of 398, and named triangles from 63 % to 84 %.How the names were found:
DEFORM_,SUBMERGED_,TRACK_,STUNT_andVEG_all haveMUD_SOFT,SAND_WET,GRASS_LONGand so on. That gives 76 suffixes.TERRAIN_gives an unnamed id for 31 of the 76. A random prefix would give about 0.4 (172 of 32,749 ids), and the next best prefix gave 2.DEFORM_,ROAD_andTRACK_surfaces, as ground should.TERRAIN_SAND_WET(18.6 M triangles),TERRAIN_GRASS_LUSH,TERRAIN_SAND_COMPACT,TERRAIN_GRASS_SHORTandTERRAIN_SAND_LOOSE.Change:
RECOVERED_SURFACE_NAMESingamenames.rs.surface_names_fromadds these names after the names read from the XML, so a name read from the XML always wins.names_notetext and the README row now describe the recovered names.Not included: single hits from larger word lists, for example
DEFAULTon317b, a GTA V name. Those lists give many chance matches, so one hit is not enough.Tested:
recovered_surface_names. It checks four ids seen inlevels.rpf(for exampleTERRAIN_SAND_WET→2ea2), that the 31 ids are distinct, and that a name read from the XML still wins. It uses no game data.cargo test --release: 145 + 12 passed, 0 failed.sixng annotate levelson the full collision export:surface_ids_named257 of 398,triangles_named0.835.