Mods / Config lib

Category: #Library
Author: Maltiez
Side: Both
Created: Dec 13th 2023 at 2:11 PM
Last modified: 9 hours ago
Downloads: 18980
Follow Unfollow 220

Latest file for v1.19.4:
configlib_1.3.9.zip 1-click install


Requires ImGui

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.

For other modders: would be nice to collaborate on combat related mod. Would be nice to have somebody to test features, to animate player and items, may be even to write some code, or just do research part. 

Documentation on JSON API of this library (updated by Somnium).

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.

Some mods that use this library:

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.3.9 68 9 hours ago Show configlib_1.3.9.zip Install now
v1.3.8 17 10 hours ago Show configlib_1.3.8.zip Install now
v1.3.7 84 17 hours ago Show configlib_1.3.7.zip Install now
v1.3.6 650 3 days ago Show configlib_1.3.6.zip Install now
v1.3.5 804 Apr 18th at 9:11 PM Show configlib_1.3.5.zip Install now
v1.3.2 261 Apr 17th at 12:53 PM Show configlib_1.3.2.zip Install now
v1.3.1 1060 Apr 10th at 4:03 PM Show configlib_1.3.1.zip Install now
v1.3.0 58 Apr 10th at 1:29 PM Show configlib_1.3.0.zip Install now
v1.2.3 69 Apr 10th at 9:16 AM Show configlib_1.2.3.zip Install now
v1.2.2 796 Apr 6th at 6:03 PM Show configlib_1.2.2.zip Install now
v1.2.1 582 Apr 4th at 5:18 PM Show configlib_1.2.1.zip Install now
v1.2.0 313 Apr 4th at 9:23 AM Show configlib_1.2.0.zip Install now
v1.1.3 879 Mar 31st at 1:17 PM Show configlib_1.1.3.zip Install now
v1.1.2 246 Mar 30th at 4:54 PM Show configlib_1.1.2.zip Install now
v1.1.1 1895 Mar 17th at 3:18 PM Show configlib_1.1.1.zip Install now
v1.1.0 224 Mar 17th at 10:51 AM Show configlib_1.1.0.zip Install now
v1.0.2 2201 Mar 2nd at 6:03 AM Show configlib_1.0.2.zip Install now
v1.0.1 105 Mar 2nd at 12:42 AM Show configlib_1.0.1.zip Install now
v1.0.0 354 Feb 28th at 10:07 AM Show configlib_1.0.0.zip Install now
v1.0.0-pre.1 247 Feb 26th at 10:43 AM Show configlib_1.0.0-pre.1.zip Install now
v0.5.4 393 Feb 23rd at 9:23 AM Show configlib_0.5.4.zip Install now
v0.5.3 48 Feb 23rd at 7:45 AM Show configlib_0.5.3.zip Install now
v0.4.5 789 Feb 14th at 2:34 AM Show configlib_0.4.5.zip Install now
v0.4.4 81 Feb 13th at 10:11 PM Show configlib_0.4.4.zip Install now
v0.4.3 1404 Feb 13th at 7:54 PM Show configlib_0.4.3.zip Install now
v0.4.2 1445 Feb 13th at 1:10 PM Show configlib_0.4.2.zip Install now
v0.4.1 115 Feb 12th at 3:04 PM Show configlib_0.4.1.zip Install now
v0.3.6 300 Feb 5th at 7:38 AM Show configlib_0.3.6.zip Install now
v0.3.5 312 Jan 30th at 7:55 PM Show configlib_0.3.5.zip Install now
v0.3.4 55 Jan 30th at 7:23 PM Show configlib_0.3.4.zip Install now
v0.3.3 1611 Jan 14th at 3:24 AM Show configlib_0.3.3.zip Install now
v0.3.2 304 Jan 9th at 10:12 AM Show configlib_0.3.2.zip Install now
v0.3.1 75 Jan 6th at 7:21 PM Show configlib_0.3.1.zip Install now
v0.3.0 63 Jan 6th at 6:01 PM Show configlib_0.3.0.zip Install now
v0.2.5 345 Dec 30th 2023 at 12:15 PM Show configlib_0.2.5.zip Install now
v0.2.4 101 Dec 24th 2023 at 3:57 PM Show configlib_0.2.4.zip Install now
v0.2.3 115 Dec 17th 2023 at 8:29 AM Show configlib_0.2.3.zip Install now
v0.2.2 73 Dec 17th 2023 at 5:53 AM Show configlib_0.2.2.zip Install now
v0.2.1 69 Dec 16th 2023 at 12:37 PM Show configlib_0.2.1.zip Install now
v0.2.0 60 Dec 16th 2023 at 11:31 AM Show configlib_0.2.0.zip Install now

26 Comments (oldest first | newest first)

💬 MaltiezAuthor, Mar 21st at 5:38 AM

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.

💬 Pheargrimm, Mar 21st at 5:07 AM

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.

💬 MaltiezAuthor, Mar 15th at 1:58 PM

Shade_Guye

Please ping me in official VS discord and send screenshot and logs

💬 Shade_Guye, Mar 15th at 12:13 PM

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.

💬 MaltiezAuthor, Mar 15th at 6:28 AM

Shade_Guye

Make sure you have latest ImGui version. Also, what OS you are on? How much it is misaligned?

💬 Shade_Guye, Mar 14th at 6:22 PM

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.

💬 MagicWand92FS, Feb 23rd at 3:27 PM

fair enough thanks

 

💬 MaltiezAuthor, Feb 23rd at 3:16 PM

MagicWand92FS

My bad, it is for 1.19.4-rc.1, I just selected wrong version here on moddb

💬 MagicWand92FS, Feb 23rd at 3:15 PM

Maltiez 

config v0.5.1 is requesting game version 1.19.4-rc.1

💬 MaltiezAuthor, Feb 13th at 9:45 AM

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.

💬 MaltiezAuthor, Jan 30th at 7:02 AM

Maamessu

Need the list of installed mods. Better to send it via discord in official VS server though.

💬 Maamessu, Jan 30th at 1:52 AM

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.

💬 MaltiezAuthor, Jan 15th at 6:44 AM

Cpt_C0nfus3d

You have two versions of the mod installed, leave only one

💬 Cpt_C0nfus3d, Jan 15th at 5:41 AM

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

💬 B0bb0, Jan 9th at 11:53 PM

Maltiez,  Thanks!  I let the client pick the dependencies.  Downloading the latest IMGui solved the issue.

💬 MaltiezAuthor, Jan 9th at 7:17 AM

Install latest version of ImGui

💬 B0bb0, Jan 9th at 12:24 AM

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

💬 BraniyaKz, Dec 17th 2023 at 6:10 AM

@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.

💬 MaltiezAuthor, Dec 17th 2023 at 5:46 AM

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

💬 BraniyaKz, Dec 17th 2023 at 5:01 AM

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]

💬 BraniyaKz, Dec 16th 2023 at 2:21 PM

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.

💬 MaltiezAuthor, Dec 16th 2023 at 11:33 AM

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

💬 MaltiezAuthor, Dec 15th 2023 at 10:53 AM

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.

💬 BraniyaKz, Dec 15th 2023 at 10:29 AM

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.

💬 MaltiezAuthor, Dec 15th 2023 at 9:29 AM

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.

💬 BraniyaKz, Dec 15th 2023 at 9:05 AM

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.

(edit comment delete)