Hello,
I came across the English patch you created for the game, and I must say, I’m truly impressed by your work. Inspired by your patch, I’ve started working on a Korean localization project for the same game. However, I’m currently stuck on a few technical aspects, and I was wondering if you could kindly provide me with some guidance.
Specifically, I’m trying to locate the text data files and understand the text encoding used in the game. Additionally, I’d like to know if you encountered any issues related to text length or alignment while working on the patch. If there are any tools or methods you used for extracting and reinserting the text, I’d greatly appreciate it if you could share some tips.
Thank you so much for your time and effort. I truly admire your work, and any advice you can provide would be incredibly helpful for my project.
Hi! Thanks for showing interest in translating this game to Korean. Translating to Korean will have its challenges even prior to translating the words, but I will try to assist you.
I'm also making this a public post so that others may refer to this in the future, if need be. Feel free to PM me if you'd like more information and further help, as I can be of help.
If you want to extract the text from the game, be sure to have an ISO of the game readily available, plus you'll need these tools/files/programs to extract the files you need:
The latest Madoka patch
https://mega.nz/file/xsUkUaLL#fRn8SCZJ7cr5axcMV-Dv6f0ONwSn1UWEerm4_DVINtc
CriPakTools
https://mega.nz/file/whVnSARC#CXVPVJNQ7JasT-v8pHC-QE09JSHy2YrZ1IAzoEOe0bI
Madohack
https://mega.nz/file/g0F1AI6L#w-jdS5x0MMHc4Nslx999EpLxP5e0wcEkml2WeH-VREs
Notes about the items above:
-The "archive.cpk" and "install.cpk" files included in the Madoka patch contains all the text data files you need.
The "archive.cpk" file has most of the text you'll encounter in the visual novel side.
The "install.cpk" file contains text you may find in the dungeons, shops, and other parts.
The "font.fnt" file will be VERY important! More details on that later.
-The CriPakTools are designed to extract all the files inside the "archive.cpk" and "install.cpk" files. CPK files, in essence, are like ZIP files.
-Drag and drop either the "install.cpk" or "archive.cpk" file into the "CriPakTools-master" folder. ONLY HAVE ONE CPK FILE AT A TIME IN THE DIRECTORY!
-Double-click on the "1-EXTRACT_ALL(no_decompression).bat" program. A popup should appear, and folders will start to generate in the directory. These same folders are what were extracted from inside that particular CPK file.
-Repeat this process with the other CPK file, but make sure to remove the first CPK file and the folders that were generated to ensure a smooth operation. You should now have all the files extracted.
-As an added note, be sure to segregate the extracted folders. For example, you can have one folder called "archive CPK files" and the other folder called "install CPK files".
-Madohack contains the tools needed to encode/decode the ".BTX" files, which hold the text files that show up in the game.
-If you want to test this out, go to your archive CPK files folder > Scene_ADVTalk > MessageData > Chapter00 > 00. There should be a file called "00_00_jp.btx". Don't worry about the other files. Copy "00_00_jp.btx" into your
madohack folder. "Chapter00" corresponds to the Madoka Chapter, and "00" corresponds to Day 0 (where Madoka has the dream about Walpurgis).
-Inside your madohack folder, there should be a number of executable files. The ones you will need are "decodebtx.exe" and "encodebtx.exe". With the "00_00_jp.btx" inside the madohack folder, double-click on the "decodebtx.exe" program. If successful, there should be a "madoka.txt" file outputted. This is the text that is stored in the "00_00_jp.btx" file.
If there is already a "madoka.txt" file in the directory, it will be overwritten.
-Let's say you have finished translating a portion of the dialogue and you want to save and store the translations back to the "00_00_jp.btx" file. To do this, double-click the "encodebtx.exe" program. If successful, the "00_00_jp.btx" file should now be updated with the text from the "madoka.txt" file.
-THE PROGRAM WILL NOT WORK IF THE "madoka.txt" FILE IS RENAMED TO SOMETHING ELSE. IT MUST BE NAMED "madoka.txt" OR YOUR WORK WILL NOT BE CARRIED OVER!
-Simply drag and drop the edited "00_00_jp.btx" file back into the original MessageData > Chapter00 > 00 folder and replace the older "00_00_jp.btx" file.
Now you might be thinking, "okay, time to get to work!"
Before that, I have to present this to you because this will be the biggest stumbling block for you. If you look at the image below you'll see 4 Japanese characters... as ASCII art pieces? Try to squint and you'll see the Japanese characters.
This is all in the "font.fnt" file, by the way. To generate this editable text file, you must use the "decodefnt.exe" program with the "font.fnt" file present in the same directory. The file should generate as "font.txt".
If you want to save your edits, YOU NEED TO SAVE THE TEXT FILE AS "test.txt" and then use the "encodefnt.exe" program.
The programs will NOT use the "font.txt" file to encode your changes. It's just how they were written. I don't know why.
If you can zoom in, at the very far left and right above every Japanese character, you'll see these characters: 30E9, 30EA, 30EB, and 30EC. 30E9, for example, represents the UCS/Unicode 16-bit code (in hex) for the Katakana letter for RA.
Each Japanese character has a 16-bit code assigned to them.
Here's the entire list for the Japanese characters:
https://loc.gov/marc/specifications/specchareacc/JapaneseHiraganaKatakana.html
For Korean hangul, use this link:
https://www.loc.gov/marc/specifications/specchareacc/KoreanHangul.html
For every character, you will need to generate the character but make it look like ASCII art/array(I have no other way to put it).
I did not make the characters for the English letters, but I did make some for a possible Spanish translation (I have no plans on undertaking that anytime soon, or at all).
There is no easy way to generate the ASCII, as that's out of my pay grade. I have seen there being tutorials on doing that via python, if you're willing to go that route.
OR, if you're willing to do so, you can "draw" each of the characters in, using the numbers and letters 0-9, A-F (as shown in the picture); where the higher the number or letter, the darker the part of that letter will show.
I have this post covering a little more on this topic, as well as variable font width:
https://gbatemp.net/threads/puella-...table-translation-project.559955/post-9707028
I hope this has been of help for you and feel free to respond or PM with more questions if you'd like.