Automatic game data translator for RPGMaker-MV

Overview

RPGMaker-MV Translator ๐Ÿ•น๏ธ

๐ŸŽฎ Use AI to translate all the dialogs and texts of your RPGMaker automatically.

๐Ÿ‘Š You worked hard to make your game, now let AI work hard for you.

Original language ๐Ÿ‡ฎ๐Ÿ‡น Automatic Translation ๐Ÿ‡บ๐Ÿ‡ธ

Why should you use it? ๐Ÿค”

๐Ÿ‘‰ RPG games usually consist of many thousands of dialog events and other forms of text displaying valuable information to understand the plot of the game, but also to know the effect and proprieties of various objects present in the game such as items, weapons, skills, enemies, ... .

๐Ÿ‘‰ Translating an RPG game from one language to another would thus require an enormous amount of time and effort for a human, but it is a task that can be easily accomplished by a machine, or at least speed up considerably the work of a human translator saving costs and time.

๐Ÿ‘‰ This project implements a tool that is able to automatically translate a game deployed with RPGMaker-MV.

Game files overview ๐ŸŽฎ

Game files containing the data we want to translate are usually contained in the folder data/. Among these json files, the ones we are going to translate are the following:

  • Armors.json: contains the name and the description of all armors ๐Ÿ›ก๏ธ . ๏ธ
  • Weapons.json: contains the name and the description of all weapons ๐Ÿ—ก๏ธ .
  • Items.json: contains the name and the description of all items ๐Ÿ’ก .
  • Skills.json: contains the name and the description of all skills โšก .
  • Enemies.json: contains the name of all enemies ๐Ÿ‘พ .
  • MapInfos.json: contains the name of all maps ๐Ÿ—บ๏ธ .
  • Classes.json: contains the name of all classes ๐Ÿง™ .
  • States.json: contains the name and the relative messages of all states โœจ .
  • Actors.json: contains the profile of all characters ๐Ÿ‘ฉ .

Other files that need to be translated, but deserve particular attention are:

  • CommonEvents.json: contains the dialogs relative to the common events in the game ๐Ÿค– .
  • MapXXX.json: contains the dialogs relative to all the maps. Basically it contains most of the dialogs on the game which would probably require a massive amount of time if translated manually ๐Ÿ—บ๏ธ .

The remaining files are not translated since they don't contain much text to translate such as System.json or there is nothing critical to translate such as Animations.json.

Usage ๐Ÿ’ก

Translate the dialogs files

Note: the program uses a Google Translate API to perform translations, thus a stable internet connection is required.

  1. Clone this repo: git clone https://github.com/davide97l/rpgmaker-mv-translator.
  2. Install dependencies: pip install -r requirements.txt.
  3. Copy CommonEvents.json and all the MapXXX.json files from you game data/folder to this project dialogs folder.
  4. For a basic usage, run the command:
  python dialogs_translator.py --print_neatly --source_lang it --dest_lang en
  1. Most important arguments explanation:
    • source_lang: (string) the original language of your game (en - english, it - italian, zh - chinese, fr -french, sp - spanish, de - deutsch, ...).
    • dest_lang: (string) the language you want to translate your game.
    • verbose: (bool) if True, show each original and corresponding translated sentence during execution.
    • input_folder: (string) the folder containing the files to translate (default: dialogs).
    • print_neatly: (bool) if True, adapts the translated sentence to fit the dialog window. This is because, by default, each dialog window row is a unique string itself and its length can change after translation. This option also improves the translation quality because each dialog window would be translated at once without translating each row one by one which causes loss of context. If you are curious how this algorithm works you can check this blog.
    • max_len (int): Used only when print_neatly is True. Indicates the length of the dialog window.
  2. After execution, which may take a while depending on the number and size of files, your translated files will be saved in data_xx where xx is the code of the translated language (dialogs_en if --dest_lang en).
  3. Copy back the content of dialogs_xx to the folder data of your game replacing the old files.

Example of print neatly with max_len=32 translating from english to italian:

   |The hunter has won the battle  |
   |and unlocked a new secret      |
   |skill.                         |
   
   After italian translation without print neatly:
   
   |Il cacciatore ha vinto la batta|glia
   |e sbloccato una nuovo segreto  |
   |potere.                        |
    
    After print neatly:

   |Il cacciatore ha vinto la      |
   |battaglia e sbloccato un nuovo |
   |potere segreto.                |

Translate the object files

  1. Copy the files you want to translate among Armors.json, Weapons.json, Items.json, Skills.json, Enemies.json, MapInfos.json, Classes.json, States.json, Actors.json from you game data/ folder to this project object folder.
  2. For a basic usage, run the command:
  python objects_translator.py --source_lang it --dest_lang en
  1. The arguments are the same as the ones used by dialogs_translator.py, and print neatly is automatically used in the description field. By default input_folder is set to objects).
  2. After execution, your translated files will be saved in objects_xx where xx is the code of the translated language (objects_en if --dest_lang en).
  3. Copy back the content of objects_xx to the folder data of your game replacing the old files.

Support

If you found this project interesting please support me by giving it a โญ , I would really appreciate it ๐Ÿ˜€

More

Check this link to play some of my RPGs ๐Ÿ˜ .

You might also like...
Quiz Game: answering questions naturally with a friendly UI to enjoy the game
Quiz Game: answering questions naturally with a friendly UI to enjoy the game

About Quiz Game : The Game is about answering questions naturally with a friendl

This is a simple telegram bot for the game Pyal, a word guessing game inspired by Wordle

Pyal Telegram Bot This is a simple telegram bot for the game Pyal, a word guessing game inspired by Wordle. How does it work? Differently from the ori

Adventure-Game - Adventure Game which is created using Python

Adventure Game ๐ŸŒ‡ This is a Adventure Game which is created using Python. Featur

Game-of-life - A simple python program to simulate and visualise the Conway's Game of life
Game-of-life - A simple python program to simulate and visualise the Conway's Game of life

Conway's game of life A simple python program to simulate and visualise the Conw

A hangman game that I created. Thanks to Data Flair for giving me the code!

Hangman A hangman game that I created. Thanks to Data Flair for giving me the code! Run python3 hangman.py in a terminal if you have Python 3. Please

Minecraft clone using Python Ursina game engine!
Minecraft clone using Python Ursina game engine!

Minecraft clone using Python Ursina game engine!

A Pygame game made in 48 hours
A Pygame game made in 48 hours

Flappuccino Flappuccino is a game created in 48 hours for the PyGame Community New Years Jam using Python with Pygame. Screenshots Background Informat

Open-source project written in the ursina engine, simulating the popular game Minecraft.
Open-source project written in the ursina engine, simulating the popular game Minecraft.

Voxelcraft is an open-source project written in the ursina engine, simulating the popular game Minecraft.

To solve games using AI, we will introduce the concept of a game tree followed by minimax algorithm.
To solve games using AI, we will introduce the concept of a game tree followed by minimax algorithm.

To solve games using AI, we will introduce the concept of a game tree followed by minimax algorithm.

Comments
  • UnicodeDecodeError

    UnicodeDecodeError

    Hello, does this work when translating from japanese? I'm getting this error and i don't know what do do translating file: dialogs\CommonEvents.json Traceback (most recent call last): File "C:\Users\wien_\rpgmaker-mv-translator\dialogs_translator.py", line 215, in new_data, t = translate_neatly_common_events(file_path, tr=Translator(), max_len=args.max_len, File "C:\Users\wien_\rpgmaker-mv-translator\dialogs_translator.py", line 132, in translate_neatly_common_events data = json.load(f) File "C:\Users\wien_\AppData\Local\Programs\Python\Python310\lib\json_init_.py", line 293, in load return loads(fp.read(), File "C:\Users\wien_\AppData\Local\Programs\Python\Python310\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 1137: character maps to

    opened by elsharkawk41 12
Owner
Davide Liu
Master degree student at Tsinghua University in Advanced Computing.
Davide Liu
Blender Game Engine Game Type Templates Logic Bricks (and Python script) based Game Templates for Blender

Blender-Game-Engine-Templates Blender Game Engine Game Type Templates Logic Bric

null 3 Oct 25, 2022
HTTP API for FGO game data. Transform the raw game data into something a bit more manageable.

FGO game data API HTTP API for FGO game data. Transform the raw game data into something a bit more manageable. View the API documentation here: https

Atlas Academy 51 Dec 26, 2022
Lint game data metafiles against GTA5.xsd for Rockstar's game engine (RAGE)

rage-lint Lint RAGE (only GTA5 at the moment) meta/XML files for validity based off of the GTA5.xsd generated from game code. This script accepts a se

GoatGeek 11 Sep 18, 2022
Mandaw 2 Mar 1, 2022
Snake game mixed with Conway's Game of Life

SnakeOfLife Snake game mixed with Conway's Game of Life The rules are the same than a normal snake game but you have to avoid cells created by Conway'

Aidan 5 May 26, 2022
A near-exact clone of google chrome's no internet game, or the "google dinosaur game", with some additions and extras.

dinoGame A near-exact clone of google chrome's no internet game, or the "google dinosaur game", with some additions and extras. Installation Download

null 1 Oct 26, 2021
Average Clicker Game (AVG) is a Python made game using tkinter

Average-Clicker-Game Average Clicker Game (AVG) is a Python clicker game not made with pygame but with tkinter, it has worker, worker upgrades, times

Zacky2613 1 Dec 21, 2021
Ice-Walker-Game - This repository is about the Ice Walker game made in Python.

Ice-Walker-Game Ce dรฉpot contient le jeu Ice Walker programmรฉ en Python. Les diffรฉrentes grilles du jeu sont contenues dans le sous-dossier datas. Vou

Mohamed Amine SABIL 1 Jan 2, 2022
Deal Or No Deal was a very popular game show. Even now, for a family party, it's a fun game to pass time

Deal Or No Deal was a very popular game show. Even now, for a family party, it's a fun game to pass time. I made a code to play the game right in your terminal/console. This isn't made to be a game which can be installed by everyone and played, I just made it as a fun project as I just started out with python. So if you have python installed and wanna have some fun, or just curious to see how I did this, feel free to check the code out!

null 1 Feb 15, 2022
Mastermind-Game - A game to test programming and logical skills

Bem vindo ao jogo Mastermind! O jogo consiste em adivinhar uma senha que serรก ge

Marcelo Daros 0 Jan 27, 2022