ZetAspectsTranslator
Translation of the "ZetAspects" mod
模組介紹 作者原文
ZetAspects Translator
About
This mod translates the ZetAspects mod.
Russian localisation is supplied by default.
Данный мод переводит ZetAspects.
По умолчанию поставляется русская локализация.
Translations
To add your localisation, place the appropriate settings in one of the 2 directories:
- BepInEx\plugins\NovaGC-ZetAspectsTranslator\NovaGC-ZetAspectsTranslator\translations
- Risk of Rain 2_Data\StreamingAssets\LanguageOverrides\ZetAspects
It is recommended to use the 2nd option, as the localisation in the 1st directory may be deleted when updating the mod
If the directory is missing, start the game with the mod enabled. All necessary directories and files will be created
Localisation is set using a configuration json file and a tokens json file (optional).
The token files MUST be placed in a separate directory./tokens or any directory other than the configuration directory
Format
All localization json files must match their schemas for the mod to work correctly:
- settings.schema.json - for configurations
- tokens.schema.json - for tokens
These files are located in the directories where the localization files are stored.
To apply the schema to your json file, add a $schema field to the root object.
For example:
{
"$schema": "./settings.schema.json"
}
Tokens file
Represents 1 object where fields are tokens and values are translations.
For example:
{
"$schema": "./tokens.schema.json",
"AFFIX_RED_NAME": "Ifrit's Distinction",
"AFFIX_RED_PICKUP": "Become an aspect of fire."
}
Configuration file
Root object:
| Field | Optional | Description |
|:-------------|:--------:|----------------------------------------------------------------------------------|
| language | - | Localization language |
| tokens | + | A list of localization tokens.
_The structure is similar to the tokens file_ |
| extends | + | List of localization dependencies |
Field extends:
| Field | Optional | Default | Description |
|:---------|:--------:|:--------:|---------------------------------------|
| path | - | - | Relative or absolute path to the file |
| type | + | tokens | Dependency type:setting or tokens |
For example:
{
"$schema": "./settings.schema.json",
"language": "en",
"tokens": {
"AFFIX_RED_NAME": "Ifrit's Distinction",
"AFFIX_RED_PICKUP": "Become an aspect of fire."
},
"extends": [
{
"path": "./tokens/eng.base.json"
},
{
"path": "./tokens/eng.items.json",
"type": "tokens"
},
{
"path": "./default.json",
"type": "setting"
}
]
}
Overwrites
Tokens files and other configuration files can be used to set up localization in the configuration file by specifying them in the extends field.
If you specify other configuration file in the dependencies, it will recursively load all the tokens it provides directly from the tokens field and from its extends field.
You can use other configurations regardless of what language they are made for. Only tokens are loaded.
If the same token is downloaded from different sources, the one with the highest priority will be used.
Priority
The tokens field has the highest priority.
Next are the dependencies from the extends field. The priority of a dependency is determined by its order in the list.
The 1st dependency has a higher priority than the 2nd one, the 2nd one has a higher priority than the 3rd one, etc.
Localizations from the Risk of Rain 2_Data\StreamingAssets\LanguageOverrides\ZetAspects directory generally have higher priority than localizations from BepInEx\plugins\NovaGC-ZetAspectsTranslator\NovaGC-ZetAspectsTranslator\translations, so they will always overwrite tokens.
If there are multiple localizations for the same language, higher priority will be given according to alphabetical sorting.
For example, a.json > b.json
Build
After the project is built, all files are collected in the public directory.
Rider
- Open ZetAspectsTranslator.sln
- Add Reference to ZetAspects:
- In "Solution" tab add a reference to ZetAspects to the ZetAspectsTranslator project.
Z
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。
下面這些內容需要先安裝,否則該模組不會生效: