Escape From Duckov

Escape From Duckov

465 ratings
ModConfig
2
   
Award
Favorite
Favorited
Unfavorite
Tags: Mod
File Size
Posted
128.940 KB
20 Oct @ 12:44pm
1 Change Note ( view )

Subscribe to download
ModConfig

Description
English Documentation
  • ModConfig is a framework that provides in-game configuration parameter adjustment for other mods.It allows players to directly adjust various configuration parameters of other mods through the in-game settings menu.
  • Mod Settings menu currently can only be accessed from ingame scenes, not from MainMenu
  • You may need to restart game after enabling ModConfig


Supported mods

Mod Settings File Location

Delete following file if you wanna reset ModConfig's mod settings
%USERPROFILE%\AppData\LocalLow\TeamSoda\Duckov\Saves\ModConfig.ES3

Development Guide

Steps
  1. Download ModConfigApi.cs from Github Project[github.com] and copy it to your project for calling ModConfig functions
  2. Before configuration read/write logic, be sure to call ModConfigAPI.Initialize() once to verify normal communication with ModConfig
  3. Check out my example project[github.com]

Supported Data Types
  • bool
  • int
  • float
  • string

Important Notes
  • Configuration values are read through OptionsManager_Mod.Load<T>(string key, T defaultV)
  • The implementation logic of ModConfig is relatively complex. There is a possibility that future game updates may broke ModConfig and require maintenance. Therefore, please note the following important tip
  • Do not create strong dependencies between your mod's configuration read/write logic and ModConfig. Your configuration read/write must function normally even without ModConfig

Mod Publishing

After uploading your mod, go to workshop item page and click Add/Remove Required Items , add ModConfig as its dependency

Source Code Reference

Github Source[github.com]
Github Example Project[github.com]
22 Comments
Jedy 2 hours ago 
Is there any way I can "show the path" to the mod's .ini file so I can add it to the mod configuration screen? It's kind of annoying having to go to the text document every time I need to change a mod's settings. Or is this only possible if the mod author makes it compatible with this mod?
ZebraRabbit 15 hours ago 
This comment is awaiting analysis by our automated content check system. It will be temporarily hidden until we verify that it does not contain harmful content (e.g. links to websites that attempt to steal information).
雪风大人nanoda 25 Oct @ 7:43am 
佬,可以加个显示mod图标和折叠功能吗,区分度有点低,以后支持的mod多了想配置一下可能不太好找
FrozenFish259  [author] 24 Oct @ 12:08pm 
目前应该就这样了, 不会改动, 你说的bug应该是转义字符导致的
FSHelix 24 Oct @ 12:03pm 
在添加下拉选项后,如果游戏切换到其他语言,选项的描述会变成*Options_XXX_XXX*
如果mod_name中包含斜杠"/",则会在每个选项前都重新添加一次标题
字符串类型的输入框有些过于小了,输入起来很不方便
是否能提供对按钮的支持?代码中能否主动修改菜单中选项的值?
如果版本更新不涉及现有接口,是否会因为版本号的改动导致不兼容,从而无法使用菜单?
Doro Doro Mi 23 Oct @ 1:48am 
支持的数据类型有定少,我还是用我自己的吧QAQ 但这个和原版类似的UI我打算偷走了 感谢{LINK REMOVED}
阿斯 22 Oct @ 8:12am 
现在稳定了吗?或者说api接口稳定了吗
Celebrin 22 Oct @ 7:30am 
Yep. perhaps mod order?
FrozenFish259  [author] 22 Oct @ 7:10am 
Mod settings doesn't show in MainMenu's Settings
Celebrin 22 Oct @ 6:35am 
I cant see the menu? what am I doing wrong?