Install the app
How to install the app on iOS

Follow along with the video below to see how to install our site as a web app on your home screen.

Note: This feature may not be available in some browsers.

Font editing process for non-Unity Otomate games. For Spanish fan patches

tsuki09_

New member
Recognized
上級乙女
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!

tomenawita.jpg

* Tested with Reine des Fleurs
  1. Dump your game copy. This can be both done through your Switch or emulator (right click on game and "Dump RomFS").
  2. Search for the cpk files from the dumped game. Font files are usually inside SYSTEM.cpk. The font format is .ffu
  3. Extract the font file with your cpk tool of preference. I personally have both CriPakGUI and YaCpkTool.
  4. 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.
  5. 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.
  6. 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.
  7. Open the .raw file through Photoshop. If you have an older version like Photoshop 2020 it also works.
  8. 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.
  9. 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.
  10. 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.
    letrasgriegas.PNG

    * 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=
  11. 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.
  12. Download Texconv and set it up through environment variables in Windows, so you can use it inside cmd.
  13. Go to the folder of your exported modified dds file inside cmd, and run this command:
    Code:
    texconv -f A8_UNORM -y [replace_with_your_file.dds]
    This will convert your BC4 DDS to a A8_UNORM DDS.
  14. 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.
  15. 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.
  16. 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.
    textordf.PNG

    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.
  17. Test your fonts in-game!
I've temporarily moved away from testing around Nil Admirari, as it is one of the very few otome games I haven't found workarounds for yet, but except from this one most games have no issue with text replacing 👍

petalos.jpg
 
woah..:0:0 im not good with this kind of stuff at all, but thats a very cool and extensive guide! thank you:D
 
  • Love
Reactions: tsuki09_
Muchísimas gracias por el post, es recontra útil. Hace un tiempo había hecho pruebas para Diabolik Lovers, pero a la hora de insertar las fuentes tenía problemas justamente por el espacio o a la hora de comprimir las fuentes de vuelta.

1780523723834.png
1780523743380.png
 
  • Love
Reactions: tsuki09_
Muchísimas gracias por el post, es recontra útil. Hace un tiempo había hecho pruebas para Diabolik Lovers, pero a la hora de insertar las fuentes tenía problemas justamente por el espacio o a la hora de comprimir las fuentes de vuelta.

View attachment 103171View attachment 103172
De nada :D ✨✨

Sí, realmente es bastante tedioso el proceso de ajuste ;w;
había probado al inicio con las letras griegas sin ajustar nada en el txt y dejaban mucho espacio
como no sabía que iba a funcionar igual ajustando los tamaños (en el txt), probé con los katakana de medio ancho y no se veía bien por defecto.
Después de varias horas de prueba me dí cuenta que sí podía ajustar los tamaños, y volví a usar los símbolos griegos con los cambios en txt, y me anduvo así 😮
Igual tuve que mover unos cuantos pixeles a la izquierda y eso de las letras. Por que cuando ves las letras normales arriba están pegadas a la raya, pero al poner las letras con acentos en las griegas hay que mudarlas más a la izquierda dentro del cuadro o solo se verá una parte de la letra :(