ModSettingsMenu

版本 v1.3.1·更新於 2026-09-16

Adds a Mod Settings button below Settings in the main menu and to the in-game pause menu, providing a unified configuration interface for mods.

模組介紹 作者原文

Note: This description is bilingual. The Chinese section is provided below the English section.

說明:本描述爲中英雙語版本,中文內容位於英文內容下方。

Mod Settings Menu (English)

Adds a Mod Settings button below Settings in the main menu and to the in-game pause menu, providing a unified configuration interface for mods.

Main Features

  • Shows configurable mod names on the left and the selected mod's settings on the right.
  • Lets mod authors optionally register a display name, description, author, version, ID, and package.

For Players

This mod does not change gameplay by itself. It provides a common settings screen for compatible mods.

Only loaded mods with at least one configuration entry appear in the list. The available settings depend on the mods you have installed.

Mod Author API

  • Registration is optional. A loaded BepInEx plugin with normal Config.Bind entries is detected automatically.
  • Use ModSettingsRegistry.Register only when you want to provide custom metadata or and links.
  • Use ModSettingsTags.Section and ModSettingsTags.Entry in ConfigDescription for display metadata, ordering, and custom slider steps. Lower order values appear first; unspecified values use 1000.

Complete example mods: Sunkenland example mods

Sorting example:

Config.Bind("General", "Enabled", true, new ConfigDescription(

"Enable this mod.",

null,

ModSettingsTags.Section("General", order: 10),

ModSettingsTags.Entry(order: 10)));

Config.Bind("General", "SpeedMultiplier", 1f, new ConfigDescription(

"Adjust the speed multiplier.",

new AcceptableValueRange(0.5f, 3f),

ModSettingsTags.Entry(order: 20, sliderStep: 0.25d)));

Put the section tag on any one entry in that section. Registered mods can alternatively use ConfigureSection and ConfigureEntry; registered values override tag values. Set ModSettingsEntryOptions.SliderStep to configure a registered range slider. Without a custom step, integer sliders use 1 and floating-point sliders use 0.1.

Optional hard dependency example:

using BepInEx;

using BepInEx.Configuration;

using ModSettingsMenu.Api;

using UnityEngine;

[BepInPlugin(PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)]

[BepInDependency(ModSettingsMenu.PluginInfo.PLUGIN_GUID)]

public sealed class MyPlugin: BaseUnityPlugin

{

private void Awake()

{

Config.Bind("General", "Enabled", true, "Enable this mod.");

Config.Bind("General", "SpeedMultiplier", 1f, new ConfigDescription("Adjust the speed multiplier.", new AcceptableValueRange(0.1f, 5f)));

Config.Bind("Controls", "QuickAction", KeyCode.F7, "Choose the quick action key.");

ModSettingsRegistry.Register(

PluginInfo.PLUGIN_GUID,

new ModSettingsModOptions

{

Name = "My Mod",

Description = "A short description shown above this mod's settings.",

Author = "Author Name",

Version = PluginInfo.PLUGIN_VERSION,

NexusModsId = 6,

ThunderstoreTeam = "MyTeam",

ThunderstoreModName = "MyMod"

});

}

}

Localization API Example

For localized config entries and mod metadata, register the Sunkenland Localization API JSON file from the same directory as your plugin DLL. ModSettingsModOptions.Description is saved when the mod is registered, so register again after LocalizationApi.LanguageChanged to refresh the current-language description.

using System.IO;

using System.Reflection;

using BepInEx;

using BepInEx.Configuration;

using ModSettingsMenu.Api;

using SunkenlandLocalizationAPI.Api;

using UnityEngine;

[BepInPlugin(PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)]

[BepInDependency(ModSettingsMenu.PluginInfo.PLUGIN_GUID)]

[BepInDependency(SunkenlandLocalizationAPI.PluginInfo.PLUGIN_GUID)]

public sealed class MyPlugin: BaseUnityPlugin

{

private ModLocalizer _localizer;

private void Awake()

{

_localizer = LocalizationApi.For(PluginInfo.PLUGIN_GUID);

string directory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

_localizer.RegisterJson(Path.Combine(directory, "MyPlugin.Localization.js

安裝與使用 安裝:按包內說明操作

  1. 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
  2. 多數模組依賴遊戲的模組載入器:常見做法是用社群模組管理器(如 r2modman)選中本遊戲安裝,由管理器自動處理載入器與依賴。
  3. 手動安裝時,把模組檔案放進遊戲目錄下對應的 Mod / plugins 資料夾。
  4. 啟動遊戲確認載入成功;帶「前置依賴」的模組需要把依賴一併安裝。

不同模組的安裝位置差異較大,包內說明是最可靠的依據。

前置依賴

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

SunkenlandModding-BepInExPack_SunkenlandIce_Box_Studio_Sunkenland-SunkenlandLocalizationAPI

檔案與校驗

檔案名稱
ModSettingsMenu-1.3.1.zip
檔案大小
150.4 KiB