Tutorial Tool Translation tools for Waffle

Alex(GoD)

Member
May 1, 2022
144
215
Also Translation tools for TMR-Hiro ADV System
Waffle Engine Visual Novel Translation Toolkit & Guide

Hello everyone!

I've put together a package containing useful tools for translating visual novels that use the Waffle engine.
This package also includes some custom scripts and forks I've made to streamline the translation process.

Let's get started with the basics:

1. Unpacking Game Files


Inside the 1_Unpack_Game_Files folder, you'll find:
  • crass-0.4.14.0
These tools are used to unpack the game's archive files.

How to Unpack using Crass: (Or Use )

1. Open CrageGUI.exe located in 1_Unpack_Game_Files/crass-0.4.14.0/.
2. Check the box next to "Source File".
3. Click the "Browse" button and select the .pak file you want to unpack.
4. Crass will extract the contents into a new folder (e.g., 1_Unpack_Game_Files/crass-0.4.14.0/your_file_name/).
5. Once unpacking is complete, you can close the CrageGUI window.
6. Repeat this process for any other archive files you need.

Key Files to Unpack:
  • cfg.pak: Contains init.ini, an important file for configuring how text is displayed in-game.
  • obj.pak: Contains images for menus, buttons, settings, etc. (You might need these if you plan to edit UI elements).
  • scr.pac: Contains the game's script files (this is the text we'll be translating).
2. Configuring init.ini

After unpacking cfg.pak, you'll find init.ini inside the resulting cfg folder. For good text display (especially with English/Latin characters), I recommend editing these lines:

WindowTitle: Set your game's title here (as it will appear in the window bar). Note: This usually doesn't support spaces. Use underscores or run words together (e.g., MyGameTitle).
UserDataDirectory: Specify the folder name where save files will be stored within the user's AppData folder. It's best to change this to an English name (e.g., Waffle/GameName).
MsgFont: Set this to 0. (This often helps with compatibility).
MsgFontSize: Set the font size. 26 works well for me, but you can experiment.
MsgMaxCharNum: Set the maximum number of characters per line. You can set this to 999, but be aware the engine often has a hard limit around 65 characters anyway.
MsgMaxLineNum: Set the maximum number of lines displayed at once. 3 is usually standard.

Applying the Changes:
Place the entire modified cfg folder (containing your edited init.ini) into the main directory of your game.

3. Extracting Game Text

Navigate to the 2_Unpack_Game_Text folder.

Inside, you'll find 1_nekoKF_PlusPlus. This is a fork of nekoKF designed for batch processing. It allows you to:
  • Extract text from all script files in your unpacked scr folder into a single .txt file.
  • Import your translated text back into the script files.
How to Extract Text using nekoKF++:

1. Open the `index.html` file located at 2_Unpack_Game_Text/1_nekoKF_PlusPlus/ in your web browser.
2. Click the "Select Folder" button and choose your unpacked scr folder (the one you got from unpacking scr.pak).
3. Your browser will likely ask for permission to access multiple files in the folder. Grant permission.
4. Click the "Export Text from Folder" button.
5. A .txt file containing all the extracted text will be downloaded.

The exported file will look like this:

Code:
[scr/ep_001_000_0001.txt] 2
CharacterName

[scr/ep_001_000_0001.txt] 3
Dialogue text here.
This format, while necessary for importing, isn't very convenient for translation.

Getting ONLY the Translatable Text:

1. Make sure you have Python installed on your system.
2. Run the script 2_Extract_Only_Text.py (located in the 2_Unpack_Game_Text folder).
3. A window will appear. Paste the entire content of the .txt file you got from nekoKF++ into the left pane.
4. The right pane will automatically populate with only the character names and dialogue, like this:

Code:
CharacterName
Dialogue text here.
CharacterName
More dialogue text.
5. Copy the text from the right pane and save it to a new file. This will be your main translation file.

4. Translating and Checking

Now, translate the clean text you just saved into your target language.

Important: Check Line Length!
Waffle engine games often have strict limits on line length. It's crucial to keep your translated lines from exceeding the limit (often around 130 characters! 2х65).

1. Run the script 3_Line_max_130.py.
2. Paste your translated text (the clean version) into the top window (Window 1).
3. Click the "Check & Highlight" button. Lines exceeding 130 characters will be highlighted in the top window.
4. If long lines are found, click the "Extract Long Lines" button.
5. The problematic lines will appear in the middle window (Window 2), prefixed with line N:.
6. Edit these lines directly in the middle window (or manual in Text Editor, or AI). Shorten them so they are under the character limit. Do not change the line N: prefix.
7. Once you've edited all the long lines in the middle window, click the "Replace & Show Result" button.
8. The bottom window (Window 3) will now contain your full translated text, with the long lines replaced by your edited versions.
9. Copy the text from this bottom window and save it. This is your final, length-checked translation.

5. Recombining Text for Import

You now need to put your translation back into the format nekoKF++ understands:

Code:
[scr/ep_001_000_0001.txt] 2
TranslatedCharacterName

[scr/ep_001_000_0001.txt] 3
Translated dialogue text here.
For this, use the 4_Combine.py script. It requires three input files:

1. File 1: The original .txt file you exported from nekoKF++ (with [scr/...] lines and original Japanese text).
2. File 2: The clean .txt file containing only the original Japanese text (the output from the right pane of 2_Extract_Only_Text.py).
3. File 3: Your final, translated, and length-checked .txt file (the output from 3_Line_max_130.py).

How to Use 4_Combine.py:

1. Run the script.
2. Use the "Select..." buttons to choose the three files listed above in the correct order.
3. Click the "✨ Replace Original Text with Translation ✨" button.
4. The text area at the bottom will populate with the combined text in the correct format.
5. Click the "Save Result..." button to save this output to a new .txt file. (Or Copy Text) This file is ready for import.

6. Importing the Translation

1. Go back to nekoKF_PlusPlus (index.html) in your browser.
2. Click "Select Folder" and choose your original, unpacked scr folder again. Grant permissions if asked.
3. Click the "Import Translation into Folder" button. It will prompt you to select a file.
4. Choose the .txt file you saved from 4_Combine.py.
5. nekoKF++ will process the files and initiate a download of a .zip archive.
6. Inside this .zip archive, you will find the scr folder containing all the script files, now with your translation inserted.
7. Extract this scr folder from the .zip file.
8. Place the extracted scr folder into your main game directory.

That's it! Launch the game, and it should now display your translation.

Troubleshooting: If Fonts Display Incorrectly

Sometimes, the default Japanese font (msgothic.ttc) doesn't handle English/Latin characters well.

Here are two ways to replace it (use caution, as this modifies system files):

Method 1: Using the Batch File (Easier)

1. Locate the font_edit.bat file.
2. Right-click font_edit.bat and select "Run as administrator".
3. A command prompt will open. Type yes and press Enter.
4. Restart your PC.
5. After restarting, replace the file C:\Windows\Fonts\msgothic.ttc with your custom font file (which must also be named msgothic.ttc and support your target language).
You might need a font like Arial or another compatible TrueType Collection (.ttc) renamed.
6. Restart your PC again.

Method 2: Manual Registry Edit (Advanced)

1. Open the Registry Editor: Press Win+R, type regedit, and press Enter..
2. Navigate to the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts
3. In the right-hand pane, find and delete the following entries:
MS Gothic & MS UI Gothic & MS PGothic (TrueType)
4. Restart your PC.
5. After restarting, replace the file C:\Windows\Fonts\msgothic.ttc with your custom font file (which must also be named msgothic.ttc and support your target language).
You might need a font like Arial or another compatible TrueType Collection (.ttc) renamed.
6. Restart your PC again.
 
Last edited:
  • Like
Reactions: frzvbee

Alex(GoD)

Member
May 1, 2022
144
215
Using this toolkit, I successfully translated 学園で時間よ止まれ / Gakuen de Jikan yo Tomare into my language.

If you encounter any problems during the process, feel free to ask for advice here.
 
  • Like
Reactions: frzvbee

frzvbee

New Member
Apr 21, 2025
3
2
Using this toolkit, I successfully translated 学園で時間よ止まれ / Gakuen de Jikan yo Tomare into my language.

If you encounter any problems during the process, feel free to ask for advice here.
btw... I've finished translating Ningen Fushin no Renkinjutsushi to Moto Heishi no Homunculus (The Alchemist & His Battle-Scarred Homunculus) - the animated version using mtl.

but, the translated text lines have inconsistent line breaks. there's a way to add manually?

1. in-game pict.jpg


i'm also attach .txt if needed to

1. rough singleline
2. rough singleline.png

2. cleaned translation
3. cleaned translation.png

3. final translation
4. final translation.png
 

frzvbee

New Member
Apr 21, 2025
3
2
turns out I just needed to adjust a few values in the init.ini.... LOL

(position of text box)
MsgNamePosX
MsgStringPosX

(text line & char)
MsgMaxCharNum

Screenshot (99).png
 
  • Like
Reactions: Alex(GoD)