ConfigurationManager
Customizable version of BepInEx's in-game configuration manager (Ctrl+F1) 遊戲內mod配置管理器
截圖 共 2 張
模組介紹 作者原文
Configuration Manager
A forked version of BepInEx's in-game configuration manager, allowing you to easily change mod configurations directly within the game.
The default hotkey to open or close the menu is Ctrl+F1. This can be changed in the config manager itself.
Note: Some mods still require restarting the game to apply the changes.
這是 BepInEx 遊戲內配置管理器的一個分支版本,允許您直接在遊戲內輕鬆更改模組配置。
打開或關閉菜單的默認熱鍵是Ctrl+F1。這可以在配置管理器本身中更改。
注意:部分模組仍需重啓遊戲,變更後的配置才能生效。
Changes from the original
This fork version of BepInEx.ConfigurationManager is for use with Dyson Sphere Program. It was forked from version 17.0 to make it works with BepInEx v5.4.17.
The changes from the original version are as follows:
- Window is draggable and resizable
- Background colors are customizable
- Text size and color are customizable
- Change the close behavior from clicking outside of window to top-left close button and hotkey
- Configuration Manager settings are changeable within the manager itself
UI layout changes:
- English and Chinese localization switch
- Button to open BepInEx log and Unity log in Debug mode
- Left and right buttons beside plugin name to reload the config and open the config file
與原版的區別
這個 BepInEx.ConfigurationManager 的分支版本是供戴森球計劃使用的。它是從版本17.0分支出來的,目的是使其能與BepInEx v5.4.17配合工作。
與原版相比,更改如下:
- 窗口可拖動和調整大小
- 背景顏色可自定義
- 文本大小和顏色可自定義
- 關閉行爲從點擊窗口外部更改爲左上角的關閉按鈕和熱鍵
- 配置管理器設置可在管理器內部更改
UI 佈局更改:
- 英漢本地化切換
- 按鈕:在調試模式下,可打開 BepInEx 日誌和 Unity 日誌
- 插件名稱旁邊的左右按鈕:用於重新加載配置和打開配置文件
Original README
Plugin / mod configuration manager for BepInEx 5
An easy way to let user configure how a plugin behaves without the need to make your own GUI. The user can change any of the settings you expose, even keyboard shortcuts.
The configuration manager can be accessed in-game by pressing the hotkey. Hover over the setting names to see their descriptions, if any.
Note: The.xml file is useful for plugin developers when referencing ConfigurationManager.dll in your plugin, it will provide descriptions for types and methods to your IDE. Users can ignore it.
How to make my mod compatible?
ConfigurationManager will automatically display all settings from your plugin's Config. All metadata (e.g. description, value range) will be used by ConfigurationManager to display the settings to the user.
In most cases you don't have to reference ConfigurationManager.dll or do anything special with your settings. Simply make sure to add as much metadata as possible (doing so will help all users, even if they use the config files directly). Always add descriptive section and key names, descriptions, and acceptable value lists or ranges (wherever applicable).
How to make my setting into a slider?
Specify AcceptableValueRange when creating your setting. If the range is 0f - 1f or 0 - 100 the slider will be shown as % (this can be overridden below).
CaptureWidth = Config.AddSetting("Section", "Key", 1, new ConfigDescription("Description", new AcceptableValueRange(0, 100)));
How to make my setting into a drop-down list?
Specify AcceptableValueList when creating your setting. If you use an enum you don't need to specify AcceptableValueList, all of the enum values will be shown. If you want to hide some values, you will have to use the attribute.
Note: You can add System.ComponentModel.DescriptionAttribute to your enum's items to override their displayed names. For example:
public enum MyEnum
{
// Entry1 will be shown in the combo box as Entry1
Entry1,
[Description("Entry2 will be shown in the combo box as this string")]
Entry2
}
How to allow user to change my keyboard shorcuts / How to easily check for key presses?
Add a setting of type KeyboardShortcut. Use the value of this setting to check for inputs (recommend using IsDown) inside of your Update method.
The KeyboardShortcut class supports modifier keys - Shift, Control and Alt. They are properly handled, preventing common problems like K+Shift+Control triggering K+Shift when it shouldn't have.
private ConfigEntry ShowCounter { get; set; }
publi
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。
下面這些內容需要先安裝,否則該模組不會生效: