Escape from Duckov

Escape from Duckov

473 betyg
ModConfig
2
   
Utmärkelse
Favorit
Favoritmarkerad
Avfavoritmarkerad
Taggar: Mod
Filstorlek
Lades upp
128.940 KB
20 okt @ 12:44
1 ändringsnotis ( visa )

Abonnera för att ladda ner
ModConfig

Beskrivning
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]
23 kommentarer
󰀕ClockCycas󰀕 1 timme sedan 
可以支持更多语言的本地化吗?
Jedy 9 timmar sedan 
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 22 timmar sedan 
请问这个mod排序需要靠上面对吗?
雪风大人nanoda 25 okt @ 7:43 
佬,可以加个显示mod图标和折叠功能吗,区分度有点低,以后支持的mod多了想配置一下可能不太好找
FrozenFish259  [skapare] 24 okt @ 12:08 
目前应该就这样了, 不会改动, 你说的bug应该是转义字符导致的
FSHelix 24 okt @ 12:03 
在添加下拉选项后,如果游戏切换到其他语言,选项的描述会变成*Options_XXX_XXX*
如果mod_name中包含斜杠"/",则会在每个选项前都重新添加一次标题
字符串类型的输入框有些过于小了,输入起来很不方便
是否能提供对按钮的支持?代码中能否主动修改菜单中选项的值?
如果版本更新不涉及现有接口,是否会因为版本号的改动导致不兼容,从而无法使用菜单?
Doro Doro Mi 23 okt @ 1:48 
支持的数据类型有定少,我还是用我自己的吧QAQ 但这个和原版类似的UI我打算偷走了 感谢{LÄNK BORTTAGEN}
阿斯 22 okt @ 8:12 
现在稳定了吗?或者说api接口稳定了吗
Celebrin 22 okt @ 7:30 
Yep. perhaps mod order?
FrozenFish259  [skapare] 22 okt @ 7:10 
Mod settings doesn't show in MainMenu's Settings