
Mods / Auto Config Lib
Tags:
#Utility
Author: TheInsanityGod
Side: Both
Created: Jan 7th at 10:34 PM
Last modified: Feb 12th at 4:39 PM
Downloads: 10989
Follow Unfollow 266
Author: TheInsanityGod
Side: Both
Created: Jan 7th at 10:34 PM
Last modified: Feb 12th at 4:39 PM
Downloads: 10989
Follow Unfollow 266
Latest release (for outdated Vintage Story v1.20.4-rc.4):
autoconfiglib_2.0.6.zip
1-click install
Requires: Config Lib
Ever wanted to edit some setting through ConfigLib's mod setting menu, only to realize the other mod doesn't have a ConfigLib implementation? Well I haven't but I'm here to try and fix this anyway.
Features:
- Automated ConfigLib implementation for Typed Configs (meaning configs that have an actual code class associated with it)
- World Config gets added to ConfigLib automatically as well
- Shows description from code documentation*
- Supports data annotation attributes
*This required the creator of the mod to enable the output of the documentation file
Suported data annotations:
- DisplayName (sets the name in config)
- Description (sets the description in config)
- Category (sets the group to display this item under)
- DefaultValue (sets the value to use for the reset button)
- ReadOnly (sets whether this value should be editable or just displayed)
- Browsable (sets whether this item should be visible, by default fields & properties are considered browseable(true) while methods are considered browseable(false) and yes changing this will make the method show up as a button in the config)
- Range (sets the minimum and maximum value for numbers, as long as the min or max is not infinite this will also turn it into a slider)
- MaxLength (sets the maximum length of the string field, default MaxLength is 128)
- DisplayFormat (sets the display format, currently only supports "P" for showing floats as percentages where 0 is considered 0% and 1 is considered 100%)
Version | For Game version | Downloads | Release date | Changelog | Download | 1-click mod install* |
---|---|---|---|---|---|---|
v2.0.6 | 6645 | Feb 12th at 4:39 PM | Show | autoconfiglib_2.0.6.zip | 1-click install | |
v2.0.5 | 279 | Feb 11th at 3:34 PM | Show | autoconfiglib_2.0.5.zip | 1-click install | |
v2.0.4 | 2026 | Jan 27th at 9:03 PM | Show | autoconfiglib_2.0.4.zip | 1-click install | |
v2.0.3 | 55 | Jan 27th at 8:20 PM | Show | autoconfiglib_2.0.3.zip | 1-click install | |
v2.0.2 | 1318 | Jan 15th at 4:30 PM | Show | autoconfiglib_2.0.2.zip | 1-click install | |
v2.0.1 | 179 | Jan 12th at 8:36 PM | Show | autoconfiglib_2.0.1.zip | 1-click install | |
v1.2.3 | 183 | Jan 9th at 6:26 PM | Show | autoconfiglib_1.2.3.zip | 1-click install | |
v1.2.1 | 119 | Jan 8th at 4:07 PM | Show | autoconfiglib_1.2.1.zip | 1-click install | |
v1.1.0 | 78 | Jan 8th at 9:43 AM | Show | autoconfiglib_1.1.0.zip | 1-click install | |
v1.0.0 | 107 | Jan 7th at 10:43 PM | Show | autoconfiglib_1.0.0.zip | 1-click install |
McTaco, this mod does not generate configs. As mentioned in the description, this mod auto creates ConfigLib Implementations for Typed Configs (meaning configs that have an actual code class associated with it)
Content mod => No Code => No Typed Config
Doesn't seem to generate a config for content mods such as
FotSA mods
Excellent, thanks very much!
CKitt should be compatible with any 1.20 and probably even any 1.19.8 version.
Usually mods don't break from a minor version upgrade but this mod in particular barely touches game code at all so unless ConfigLib made some drastic change it should work just fine on most versions
Wow, you're fast! Thanks very much. Is v2.0.6 ackwards compatible with 1.20.3? I started a long-term world, so I'm avoiding release candidates and sticking with stable now.
CKitt, just took a look and 'Texture Atlas Resized' still crashes even after the config generation.
Was a problem with harmony itself, fix is out now.
RowanSkie, what do you mean with this?
I only register configs that have an actual config file other then the WorldConfig, which doesn't run any code for the save button in the first place.
(I can't say much more without more info, like a log file or a reproduction path)
It seems like this crashes the game when you're trying to save a config that doesn't exactly have a config. Maybe find a way to catch/disable the save option for those without proper configs?
I think I found a weird incompatibility. When I installed Texture Atlas Resized it couldn't generate the normal config file, until I had removed Auto Config Lib and reopened a world. Afterwards, I reenabled this mod. Once I did that, everything was good to go.
Ossom,
This is actually the wrong exception 😅, you only get this exception because an earlier exception during mod startup occured (which wasn't considered fatal by vintage story for some unknown reason).
Should be fixed in newest version (it was a load order issue).
AutoConfig+RPVoiceChat on a server crashes clients
Just a heads up, there seems to be an issue between AutoConfigLib 2.0.4 and RPVoiceChat 2.3.12, but only on servers!
If AutoConfig is on the server and the client, the client will crash on connect, otherwise when only ConfigLib and RPVoiceChat is on the server, plus requirements, no problem.
First issue cropped up with a large modpack, the log of which i'll leave below, adding mods by groups till i found the issue is how i found the issue, and then checking client vs server setups is how i confirmed the issue.
Running on 64 bit Windows 10.0.19045.0 with 32636 MB RAM
Game Version: v1.20.3 (Stable)
09/02/2025 02:21:03: Critical error occurred
Loaded Mods: aculinaryartillery@1.2.3, ancientarmory@1.0.6, antlershorns@1.0.1, backpackpackpluscontinued@1.0.0, barkbeetle@1.0.3, scrapblocks@1.1.0, bettertraders@0.0.9, canoemod@1.0.2, clickuptorches@1.1.1, combatoverhaul@0.1.24, craftablecompanion@1.2.1, craftablejparts@1.0.0, expandedmolds@1.1.1, firestarters@1.4.2, goblinears@2.1.1, handtohand@1.0.3, indappledgroves@2.0.3, litbrig@0.7.3, long-term_food@0.2.1, manualdough@1.1.1, manualquenching@1.0.4, manualscraping@1.2.1, millwright@1.1.8, nudemod@1.0.0, polylocusts@1.0.1, primitivesurvival@3.7.5, prospecttogether@2.0.1, qolcraft@2.1.2, recyclemetalwork@1.0.3, repairablelocust@1.4.0, slowwalkmod@1.2.2, sticksarefirewood@1.0.0, undertangledboughs@1.0.2, upgradeablelocust@1.0.3, visibleore@1.0.1, game@1.20.3, vsimgui@1.1.7, wetlandharvest@0.0.1, AbsoluteProspecting@1.500.02, alchemy@1.6.42, armory@0.1.5, awearablelight@1.1.31, betterruins@0.4.6, bloodystory@0.0.13, butchering@1.7.8, carryon@1.8.0-pre.1, coinage@1.12.2, commonlib@2.6.1, configlib@1.4.4, foodshelves@1.5.1, gourmand@1.6.3, hydrateordiedrate@1.7.7, krpgenchantment@0.6.13, maltiezcrossbows@0.6.5, maltiezfirearms@0.10.7, metaltongs@1.2.1, monsternuggetdrops@1.0.0, spearexpantion@0.3.0, petai@3.0.1, pewter@1.0.0, rpvoicechat@2.3.12, rustboundmagic@2.1.48, smithingplus@1.1.8, stonebakeoven@1.1.6, trailmodcupdate@1.2.1, traitacquirer@0.9.6, unconscious@1.9.2, creative@1.20.3, survival@1.20.3, woodenfortifications@2.0.4, autoconfiglib@2.0.4, em@3.0.0, playercorpse@1.11.0, shearlib@1.1.2, stonequarry@3.4.3, wblockadj@1.0.0-dev.2, wtweaks@1.0.0-dev.5, wolftaming@3.0.3, theworkingclasses@1.0.3, wool@1.5.2
System.Exception: Don't know how to instantiate item of class 'soundemittingitem' did you forget to register a mapping?
at Vintagestory.Common.ClassRegistry.CreateItem(String itemClass) in VintagestoryLib\Common\ClassRegistry.cs:line 323
at Vintagestory.Common.ItemTypeNet.ReadItemTypePacket(Packet_ItemType packet, IWorldAccessor world, ClassRegistry registry) in VintagestoryLib\Common\Network\ItemTypeNet.cs:line 18
at Vintagestory.Client.NoObf.ClientSystemStartup.PopulateItems(List`1 items, Int32 listSize) in VintagestoryLib\Client\Systems\Startup.cs:line 590
at Vintagestory.Client.NoObf.ClientSystemStartup.LoadItemTypes() in VintagestoryLib\Client\Systems\Startup.cs:line 402
at Vintagestory.Client.NoObf.ClientSystemStartup.HandleServerAssets_Step1() in VintagestoryLib\Client\Systems\Startup.cs:line 344
at Vintagestory.API.Common.TyronThreadPool.<>c__DisplayClass13_0.<QueueTask>b__0(Object a) in VintagestoryApi\Common\TyronThreadPool.cs:line 121
at System.Threading.QueueUserWorkItemCallback.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
That's... actually really funny as far as oversights go! 😅
I'm glad it was a harmless error, but I figured it was better to mention it than not.
Edit: And I'm glad I can reenable it. Useful mod.
CKitt, thanks for the heads up but it works just fine with BedSpawn, it's my own config that's failing.
I just made an update that shows a message in the config that inform people about configs failing to bind because the config didn't exist yet (when you load a mod for the first time)... and I never bothered to check if my very own mod config might have the same issue lol.
PS: Should now no longer happen (not that you would notice since you already have the config now)
There seems to be an incompatibility with this mod and BedSpawn. I figured I'd give you a heads-up!
[Client Error] Failed to load AutoConfigLibConfig.json using default, exception: System.NullReferenceException: Object reference not set to an instance of an object.
at AutoConfigLib.Auto.AutoConfigGenerator.RegisterOrCollectConfigFile[T](ICoreAPI api, String configPath, T configValue) in D:\Modding\VintageStory\AutoConfigLib\AutoConfigLib\Auto\AutoConfigGenerator.cs:line 24
at AutoConfigLib.AutoConfigLibModSystem.StartPre(ICoreAPI api) in D:\Modding\VintageStory\AutoConfigLib\AutoConfigLib\AutoConfigLibModSystem.cs:line 58
Currently, no. but it's something I do plan on adding. evil1505
is there anyway to allow a player via a server to use auto config on server files
TheInsanityGod Sorry, called it a bug because it came from the server.main log throwing errors that mentioned this mod & the other one. I disabled this until I add more mods since I only need to generate the configs once (afaik), but yeah, I wouldn't be surprised if they've hardcoded in file paths to the dll, I was just very amused to have this insight into someone else's folder structures this way. No other mods had similar interactions so I doubt the issue is on your end.
SageOceiros, If you are talking about the xml files it's reading then this is not a bug.
As mentioned in my feature list this mod "Shows description from code documentation*" (*This required the creator of the mod to enable the output of the documentation file)
'documentation file' referring to the global standard in which documentation is provided for .dll files. These are (similarly to the SomeModName.pdb file, if provided) stored at the exact same location as the SomeModName.dll but with a different extension (SomeModName.xml)
Asside from that this mod merely intercept the call to api.LoadModConfig(filename) and use the filename and return value of this call to register it in ConfigLib. This mod makes no decisions about where these files are stored (directory is either decided by the game & other mod, or by where the used .dll file is located)
Since you called this a bug, are you experiencing some form of issue with this? (like crashing?)
(ps: I just looked at their code and I was horrified by what I saw :P)
Got a very interesting bug when it tried to run on Moves Like Kaji, where it tried to pull files from hardcoded locations, which included a user's C:/ drive complete with windows account name, and their D:/ drive modding folder. Very amusing. Not sure if this mod is the cause though.
Somehow I added this without adding config lib, due to somehow not realizing that config lib was a required mod and this wasnt like CombatOverhaul and Bullseye being inside of it.
Good mod!
Kwehlani, thanks for the mod list, should work in the newest release.
ps: I already had and upate ready locally and these mods load just fine together for me so I just released it :P
TheInsanityGod
It is a slightly long list of mods, but I will hyperlink all the related items!
I did see that a few of these were able to auto create config files in your example photos, so I'm not sure what's up with my game! 😅
Xerog, thank you for reporting this issue, it should be fixed by the new release.
Kwehlani, the only condition is that the config needs to have an actual code type associated to it.
(as in the mod needs to call api.LoadModConfig<CustomModConfigType>(ConfigFileName))
If you want me to check why some mod isn't getting an AutoConfig please mention the actual mod name
It crashed my game when I was trying to get into https://mods.vintagestory.at/show/mod/367 Xandus inventory tweaks.
Hey!
Are there any specific conditions or buttons that need to be pressed to enable the auto creation of the config files? I was unable to get this to work and still only have my default configlib compatible mods available to edit.
Thanks!