DOC-MODDING-CONSTANTS: the constant search in docs/modding.md gives nothing on this image #406

Closed
fiestorra wants to merge 1 commit from upstream-pr/406 into main
fiestorra commented 2026-11-24 04:44:54 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-24T04:44:54Z.


Claimed in the coordination issue as: DOC-MODDING-CONSTANTS (claim comment).

What this changes

Step 1 of the lookup-finding recipe in docs/modding.md presents the constant search as the route to the archetype lookup: "The player model id 0xE472B687 should appear as an immediate in the code that sets up the story player."

On the 1.0.2.1 image it gives nothing, and the row should say so before someone spends an afternoon looking for it:

  • neither 0xE472B687 nor 0xD7C0CDFF is in the executable at all. All 120,181,760 bytes were read and searched as 4-byte little-endian, 4-byte big-endian, decimal text and hex text: 0 hits for each form. Re-run today, same result.
  • the image has no delay-load directory (data directory 13 is zero), so the ids cannot arrive through an import table either.
  • tools/find_hash_lookup.py reports the same thing on its own: 0 occurrence(s) in code, "no direct call follows any of the hashes".
  • the ids are real and the game's own tables carry them: 24 occurrences across the package's root archives (data.rpf 1, packs.rpf 3, anim.rpf 4, navmeshes.rpf 10, movies.rpf 6; little-endian except a few big-endian ones in anim.rpf, navmeshes.rpf and movies.rpf), measured 2026-11-23.

So the constants are the right keys and they are simply not in the code: on this build step 2 (the shape) is what has to find the function. The row now says that, with the counts and the dates.

The image is the one this repository already documents: docs/embedded_shaders.md :44 records it as 120,181,760 bytes with SHA-256 e95020b2fa4a721db3df59fdecf75621730ac559d8835252f6c3b658d5a08993, and Get-FileHash on the file I searched returns exactly that value, so the measurement is on the same image your own docs describe.

Evidence

Head 7e0f21ff6, one commit, docs/modding.md only, rebased onto ece4ba5b3.

  • py -3.13 -I -m unittest discover -s tests -p "test_docs_*.py" on this branch: Ran 47 tests in 44.733s / OK. The same command on clean ece4ba5b3: Ran 47 tests in 45.178s / OK. Same 47 tests, no failures on either side, so this PR changes no test outcome.
  • The replaced wording is what main says at docs/modding.md :133 and :137 right now (1. **Constant search.** The player model id 0xE472B687 should appear as an immediate… and 3. **Cross-check.** Called with 0xD7C0CDFF…), and step 3 is stated as something that "must return a valid archetype too", which cannot be reached from a hash that is never loaded.

No GPU is involved: the search was done on the executable bytes and on the package's archives, and the docs battery runs on the CPU. Hardware used: one desktop machine, Windows build 26300, CPython 3.13.14. Written with an AI assistant; the commands and the measurements above are reproducible as written.

Neighbour

I read #358 before claiming, and I know it edits docs/modding.md too (for the SHA-256 check in tools/leonida_mods.py). If you take that one first I will rebase this on it rather than ask you to resolve anything; my edit is confined to the three numbered steps quoted above.

Supersedes the branch carried in the private tracker as #7929, closed unmerged by the sweep.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5466235717 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/406). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-24T04:44:54Z. --- Claimed in the coordination issue as: `DOC-MODDING-CONSTANTS` ([claim comment](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7122051420)). ### What this changes Step 1 of the lookup-finding recipe in `docs/modding.md` presents the constant search as the route to the archetype lookup: "The player model id `0xE472B687` should appear as an immediate in the code that sets up the story player." On the 1.0.2.1 image it gives nothing, and the row should say so before someone spends an afternoon looking for it: * neither `0xE472B687` nor `0xD7C0CDFF` is in the executable at all. All 120,181,760 bytes were read and searched as 4-byte little-endian, 4-byte big-endian, decimal text and hex text: `0` hits for each form. Re-run today, same result. * the image has no delay-load directory (data directory 13 is zero), so the ids cannot arrive through an import table either. * `tools/find_hash_lookup.py` reports the same thing on its own: `0 occurrence(s) in code`, "no direct call follows any of the hashes". * the ids are real and the game's own tables carry them: 24 occurrences across the package's root archives (`data.rpf` 1, `packs.rpf` 3, `anim.rpf` 4, `navmeshes.rpf` 10, `movies.rpf` 6; little-endian except a few big-endian ones in `anim.rpf`, `navmeshes.rpf` and `movies.rpf`), measured 2026-11-23. So the constants are the right keys and they are simply not in the code: on this build step 2 (the shape) is what has to find the function. The row now says that, with the counts and the dates. The image is the one this repository already documents: `docs/embedded_shaders.md` :44 records it as 120,181,760 bytes with SHA-256 `e95020b2fa4a721db3df59fdecf75621730ac559d8835252f6c3b658d5a08993`, and `Get-FileHash` on the file I searched returns exactly that value, so the measurement is on the same image your own docs describe. ### Evidence Head `7e0f21ff6`, one commit, `docs/modding.md` only, rebased onto `ece4ba5b3`. * `py -3.13 -I -m unittest discover -s tests -p "test_docs_*.py"` on this branch: `Ran 47 tests in 44.733s` / `OK`. The same command on clean `ece4ba5b3`: `Ran 47 tests in 45.178s` / `OK`. Same 47 tests, no failures on either side, so this PR changes no test outcome. * The replaced wording is what `main` says at `docs/modding.md` :133 and :137 right now (`1. **Constant search.** The player model id 0xE472B687 should appear as an immediate…` and `3. **Cross-check.** Called with 0xD7C0CDFF…`), and step 3 is stated as something that "must return a valid archetype too", which cannot be reached from a hash that is never loaded. No GPU is involved: the search was done on the executable bytes and on the package's archives, and the docs battery runs on the CPU. Hardware used: one desktop machine, Windows build 26300, CPython 3.13.14. Written with an AI assistant; the commands and the measurements above are reproducible as written. ### Neighbour I read #358 before claiming, and I know it edits `docs/modding.md` too (for the SHA-256 check in `tools/leonida_mods.py`). If you take that one first I will rebase this on it rather than ask you to resolve anything; my edit is confined to the three numbered steps quoted above. Supersedes the branch carried in the private tracker as #7929, closed unmerged by the sweep.
fiestorra commented 2026-11-24 12:19:10 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-24T12:19:10Z.


Closing this. I am moving my work to a different project and will not continue on this repository, so I am not going to rebase or finish this branch. Nothing in it landed. The branch will be deleted shortly. Thanks to anyone who looked at it.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7131271371 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/406#issuecomment-7131271371). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-24T12:19:10Z. --- Closing this. I am moving my work to a different project and will not continue on this repository, so I am not going to rebase or finish this branch. Nothing in it landed. The branch will be deleted shortly. Thanks to anyone who looked at it. Written with an AI assistant.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!406
No description provided.