Shared HostingFirst month freeShared web hosting from $2.99/mo — $0 today, and the price you sign up at is the price you renew at.See hosting plans →

NxLabs / Core Keeper

General Mod Config Menu

By ReishyouSose

可以在游戏中进行实时模组配置 Allows real-time setting mod configs in-game

Description

BASIC INFORMATION: This mod is a universal mod menu that allows players to hot-reloading mod config values in real-time without the need to restart the game. The menu is located in the game settings.

> Hot-reloading of config values on dedicated servers is now supported!

TO MOD DEVELOPERS:

  • To separate server and client data, this mod sets SaveOnConfigSet to false for all ConfigFile instances.
  • To ensure the menu functions as expected, mod developers should pass the appropriate ConfigScope parameter (including permission settings and restart requirements) when adding configuration entries via ConfigFile.Bind.
  • Make sure to reference the configuration entry itself, not a field that has cached its value, unless you have set a configuration change callback to update that field. Failing to do so may cause real-time changes to not take effect.

LOCALIZATION KEY NAMING RULE

The localization key for this mod follows this format:

* Use / as the path separator

* Use _ (underscore) to connect all other hierarchy levels except the final separator

Mapping rules:

* FILENAME: FilePath/FileName

* SECTION: FilePath_FileName/Section

* ENTRY: FilePath_FileName_Section/Key

* ACCEPTVALUERANGE: FilePath_FileName_Section_Key/Value (same as Entry level)

Please follow this rule when writing localization keys to ensure the mod can properly load localized text.

A little support goes a long way! If you’d like to help me keep creating

基本信息: 该Mod为通用模组菜单,允许玩家在不需要重启游戏的情况下,实时修改模组配置的值。 菜单位于游戏设置中。

> 现已支持专用服务器上的配置热修改!

写给模组开发者的适配细节:

  • 为了分离服务器数据与客户端数据,本模组会将所有ConfigFile的SaveOnConfigSet设为false。
  • 为确保菜单功能正常,请各位模组作者在添加配置条目时,即调用ConfigFile.Bind时,根据配置条目的生效范围,传入合适的ConfigScope参数,包括更改权限和重启需求。
  • 确保引用的是配置条目本身,而不是缓存了它的值的某个字段,除非您已设置配置条目更改回调来重新更新该字段的值,否则这会导致实时修改失效。

本地化 KEY 编写规则

本模组的本地化 Key 采用以下格式:

* 用 / 作为路径分隔符

* 除 / 以外的层级之间用 _(下划线)连接

具体对应关系:

* 文件名层级(FILENAME):FilePath/FileName

* 节层级(SECTION):FilePath_FileName/Section

* 条目层级(ENTRY):FilePath_FileName_Section/Key

* 可接受值范围(ACCPETVALUERANGE):FilePath_FileName_Section_Key/Value

请按照此规则编写本地化 Key,以确保模组能正确读取本地化文本。

Ratings & reviews

No ratings yet

Sign in to leave a rating or comment.