This repository contains tools to streamline the localization process for the game Brigand. It includes scripts to extract original text, organize it for translation, and re-import translations into the game files with minimal effort and maximum accuracy.
- Python 3.x and basic knowledge of running Python scripts via the command line.
Before starting:
- Create a new folder as your working directory, and copy extract.py and import.py into this directory. (Or if you're familiar with git, directly clone this repo to your local)
- Copy the Assets and Stories folders from the game's root directory (...\steamapps\common\Brigand) into your working directory.
- The Assets folder will be used as the source for extraction
- In Assets, remove any language versions you don't need to translate (e.g., folders ending with "(RU)" for Russian, "(ES)" for Spanish, etc.), but don't touch with other original versions
- From the remaining folders in Assets, copy all story-related txt files (e.g., "BRIGAND - OAXACA\BRIGAND - OAXACA.txt") to the Stories folder in your working directory
- This is an extra step due to a minor issue in the game’s source files. To ensure the localization program runs correctly, a manual adjustment is required. In the file "Assets\BRIGAND - PANAMA\Objects\text\textUse.bsl" (you can ignore this step if you don't have BRIGAND - PANAMA), on line 119, there is an invalid character between "altwin=The Ancient Mariner," and "Water, water, every where,/r". Replace this invalid character with a standard English quotation mark ("), then save the file in UTF-8 format. (This step would be removed if this issue is fixed later)
working_directory/
├── extract.py
├── import.py
├── Assets/ (copied from game root)
└── Stories/ (copied from game root)
- Run the extraction script:
python extract.py
- A new
Extracted
folder will be created containing JSON files with the original text. I also put a small excerpt of an extracted JSON in this repo. You can use it as a sample to see how it works.
Fill in the "translation" field for each JSON entry. We recommend using the ParaTranz platform for more convenient translation, but it's optional:
- Create a new project on ParaTranz
- Upload the extracted JSON files
- Use the platform's visual UI for translation
- The platform helps prevent formatting errors during editing
- Create a new folder in your working directory
- Place all translated JSON files in this folder (tip: we recommend creating a backup of the translated JSON files in a location outside your working directory before proceeding, just as a precautionary measure)
- Run the import script with the following parameters:
Example:
python import.py --encoding [target_encoding] --dir [translation_folder]
python import.py --encoding gb2312 --dir chinese_translation
After importing, you'll find an Output
folder containing the translated Assets
and Stories
folders. You have two options for testing your translations:
- IMPORTANT: Back up your game's original
Assets
,Stories
, andSaves
folders in the game root directory - Copy and overwrite the contents of the
Output
folder to your game root directory - Run the launcher and select your language charset
- If you want to restore overwritten files later, use the backups (REMEMBER TO BACK UP!!!)
Follow the developer's translation guide to create a new Story using the contents of the Output
folder.
- Always backup your game files before overwriting
- Make sure to use the correct encoding for your target language (e.g., gb2312 for Chinese)
- As the localization project is still ongoing, there may be potential bugs that have not yet been addressed. This repository will be updated periodically to fix issues or introduce new features. In addition, the current version of extract.py does not extract all in-game text considering the progress of our translation team. You are welcome to modify the script to meet your specific needs.
If you encounter any issues or need assistance, please:
- Check the Issues section
- Create a new issue with detailed information about your problem