LocalizationCache

版本 v0.3.0·更新於 2024-09-28

A small mod that caches localization loading, which can help improve startup performance and reduce possible connection timeouts

模組介紹 作者原文

LocalizationCache

About

This is small mod that caches localization loading, which can help improve startup performance and reduce possible connection timeouts.

With no other mods and the language set to English, only a small improvement is achieved.

On my system, the load time is reduced by a few hundred milliseconds.

If you have mods that call the localization multiple times, you can expect an improvement of a few seconds.

Some mods also cache internally, so the improvement may not stack beyond a certain point.

In some cases, loading is also triggered when joining a world which can exceed the 30s Steam timeout and cause a disconnect.

This mod can help to reduce those disconnects, especially on low end systems.

The log messages Loaded localization file #0 - 'localization' language: 'English'... will still be printed, as some mods rely on the underlying functionality.

While the vanilla localization is cached in this case, mods may load their own localization files for the first time which are not cached.

Configuration

General:

  • Enable Cache: Enable caching of localization files. Disable to compare loading times. Requires a restart to take effect. Default: true

Debugging:

  • Log Timing: Log timing information for Localization.SetupLanguage. Requires a restart to take effect. Default: false
  • Log Stacktrace: Log stacktrace for each Localization.SetupLanguage call. Requires a restart to take effect. Default: false

Manual Installation

This mod requires BepInEx.

Extract all files to BepInEx/plugins/LocalizationCache.

The mod can be installed on both server and client and is optional.

However, it will have the most impact on the client.

Links

-

  • Github
  • Discord: margmas. Feel free to DM or ping me about feedback or questions, for example in the Jötunn discord

Changelog

0.3.0

  • Added caching of some mod translation loading calls, which can help a lot with many mods. However, this breaks switching languages in-game, as the mod translations are not reloaded. Can be disabled in the config.

0.2.0

  • Fixed caching did not distinguish between different localization files, resulting in missing vanilla translations
  • Added config options for debugging timing and stacktrace

0.1.0

  • Release

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

denikson-BepInExPack_Valheim

檔案與校驗

檔案名稱
LocalizationCache-0.3.0.zip
檔案大小
15.4 KiB