LocalizationCache

v0.3.0·Updated 2024-09-28

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

About this mod Author’s original text

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

Install & use Install: BepInEx plugin

  1. The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
  2. Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
  3. Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
  4. Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.

Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file. In multiplayer, the host and every client need the same mods installed.

Dependencies

Install these first, or the mod will not work:

denikson-BepInExPack_Valheim

File & checksum

Filename
LocalizationCache-0.3.0.zip
File size
15.4 KiB