
Mods / Config lib
Author: Maltiez
Side: Both
Created: Dec 13th 2023 at 2:11 PM
Last modified: Apr 28th at 10:12 AM
Downloads: 164523
Follow Unfollow 1410
Latest release (for outdated Vintage Story v1.20.7):
configlib_1.5.3.zip
1-click install
You can support me on Patreon: 
Requires ImGui
There is an addon you might want to check: Auto Config lib
For other modders (or if you want to help): I need help with wrighting documentation for this library, I'm bad at it and dont have energy to do this stuff. Also I will be happy to have some help with testing new features.
This is a library that allows making configs even for content mods (there is also API for code mods, including custom widgets) and provides a unified GUI for editing them in game. It does not require for your mod to depend on this library. If the library is not installed, default values from assets will be used.
This library also allows changing values in regular JSON patches, that can be valuable for server configurations and can make tweaking other mods for server needs much easier.
Documentation on JSON API of this library (written by Somnium). If you want to help keep documentation up-to-date, expand it and help test new features, please ping me in discord, any help will me much appreciated.
If you need help with adding a config file using this lib feel free to ping me in discord on official VS server.
Thanks Somnium for feature suggestions and help with testing them, and the documentation.
Some of the mods that use this library:
- Status Hud Continued
- BetterRuins
- Crossbows
- Firearms
- Wild Farming
- Millwright
- Translocator Engineering - Redux
- Sortable Storage
- Zoom Button - Reborn
- Buzzwords
- Primitive Survival
- Vanilla Variants
- BetterTraders
- Mobs Radar
- Dana Tweaks
- Real Currency
- Smithing Plus
Feel free to request any features you might need under mod's discord post (link is above in Homepage tab).
Version | For Game version | Downloads | Release date | Changelog | Download | 1-click mod install* |
---|---|---|---|---|---|---|
v1.5.3 | 7937 | Apr 28th at 10:12 AM | Show | configlib_1.5.3.zip | 1-click install | |
v1.5.2 | 24858 | Mar 13th at 11:06 PM | Show | configlib_1.5.2.zip | 1-click install | |
v1.5.1 | 21995 | Feb 10th at 12:26 AM | Show | configlib_1.5.1.zip | 1-click install | |
v1.5.0 | 1012 | Feb 9th at 4:39 AM | Show | configlib_1.5.0.zip | 1-click install | |
v1.4.4 | 13445 | Jan 23rd at 3:17 PM | Show | configlib_1.4.4.zip | 1-click install | |
v1.4.3 | 6730 | Jan 12th at 10:57 AM | Show | configlib_1.4.3.zip | 1-click install | |
v1.4.2 | 79 | Jan 12th at 10:29 AM | Show | configlib_1.4.2.zip | 1-click install | |
v1.4.1 | 2188 | Jan 3rd at 10:19 AM | Show | configlib_1.4.1.zip | 1-click install | |
v1.4.0 | 198 | Jan 3rd at 2:27 AM | Show | configlib_1.4.0.zip | 1-click install | |
v1.3.17 | 8445 | Oct 24th 2024 at 5:30 AM | Show | configlib_1.3.17.zip | 1-click install | |
v1.3.16 | 1820 | Oct 9th 2024 at 8:45 AM | Show | configlib_1.3.16.zip | 1-click install | |
v1.3.15 | 463 | Oct 6th 2024 at 5:13 PM | Show | configlib_1.3.15.zip | 1-click install | |
v1.3.14 | 422 | Oct 5th 2024 at 3:39 PM | Show | configlib_1.3.14.zip | 1-click install | |
v1.3.13 | 35753 | May 24th 2024 at 4:43 PM | Show | configlib_1.3.13.zip | 1-click install | |
v1.3.12 | 991 | May 22nd 2024 at 2:48 AM | Show | configlib_1.3.12.zip | 1-click install | |
v1.3.11 | 1595 | May 15th 2024 at 10:24 AM | Show | configlib_1.3.11.zip | 1-click install | |
v1.3.10 | 1446 | May 8th 2024 at 4:40 AM | Show | configlib_1.3.10.zip | 1-click install | |
v1.3.9 | 4263 | Apr 27th 2024 at 3:26 AM | Show | configlib_1.3.9.zip | 1-click install | |
v1.3.8 | 162 | Apr 27th 2024 at 1:35 AM | Show | configlib_1.3.8.zip | 1-click install | |
v1.3.7 | 250 | Apr 26th 2024 at 6:29 PM | Show | configlib_1.3.7.zip | 1-click install | |
v1.3.6 | 1002 | Apr 23rd 2024 at 4:51 PM | Show | configlib_1.3.6.zip | 1-click install | |
v1.3.5 | 1092 | Apr 18th 2024 at 9:11 PM | Show | configlib_1.3.5.zip | 1-click install | |
v1.3.2 | 405 | Apr 17th 2024 at 12:53 PM | Show | configlib_1.3.2.zip | 1-click install | |
v1.3.1 | 1457 | Apr 10th 2024 at 4:03 PM | Show | configlib_1.3.1.zip | 1-click install | |
v1.3.0 | 200 | Apr 10th 2024 at 1:29 PM | Show | configlib_1.3.0.zip | 1-click install | |
v1.2.3 | 219 | Apr 10th 2024 at 9:16 AM | Show | configlib_1.2.3.zip | 1-click install | |
v1.2.2 | 944 | Apr 6th 2024 at 6:03 PM | Show | configlib_1.2.2.zip | 1-click install | |
v1.2.1 | 725 | Apr 4th 2024 at 5:18 PM | Show | configlib_1.2.1.zip | 1-click install | |
v1.2.0 | 2047 | Apr 4th 2024 at 9:23 AM | Show | configlib_1.2.0.zip | 1-click install | |
v1.1.3 | 1063 | Mar 31st 2024 at 1:17 PM | Show | configlib_1.1.3.zip | 1-click install | |
v1.1.2 | 387 | Mar 30th 2024 at 4:54 PM | Show | configlib_1.1.2.zip | 1-click install | |
v1.1.1 | 2102 | Mar 17th 2024 at 3:18 PM | Show | configlib_1.1.1.zip | 1-click install | |
v1.1.0 | 374 | Mar 17th 2024 at 10:51 AM | Show | configlib_1.1.0.zip | 1-click install | |
v1.0.2 | 2424 | Mar 2nd 2024 at 6:03 AM | Show | configlib_1.0.2.zip | 1-click install | |
v1.0.1 | 246 | Mar 2nd 2024 at 12:42 AM | Show | configlib_1.0.1.zip | 1-click install | |
v1.0.0 | 494 | Feb 28th 2024 at 10:07 AM | Show | configlib_1.0.0.zip | 1-click install | |
v1.0.0-pre.1 | 390 | Feb 26th 2024 at 10:43 AM | Show | configlib_1.0.0-pre.1.zip | 1-click install | |
v0.5.4 | 534 | Feb 23rd 2024 at 9:23 AM | Show | configlib_0.5.4.zip | 1-click install | |
v0.5.3 | 184 | Feb 23rd 2024 at 7:45 AM | Show | configlib_0.5.3.zip | 1-click install | |
v0.4.5 | 933 | Feb 14th 2024 at 2:34 AM | Show | configlib_0.4.5.zip | 1-click install | |
v0.4.4 | 213 | Feb 13th 2024 at 10:11 PM | Show | configlib_0.4.4.zip | 1-click install | |
v0.4.3 | 1627 | Feb 13th 2024 at 7:54 PM | Show | configlib_0.4.3.zip | 1-click install | |
v0.4.2 | 4340 | Feb 13th 2024 at 1:10 PM | Show | configlib_0.4.2.zip | 1-click install | |
v0.4.1 | 250 | Feb 12th 2024 at 3:04 PM | Show | configlib_0.4.1.zip | 1-click install | |
v0.3.6 | 436 | Feb 5th 2024 at 7:38 AM | Show | configlib_0.3.6.zip | 1-click install | |
v0.3.5 | 490 | Jan 30th 2024 at 7:55 PM | Show | configlib_0.3.5.zip | 1-click install | |
v0.3.4 | 191 | Jan 30th 2024 at 7:23 PM | Show | configlib_0.3.4.zip | 1-click install | |
v0.3.3 | 2708 | Jan 14th 2024 at 3:24 AM | Show | configlib_0.3.3.zip | 1-click install | |
v0.3.2 | 449 | Jan 9th 2024 at 10:12 AM | Show | configlib_0.3.2.zip | 1-click install | |
v0.3.1 | 209 | Jan 6th 2024 at 7:21 PM | Show | configlib_0.3.1.zip | 1-click install | |
v0.3.0 | 193 | Jan 6th 2024 at 6:01 PM | Show | configlib_0.3.0.zip | 1-click install | |
v0.2.5 | 644 | Dec 30th 2023 at 12:15 PM | Show | configlib_0.2.5.zip | 1-click install | |
v0.2.4 | 244 | Dec 24th 2023 at 3:57 PM | Show | configlib_0.2.4.zip | 1-click install | |
v0.2.3 | 274 | Dec 17th 2023 at 8:29 AM | Show | configlib_0.2.3.zip | 1-click install | |
v0.2.2 | 226 | Dec 17th 2023 at 5:53 AM | Show | configlib_0.2.2.zip | 1-click install | |
v0.2.1 | 211 | Dec 16th 2023 at 12:37 PM | Show | configlib_0.2.1.zip | 1-click install | |
v0.2.0 | 235 | Dec 16th 2023 at 11:31 AM | Show | configlib_0.2.0.zip | 1-click install |
Version 1.5.3 is causing my game to crash on 1.20.9 :(
im hosting a mp server for me and my friends and it wont let me edit the config lib menu is there a way to fix this i open it but all options are greyed out.
Please contact me in discord to help debug this bug
I don't know if this is the correct place to ask, but I am desperate. When I try to edit Better Ruins, I change the numbers and sliders, hit save, restart the game, but when I start the game again, all the changes I had made have reset.
I only have this mod, ImGui, and Better Ruins installed, with the latest updates.
Thank you so much for this library. You've turned what would've been 6+ hrs of me setting up C# environment into 15 minutes of using your documentation.
I can not stress enough how easy and useful this mod is in making config files for content mods.
hey not sure if im doing something wrong or what but i can edit things on singleplayer but not on server side (note i am an admin server side) not sure what to do if anyone has any idea what im doing wrong please let me know also for note its a gportal server also on a side note the homepage button to access your discord server doesnt work for people not already in the server just takes me to my browser app for discord with a blank page and nothing to join
I have a server with my buddies, and i have OP, and im not able to change or play around with some of the setting, why is this? - Wich to know it, too. Have a Server for Vintage Story 1.20.3 and have trayed out all versions from v1.3.13 up to v1.5.1
I have a server with my buddies, and i have OP, and im not able to change or play around with some of the setting, why is this?
I really appreciate ths because I couldn't have edited the settings on my own.
Hey, honest question Maltiez. And it's a bit of a rant because I've been working on getting my mods working today, and a significant amount of that time has revolved around the oddities of this framework.
What's the point of this? Config Lib and its GUI dependency are 2 extra mods to add to bloat up my modlist for.... an ability to edit configs in-game..? But configs don't take effect until you reload the save? So I have to wait to load a save, make a change, leave it, and wait while it loads again to confirm? Instead of, say.... editing a .json config file in my ModConfig folder?
Like, ok, sure, it's fine and dandy and neat for people who can't be bothered to find their ModConfig folder or learn they can open a .json file with Notepad. But the thing that gets me is that mods (Combat Overhaul specifically, but there might be more) have built their config dependencies around this mod, to the point where firstly, you can't even configure the mod, AT ALL, without Config Lib and ImGui, but also, if you load Config Lib, use it to config the mod (once again, only know of CO that did this, so correct me if I'm wrong) save the changes and then UNINSTALL Config Lib, the changes will REVERT??? The configured .yaml files are RIGHT THERE IN THE MODCONFIG FOLDER! With all the OTHER .json CONFIG FILES!!!! That I don't need TWO SEPARATE MODS FOR THEM TO TAKE EFFECT!!!
But even if there are settings that can be tweaked without reloading the save, why use an entirely different filetype? Why not simply encourage mod authors to keep using the .json format and have your Config Lib edit those?? The existing .json files even have support for variable descriptions and defaults, just like the .yaml files. It's like building brand new hoops you have to jump through, for no reason?
Is it possible to add an option to run this mod without ImGui so that settings can only be modified via the file? Maltiez
The reasoning behind this is because I am hosting a server and I do not wany anyone with admin permisssions to be able to access the mod settings as well.
I also do not want an extra redundant button always visable on the client side.
For me the configs always reset to their initial values after I edit them and reload my save.
Anything I'm doing wrong on my end? Like should I execute /autosavenow before reloading?
The settings menu dosnt appear properly when using fullscreen + always on top.
Check ImGui version in logs, should be the latest. Also report bugs via discord.
Confirming "mod settings" does not load the GUI in 1.20 RC6 on servers. but DOES work in single player.
Currently in 1.20 RC 6 and the gui doesn't want to load up when I hit Mods Settings, was doing that for other RC versions as well
The 'Mods settings' button overlaps the 'settings' button when used with the game in Brazilian Portuguese and is difficult to click, with the game in 'English' it is perfect,
1.19.4 is compatible for 1.19.4 - 1.19.8 versions
Also adding my one cent, but I too am looking to see if this works with the current stable ersion, 1.19.8 since the latest non-1.2 seems to be 1.19.4 for this mod.
I'm on version 1.19.8 but I'm seeing that this one could not be loaded.
"Unable to load mod. Requires dependency game v1.20.0-pre.5"
How do I resolve this?
which version is compatible with 1.19.8? (current stable)
does this work for servers?
Sollyz
Make sure you have the correct version of the mod for your version of the game
It says I need a mod called "Dependency game" ??? I can't find it anywhere
Seems to work on 1.20
Im clicking the mod settings button, but nothing seems to be happening
Report it vi discord
In this mod, Chinese is displayed as "?" now.
Pheargrimm
Please ping me in official VS discord and send screenshot and logs, and also your VS graphics settings, number of monitors and main monitor resolution.
Maltiez
I have the same problem as Shade_Guye. When I open the config screen I cannot interact with it directly when the cursor is placed directly over the visual elements of the config menu. However if I move the cursor to the left of the Menu's visual elements on screen, I can interact with the config menu. It appears the visual elements of the Config menu are offset to the right of where the cursor can interact with them. Looks like approximate about one full width of the menu.
The menu is still fully functional, just a little fiddly to use. Of course it could be completely my fault I may be missing something, not a coder just a lover of mods.
If you need further evidence I can provide a video and logs to discord.
I have tested it in isolation with no other mods installed on a fresh world.
I have replicated the fault with both BetterRuins and StatusUIContinued separately.
I have tested it the following configurations
- Config 1.1.1 vsimgui 1.1.0 - Fault initially found
- Config 1.1.1 vsimgui 1.1.0 - No Other Mod Installed - Fault replicated
- Config 1.1.1 vsimgui 1.1.1 - Opening config menu cause crash to desktop
- Config 1.1.1 vsimgui 1.1.2 - Fault replicated
*Edit OS is Windows 10.
Shade_Guye
Please ping me in official VS discord and send screenshot and logs
It increases the more right on the screen I go. I did reinstall ImGui, as at first I forgot it and let the game install it, there were 2 vers one of which was unusable, so I removed them and got it manually, didn't fix it. That was right when I got the mod.
Shade_Guye
Make sure you have latest ImGui version. Also, what OS you are on? How much it is misaligned?
Hi I have a bug with the window itself, the cursor is misaligned down-right by some amount. I tried it in windowed but it still happened. Any mods that are known to be conflicting? I don't have many, and only have status hud as a mod that is relevant to ui.
fair enough thanks
MagicWand92FS
My bad, it is for 1.19.4-rc.1, I just selected wrong version here on moddb
Maltiez
config v0.5.1 is requesting game version 1.19.4-rc.1
EquivalentBad
This is caused by some other mod. "BlockAnimalNest" is not a vanilla class and has nothing to do with this mod.
Upd.: it is Feverstone Wilds, remove it, because it is not updated to 1.19. And please next time make sure that you found the actual mod that causes problems.
Maamessu
Need the list of installed mods. Better to send it via discord in official VS server though.
I'm having the same issue as below:
[Error] [configlib] An exception was thrown when trying to load assembly:
30.1.2024 01:48:05 [Error] [configlib] Exception: Assembly with same name is already loaded
at System.Runtime.Loader.AssemblyLoadContext.<LoadFromPath>g____PInvoke|5_0(IntPtr ptrNativeAssemblyBinder, UInt16* ilPath, UInt16* niPath, ObjectHandleOnStack retAssembly)
at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at Vintagestory.Common.ModAssemblyLoader.LoadFrom(String path) in VintagestoryLib\Common\API\ModAssemblyLoader.cs:line 34
at Vintagestory.Common.ModContainer.<>c__DisplayClass35_0.<LoadAssembly>b__0(String path) in VintagestoryLib\Common\API\ModContainer.cs:line 449
at System.Linq.Enumerable.SelectListIterator`2.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.ToList()
at Vintagestory.Common.ModContainer.LoadAssembly(ModCompilationContext compilationContext, ModAssemblyLoader loader) in VintagestoryLib\Common\API\ModContainer.cs:line 448
I can confirm I don't have more than one copy/version of config lib installed.
Cpt_C0nfus3d
You have two versions of the mod installed, leave only one
This is from 1.19.0-RC8
14.1.2024 21:57:00 [Error] [configlib] An exception was thrown when trying to load assembly:
14.1.2024 21:57:00 [Error] [configlib] Exception: Assembly with same name is already loaded
at System.Runtime.Loader.AssemblyLoadContext.<LoadFromPath>g____PInvoke|5_0(IntPtr ptrNativeAssemblyBinder, UInt16* ilPath, UInt16* niPath, ObjectHandleOnStack retAssembly)
at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at Vintagestory.Common.ModAssemblyLoader.LoadFrom(String path) in VintagestoryLib\Common\API\ModAssemblyLoader.cs:line 34
at Vintagestory.Common.ModContainer.<>c__DisplayClass35_0.<LoadAssembly>b__0(String path) in VintagestoryLib\Common\API\ModContainer.cs:line 449
at System.Linq.Enumerable.SelectListIterator`2.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.ToList()
at Vintagestory.Common.ModContainer.LoadAssembly(ModCompilationContext compilationContext, ModAssemblyLoader loader) in VintagestoryLib\Common\API\ModContainer.cs:line 448
Maltiez, Thanks! I let the client pick the dependencies. Downloading the latest IMGui solved the issue.
Install latest version of ImGui
Hello, just installed 'status hud continued' and the associated 'config lib' and 'vsimgui' mods in 1.19-rc6. When pressing 'p' to open the config, a window appears with the text "Config lib: cursor unlock" in the header. The client log shows what looks like a hardcoded path. Can you point me in the right direction? Status Hud Continued? Many thanks!
8.1.2024 18:27:07 [Error] [configlib] An exception was thrown when trying to start the mod:
8.1.2024 18:27:07 [Error] [configlib] Exception: Could not load type 'VSImGui.Style' from assembly 'VSImGui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. at ConfigLib.ConfigWindow..ctor(ICoreClientAPI api) at ConfigLib.GuiManager..ctor(ICoreClientAPI api) in D:\Projects\Firearms\configlib\configlib\src\GUI\GuiManager.cs:line 27 at ConfigLib.ConfigLibModSystem.AssetsFinalize(ICoreAPI api) in D:\Projects\Firearms\configlib\configlib\src\ContentSettingsModSystem.cs:line 47 at Vintagestory.Common.ModLoader.TryRunModPhase(Mod mod, ModSystem system, ICoreAPI api, ModRunPhase phase) in VintagestoryLib\Common\API\ModLoader.cs:line 654
8.1.2024 18:27:07 [Error] Failed to run mod phase AssetsFinalize for mod ConfigLib.ConfigLibModSystem
@Maltiez - Thank you and thank you again! This time the discord works. Wonderful work, I'll test it out. From now on, I'll try to stick to discord for further happenings.
BraniyaKz
It is not my discord server, it is official Vintage Story discord server, here is invite-link: discord.com/invite/CkJjdrB
Made a patch for this problem. No idea what caused it, but should not be a problem now
Maltiez - I'm having more issues, and I can't access your Discord server via the issue tracker button on the top of this page... The page just stays greyed out and I can't click on any channels or anything. It says I don't have permission to post messages in the channel. I have logs to show you about the patch file with boolean options that disable another mods' items, which throws a null reference exception. [The Log] [The Patch File] [The settings-config.json]
Maltiez - I apoligize, I've been having trouble accessing discord at all. But you're right about it being a better place for discussion, so I'll try to fix my situation and do more testing for ya. And btw, I think you're making GREAT progress with this, and it's definately a very much needed resource. Thanks again.
BraniyaKz
Reworked library, should fix most of the problems. But still it is better to report issues in discord, cause you can link files and stuff and I can see it earlier and reply immideatly sometimes
BraniyaKz
Moddb is a bad place for reporting and solving issues. There is official VS discord server and a dedicated post for this mod, all links are above.
OH BOY, does the log throw errors when making configs for optionally disabling itemtypes and recipes. Seems to not entirely work in some cases. Here's what happened:
15.12.2023 05:23:45 [Error] Patch 4 (target: acorns:recipes/grid/mallet-head.json) in qolmaster:patches/acorns-qol.json failed, following Exception was thrown: Set JArray values with invalid key value: "enabled". Int32 array index expected. -> That value, false, worked before without errors.
BraniyaKz
Thanks for reply. I'm currently working on gui for it for edditing user config for a mod, and mod config for a developer of the mod, you can check out mod-development in official VS discord for details.
Just what I was looking for! I plan on using this functionality for boolean variables in my content mod QoL Master. Thank you so much! I have a special case already tho: I want to use a value that reads "hammer", with the "", as a value for replacement. I did, and it crashed. I only used the default "hammer", name, and comment in the config file.