

制作:哔哩哔哩-华丽的小柠檬
这是一个为 YAPYAP 开发的通用配置管理框架,旨在为 MOD 开发者提供一个统一、美观且易用的 UI 界面,让玩家可以直接在游戏中修改各个 MOD 的 BepInEx 配置项,而无需手动编辑 .cfg 文件。
如果你希望你的 MOD 能更好地适配本框架,或者需要根据配置界面的显示状态调整 MOD 逻辑:
添加引用与依赖
ModConfigManager.dll 添加到你的 C# 项目引用(Reference)中。BaseUnityPlugin)上声明硬依赖:[BepInDependency("com.hali.yapyap.modconfigmanager")]
自动扫描机制
BaseUnityPlugin 的 MOD,并提取其通过 Config.Bind() 注册的所有配置项。Description(支持中英双语,建议格式:"中文描述 | English Description"),框架会自动解析并作为悬浮提示显示。监听配置变更
var myConfig = Config.Bind("General", "Speed", 1.0f, "移动速度");
myConfig.SettingChanged += (sender, args) => {
// 在这里编写配置变更后的逻辑
Debug.Log("配置已更新!");
};
判断 UI 是否显示
if (ModConfigManager.ModConfigManager.IsUIShown) {
// UI 正在显示,执行相关逻辑
}
手动刷新 MOD 列表
ModConfigUI.Instance.RefreshModList() 手动触发 UI 刷新。ModConfigManager.dll 放入 BepInEx/plugins 文件夹。Created by: Bilibili - 华丽的小柠檬
A universal configuration management framework for YAPYAP mods. It provides a unified, clean, and user-friendly UI for mod developers, allowing players to modify BepInEx configurations directly in-game without manual .cfg file editing.
To better integrate your mod with this framework or adjust logic based on the UI state:
Add Reference & Dependency
ModConfigManager.dll to your C# project references.BaseUnityPlugin class:[BepInDependency("com.hali.yapyap.modconfigmanager")]
Automatic Scanning
BaseUnityPlugin mods and extracts all entries registered via Config.Bind().Description for your entries (supports bilingual format: "Chinese Description | English Description").Listen for Changes
SettingChanged event:var myConfig = Config.Bind("General", "Speed", 1.0f, "Move Speed");
myConfig.SettingChanged += (sender, args) => {
// Your logic here
};
Check UI Visibility
if (ModConfigManager.ModConfigManager.IsUIShown) {
// UI is open
}
ModConfigManager.dll into the BepInEx/plugins folder.Powered by ModConfigManager Framework | 制作:哔哩哔哩-华丽的小柠檬