YAPYAP MOD 通用配置框架 (ModConfigManager)
制作:哔哩哔哩-华丽的小柠檬
这是一个为 YAPYAP 开发的通用配置管理框架,旨在为 MOD 开发者提供一个统一、美观且易用的 UI 界面,让玩家可以直接在游戏中修改各个 MOD 的 BepInEx 配置项,而无需手动编辑 .cfg 文件。
功能特性
- 即时生效:在 UI 中修改数值后点击“保存”即可实时应用配置(需 MOD 支持)。
- 多语言支持:界面支持中英双语,并可根据游戏语言自动切换。
- 数值自定义:支持布尔值、数字(滑块/输入框)、枚举(下拉菜单)等多种类型。
- 重置功能:支持单个配置项独立重置为默认值。
- 悬浮提示:鼠标悬停在配置项上可实时读取并显示配置文件中的描述信息。
- 调试模式:内置双语调试日志系统,方便开发者调试。
开发者使用指南
- 添加引用:将
ModConfigManager.dll 添加到你的 C# 项目引用中。
- 声明依赖:在你的
BaseUnityPlugin 类特性上添加依赖声明:[BepInDependency("com.hali.yapyap.modconfigmanager")]
- 标准配置写法:框架会自动扫描通过
Config.Bind() 注册的配置项。
- 监听变更:建议监听
SettingChanged 事件以实现即时生效。
安装方法 (玩家)
- 安装 BepInEx。
- 将
ModConfigManager.dll 放入 BepInEx/plugins 文件夹。
- 进入游戏主菜单,点击左下角的 MOD 配置 按钮即可打开界面。
YAPYAP Universal Mod Config Framework (ModConfigManager)
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.
Features
- Instant Apply: Real-time configuration updates after clicking "Save" (requires mod support).
- Multilingual Support: Supports Chinese and English, automatically switching based on game language.
- Customizable Values: Supports booleans, numbers (sliders/input fields), enums (dropdowns), and more.
- Reset Function: Independent reset buttons for individual configuration entries.
- Tooltips: Real-time display of descriptions from the config file on mouse hover.
- Debug Mode: Built-in bilingual debug logging system for developers.
Developer Guide
- Add Reference: Add
ModConfigManager.dll to your C# project references.
- Declare Dependency: Add the dependency attribute to your
BaseUnityPlugin class:[BepInDependency("com.hali.yapyap.modconfigmanager")]
- Standard Configuration: The framework automatically scans all entries registered via
Config.Bind().
- Listen for Changes: It is recommended to listen to the
SettingChanged event for instant application.
Installation (Players)
- Install BepInEx.
- Place
ModConfigManager.dll into the BepInEx/plugins folder.
- In the main menu, click the MOD CONFIG button at the bottom left to open the UI.
Powered by ModConfigManager Framework | 制作:哔哩哔哩-华丽的小柠檬