Talented

Talented

Not enough ratings
XUnity.AutoTranslator
By uiscelt
Tips for real-time automated translation using translation services such as DeepL and Google Translate.

DeepLやGoogle翻訳などの翻訳サービスを利用したリアルタイム自動翻訳のヒント
2
   
Award
Favorite
Favorited
Unfavorite
Getting Started (in English)
1. Download XUnity.AutoTranslator and the font from the following link:
https://github.com/bbepis/XUnity.AutoTranslator/releases
  • XUnity.AutoTranslator-ReiPatcher-x.x.x.zip
  • TMP_Font_AssetBundles.zip

2. Extract the contents to your local game files:
`C:\Program Files (x86)\Steam\steamapps\common\Talented`
  • SetupReiPatcherAndAutoTranslator.exe
  • arialuni_sdf_u2019

3. Run `SetupReiPatcherAndAutoTranslator.exe`.

4. Run `Talented (Patch and Run)`.

5. The game will launch; exit from the menu.

6. Modify `Config.ini` as needed.

7. From now on, start the game normally through Steam.

8. If you notice any issues with the automatic translation, edit the relevant text files and press `Alt+R` in-game to apply the changes.
Getting Started
1. XUnity.AutoTranslator本体とフォントをダウンロード
https://github.com/bbepis/XUnity.AutoTranslator/releases
  • XUnity.AutoTranslator-ReiPatcher-x.x.x.zip
  • TMP_Font_AssetBundles.zip

2. 解凍した中身をローカルファイルに配置
C:\Program Files (x86)\Steam\steamapps\common\Talented
  • SetupReiPatcherAndAutoTranslator.exe
  • arialuni_sdf_u2019

3. SetupReiPatcherAndAutoTranslator.exeを実行

4. Talented (Patch and Run)を実行

5. ゲームが起動するのでメニューから終了

6. Config.iniを修正

7. 今後は通常通りSteamから起動

8. 自動翻訳で気になったらテキストファイルを編集して、ゲーム上でAlt+Rして反映
Config
Config.iniの該当箇所を編集
C:\Program Files (x86)\Steam\steamapps\common\Talented\AutoTranslator\Config.ini
[Service] Endpoint=DeepLTranslateLegitimate [General] Language=ja FromLanguage=en [Behaviour] FallbackFontTextMeshPro=arialuni_sdf_u2019 TemplateAllNumberAway=True [DeepLLegitimate] ApiKey=DeepL無料アカウントのAPIキー Free=True
Text Files
日本語化するにあたって、記述しておくと手間が少ない例を載せておきます

_AutoGeneratedTranslations.txt
自動翻訳の出力先
foo=bar形式
r:やsr:などの正規表現も使えます

_Postprocessors.txt
foo=barでいうとbarの部分を置換します
翻訳後の文字列を変換して_AutoGeneratedTranslations.txtに出力します
日本語化する際、フォントにない全角記号は半角に変換すると文字化けしません
(=( )=) [=[ ]=] !=! ?=? :=: %=% /=/ 【=[ 】=] +=+

_Preprocessors.txt
foo=barでいうとfooの部分を置換します
翻訳前の文字列を変換して_AutoGeneratedTranslations.txtに出力します
自分は使ってません

_Substitutions.txt
スキル名など固有名詞や、誤訳されやすい単語を置換します

regex.txt
任意のファイル名
本家の作法では正規表現を_AutoGeneratedTranslations.txtに書かずに、別ファイルに分けることが推奨されています
sr:"^(.+)\n\n(.+)$"=$1\n\n$2 sr:"^(.+) will now appear$"=$1が出現 sr:"^(.+) and (.+) will now appear$"=$1と$2が出現

others
その他、AutoTranslator\Translation\ja\Text以下に作成したtxtファイルも反映されます
サブフォルダ内に置いても反映されます
クラスやメニュー項目ごとに分割して作成すると管理がしやすく綺麗かも知れません

自分は面倒なので_AutoGeneratedTranslations.txtにほぼすべて書いてます
Tips
Key Mapping
プレイ中に気になったテキストを編集する際の主なキー操作:
  • Alt+R: 編集内容を反映
  • Alt+T: 原文と翻訳を切り替え

TemplateAllNumberAway=True
以下のようにカラーコードを含む文章は、自動翻訳がうまくいかないことが多いため、手動で編集することがあります
(もし、うまく自動翻訳する方法があれば教えてください)
Landing a Critical Strike reduces the cooldown of a random ability by {{A}} second <color\=#808080>(Cooldown: {{B}} seconds)</color>=クリティカルでランダムなアビリティのクールダウンを{{A}}秒短縮する。 <color\=#808080>(クールダウン:{{B}}秒)</color>

Plugin Frameworks
このゲームではスタンドアロンで導入が一番簡単なReiPatcherが利用できます
他のゲームでは、Mod Loaderプラグインとして導入する必要があるかも知れません

Config.ini
各オプションについても、このゲームで日本語環境で必要だったものだけ列挙してます
他のゲームでは、追加でオプションを修正する必要があるかも知れません

Finally
Let's express our gratitude to the creator of XUnity.AutoTranslator!
(Option) DeepL API
Endpoint=DeepLTranslateLegitimate
翻訳精度が高く動作も早いので、DeepL APIを使うのを個人的におすすめします
無料アカウントでは1ヶ月の利用上限は500,000文字ですが、このゲームで通常は使い切りません
参考までに、自分は何度か全翻訳を削除してやり直しましたが、今月の使用量は75,892文字でした

Endpoint=DeepLTranslate
APIを利用せずアカウント作成も必要ない設定もありますが、動作が遅いです

Endpoint=PapagoTranslate
次点として完全無料で使えるPapagoTranslateもおすすめです
(Option) Regex
TemplateAllNumberAway=True
設定で上記にしていれば、下記のようにほぼいい感じに翻訳してくれます
Your next {{A}} attacks have {{B}}% increased attack speed=次の{{A}}攻撃の攻撃速度が{{B}}%増加する。

細かい調整をしたければ下記にサンプルを書きます

Standard Regex
こっちはほぼ使わないと思います
正規表現にすると
\*+.?{ }( )[ ]^$-|/
の文字がエスケープ必須になって面倒です
r:"^Cost: (\d+)$"=コスト: $1 r:"^Every third attack has double Attack Damage \((\d+)\)$"=3回目の攻撃ごとに攻撃力が2倍になる($1) r:"^foo \(bar: (\d+)%\)$"=foo (bar: $1%)

Splitter Regex
()でくくった部分が分割されて翻訳されます
敵の名前をメッセージから分割する場合などで利用します
sr:"^(.+)\n\n(.+)$"=$1\n\n$2 sr:"^(.+) will now appear$"=$1が出現 sr:"^(.+) and (.+) will now appear$"=$1と$2が出現 sr:"^foo: (.+), bar: (\w\s+)$"=foo: $1, bar: $2