A mod with a code module the port cannot run can be used without it (mods_without_code)

Taken from PR #790, which carries Eric Dallo's work from his fork (ericdallo/totk-pc-recomp, 6241358f): only its
mods_without_code part, adapted to dev, which has the ExeFS data writes already (#835) and no plugin runner. A mod with
an exefs/subsdk* or a replaced exefs/main stays off as a whole; mods_without_code = 1 under [mods] uses the rest of it
(RomFS files, cheats, ExeFS patch files) without that code. ModInfo.code names the modules that do not load; the
scan logs it, the Mods tab says it on the mod's row and shows the switch once such a mod is there.

Co-Authored-By: itaskaev2 <165683571+itaskaev2@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
authored and Valiantsin Dzerakh committed 2026-11-16 19:56:42 +03:00
1 parent 000d8f7feb
commit 8e098e95a8
9 files changed
+121 -18

No files matched your search

+38 -4
View File
@@ -223,7 +223,8 @@ static const char *const text_en[UI_TEXT_COUNT] = {
"restart.",
[UI_MENU_MODS_EMPTY] = "This folder has no romfs, exefs or cheats files.",
[UI_MENU_MODS_SUBSDK] = "This mod brings its own game code (a subsdk plugin or a replaced main). The port cannot "
"load code modules, so the whole mod stays off.",
"load code modules, so the whole mod stays off. \"Use mods without their code\" below uses "
"the rest of it.",
[UI_MENU_MODS_EXEFS_LATER] = "This mod patches the game code (exefs). The game builds the patches in when it "
"starts next (a rebuild of a few minutes); until then the whole mod stays off.",
[UI_MENU_MODS_CHEATS] = "Cheats: %d. Switch them on the Cheats tab.",
@@ -582,6 +583,14 @@ static const char *const text_en[UI_TEXT_COUNT] = {
[UI_MENU_MODS_EXEFS_ON] = "Code patches in use: %d files.",
[UI_MENU_MODS_REPLACES_BUILTIN] = "Code patches in use: %d files. They replace the port's own patch %s, which "
"stays off while this mod is on.",
[UI_MENU_MODS_CODE_SKIPPED] = "Its own game code (%s) does not load: the rest of the mod is used. Switch the mod "
"off if the game misbehaves with it.",
[UI_MENU_MODS_WITHOUT_CODE] = "Use mods without their code",
[UI_MENU_MODS_WITHOUT_CODE_DESC] = "A mod that brings its own game code (a subsdk plugin or a replaced main) "
"stays off as a whole, because the port cannot run that code. On: such a mod is "
"used without that code: its RomFS files, cheats and ExeFS patches load. Its "
"files may expect the missing code; switch the mod off if the game misbehaves. "
"Applies at the next start.",
};
static const char *const text_ru[UI_TEXT_COUNT] = {
@@ -773,7 +782,8 @@ static const char *const text_ru[UI_TEXT_COUNT] = {
"два мода меняют один файл, побеждает верхний. Изменения действуют после перезапуска.",
[UI_MENU_MODS_EMPTY] = "В этой папке нет файлов romfs, exefs или cheats.",
[UI_MENU_MODS_SUBSDK] = "Этот мод приносит свой код игры (плагин subsdk или заменённый main). Порт не загружает "
"модули кода, поэтому мод выключен целиком.",
"модули кода, поэтому мод выключен целиком. «Моды без их кода» ниже включает остальную "
"часть мода.",
[UI_MENU_MODS_EXEFS_LATER] = "Этот мод меняет код игры (exefs). Игра соберёт эти патчи при следующем запуске "
"(пересборка на несколько минут); до тех пор мод выключен целиком.",
[UI_MENU_MODS_CHEATS] = "Читов: %d. Они включаются на вкладке «Читы».",
@@ -1136,6 +1146,14 @@ static const char *const text_ru[UI_TEXT_COUNT] = {
[UI_MENU_MODS_EXEFS_ON] = "Патчи кода в работе: файлов: %d.",
[UI_MENU_MODS_REPLACES_BUILTIN] = "Патчи кода в работе: файлов: %d. Они заменяют собственный патч порта %s, "
"который выключен, пока этот мод включён.",
[UI_MENU_MODS_CODE_SKIPPED] = "Его собственный код игры (%s) не загружается: используется остальная часть мода. "
"Выключите мод, если игра с ним ведёт себя странно.",
[UI_MENU_MODS_WITHOUT_CODE] = "Моды без их кода",
[UI_MENU_MODS_WITHOUT_CODE_DESC] = "Мод со своим кодом игры (плагин subsdk или заменённый main) выключается "
"целиком, потому что порт не может запустить этот код. Вкл.: такой мод "
"используется без этого кода — загружаются его файлы RomFS, читы и патчи ExeFS. "
"Его файлы могут рассчитывать на отсутствующий код; выключите мод, если игра "
"ведёт себя странно. Применяется при следующем запуске.",
};
static const char *const text_pt_br[UI_TEXT_COUNT] = {
@@ -1160,7 +1178,8 @@ static const char *const text_pt_br[UI_TEXT_COUNT] = {
"Quando dois mods mudam o mesmo arquivo, vale o de cima. As mudanças valem após reiniciar.",
[UI_MENU_MODS_EMPTY] = "Esta pasta não tem arquivos romfs, exefs ou cheats.",
[UI_MENU_MODS_SUBSDK] = "Este mod traz código próprio do jogo (um plugin subsdk ou um main substituído). O port não "
"carrega módulos de código, então o mod inteiro fica desligado.",
"carrega módulos de código, então o mod inteiro fica desligado. \"Usar mods sem o código "
"deles\", abaixo, usa o resto dele.",
[UI_MENU_MODS_EXEFS_LATER] = "Este mod altera o código do jogo (exefs). O jogo compila esses patches na próxima "
"vez que iniciar (uma recompilação de alguns minutos); até lá o mod inteiro fica "
"desligado.",
@@ -1725,6 +1744,15 @@ static const char *const text_pt_br[UI_TEXT_COUNT] = {
[UI_MENU_MODS_EXEFS_ON] = "Patches de código em uso: %d arquivos.",
[UI_MENU_MODS_REPLACES_BUILTIN] = "Patches de código em uso: %d arquivos. Eles substituem o patch do próprio port "
"%s, que fica desligado enquanto este mod está ligado.",
[UI_MENU_MODS_CODE_SKIPPED] = "O código próprio do jogo dele (%s) não é carregado: o resto do mod é usado. "
"Desligue o mod se o jogo se comportar mal com ele.",
[UI_MENU_MODS_WITHOUT_CODE] = "Usar mods sem o código deles",
[UI_MENU_MODS_WITHOUT_CODE_DESC] = "Um mod que traz código próprio do jogo (um plugin subsdk ou um main "
"substituído) fica desligado por inteiro, porque o port não consegue rodar esse "
"código. Ligado: esse mod é usado sem esse código; os arquivos RomFS, cheats e "
"patches de ExeFS dele carregam. Os arquivos dele podem depender do código que "
"falta; desligue o mod se o jogo se comportar mal. Vale na próxima "
"inicialização.",
};
// Simplified Chinese: this row covers the software keyboard and the whole menu, so the menu and the overlay read Chinese
@@ -1756,7 +1784,8 @@ static const char *const text_zh_hans[UI_TEXT_COUNT] = {
[UI_MENU_MODS_MOVE_HINT] = "上方按钮或 Ctrl+上 上移,左侧按钮或 Ctrl+下 下移。两个模组修改同一个文件时,以靠上的为准。"
"更改在重启后生效。",
[UI_MENU_MODS_EMPTY] = "此文件夹中没有 romfs、exefs 或 cheats 文件。",
[UI_MENU_MODS_SUBSDK] = "此模组带有自己的游戏代码(subsdk 插件或替换的 main)。移植版无法加载代码模块,因此整个模组保持关闭。",
[UI_MENU_MODS_SUBSDK] = "此模组带有自己的游戏代码(subsdk 插件或替换的 main)。移植版无法加载代码模块,因此整个模组保持关闭。"
"打开下方的“不带代码使用模组”即可使用其余部分。",
[UI_MENU_MODS_EXEFS_LATER] = "此模组修改游戏代码(exefs)。游戏会在下次启动时把这些补丁构建进去(重新构建需要几分钟);在此之前整个模组保持关闭。",
[UI_MENU_MODS_CHEATS] = "金手指:%d 个。在“金手指”标签页中开关。",
[UI_MENU_MODS_CHEATS_FILE] = "此游戏版本的金手指在启动时从此模组的 cheats\\%s 读取。",
@@ -2395,6 +2424,11 @@ static const char *const text_zh_hans[UI_TEXT_COUNT] = {
[UI_MENU_MODS_EXEFS_OTHER] = "它的代码补丁(exefs)是为其他游戏版本制作的。",
[UI_MENU_MODS_EXEFS_ON] = "正在使用的代码补丁:%d 个文件。",
[UI_MENU_MODS_REPLACES_BUILTIN] = "正在使用的代码补丁:%d 个文件。它们取代本移植自带的补丁 %s,此模组开启时该补丁保持关闭。",
[UI_MENU_MODS_CODE_SKIPPED] = "它自带的游戏代码(%s)不会加载:模组的其余部分照常使用。如果游戏因此表现异常,请关闭此模组。",
[UI_MENU_MODS_WITHOUT_CODE] = "不带代码使用模组",
[UI_MENU_MODS_WITHOUT_CODE_DESC] = "带有自己游戏代码(subsdk 插件或替换的 main)的模组会整体关闭,因为移植版无法运行这些代码。"
"开启后:此类模组在没有这些代码的情况下使用,其 RomFS 文件、金手指和 ExeFS 补丁照常加载。"
"它的文件可能依赖缺失的代码;如果游戏表现异常,请关闭该模组。下次启动时生效。",
};
#define SWKBD_ONLY(name, ...) static const char *const name[UI_TEXT_COUNT] = {SWKBD(__VA_ARGS__)}