Repository navigation
Adding Custom Translation
Prerelease: https://www.dropbox.com/scl/fi/k1qv5evazb5f9cmf99jmr/Disgaea-Tools-v1.1.0-alpha.zip?rlkey=db51hwm7ypm22jfor2tblxi5c&dl=0
It is possible to create a mod that translates the game strings into a different language, see example blow.
Warning
This feature is still in testing.
- If you are missing Dll's then you might need to also install Microsoft Visual C++ Redistributable 2022 (Many games install it in the background so you may have it already)
- You need both X64 and X86 of the 2015–2022 Version
- Run Mod Manager or Map Editor setup at least once
The translation system works by intercepting the function responsible for rendering text and replacing its text argument with a translated string. This allows every in-game string to be replaced dynamically.
Warning
Currently only the new UI can be replaced as its the only one that support UTF-8.
To create a new character you need to create a .zip file inside mod\CustomCharacters with the following file structure:
| Name | Description |
|---|---|
| mod.json | Declares your mod |
| translation | Folder with your translated .csv files (utf8 encoded) |
| fonts | Folder with your custom font |
Note
Yes its a bit strange but it must be located in CustomCharacters folder. Its the folder for all general mods.
The 'mod.json' file defines all resources and references to your translation CSV files. You can find a full example below.
| Field | Required | Description |
|---|---|---|
| id | Yes | A unique UUID. Please generate a new one!!! |
| name | Yes | Name of the character mod |
| author | Advised | Name of mod creator |
| description | Advised | Mod description |
| previewImage | Advised | Filename to png used as thumbnail, located inside "img" folder |
| translations | A list of CSV filenames located inside the "translation" folder | |
| font | Optional | Filename of a custom font located in 'fonts' folder |
| fontOffsetX | Optional | Global x offset of your custom font |
| fontOffsetY | Optional | Global y offset of your custom font |
| fontScaleX | Optional | Global x scale of your custom font |
| fontScaleY | Optional | Global y scale of your custom font |
| iconOffsetX | Optional | Global x offset of icons in custom font |
| iconOffsetY | Optional | Global y offset of icons in custom font |
You can have more then once CSV file for organizational purposes.
To generate the base translation file (containing all story-related strings), run the translationBase (tb) command from the F2 terminal.
This will output a .csv file to the mod/CustomTranslation folder.
Warning
Ensure the mod/CustomTranslation folder exists before running the command, otherwise, the file cannot be written.
Note that the base file will not include every string. To capture additional text, you can record on-screen strings using the translationRecord (tr) command.
Type tr to start recording, and type tr again to stop and save the results.
Note
The recording will include all visible strings, including non-translatable elements like numbers.
You can press F3 to toggle between translation and original text.
While the default game font support many characters, they are often placed incorrectly. And some characters might be missing entirely. To fixed this you can define a custom font to be loaded and used instead.
Place your font file in the fonts folder to make it available to the game.
You can further fine-tune its appearance by adjusting the following settings:
fontOffsetX, fontOffsetY, fontScaleX, and fontScaleY.
Please note game icons are not scaled.
If your translation includes special characters, be sure to add them to the hash entry with the value 0 (see the CSV file). Otherwise, they may not appear immediately or may only display after restarting the game.
Warning
In some cases, the font cache may become corrupted. If this happens, close the game and delete the cache files located in resources/cache.
Some utf-8 characters are reserved for special icons:
You can fine tune the location of the icons when a custom font is used via iconOffsetX and iconOffsetY. Most likely you only need to adjust iconOffsetY by entering a negative value to move the icons upwards, so they are centered with the text.
| Character | UTF-8 bytes | Description |
|---|---|---|
□ |
E2 96 A1 |
Controller square mapping |
△ |
E2 96 B3 |
Controller triangle mapping |
× |
C3 97 |
Controller x mapping |
○ |
E2 97 8B |
Controller circle mapping |
L1 |
2 chars |
Controller L1 mapping |
R1 |
2 chars |
Controller R1 mapping |
① |
E2 91 A0 |
Fist |
② |
E2 91 A1 |
Sword |
③ |
E2 91 A2 |
Spear |
④ |
E2 91 A3 |
Bow |
⑤ |
E2 91 A4 |
Pistol |
⑥ |
E2 91 A5 |
Axe |
⑦ |
E2 91 A6 |
Staff |
⑧ |
E2 91 A7 |
Sword/Staff special |
⑨ |
E2 91 A8 |
Poison |
⑩ |
E2 91 A9 |
Parallelized (zzz) |
⑪ |
E2 91 AA |
Red question mark |
⑫ |
E2 91 AB |
Green swirl |
⑭ |
E2 91 AD |
Gray/Lightgreen Geo Panel |
⑮ |
E2 91 AE |
Red Geo Panel |
⑯ |
E2 91 AF |
Green Geo Panel |
⑰ |
E2 91 B0 |
Blue Geo Panel |
⑱ |
E2 91 B1 |
Yellow Geo Panel |
⑲ |
E2 91 B2 |
Magenta Geo Panel |
⑳ |
E2 91 B3 |
Cyan Geo Panel |
The controller icons dynamically switch depending on used input. L1 and L2 are two characters.
Translation files must be UTF-8 encoded CSVs, using a semicolon (;) as a separator and containing four columns:
- Hash: Used to identifly the string for replacement
- Translated string: The string that will be displayed instead of the original
- Original string: The original string, but not all characters may be present
- Origin description: Short description from where the string originates from
The entry with the hash value 0 is reserved for preloading special characters. If your translated text includes any special characters, please make sure to add them there. Otherwise, they may not appear immediately or could require restarting the game to display correctly.
Example:
0;çõêäö;Character cache;Add your special characters here;
39a7768ec09c7bf1d2197d8296678dee;Iniciar;Start;Main menu;
5e422c271d6d1e950e5b6b0f4bd57b97;Continuar;Continue;Main menu;
52e0c986db07c4936675a2f80915afe7;Configurações;Settings;Main menu;
aec95bec8bf6db33d94d93e0c1cb2ab8;Sair;Exit;Main menu;
36e4b51ee89dcf11cddc26ee909a231b;Por favor, selecione para onde você gostaria de ir.;Please select where you would like to go.;Talk Script 41 (2002011, 0, 0);
b5879f0d9d530c90a9e136fe52788d77;Uau.;Wow.;Talk Script 1244 (105, 0, 0);
219a7bdff52161cfaa22e07be929b19b;Este é um lugar bem bonito.;This is a pretty nice place.;Talk Script 1244 (105, 0, 0); {
"id": "c3e4a803-26d5-4050-9e6e-8f4f8fc9f2b2",
"name": "Translation Mod",
"author": "My Name",
"description": "Elum Epsum texto maxo",
"translations": ["translation.csv"]
}