Skip to content

Mmat97/Simulation-and-Game-Translator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Screenshot 2025-09-02 at 10 21 53 AM

Note: An OpenAI key is needed along with bought credits. Ex: When using Open AI's credit with your key, each cunk(80 lines) is about 1 cent, my script shows the number of chunks needed so if have a 40000 file that needs trnaslating you would need around $5 to get credits.

1) Translate the game file to English

python translate_game_script.py
-i Text_Event_Prod.txt
-o Text_Event_Prod_en.txt
--lines-per-chunk 80
--model gpt-4o-mini
--overwrite

2) Sanitize the translated file for pasting back into the game

Choose the line endings / encoding your game expects.

python sanitize_game_text.py
Text_Event_Prod_en.txt
Text_Event_Prod_en_clean.txt
--encoding utf-8
--line-endings crlf

3) Copy and paste from cleaned file to replace game/simulation file text

#Note: If error copy and paste partially to see which parts can be translated with the script and which can't

With this its easier to pinpoint errors and if you find them let me know!

Resuming a run

If it stopped midway, you can resume:

python translate_game_script.py
-i Text_Event_Prod.txt
-o Text_Event_Prod_en.txt
--lines-per-chunk 80
--model gpt-4o-mini
--resume

About

Automated machine learning translator for command scripts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages