简单简介
在3DM Mod站下载游戏Mod工具最新的BepInEx 插件/Mod管理 + GUI 汉化版(Plugin / mod configuration manager) Mod,由BepInEx制作。◕小莫◕在我们的平台上分享了这个免费且高质量的游戏模组,让玩家们可以享受到更加丰富的游戏体验。快来3DM Mod站下载并尝试吧!
详细介绍
Mod作者: BepInEx Mod版本: 1.016.1 Mod大小: 40.70KB 更新时间: 2021-04-16 12:03:39 发布时间: 2021-01-28 13:10:03
详细说明
作者:BepInEx 汉化:小莫 源码:https://github.com/BepInEx/BepInEx.ConfigurationManager
一个简单的工具,无需自己制作,直接你的插件/Mod 配置一个GUI,用户可以更改你公开的任何设置,包括键盘快捷键;
默认按F1打开管理界面,这个按键可以根据自己的习惯修改;
安装方法:
- 安装BepInEx :https://mod.3dmgame.com/mod/172563
- 将“ConfigurationManager.dll”和“ConfigurationManager.xml”放入“\BepInEx\plugins”目录
- 如果没有“plugins”就自己新建一个
- 进游戏按F1打开菜单
为你的Mod制作GUI:
ConfigurationManager 会自动将插件的配置内容显示出来; ConfigurationManager 将使用所有元素(例如:说明,范围)向用户展示; 在大多数情况下,您不必引用ConfigurationManager.dll或对其进行特殊的数据处理;
只需确保添加尽可能多的参数(这样可以帮助玩家更好的进行修改)。别忘了添加描述、键名、值范围。
为你的Mod添加范围滑块:
创建时,请指定 AcceptableValueRange ,如果范围是0f-1f,或0-100,则滑块将显示百分比%。
CaptureWidth = Config.Bind(“Section”, “Key”, 1, new ConfigDescription(“Description”, new AcceptableValueRange(0, 100)));
为你的Mod添加下拉选项:
创建时,请指定 AcceptableValueList ,如果使用枚举,则无需指定 AcceptableValueList ,将会显示所有的枚举值。
注意:你可以将 System.ComponentModel.DescriptionAttribute 添加到枚举项目中,以覆盖其显示的名称,如:
public enum MyEnum
{
// Entry1 将在下拉框中 显示 Entry1
Entry1,
[Description(“Entry2 将在下拉框中显示该字符串”)]
Entry2
}
为你的Mod添加自定义按键:
创建类型为 KeyboardShortcut ,可以使用Update()函数 + IsDown 来监听用户是否按下; KeyboardShortcut 支持Shift、Ctrl、Alt的修饰键,并且这些按键也得到了合适的处理,避免了一些常见的问题; 例如 K+Shift+Ctrl 时会触发 K+Shift 的问题。(这个问题不会出现了)
private ConfigEntry ShowCounter { get; set; }
public Constructor()
{
ShowCounter = Config.Bind(“Hotkeys”, “Show FPS counter”, new KeyboardShortcut(KeyCode.U, KeyCode.LeftShift));
}
private void Update()
{
if (ShowCounter.Value.IsDown())
{
// 处理按键
}
}
覆盖Configuration Manager的默认行为:
You can change how a setting is shown inside the configuration manager window by passing an instance of a special class as a tag of the setting. The special class code can be downloaded here. Simply download the .cs file and drag it into your project.
You do not have to reference ConfigurationManager.dll for this to work. The class will work as long as name of the class and declarations of its fields remain unchanged. Avoid making the class public to prevent conflicts with other plugins. If you want to share it between your plugins either give each a copy, or move it to your custom namespace. If the ConfigurationManager plugin is not installed in the game, this class will be safely ignored and your plugin will work as normal. Here’s an example of overriding order of settings and marking one of the settings as advanced:
// Override IsAdvanced and Order
Config.Bind(“X”, “1”, 1, new ConfigDescription(“”, null, new ConfigurationManagerAttributes { IsAdvanced = true, Order = 3 }));
// Override only Order, IsAdvanced stays as the default value assigned by ConfigManager
Config.Bind(“X”, “2”, 2, new ConfigDescription(“”, null, new ConfigurationManagerAttributes { Order = 1 }));
How to make a custom editor for my setting? If you are using a setting type that is not supported by ConfigurationManager, you can add a drawer Action for it. The Action will be executed inside OnGUI, use GUILayout to draw your setting as shown in the example below.
To use a custom seting drawer for an individual setting, use the CustomDrawer field in the attribute class. See above for more info on the attribute class.
void Start()
{
// Add the drawer as a tag to this setting.
Config.Bind(“Section”, “Key”, “Some value”
new ConfigDescription(“Desc”, null, new ConfigurationManagerAttributes{ CustomDrawer = MyDrawer });
static void MyDrawer(BepInEx.Configuration.ConfigEntryBase entry)
{
// Make sure to use GUILayout.ExpandWidth(true) to use all available space
GUILayout.Label(entry.BoxedValue, GUILayout.ExpandWidth(true));
Add a custom editor globally
You can specify a drawer for all settings of a setting type. Do this by using ConfigurationManager.RegisterCustomSettingDrawer(Type, Action).
}
Warning: This requires you to reference ConfigurationManager.dll in your project and is not recommended unless you are sure all users will have it installed. It’s usually better to use the above method to add the custom drawer to each setting individually instead.
void Start()
{
ConfigurationManager.RegisterCustomSettingDrawer(typeof(MyType), CustomDrawer);
}
static void CustomDrawer(SettingEntryBase entry)
{
GUILayout.Label((MyType)entry.Get(), GUILayout.ExpandWidth(true));
}
文件说明
暂无介绍
Mod截图
相关作品
【GMM】Gloss Mod Manager 一款综合性的现代化游戏模组管理器 | Cheat Engine (CE修改器) 7.5 汉化版 | 荒野大镖客2 线下内置修改器[RDR2 Native Trainer(RNT)] v0.951 | OpenIV 4.1版本 中文汉化版 | GTA5最强ENB(画质补丁)——REDUX_1.16 | Unity Mod 管理工具(Unity Mod Manager) 0.21.2汉化版 |