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

Closed
opened 2026-11-26 20:17:56 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/406
Author: @fiestorra
Created: 11/24/2026
Status: ❌ Closed

Base: main ← Head: carry/modding-constants


📝 Commits (1)

  • 7e0f21f docs/modding: the constant search finds nothing on the 1.0.2.1 image

📊 Changes

1 file changed (+15 additions, -2 deletions)

View changed files

📝 docs/modding.md (+15 -2)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/406 **Author:** [@fiestorra](https://github.com/fiestorra) **Created:** 11/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `carry/modding-constants` --- ### 📝 Commits (1) - [`7e0f21f`](https://github.com/ubiquitarianism/leonida/commit/7e0f21ff6a728b86ca1d685f034aa2a83179f7df) docs/modding: the constant search finds nothing on the 1.0.2.1 image ### 📊 Changes **1 file changed** (+15 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `docs/modding.md` (+15 -2) </details> ### 📄 Description 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:17:56 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#456
No description provided.