A comprehensive Chinese localization mod for TheDeadseat using the Godot Mod Loader system. This mod translates in-game text, UI elements, and video subtitles while preserving the original game's visual style with custom pixel fonts.
This mod addresses the challenge of translating hardcoded strings in the base game through an automated pipeline:
- Text Extraction -
extract_text.pyscans.tscn,.tres, and.gdfiles using regex patterns to extract translatable strings intotemplate.csv - Collaborative Translation - The template is uploaded to ParaTranz for community translation
- Format Processing -
format_translation.pyconverts the translated CSV into Godot's translation format with proper line ending normalization - Font Subsetting -
extract_font_subset.pyuses fontTools to generate minimal TTF files containing only the required glyphs, reducing file size
Navigate to the game's root directory and run the extraction script:
python mods-unpacked/Aiden-ChineseTranslation/.scripts/extract_text.pyThis generates template.csv in .scripts/tmp/ containing all extractable strings from the base game.
Copy template.csv to translation_template.csv:
copy .scripts\tmp\template.csv .scripts\tmp\translation_template.csvUpload translation_template.csv to ParaTranz project for collaborative translation.
After translation is complete, download translation_template.csv from ParaTranz and place it in .scripts/tmp/. Then format the translation file:
python mods-unpacked/Aiden-ChineseTranslation/.scripts/format_translation.pyThis outputs the formatted translations/translation.csv file used by Godot.
Download the Fusion Pixel Font Chinese variants:
fusion-pixel-8px-proportional-zh_hans.ttffusion-pixel-12px-proportional-zh_hans.ttf
Place both files in .scripts/tmp/fonts/.
Open fusion-pixel-12px-proportional-zh_hans.ttf in FontForge:
- Select all glyphs → Element → Transformations → Transform
- Set Origin to Glyph Origin
- Scale X: 170%, Scale Y: 170%
- Center glyphs → Metrics → Center in Width
- Adjust metrics → Element → Font Info → OS/2 → Metrics
- HHead Ascent: 1700
- HHead Descent: -450
- Export as
fusion-pixel-12px-proportional-zh_hans-subset-transform.ttftofonts/directory
Copy the 8px font directly to fonts/ as well.
Run the subsetting script to create optimized font files containing only the characters used in translations:
python mods-unpacked/Aiden-ChineseTranslation/.scripts/extract_font_subset.pyThis generates subset TTF files in .scripts/tmp/fonts/ that should be moved to the final fonts/ directory.
- Dynamic Font Substitution - Uses
FontVariation.take_over_path()to inject custom fonts without modifying game files - Script Extension Pattern - Extends base game classes via
ModLoaderMod.install_script_extension()to intercept and translate text dynamically - Regex-based Parsing - Handles escaped strings and multi-line text with patterns like
(?:[^"\\]|\\.)* - Python Type Hints - Full static typing with
List[str],Set[str], andPathannotations for maintainable tooling scripts - Resource Takeover - Replaces image and video resources at runtime via
take_over_path()for UI/cutscene translations
- Godot Mod Loader - Version 7.0.1 compatible modding framework
- fontTools - Python library for TTF manipulation and subsetting
- Fusion Pixel Font - Retro-styled Chinese pixel fonts (8px and 12px variants)
- FontForge - Used for 12px font transformation (170% scaling, metrics adjustment)
- ParaTranz - Crowdsourced translation platform with CC BY-NC 4.0 licensing
- CSV Module - Python's built-in CSV handling for translation data
mods-unpacked/Aiden-ChineseTranslation/
├── .scripts/ # Python automation tools
├── extensions/ # GDScript extensions for runtime text injection
├── fonts/ # Custom pixel font TTF files
├── overwrites/ # Translated image and video assets
│ ├── art/ # UI textures and sprites
│ └── videos/ # Cutscene videos with Chinese subtitles
└── translations/ # CSV and compiled .translation files
Notable Directories:
.scripts/- Contains the three-stage translation pipeline tools (extraction → formatting → font subsetting). The dot-prefix ensures these development scripts are excluded when exporting the mod, keeping the distributed package clean and minimal.extensions/- Monkey-patches game scripts to wrap strings withtr()for translation lookupoverwrites/- Binary assets (PNG/OGV) with baked-in Chinese text, following original game copyright
Following Godot best practices:
- GDScript - CRLF line endings with tab indentation
- Python - CRLF with 4-space indentation
- Translation Content - CC BY-NC 4.0 via ParaTranz contributors
- Fonts - SIL OFL 1.1 by TakWolf
- Mod Framework - godot-mod-tool (MIT), godot-mod-loader (CC0 1.0 Universal)
- Overwritten Assets - Original game copyright (acquire through legitimate game purchase)
- Godot Modding Tutorial - Video guide on creating Godot mods
- Steam Workshop Page - Download and discussion