UniversalModLocalizer
A scoped Valheim mod localization system for exporting, importing, applying, and syncing translations for installed BepInEx mods.
模組介紹 作者原文
UniversalModLocalizer
Translate Valheim mods without editing their files. Export texts, translate them, import them back and keep every mod neatly separated.
English
UniversalModLocalizer is a translation tool for modded Valheim.
It was created to make translating mods easier without having to manually edit DLL files or modify the original files of each mod.
The mod scans installed BepInEx plugins, finds translatable content and exports it into simple JSON files that can be edited with any text editor or translation tool.
Each detected mod gets its own folder based on its BepInEx plugin GUID, so translations from different mods stay separated and are much easier to manage.
Once your translation is ready, place it in the corresponding import folder and reload it directly in-game.
Features
- Separate translation folders for every detected mod.
- Simple UTF-8 JSON translation files.
- Automatic detection of installed BepInEx plugins.
- Reads existing JSON, YAML/YML, CSV, TSV and TXT localization files.
- Standard scan with uml scan.
- Deeper visible-content scan with uml deep.
- Reload translations without restarting the game using uml reload.
- Runtime translation support for hardcoded UI text.
- Support for TMP_Text and Unity UI Text.
- Support for simple dynamic text templates and placeholders.
- Prefab scanning for items, creatures, building pieces, effects and other visible content.
- Server-to-client translation synchronization.
- Local cache for synchronized server translations.
- Protection for original Valheim localization tokens.
- More tolerant JSON loading for common formatting mistakes.
- Runtime translation caching for better performance.
- Does not modify mod DLLs, save files, worlds or original localization files.
Improved Runtime Performance
UniversalModLocalizer is designed to stay lightweight during normal gameplay.
More expensive ownership detection is mainly used when manually running uml scan or uml deep, while normal runtime UI translation uses a faster cached lookup system.
This significantly reduces the performance impact of runtime text translation, especially in heavily modded setups with many UI elements.
For unusual cases where multiple mods use the same hardcoded UI text with different translations, the optional:
EnableScopedRuntimeComponentLookup
setting can enable more precise owner-based matching.
It is disabled by default because the faster lookup method is recommended for normal gameplay.
Vanilla Translation Protection
Some mods reuse localization tokens that already belong to Valheim, for example:
$item_hammer
$item_club
$piece_fire
UniversalModLocalizer protects these tokens so Valheim can continue using its original localization instead of replacing it with an incorrect translation from a mod package.
Protected tokens are stored in:
BepInEx/config/UniversalModLocalizer/vanilla_tokens.txt
The list can also be edited manually if additional tokens need to be protected.
Commands
uml scan
Runs the standard translation scan and exports detected strings.
uml deep
Performs a deeper scan of visible modded content, including loaded UI elements and additional prefab data.
This mode can find strings that may not be detected during a normal scan.
uml reload
Reloads translation files from the import folders without requiring a full game restart.
uml status
Shows the currently selected language, loaded translations and configuration location.
uml language Polish
Changes the target translation language.
You can also use:
uml language Auto
to automatically use the language currently selected in Valheim.
uml runtime on
Enables collection of hardcoded runtime UI strings while browsing mod menus, HUD elements and other interfaces.
How to use
- Install UniversalModLocalizer using r2modman or manually place it inside:
BepInEx/plugins
- Start Valheim and enter a world.
- Open the console and run:
uml scan
or:
uml deep
- Exported files can be found under:
BepInEx/conf
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。
下面這些內容需要先安裝,否則該模組不會生效: