The I of the Dragon — fan tools (localization + HD)
Reverse-engineering and localization tooling for The I of the Dragon (Topware / Primal Software).
This repository tracks only our own tools and documentation. It does not contain the game, its assets, or any cracked distribution — those are regenerated/produced locally from a legit copy.
Layout
tools/ Python tooling (unpack, repack, preprocess, font patch, decoders)
docs/ DEVLOG, format specs, patch notes
Working data (not tracked): original/, png/, report/, patch/, crack/.
Current localization status
The complete tutorial translation and Chinese font fixes were accepted in game by the user on 2026-09-20. All 57 tutorial display literals are translated using 42 mappings. Tooltip wrapping, option-title centering, intro alignment, and the Chinese full-stop baseline are fixed. The latest targeted regression run passes 39 tests; tutorial event logic remains byte-identical outside display strings.
See 教程汉化:构建、验证与恢复 for reproducible commands, accepted behavior, and the remaining project queue.
Tooling
| script | purpose |
|---|---|
tools/res_unpack.py |
extract a .res archive (index + raw blobs, 16-byte aligned) |
tools/res_repack.py |
rebuild a .res byte-identically from a directory |
tools/preprocess.py |
convert textures to PNG + build classification report |
tools/make_plan.py |
build an HD upscale plan from the report |
tools/decode_dat.py |
decode/encode the XOR-obfuscated Fonts.dat / *Description.dat |
tools/fontparse.py |
parse Fonts.dat into font blocks and glyph rects |
tools/add_section.py |
add an executable section to the game PE |
tools/apply_cjk.py |
apply the double-byte font-rendering patch |
tools/build_cjk.py |
build the 2048x1024 UI font atlas + cjk_glyph/cjk_metric tables |
tools/cn_strings.py |
simplified-Chinese translation table (Id -> text) |
tools/make_cn_strings.py |
patch the English column of Strings.dat to GB2312 |
tools/install_cjk.py |
deploy/restore the whole patch into the game folder |
tools/script_text.py |
translate tutorial display strings without changing event code |
tools/tutorial_cn.json |
complete tutorial translation mapping |
tools/verify_tutorial_step1.py |
verify the complete tutorial against the pinned original (historical filename) |
tools/fix_full_stop.py |
lower U+3002 pixels in an existing atlas without changing other glyphs |
tools/xrefs.py |
find call/jmp xrefs in the game executable |
See docs/ for the reverse-engineered formats and addresses.
Implementation history and remaining work: tutorial acceptance and subsequent small batches.
Legal
No game data is distributed here. Patches are produced by the user against their own copy.