[PR #154] [MERGED] um: UTF-8 console output, nested-exe fingerprinting, ZenGin (Gothic 1/2) detection + playbook #167

Closed
opened 2026-10-15 20:53:57 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/rehan-remade/universal-modder/pull/154
Author: @Alistair-Afton
Created: 10/8/2026
Status: ✅ Merged
Merged: 10/10/2026
Merged by: @rehan-remade

Base: main ← Head: um-windows-fixes-zengin


📝 Commits (5)

  • 620d3f5 um: UTF-8 console output; fingerprint exes in subdirs
  • aedd0f2 scan: don't take deep tooling jars as the game's engine
  • b805f9c scan + playbooks: detect ZenGin (Gothic 1/2), document the Union stack
  • 959f05d scan + zengin playbook: review fixes
  • 150f7a0 Merge remote-tracking branch 'origin/main' into land/pr-154

📊 Changes

9 files changed (+486 additions, -9 deletions)

View changed files

📝 .agents/skills/mod-any-game/SKILL.md (+1 -1)
➕ .agents/skills/mod-any-game/references/engines/zengin.md (+125 -0)
📝 .claude/skills/mod-any-game/SKILL.md (+1 -1)
➕ .claude/skills/mod-any-game/references/engines/zengin.md (+125 -0)
📝 skills/mod-any-game/SKILL.md (+1 -1)
➕ skills/mod-any-game/references/engines/zengin.md (+125 -0)
📝 tests/test_um.py (+81 -4)
📝 um/cli.py (+6 -0)
📝 um/scan.py (+21 -2)

📄 Description

Summary

Three Windows-field fixes and one engine addition, all hit while modding real installs:

  • UTF-8 console output (um/cli.py): kb show and win ps crashed with
    UnicodeEncodeError on cp1252 consoles whenever a note or window title had
    non-ASCII text. main() now reconfigures stdout/stderr to UTF-8
    (errors="replace"), so PYTHONUTF8=1 is no longer needed as a workaround.
  • Nested-exe fingerprinting (um/scan.py): only top-level *.exe files were
    fingerprinted, so games whose exe lives in system/ (Gothic), bin/, etc.
    scanned with an empty executables list and missed managed-exe detection.
    Now takes the 12 shallowest exes, skipping redist/installer dirs.
  • Deep tooling jars (um/scan.py): a dev workspace inside the install
    (e.g. a bundled Ghidra tree) put *.jar files in the index and misdetected a
    native game as "Java [60%]". Only jars at root or one level down count now.
  • ZenGin detection + playbook: Gothic 1/2 installs scanned as
    "unknown native engine". Adds the system/gothic*.exe + data/*.vdf
    signature, a zengin engine entry, KNOWN routes for Gothic 1/2 (including the
    required GOG 2.7 → 2.6.0.0-rev2 exe swap for Union/GD3D11), and a new
    references/engines/zengin.md playbook covering the Union plugin SDK,
    GD3D11, ZenKit VDF/ZTEX/MDH extraction, engine coordinate conventions, and
    the circulating source-tree caveat.

Verified on the real installs: Gothic 2 Gold now reports
ZenGin (Gothic 1/2) [95%] with the Union route, and Might and Magic 6
correctly reports a native engine instead of Java.

Test plan

  • uv run --with pytest pytest -q tests — 82 pass, incl. 4 new regression
    tests (nested exe, redist skip, deep-jar rejection, cp1252 console)
  • um scan on real Gothic 2 Gold and MM6 installs (see above)
  • .agents/skills and .claude/skills copies of zengin.md kept in sync
    (tree-parity test passes)

Generated with Devin


🔄 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/rehan-remade/universal-modder/pull/154 **Author:** [@Alistair-Afton](https://github.com/Alistair-Afton) **Created:** 10/8/2026 **Status:** ✅ Merged **Merged:** 10/10/2026 **Merged by:** [@rehan-remade](https://github.com/rehan-remade) **Base:** `main` ← **Head:** `um-windows-fixes-zengin` --- ### 📝 Commits (5) - [`620d3f5`](https://github.com/rehan-remade/universal-modder/commit/620d3f59ab00bc0a443a17db2498c687117d1c03) um: UTF-8 console output; fingerprint exes in subdirs - [`aedd0f2`](https://github.com/rehan-remade/universal-modder/commit/aedd0f2b9a07ea704ed73ecd54d5397ecbda1a63) scan: don't take deep tooling jars as the game's engine - [`b805f9c`](https://github.com/rehan-remade/universal-modder/commit/b805f9c3eae9629cc20e417f681663a30ec14576) scan + playbooks: detect ZenGin (Gothic 1/2), document the Union stack - [`959f05d`](https://github.com/rehan-remade/universal-modder/commit/959f05da5d037d4909be1df0c265b32e80410d06) scan + zengin playbook: review fixes - [`150f7a0`](https://github.com/rehan-remade/universal-modder/commit/150f7a0a07c24529db81cc5194f6fd845be91319) Merge remote-tracking branch 'origin/main' into land/pr-154 ### 📊 Changes **9 files changed** (+486 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `.agents/skills/mod-any-game/SKILL.md` (+1 -1) ➕ `.agents/skills/mod-any-game/references/engines/zengin.md` (+125 -0) 📝 `.claude/skills/mod-any-game/SKILL.md` (+1 -1) ➕ `.claude/skills/mod-any-game/references/engines/zengin.md` (+125 -0) 📝 `skills/mod-any-game/SKILL.md` (+1 -1) ➕ `skills/mod-any-game/references/engines/zengin.md` (+125 -0) 📝 `tests/test_um.py` (+81 -4) 📝 `um/cli.py` (+6 -0) 📝 `um/scan.py` (+21 -2) </details> ### 📄 Description ## Summary Three Windows-field fixes and one engine addition, all hit while modding real installs: - **UTF-8 console output** (`um/cli.py`): `kb show` and `win ps` crashed with `UnicodeEncodeError` on cp1252 consoles whenever a note or window title had non-ASCII text. `main()` now reconfigures stdout/stderr to UTF-8 (`errors="replace"`), so `PYTHONUTF8=1` is no longer needed as a workaround. - **Nested-exe fingerprinting** (`um/scan.py`): only top-level `*.exe` files were fingerprinted, so games whose exe lives in `system/` (Gothic), `bin/`, etc. scanned with an empty executables list and missed managed-exe detection. Now takes the 12 shallowest exes, skipping redist/installer dirs. - **Deep tooling jars** (`um/scan.py`): a dev workspace inside the install (e.g. a bundled Ghidra tree) put `*.jar` files in the index and misdetected a native game as "Java [60%]". Only jars at root or one level down count now. - **ZenGin detection + playbook**: Gothic 1/2 installs scanned as "unknown native engine". Adds the `system/gothic*.exe` + `data/*.vdf` signature, a `zengin` engine entry, KNOWN routes for Gothic 1/2 (including the required GOG 2.7 → 2.6.0.0-rev2 exe swap for Union/GD3D11), and a new `references/engines/zengin.md` playbook covering the Union plugin SDK, GD3D11, ZenKit VDF/ZTEX/MDH extraction, engine coordinate conventions, and the circulating source-tree caveat. Verified on the real installs: `Gothic 2 Gold` now reports `ZenGin (Gothic 1/2) [95%]` with the Union route, and `Might and Magic 6` correctly reports a native engine instead of Java. #### Test plan - [x] `uv run --with pytest pytest -q tests` — 82 pass, incl. 4 new regression tests (nested exe, redist skip, deep-jar rejection, cp1252 console) - [x] `um scan` on real Gothic 2 Gold and MM6 installs (see above) - [x] `.agents/skills` and `.claude/skills` copies of `zengin.md` kept in sync (tree-parity test passes) Generated with [Devin](https://devin.ai) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 20:53:57 +00:00
Sign in to join this conversation.
No labels
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
rehan-remade/universal-modder#167
No description provided.