- Jul 15, 2022
- 63
- 120
This is meant for Otomate's custom engine (it seems like it is the same for most Idea Factory games even
)
For Unity otome games I've posted in this thread!
* Tested with Reine des Fleurs

)For Unity otome games I've posted in this thread!
* Tested with Reine des Fleurs
- Dump your game copy. This can be both done through your Switch or emulator (right click on game and "Dump RomFS").
- Search for the cpk files from the dumped game. Font files are usually inside SYSTEM.cpk. The font format is .ffu
- Extract the font file with your cpk tool of preference. I personally have both CriPakGUI and YaCpkTool.
- Use Reconv by DC to extract the contents of the .ffu file. You can use Reconv through the website, or download the zip from the github and compile it for cmd use. You'll need Visual Studio Community for cmd use.
- Once you extract you'll get three different files: a dds file, a txt file and a css file. We will be editing the dds file and the txt file.
- Notice none of the apps open the dds file correctly. So we need a workaround for this: change the format from .dds to .raw through changing name.
- Open the .raw file through Photoshop. If you have an older version like Photoshop 2020 it also works.
- Photoshop will ask you to give sizes for the raw file. The way to calculate the size is this:
* Number of chars / Tile width = number of rows.
Example: Reine des Fleurs has 7110 chars. You can find out the number of chars. more easily by putting the txt content through a line counter online (minus the header of the txt!).
You'll find that the txt header mentions 115 x 115. Take 115 as the tile width.
7110 / 115 = 61,82 -> just round up towards 62. So you have 62 rows of characters inside the dds.
* IMAGE WIDTH = Tile width x Tile width
Example: 115 x 115 = 13225
* IMAGE HEIGHT = Tile width x number of rows
Example: 115 x 62 = 7130
So, for Reine des Fleurs, this dds image is sized 13225 x 7130
Ignore the Photoshop window telling image is smaller than original. It has to do with the way Reconv builds the dds file from what it gets from the binary inside the ffu. You can verify the calculations done through the Reconv source code. - Export the opened raw file as a png, and I would advise you modify it through Paint.NET, as this image is too huge and Photoshop has tendency to lag frequently. I've found that my experience with Paint.NET is much more smooth.
- Have your extracted txt open, and select the characters you want to replace with accents.
* Do not change char_id, otherwise Reconv complains "new glyph???"
* Do not add more lines of characters either, Reconv also complains over this.
* The things you can change, however, are width, height and xAdv.
* The selected characters you want to replace are important for when you edit the dds. You'll be putting your new characters over the replaced ones inside the image file.
* I advise you have a separated layered format (Like Paint.NET default layered format) and a different DDS format, it'll make your life easier if you want to change which character you want to replace, or the position of the character if it ends up looking weird in game. Have a different layer per new character. Note this is going to be a lot of trial and error, so having a layered file different from the dds is going to help speed up things. If you can test this stuff through emulation instead of inside the switch console it will also help speed up the process further.
* If the game doesn't use greek symbols inside its dialogues, I found that they're easier to deal with as they're "bigger" in number values inside the txt.
* For vowels with accents I advise looking up the normal vowels, and bringing over their width, height and advx to the characters you're going to use as replacement. Example:
Code:Original: char id=ε width=52 height=115 xAdv=99 odd= Changed: char id=ε width=28 height=115 xAdv=55 odd= - Save your modified file as a BC4 DDS. You can't save this DDS as A8_UNORM (required DDS type) in a lot of apps, so you'll have to use a different program for this.
- Download Texconv and set it up through environment variables in Windows, so you can use it inside cmd.
- Go to the folder of your exported modified dds file inside cmd, and run this command:
This will convert your BC4 DDS to a A8_UNORM DDS.Code:
texconv -f A8_UNORM -y [replace_with_your_file.dds] - Repack through Reconv your new DDS, new txt and old csv. For website version, you put it all inside a zip. For cmd version you can place them all in a folder and it will pick it up all to build the new .ffu file.
- While YaCPKTool doesn't have CRILAYLA compression as far as I know, I use it for debug purposes as it is much faster. However, for patch distribution it is advisable to use CriPakGUI with compression (if the game files are compressed!). I replace .ffu file inside the cpk.
* For YaCPKTool, I extract the whole cpk in a folder, replace the .ffu inside the folder and then rebuild the cpk through the folder
* For CriPakGUI you need a patch folder with the same folder structure as the CPK. For speed purposes, you don't need every file to be inside the patch folder, only the ones to be replaced. The program will already bring over the rest of the files. - For testing with the script: instead of writing the letters you want inside your dialogue, use the original symbols so the game can detect them as the new characters from the image file.
stcm2-asm helps with extracting, replacing and rebuilding the dialogue scripts! Process is similar than for fonts, but scripts are either found inside script.cpk or game.cpk. - Test your fonts in-game!

