PrefabLocalizer
To easily export the text of mod, you need to localize the text and automatically apply the localized file.
模組介紹 作者原文
PrefabLocalizer / 通用本地化模組
更新日誌
1.6.2:修復“篩選條件.txt”不生效的問題。
1.6.1:修復了收集文本重複收集引起的報錯。
1.6.0:支持deepseek接入翻譯,目標文件的格式要求和應用翻譯的文件命名格式一致,以前綴開頭(漢化信息_物品等等),但是速度很慢。支持遊戲內應用翻譯。現在有配置文件了,自定義觸發按鍵,應用翻譯是否開啓,api填入。
簡介
這是一個專爲《英靈神殿》模組設計的通用本地化框架。本模組的主要功能是爲遊戲中的各類模組內容提供一個便捷的本地化翻譯環境。它允許翻譯者輕鬆地本地化其他模組添加的內容。
本模組支持對以下模組內容進行本地化:
- 物品:武器、盔甲、材料、食物等的名稱與描述(能放在背包裏的東西)
- 效果:Buff、Debuff 的狀態名稱與描述(UI右上角顯示的各種狀態)
- 生物:怪物、Boss 的名稱
- 建築:工具錘右鍵界面的東西,如工作臺、傳送門、建築材料等的名字和描述
前置需求
- 遊戲本體:《英靈神殿》(Valheim)
- BepInEx:Valheim 模組框架。必須安裝
- Jotunn:圖書館。必須安裝
重要提示:
可以用新版本導出製作成漢化文件,然後用老版本加載,從而可以不使用Jotunn前置
安裝步驟
- 下載本模組的最新版本(.dll 文件)
- 手動安裝:
- 將下載的文件複製到您的 Valheim 遊戲根目錄下的 BepInEx/plugins 文件夾中
- 確保文件路徑類似於...\Valheim\BepInEx\plugins\PrefabLocalizer.dll
使用說明
- 首次啓動:首次運行遊戲後按下F12,模組會在 Valheim\BepInEx\config\mod漢化 文件夾內生成1個 篩選條件.txt 文件和1個 篩選條件_Mod名稱.txt,同時導出默認條件的文本(r2也在遊戲本體這個位置)
- 設置篩選條件:根據您想要本地化的模組內容的預製名,在篩選條件.txt中填入預製名的某些字段,在篩選條件_Mod名稱.txt填入mod名字。如果篩選條件爲空,則會導出所有文本。
- 導出文本:啓動遊戲並加載一個世界。在遊戲中按 F12 鍵,模組會根據您的篩選條件導出文本到新的本地化文件
- 進行本地化:打開步驟 3 中生成的本地化.txt 文件。修改裏面的 名稱和 描述後面的內容進行翻譯。注意:請勿修改其他信息、符號或文件結構
- 生效:完成本地化後,重啓遊戲即可生效
重要提示
現在可以隨時讀取篩選條件了,導出文本了
簡單流程
- 安裝本模組
- 首次啓動遊戲,自動創建 mod漢化 文件夾,按F12自動創建篩選文件
- 進入文件夾,打開篩選文件並填入條件
- 重新啓動遊戲
- 在遊戲內按 F12 導出文本
- 在文件夾內,對導出的文本內容進行本地化
- 本地化完成後,重啓遊戲生效
文件結構(Valheim\BepInEx\config\mod漢化)
- 篩選條件_.txt
物品:Items filter
效果:Effects filter
怪物:Creatures filter
工具:Pieces filter
- 漢化信息_物品.txt # 只有帶有此前綴的文件才能被讀取,如 "漢化信息_物品_item.txt""漢化信息_物品_new.txt"
- 漢化信息_效果.txt # 只有帶有此前綴的文件才能被讀取
- 漢化信息_怪物.txt # 只有帶有此前綴的文件才能被讀取
- 漢化信息_工具.txt # 只有帶有此前綴的文件才能被讀取
上面四個是能被加載應用的本地化文件.(2、3、4、5)
- 漢化信息_modname.txt
漢化信息_modname.txt 內容需要自己本地化後,根據板塊(物品、效果、怪物、工具)複製到對應前綴文件中,才能被正確加載讀取
- 篩選條件_Mod名稱.txt # Filter criteria: mod name
本地化後,建議讓無用的導出文件刪除,更方便管理本地化文件。導出的文本有些是無用的,可以自己判斷進行保持原本的格式刪除。所有文本內容可以隨意刪除,但要注意保證格式正確。
PrefabLocalizer / Universal Localization Mod
Introduction
This is a universal localization framework designed for Valheim mods. The main function of this mod is to provide a convenient localization environment for various mod content in the game, allowing translators to easily localize content added by other mods.
Features
This mod supports the localization of the following mod content:
- Items: Names and descriptions of weapons, armor, materials, food, etc. (Anything that can be placed in the inventory).
- Status Effects: Names and descriptions of Buffs and Debuffs (various states displayed in the top-right UI corner).
- Creatures: Names of monsters and bosses.
- Pieces: Names and descriptions of buildable pieces accessible via the Hammer's build menu, such as workbenches, portals, and building materials.
Prerequisites
- Game: Valheim
- BepInEx: Valheim mod framework. Must be installed.
- Jotunn: The new prerequisite is designed to support the export by mod name. Must be installed.
Important Note:
The new version can be used to export and create a localized file. Then, the old version can be loaded to achieve the same result without using Jotunn in advance.
Installation
- Download the latest version of this mod (.dll file)
- Manual Installation:
- Copy the downloaded file into your Valheim game root directory under the BepInEx/plugins folder
- Ensure the file path resembles...\Valheim\BepInEx\plugins\PrefabLocalizer.dll
Usage
- First Launch: After running the game for the first time, the mod will generate 篩選條件.txt、 篩選條件_Mod名稱.txt files (filter files) in the Valheim\BepInEx\config\mod漢化 folder(Because it is hard-coded,R2 is also located at this position in the game itself.)
- Set Filters: Based on the pre-defined name of the module content you want to localize, fill in certain fields of the pre-defined name in 篩選條件.txt, and fill in the mod name in 篩選條件_Mod名稱.txt. If the filter conditions are empty, all the text will be exported.
- Export Text: Launch the game and load a world. Press the F12 key in-game. The mod will export text based on your filters into new localization files
- Localize: Open the localization.txt files generated in step 3. Modify the 名稱 and 描述 fiel
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。
下面這些內容需要先安裝,否則該模組不會生效: