diff options
| author | Kacper Serewiś <kacper@serewis.nl> | 2026-11-23 16:37:15 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-11-23 09:37:15 -0600 |
| commit | c1aa89e0ffa89b88ca3e7dafb77bc87e71eb9ff2 (patch) | |
| tree | 21b6ca180c5c7963865e1d42d7f752e1acab0d5c /docs | |
| parent | 01f8116d1b58f7fe632ac92a9a51bdd990a8fecc (diff) | |
BUILD-2389: verify keyed drawable offset predictions against exported models (#6900)
Squash-merged after diff review of PR #6900 - BUILD-2389: verify keyed drawable offset predictions against exported models
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/models.md | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/docs/models.md b/docs/models.md index fd783dd36..5c29b2332 100644 --- a/docs/models.md +++ b/docs/models.md | |||
| @@ -829,3 +829,32 @@ geometry from the BIN chunk. Standard library only; no game files. | |||
| 829 | `levels.rpf` has the same 343,327 rows in a full export (50,731 fragments, 2,509,947,536 | 829 | `levels.rpf` has the same 343,327 rows in a full export (50,731 fragments, 2,509,947,536 |
| 830 | triangles). | 830 | triangles). |
| 831 | 4. Keep the README and issue #29 in sync with the new counts. | 831 | 4. Keep the README and issue #29 in sync with the new counts. |
| 832 | |||
| 833 | ### Predict model offsets for placements | ||
| 834 | |||
| 835 | Run `python -I tools/world_drawable_lookup.py entities.jsonl archetypes.json names.json` | ||
| 836 | with the placement rows from `world_index.py --entities-out`, the definitions from | ||
| 837 | `world_archetypes.py`, and a bounded `rpf9_names.py --types dr,ft` report. The command | ||
| 838 | prints local scratch JSON. Supply `--manifest path/to/models/manifest.json` for each | ||
| 839 | existing export whose listed identities should be excluded. | ||
| 840 | |||
| 841 | The lookup requires agreement between the placement archetype, the definition's name and | ||
| 842 | assetName, the resource stem's joaat and its 64-bit placement key. It considers type 1 | ||
| 843 | fragments and type 2 drawables at page offset +16. Multiple offsets for an identity in | ||
| 844 | the indexed window are marked ambiguous. Even a single hit is a prediction: a stream | ||
| 845 | can mention another model. Export a window around the predicted offset with | ||
| 846 | `rpf9dump models <archive> <outdir> --start BYTES --length BYTES`, compare the manifest offset and | ||
| 847 | model identity and run `world_build.py --placements` with the exported geometry. | ||
| 848 | |||
| 849 | Save the lookup JSON and run | ||
| 850 | `python -I tools/world_drawable_verify.py lookup.json first/models/manifest.json second/models/manifest.json` | ||
| 851 | to verify single-offset predictions. Supply completed normal model manifests from the | ||
| 852 | same source archive. The verifier reads cached JSON only. It uses the world builder's | ||
| 853 | name hashes and counts each identity and its placements once. A matching offset and both | ||
| 854 | hashes confirm an observation, including dictionary children sharing an offset. The local | ||
| 855 | report counts repeat exact observations and lists other offsets for the same identity. | ||
| 856 | Without an exact match, a different name at the offset takes precedence over a matching | ||
| 857 | identity elsewhere. The coverage flag independently records whether the predicted offset | ||
| 858 | falls in a supplied scan (start inclusive, end exclusive). A full scan covers all offsets. | ||
| 859 | A covered prediction with no named evidence remains missing. Geometry loadability is | ||
| 860 | checked separately by running the normal world builder on confirmed placement rows. | ||