From 0293f5dc7cf94368ceb3a4a7f840705744bbc047 Mon Sep 17 00:00:00 2001 From: chinosk <2248589280@qq.com> Date: Mon, 20 May 2024 20:03:34 +0800 Subject: [PATCH] Update README --- README.md | 35 ++++++++++++++++++++++- app/src/main/cpp/GakumasLocalify/Hook.cpp | 6 ++-- 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9f8aee5..99588e4 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,35 @@ # gakuen-imas-localify -gakuen idolmaster localify + +- 学园偶像大师 本地化插件 +- **开发中** + + + +# TODO + +- [ ] 卡片信息、TIP等部分的文本 hook +- [ ] 自定义配置 +- [ ] 更多类型的文件替换 + +... and more + + + +# 本地化相关 + +- 本地化文件放在 `app/src/main/assets/gakumas-local` 内 + +- `version.txt` 记录翻译版本号。每次插件启动都会检查 `asset` 内的版本和本地的版本是否一致。不一致会覆盖文件到 `/data/data/com.bandainamcoent.idolmaster_gakuen/files/gakumas-lical/` 文件夹内 +- `local-files/localization.json` 为 localization 翻译 +- `local-files/generic.json` 为 localization 未覆盖部分的翻译 +- `local-files/resource` 文件夹存放资源文件,目前可以替换所有同名的 txt 文件。获取游戏原始资源可以查看:[gkmasToolkit](https://github.com/kishidanatsumi/gkmasToolkit) + + + +# 特别鸣谢 + +- [gkmasToolkit](https://github.com/kishidanatsumi/gkmasToolkit) +- [UmaPyogin-Android](https://github.com/akemimadoka/UmaPyogin-Android) +- [UnityResolve.hpp](https://github.com/issuimo/UnityResolve.hpp) +- You + diff --git a/app/src/main/cpp/GakumasLocalify/Hook.cpp b/app/src/main/cpp/GakumasLocalify/Hook.cpp index 49a6c83..50143d4 100644 --- a/app/src/main/cpp/GakumasLocalify/Hook.cpp +++ b/app/src/main/cpp/GakumasLocalify/Hook.cpp @@ -161,7 +161,8 @@ namespace GakumasLocal::HookMain { return TMP_Text_set_text_Orig(_this, UnityResolve::UnityType::String::New(transText)); } - TMP_Text_set_text_Orig(_this, UnityResolve::UnityType::String::New("[TS]" + text->ToString())); + // TMP_Text_set_text_Orig(_this, UnityResolve::UnityType::String::New("[TS]" + text->ToString())); + TMP_Text_set_text_Orig(_this, text); static auto set_font = Il2cppUtils::GetMethod("Unity.TextMeshPro.dll", "TMPro", "TMP_Text", "set_font"); @@ -192,7 +193,8 @@ namespace GakumasLocal::HookMain { } DEFINE_HOOK(void, UI_Text_set_text, (void* _this, Il2cppString* value)) { - UI_Text_set_text_Orig(_this, Il2cppString::New("[US]" + value->ToString())); + // UI_Text_set_text_Orig(_this, Il2cppString::New("[US]" + value->ToString())); + UI_Text_set_text_Orig(_this, value); static auto set_font = Il2cppUtils::GetMethod("Unity.TextMeshPro.dll", "TMPro", "TMP_Text", "set_font");