2.9 KiB
2.9 KiB
DEVLOG
Working log for the The I of the Dragon localization / HD project. Newest entries on top.
2026-09-20 — Double-byte font patch proven
- Reverse-engineered the whole text pipeline (see
patch-notes.md). - Built
tools/add_section.py(PE section injection) and verified the patched exe still runs. - Built
tools/apply_cjk.py: assembles two code caves with keystone, adds a.cjksection, hooks the draw loop (0x4EACB0) and the metrics loop (0x4E8026). - Verified on screen: a GB2312-coded string
0xC1FA(龙) in a menu label rendered a 16x16 glyph at the mapped atlas position (green control test). Double-byte decode + render works. - Game files restored afterwards (exe SHA1
9EDB9B99...,Textures.resbyte-identical).
Next
- Big atlas (2048x2048): ASCII glyphs (copied) + CJK glyphs; re-point
Fonts.datTexture+ ASCII rects. - Generator for
cjk_glyph/cjk_metrictables from a chosen charset. - Convert
Strings.dat, scripts, and*Description.datdisplay text to GB2312. - Redraw baked-in text textures (menu buttons, credits, tutorial).
- Package: patched exe + atlas + data files.
2026-09-20 — HD texture preprocessing
- Cracked the
.resarchive format and builtres_unpack.py/res_repack.py(byte-identical round-trip once 16-byte alignment was found). - Extracted
Textures.res(1884) andGeometry.res(1397). - Built
preprocess.py(TGA/DDS→PNG, classification) andmake_plan.py. - Result: 63.6 Mpix, 1882 PNG, 0 failures. Plan: 1195 upscale / 499 tiling / 182 review / 8 skip (6 font atlases + 2 non-textures).
2026-09-20 — Cracking the .dat obfuscation
Fonts.dat/UnitDescription.dat/AIDescription.datdecoded:b"==" + XOR(plaintext, "GBDFYTNE"); key at0x620D18, decoder at0x4AE1D0.Fonts.datparsed: 4 font blocks, per-char atlas rects; parser keeps only the first byte ofCode(0x4EC168), so the stock engine is single-byte.
2026-09-20 — Initial findings
- Engine has a data-driven multi-language system: per-language folders for scripts/speech/video/UI
textures and language columns in
Strings.dat. - Text is externalized:
Strings.dat(499 entries, plain) and plain-text scripts. - First font test: replaced the
eglyph inShrift_gb_Germany.TGAand confirmed the atlas override works in game (rendered 龙 whereewas). - Investigated the "pirate build": PROPHET 2009 Topware release, languages EN/DE/PL/CZ/HU, no Chinese; its exe is identical to the Steam exe (no engine patch), so the Chinese build the user remembers was a different repack (not recoverable from it).
Decisions
- Do the localization ourselves (route B): patch the engine for double-byte text, build our own font atlas, translate only display text (never Ids / event names / unit types) to avoid trigger bugs.
- Keep the repository text-only; regenerate binaries from scripts (see
.gitignore).