ModConfig 是一个通用模组配置框架,为游戏设置界面添加 Mods 选项卡。模组作者可通过 API 注册配置项,界面会自动生成相应控件;玩家无需编辑配置文件,改动也无需重启即可生效。
支持的控件
- 开关
- 数值滑块(支持步进)
- 下拉选项
- 按键绑定(支持清除)
- 文本输入(可选验证)
- 颜色选择器
- 标题与分隔线
玩家使用
将本模组与支持 ModConfig 的模组一同安装。安装后,设置中会出现 Mods 选项卡,可在其中调整相关模组设置。配置更改会立即生效,无需重启。
目前使用 ModConfig 的模组包括:Skada、SpeedX、Rewind、QuickLink 等。
模组作者使用
集成采用零依赖方式:模组通过反射调用 ModConfig,即使玩家未安装 ModConfig,相关模组也可以正常运行;无需引用 DLL。
- 每个控件可通过一次方法调用注册。
- 通过
SetValue 从外部更改数值时,界面会即时刷新。
- 按键绑定支持按 Delete 或 Backspace 解除绑定。
- 文本输入验证回调有安全封装,第三方错误不会破坏存档。
- 配置持久化由框架自动处理。
集成指南与源代码:GitHub
安装
将 ModConfig.dll、ModConfig.pck 和 ModConfig.json 解压到:
<Game Install>/mods/ModConfig/
兼容性与影响
- 支持 Windows、macOS、Linux(AnyCPU 构建)。
- 支持英语和简体中文,自动检测语言。
- 不与其他模组冲突。
- 不影响存档或游戏玩法。
版本说明
本次发布重新打包了压缩包,移除了旧版 mod_manifest.json,以避免新版本游戏加载新旧清单时在模组菜单中出现重复条目。更新时,ModManager 会移除游戏目录中的旧清单。此次没有代码改动。
作者:皮一下就很凡(piyixiajiuhenfen)。
Bilibili 频道
欢迎反馈问题。
下载说明
本站仅保存 Nexus Mods 原站文件页,没有镜像附件;请在原站核对适配版本、许可与安装要求。
来源与文件
- 原作者:PiPiFanDev
- 原项目:ModConfig
- 文件:ModConfig(ID:2093)
文件说明
repackage release zip without legacy mod_manifest.json to fix duplicate mod entry in game menu
- Game v0.99+ introduced <ModId>.json as the sole external root manifest. The mod loader still scans for legacy mod_manifest.json - so when a deployed folder contains both, the loader registers them as two separate mod entries and the game menu shows a duplicate red 'already loaded' row for that mod.
- Releases up to and including the previous version shipped both manifests in the zip. Even though ModManager.ps1's install/update path calls Remove-LegacyExternalManifest to clean the target directory, the cleanup was undone because the zip still contained mod_manifest.json and the subsequent Copy-Item step re-deposited it.
- This release ships a repackaged zip that contains only <Mod>.json + DLL + PCK. No code changes. Updating from the previous version will trigger ModManager to remove the old mod_manifest.json from the player's game folder and the duplicate entry disappears.
前往 N 网打开所选文件。安装与下载要求以原作者及平台说明为准。
<!-- aoe-mods-source:nexusmods:slaythespire2:27 -->