From 0e6c93efd845432d98b8a48d635872a4c406216e Mon Sep 17 00:00:00 2001
From: Aloqas <102683375+Aloqas@users.noreply.github.com>
Date: Tue, 14 Apr 2026 08:15:18 +0300
Subject: [PATCH] jak2/jak3: Flags for custom languages (#4209)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Needs testing, I was having issues with Visual Studio so I couldn't
fully test
---------
Co-authored-by: Tyler Wilding
---
common/util/font/dbs/font_db_jak2.cpp | 53 ++++++++++++++++---
common/util/font/dbs/font_db_jak3.cpp | 50 ++++++++++++++---
decompiler/config/jak3/jak3_config.jsonc | 2 +-
.../jak2/text/game_custom_text_bs-BA.json | 28 +++++-----
.../jak2/text/game_custom_text_ca-ES.json | 28 +++++-----
.../jak2/text/game_custom_text_cs-CZ.json | 28 +++++-----
.../jak2/text/game_custom_text_da-DK.json | 28 +++++-----
.../jak2/text/game_custom_text_de-DE.json | 28 +++++-----
.../jak2/text/game_custom_text_en-GB.json | 28 +++++-----
.../jak2/text/game_custom_text_en-US.json | 28 +++++-----
.../jak2/text/game_custom_text_es-ES.json | 28 +++++-----
.../jak2/text/game_custom_text_fi-FI.json | 32 +++++------
.../jak2/text/game_custom_text_fr-FR.json | 28 +++++-----
.../jak2/text/game_custom_text_gl-ES.json | 28 +++++-----
.../jak2/text/game_custom_text_hr-HR.json | 28 +++++-----
.../jak2/text/game_custom_text_hu-HU.json | 28 +++++-----
.../jak2/text/game_custom_text_is-IS.json | 28 +++++-----
.../jak2/text/game_custom_text_it-IT.json | 28 +++++-----
.../jak2/text/game_custom_text_ja-JP.json | 28 +++++-----
.../jak2/text/game_custom_text_ko-KO.json | 28 +++++-----
.../jak2/text/game_custom_text_ko-KR.json | 28 +++++-----
.../jak2/text/game_custom_text_lt-LT.json | 28 +++++-----
.../jak2/text/game_custom_text_nl-NL.json | 28 +++++-----
.../jak2/text/game_custom_text_no-NO.json | 28 +++++-----
.../jak2/text/game_custom_text_pl-PL.json | 28 +++++-----
.../jak2/text/game_custom_text_pt-BR.json | 28 +++++-----
.../jak2/text/game_custom_text_pt-PT.json | 28 +++++-----
.../jak2/text/game_custom_text_sv-SE.json | 28 +++++-----
game/assets/jak3/game_text.gp | 2 +-
.../jak3/text/game_base_text_fi-FI.json | 1 +
.../jak3/text/game_base_text_ko-KO.json | 2 +-
.../jak3/text/game_base_text_ru-RU.json | 2 +-
.../jak3/text/game_custom_text_ca-ES.json | 29 +++++-----
.../jak3/text/game_custom_text_da-DK.json | 29 +++++-----
.../jak3/text/game_custom_text_de-DE.json | 29 +++++-----
.../jak3/text/game_custom_text_en-GB.json | 4 +-
.../jak3/text/game_custom_text_en-US.json | 29 +++++-----
.../jak3/text/game_custom_text_es-ES.json | 29 +++++-----
.../jak3/text/game_custom_text_fi-FI.json | 33 ++++++------
.../jak3/text/game_custom_text_fr-FR.json | 29 +++++-----
.../jak3/text/game_custom_text_hu-HU.json | 29 +++++-----
.../jak3/text/game_custom_text_is-IS.json | 29 +++++-----
.../jak3/text/game_custom_text_it-IT.json | 29 +++++-----
.../jak3/text/game_custom_text_ja-JP.json | 29 +++++-----
.../jak3/text/game_custom_text_ko-KO.json | 28 +++++-----
.../jak3/text/game_custom_text_nl-NL.json | 29 +++++-----
.../jak3/text/game_custom_text_no-NO.json | 29 +++++-----
.../jak3/text/game_custom_text_pl-PL.json | 29 +++++-----
.../jak3/text/game_custom_text_pt-BR.json | 29 +++++-----
.../jak3/text/game_custom_text_pt-PT.json | 29 +++++-----
.../jak3/text/game_custom_text_ru-RU.json | 28 +++++-----
.../jak3/text/game_custom_text_sv-SE.json | 29 +++++-----
52 files changed, 732 insertions(+), 641 deletions(-)
diff --git a/common/util/font/dbs/font_db_jak2.cpp b/common/util/font/dbs/font_db_jak2.cpp
index f176d40397..9f7fdcf3fe 100644
--- a/common/util/font/dbs/font_db_jak2.cpp
+++ b/common/util/font/dbs/font_db_jak2.cpp
@@ -284,16 +284,53 @@ std::vector replace_info_jak2 = {
{"~Y~3L~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+6V~-26H~7L~Z~-21H~+1V~7L~Z~+26H",
+ ""},
+ {"~Y~3L~~~Z~1L~Z~7L~]~-1H~Y~3L~~"
+ "~Z~1L~Z~7L~Z~-11H~+2V~3L"
+ "~Z~-9H~+2V~1L+~Z~-8V~-8H~7L-~Z~-8V~-3H~7L-~Z~+26H",
+ ""},
+ {"~Y~1L~Z~21L~Z~1L"
+ "~Z~1L~]~-1H~Y~1L~Z~21L~Z~1L~Z~-4H~1L~Z~1L~~"
+ "~Z~-11H~7L~Z~-8V~-8H~3L-~Z~-8V~-4H~3L-~Z~+26H",
+ ""},
// korean jamo -- only relevant for the language selection since
// non-korean languages don't run through the `convert-korean-text` function and hence the
diff --git a/common/util/font/dbs/font_db_jak3.cpp b/common/util/font/dbs/font_db_jak3.cpp
index 7e972af95f..6510b6d247 100644
--- a/common/util/font/dbs/font_db_jak3.cpp
+++ b/common/util/font/dbs/font_db_jak3.cpp
@@ -284,20 +284,54 @@ std::vector replace_info_jak3 = {
{"~Y~3L~Z~1L~Z~1L~]"
"~-1H~Y~3L~Z~1L~Z~+26H",
""},
- {"~Y~1L~Z~3L~]~-1H~Y~1L~Z~3L~Z~-19H~1L~Z~-23H~7L~Z~-23H~7L~Z~7L~Z~"
- "+26H",
+ {"~Y~1L~Z~3L~]~-2H~Y~1L~Z~3L~Z~-10H~1L~Z~-5H~1L~Z~-23H~7L~Z~-22H~7L~Z~7L"
+ "~Z~+26H",
""},
- {"~Y~1L~Z~7L~]~-1H~Y~1L~Z~7L~Z~-19H~1L~Z~-23H~3L~Z~-23H~3L~Z~3L~Z~"
- "+26H",
+ {"~Y~1L~Z~7L~]~-2H~Y~1L~Z~7L~Z~-10H~1L~Z~-5H~1L~Z~-23H~3L~Z~-22H~3L~Z~3L"
+ "~Z~+26H",
""},
{"~Y~6L~Z~+15H~3L~Z~+30H~3L~Z~+4H~5L~Z~+2H~3L~Z~+"
"2H~1L~Z~+47H",
""},
+ {"~Y~3L~~~Z~1L~Z~7L~]~-2H~Y~3L~~"
+ "~Z~1L~Z~7L~Z~+26H",
+ ""},
+ {"~Y~26L~]~-1H~Y~26L~Z~-10H~-3V~5L~Z~-10H"
+ "~+6V~5L~Z~-5H~+1V~5L~Z~-14H~+1V~5L~Z"
+ "~-11H~+1V~7L~Z~+26H",
+ ""},
+ {"~Y~3L~~~Z~1L~Z~26L~]~-2H~Y~3L~~"
+ "~Z~1L~Z~26L~Z~+26H",
+ ""},
+ {"~Y~3L~Z~5L~]~-2H~Y~3L~Z~5L"
+ "~Z~+26H",
+ ""},
+ {"~Y~1L~Z~3L~Z~-5V~3L~]~-2H~+5V~Y~1L~Z~3L~Z~-5V~3L"
+ "~Z~+26H",
+ ""},
+ {"~Y~5L~~~Z~26L~Z~3L~]~-2H~Y~5L~~"
+ "~Z~26L~Z~3L~Z~+26H",
+ ""},
+ {"~Y~1L~]~-2H~Y~1L~Z~3L~Z~-5V~3L"
+ "~Z~-22H~3L~Z~-22H~-5V~3L"
+ "~Z~-23H~7L~Z~-26H~-3V~7L"
+ "~Z~+6V~-26H~7L~Z~-21H~+1V~7L~Z~+26H",
+ ""},
+ {"~Y~3L~~~Z~1L~Z~7L~]~-1H~Y~3L~~"
+ "~Z~1L~Z~7L~Z~-11H~+2V~3L"
+ "~Z~-9H~+2V~1L+~Z~-8V~-8H~7L-~Z~-8V~-3H~7L-~Z~+26H",
+ ""},
+ {"~Y~1L~Z~21L~Z~1L"
+ "~Z~1L~]~-1H~Y~1L~Z~21L~Z~1L~Z~-4H~1L~Z~1L~~"
+ "~Z~-11H~7L~Z~-8V~-8H~3L-~Z~-8V~-4H~3L-~Z~+26H",
+ ""},
// korean jamo -- only relevant for the language selection since
// non-korean languages don't run through the `convert-korean-text` function and hence the
diff --git a/decompiler/config/jak3/jak3_config.jsonc b/decompiler/config/jak3/jak3_config.jsonc
index da537c77e2..65aad1ab57 100644
--- a/decompiler/config/jak3/jak3_config.jsonc
+++ b/decompiler/config/jak3/jak3_config.jsonc
@@ -130,7 +130,7 @@
// turn this on if you want extracted level collision to be saved as .obj files in decompiler_out//collision
"rip_collision": false,
// save game textures as .png files to decompiler_out//textures
- "save_texture_pngs": true,
+ "save_texture_pngs": false,
// whether or not to dump out streamed audio files to decompiler_out//audio
"rip_streamed_audio": false,
diff --git a/game/assets/jak2/text/game_custom_text_bs-BA.json b/game/assets/jak2/text/game_custom_text_bs-BA.json
index c188e1b549..46f374f888 100644
--- a/game/assets/jak2/text/game_custom_text_bs-BA.json
+++ b/game/assets/jak2/text/game_custom_text_bs-BA.json
@@ -236,20 +236,20 @@
"1339": "Display",
"133a": " Suomi",
"133b": "Hint Subtitles",
- "133c": "Português",
- "133d": "Svenska ",
- "133e": "Dansk",
- "133f": "Norsk",
- "1340": "Nederlands",
- "1341": "Português (Brasil)",
- "1342": "Magyar",
- "1343": "Català",
- "1344": "Íslenska ",
- "1345": "Polski",
- "1346": "Lietuvių Kalba",
- "1347": "Čeština",
- "1348": "Hrvatski",
- "1349": "Galego",
+ "133c": " Português",
+ "133d": " Svenska",
+ "133e": " Dansk",
+ "133f": " Norsk",
+ "1340": " Nederlands",
+ "1341": " Português (Brasil)",
+ "1342": " Magyar",
+ "1343": " Català",
+ "1344": " Íslenska",
+ "1345": " Polski",
+ "1346": " Lietuvių Kalba",
+ "1347": " Čeština",
+ "1348": " Hrvatski",
+ "1349": " Galego",
"134a": "Pressure Sensitivity",
"134b": "Swap R1 and R2",
"134c": "Trigger Effects"
diff --git a/game/assets/jak2/text/game_custom_text_ca-ES.json b/game/assets/jak2/text/game_custom_text_ca-ES.json
index 5860a4d2a8..39afe9133d 100644
--- a/game/assets/jak2/text/game_custom_text_ca-ES.json
+++ b/game/assets/jak2/text/game_custom_text_ca-ES.json
@@ -236,20 +236,20 @@
"1339": "Mostra",
"133a": " Suomi",
"133b": "Subtítols amb Suggeriments",
- "133c": "Português",
- "133d": "Svenska ",
- "133e": "Dansk",
- "133f": "Norsk",
- "1340": "Nederlands",
- "1341": "Português (Brasil)",
- "1342": "Magyar",
- "1343": "Català",
- "1344": "Íslenska ",
- "1345": "Polski",
- "1346": "Lietuvių Kalba",
- "1347": "Čeština",
- "1348": "Hrvatski",
- "1349": "Galego",
+ "133c": " Português",
+ "133d": " Svenska",
+ "133e": " Dansk",
+ "133f": " Norsk",
+ "1340": " Nederlands",
+ "1341": " Português (Brasil)",
+ "1342": " Magyar",
+ "1343": " Català",
+ "1344": " Íslenska",
+ "1345": " Polski",
+ "1346": " Lietuvių Kalba",
+ "1347": " Čeština",
+ "1348": "