IMPORTANT: WATCH THE TRANSLATED OPENING VIDEO TO UNDERSTAND THE STORY.
Check here if you want to replace the ingame video: viewtopic.php?t=3499-english-intro-vide ... -tu-lo-shuSome generated dialogue isn't translated because I haven't setup the regexes yet. Some untranslated UI stuff. See my update post later in the thread for all known issues.
OLD:
► Show Spoiler
It includes a custom forked plugin for XUnity Auto Translator(https://github.com/bbepis/XUnity.AutoTranslator) that uses AI to translate the game. To get it working, you need an openrouter API key(which means an openrouter account with a couple dollars in credit.) You can create a key here once you have an account: https://openrouter.ai/settings/keys
To install this, you drop the BepinEx directory into the root of the game's directory. BepInEx's directory should be right next to J2.exe
Once you get the API key, open the BepInEx/config/AutoTranslatorConfig.ini file, go down to [OpenAIAPI] section, find the APIKey and put it there. e.g.,
There's nothing about this plugin specific to Ho Tu Lo Shu, I think… so it should work for other games. But I've only tried it with this game, so I'm distributing it as a mod for it.
You can find my fork of the plugin here: https://github.com/WizardLizard549/OpenAIAPITranslator
Because, unlike other translation tools, AIs can use(and benefit greatly from) context, I hacked in a way to provide context with translations. This has a good deal of issues(e.g., translations are cached and therefore may be shared across contexts…), but it can also greatly improve translation output.
UI elements are matched based on their path, the first matcher that matches the path from the beginning is used. If no matches, no extra settings are added. This is what the ui_matcher.json file in the config directory looks like:
The default temperature is 0.2, which prioritizes accuracy. 0.6 is used for dialogue to prioritize more creative translations over transliterations.
Additionally, the base prompt is too large to store as a single key value in the ini and therefore has its own file, base_prompt.txt. This prompt is used to greatly improve the translation output. A good deal of time was spent tweaking the various prompts(there are several in total concatenated together), there should be no reason to edit them.
Some things have been manually translated and more likely will be as I continue. Most of these are names and various game mechanics to make sure they use a consistent name/tone. e.g., keeping the name of Qīnggōng/Nèigōng stats, morality attributes, etc.,
To install this, you drop the BepinEx directory into the root of the game's directory. BepInEx's directory should be right next to J2.exe
Once you get the API key, open the BepInEx/config/AutoTranslatorConfig.ini file, go down to [OpenAIAPI] section, find the APIKey and put it there. e.g.,
APIKey=sk-or-v1-aaaaaaaa
. There's nothing about this plugin specific to Ho Tu Lo Shu, I think… so it should work for other games. But I've only tried it with this game, so I'm distributing it as a mod for it.
You can find my fork of the plugin here: https://github.com/WizardLizard549/OpenAIAPITranslator
Because, unlike other translation tools, AIs can use(and benefit greatly from) context, I hacked in a way to provide context with translations. This has a good deal of issues(e.g., translations are cached and therefore may be shared across contexts…), but it can also greatly improve translation output.
UI elements are matched based on their path, the first matcher that matches the path from the beginning is used. If no matches, no extra settings are added. This is what the ui_matcher.json file in the config directory looks like:
Code: Select all
[
{
"name": "MainMenu",
"path": "/Canvas(Clone)/UITitle(Clone)/System_BG/Btn_VLG",
"prompt": "IMPORTANT: This translation request is for text that will be displayed on a menu screen."
},
{
"name": "SettingsMenu",
"path": "/Canvas(Clone)/UISetting(Clone)/Anchor1920.1080/WgPanel",
"prompt": "IMPORTANT: This translation request is for text that will be displayed on an ingame settings screen, likely with technical terminology."
},
{
"name": "Dialogue",
"path": "/Canvas(Clone)/UITalk(Clone)/BackGround/DialogGroup/Message",
"prompt": "CRITICALLY IMPORTANT: This translation request is for text that is character dialogue. It is a standalone message and should make sense when read by itself.",
"temperature": 0.6
},
{
"name": "Dialogue Choice",
"path": "/Canvas(Clone)/UITalk(Clone)/BackGround/ButtonList",
"prompt": "IMPORTANT: This translation request is for text that is a dialogue choice. It is a standalone message and should make sense when read by itself. The intent of the choice MUST be clear and understandable.",
"temperature": 0.6
},
[…]
Additionally, the base prompt is too large to store as a single key value in the ini and therefore has its own file, base_prompt.txt. This prompt is used to greatly improve the translation output. A good deal of time was spent tweaking the various prompts(there are several in total concatenated together), there should be no reason to edit them.
Some things have been manually translated and more likely will be as I continue. Most of these are names and various game mechanics to make sure they use a consistent name/tone. e.g., keeping the name of Qīnggōng/Nèigōng stats, morality attributes, etc.,