Tutorial Tool VN Unity Using the XUAT to translate a large part of the game at once

Ronald1813

Newbie
Sep 21, 2023
38
41
So, many people, myself included have used the to play unity games, and it works pretty well
But, there are some issues that make the game experience quite wacky, for me at least:
  1. For any transloator other than sugoi, a constant internet connection is needed
  2. Sugoi takes too long to translate stuff, especially if I skip a bit and then open the log
  3. I need to open the substitution file and add stuff every single time I want something translated a specific way
So, using a bit of my brain, and help from the almighty ChatGPT, I made two simple scripts that make the work easier for me

Before reading through this long-ass guide, in order to save both your and my time, TURN BACK if you don't use the WINDOWS os

Now then, let's get started


I'm going to assume that anyone who uses these scripts already has knowledge of the following:
  • How to install and use XUAT and where the translated stuff is stored
  • How to translate .txt files
Also, I recommend using the following tools (I'm not gonna explain how to use them, refer to their original sources for that):
  • (makes the whole translation process much easier)
  • Translator (offline translator, can translate files line-by-line or can be used in conjunction with Translator++)
The .txt file containing the translation result looks something like this(I used passthrough as the tl to get japanese on both sides, you can just skip through content and it will still register as long as it shows in the log):
1705905717846.png

So, what we have here is a series of lines, seperated by the "=" operator, with translated text on the right hand side

If we wanna do things the traditional way, we gotta manually type in the text on the right side, which, frankly put is a major PITA, so I(GPT) made 2 scripts to make it possible to use translation software to get things done faster

The entire process consists of 3 steps:
  1. Extracting text on the right side of the "=" operator from each line and making a new .txt file out of it (the script will be doing this)
  2. Translating the extracted .txt file and making another .txt file that contains the translated text which is gonna come on the right side of the "=" operator in the final result of the entire process(You gotta do this yourself, using whatever file translator you wanna use)
  3. Replacing the text on the right side of "=" in the original file to get the final output, whose lines will looks like this: Original_Text=Translated_Text
What the files have:
  • In the download links attached, the folder contains 2 files: .txt extract and replace.7z and Parser Models.7z
  • The ".txt extract and replace.7z" file contains 4 files: extract_code, replace_code, Extract.exe and replace_script.exe (forgive me for the name disparity, you can change them to suit your tastes later on)
  • The Parser Models.7z file contains .tpm files I or someone who shared them with me have used at some point to tranlsate stuff in Translator++
How to use the scripts:
  1. First of all, copy the "_AutoGeneratedTranslations.txt" file from your game folder and copy it into the ".txt extract and replace" folder (this makes the command prompt easier to use)
  2. Now, open the command prompt/powershell in the folder itself (you can do it by right-clicking on a blank space in the folder and selecting "Open in Terminal"
  3. Type in "Extract.exe _AutoGeneratedTranslations.txt extracted_text.txt" and click enter - this will make an output file called "extracted_text.txt" which will contain the 'right-hand-side of =' text
  4. Use a file translator to translate the "extracted_text.txt" file and let's say that the translated file is called "extracted_trans.txt", make sure that it is saved in the ".txt extract and replace" folder
  5. Open the command prompt again, type "replace_script.exe _AutoGeneratedTranslations.txt final_output.txt" and hit enter, this will create a file called "final_output.txt" which is, as the name says the final output of the entire process
  6. Rename this file as "_AutoGeneratedTranslations.txt", copy/move it to the location where the original translated file is stored and replace
If you wanna use Translator++ to do the translation, this is where the Parser Models folder comes into play:
  1. After the first 3 steps are done and you have the "extracted_text.txt", move/copy it to another folder
  2. Open a new project, chose the option at the bottom fo the list: Parse any script with custom parser, then select the use existing parser model and chose the "All jp+en text.tpm" file in the Parser models folder
  3. Then when it asks to chose the folder, chose the folder you just created
  4. Translate the text, obtain the "extracted_trans.txt" file and move it to the ".txt extract and replace" folder
  5. Complete the rest of the process
Now I know that this guide seems pretty long just by looking at it, it's actually pretty easy to follow
Well, to use this guide you need to play through the whole thing once to get the _AutoGeneratedTranslations.txtfile, but you can just press Alt+0 (zero), select passthrough as the translator model and click skip to obtain it, so in my opinion, it's much faster than waiting for the text in each dialog to be translated

Hope this helps someone save some time

Now, time for the long-awaited donwload links:
- -