A simple Python utility that converts a game data JSON file into a simplified ID → English name mapping.
The script automatically extracts the best available English name for each entry and can optionally translate Chinese-only names into English using a translation API.
- Extracts English names from multiple fields.
- Automatically falls back through several name sources.
- Supports automatic Chinese → English translation when no English name exists.
- Translation cache to avoid duplicate API requests.
- Outputs a clean and lightweight JSON file.
- Fully automated with GitHub Actions.
- Automatically publishes generated files as GitHub Releases.
Example:
{
"2450103": {
"Id": 2450103,
"Names": {
"en": "Burn",
"zh-CN": "灼烧"
}
}
}{
"2450103": "Burn"
}If an English translation is unavailable:
{
"4601": {
"LinkedBuffName": "引爆引燃Buff"
}
}the script will automatically translate it to English (if translation is enabled).
The converter searches for names in the following order:
Names.enLinkedSkillTableNames.enLinkedBuffNames.enLinkedSkillEffectSkillTableNames.enName(if already English)- Translate Chinese fallback fields
Chinese fallback fields:
NameLinkedSkillTableNameLinkedBuffNameLinkedSkillEffectSkillTableNameNameDesign
When no English name exists, the converter can automatically translate Chinese text into English.
To reduce API usage:
- duplicate strings are translated only once
- translations are cached locally
- cached translations are reused in future runs
See the project TODO list for the planned translation pipeline and future improvements.
Offline Translation: See the Local Translator Setup Guide for installation instructions and configuration.
Clone the repository:
git clone https://github.com/<username>/<repository>.git
cd <repository>Install dependencies:
pip install -r requirements.txtPlace your source file as:
input.json
Run:
python convert.pyGenerated file:
output.json
This repository includes an automated workflow that:
- runs the converter
- commits updated output
- creates a GitHub Release
- uploads the generated
output.json - generates version tags using:
vYYYY.MM.DDr<run_number>
Example:
v2026.07.10r42
.
├── .github/
│ └── workflows/
├── convert.py
├── input.json
├── output.json
├── translation_cache.json
├── requirements.txt
└── README.md
- Python 3.12+
- Internet connection (if automatic translation is enabled)
This project is released under the MIT License.
Converts the game's DamageAttrTable JSON into a simplified JSON containing only IDs and English names.
The converter expects a JSON file named input.json in the project root.
Example:
{
"2450103": {
"Id": 2450103,
"Name": "Burn",
"Names": {
"en": "Burn",
"zh-CN": "灼烧"
},
"LinkedSkillTableNames": {
"en": "Boar Charge"
}
}
}The generated output.json contains only the ID and the English name.
Example:
{
"2450103": "Burn"
}The converter selects the first available English name in the following order:
Names.enLinkedSkillTableNames.enLinkedBuffNames.enNameId(fallback)
Requirements:
- Python 3.8 or newer
Run:
python convert.pyAfter completion, output.json will be created or updated.
This repository includes a GitHub Actions workflow that:
- Runs automatically on every push to the
mainbranch. - Can also be started manually using Run workflow.
- Executes
convert.py. - Automatically commits and pushes
output.jsonif it has changed.
.
├── .github/
│ └── workflows/
│ └── convert.yml
├── convert.py
├── input.json
├── output.json
└── README.md
This project is provided as-is under the MIT License.