Where is the information about currently selected mods stored?

PawelS

Ancient Druid
Joined
Dec 11, 2003
Messages
2,811
Location
Poland
I need this in my research about a crash on the mods screen I'm getting lately. It always happens after I play the mod I'm working on, and then I build a new version of the mod (or rebuild the existing version), and run the game to test it. But it doesn't happen when I run the game again after the crash. So I need to run the game twice to test the mod, which is annoying and time consuming. If I know where the information about currently selected mods is stored, I can change it so the mod is not selected and check if it prevents the crash.
 
Mods.Enabled in C:\Users\{username}\Documents\My Games\Sid Meier's Civilization 5\cache\Civ5ModsDatabase.db if you want the SQLite file, or via Modding.EnableMod(modID, version) and Modding.DisableMod(v.ModID, v.Version) via Lua - see also the functions EnableMod(modID, version) and DisableMod(modID, version) in UI\FrontEnd\Modding\InstalledPanel.lua
 
Thanks for the information. After additional testing I see that I get the crash every time I start the game after building the mod, regardless if it's selected or not (also clearing the cache and mod user data doesn't help).

Perhaps it has something to do with the problems I have lately with accessing the Steam Workshop pages? If the game checks something with Steam on the mods screen, the failure of doing so may cause the crash.
 
"Go Offline" (which will stop civ doing any checks against Steam Workshop) and see if the problem persists
 
It crashes as well when Steam is in offline mode. I even tried disconnecting from the Internet completely. Doesn't help.

But I found a way to prevent the crash: delete the mod's package from it's Packages folder. Perhaps I shouldn't keep the mod's "source code" in the Mods folder. But it didn't cause any problems earlier.

Edit: I found the option in ModBuddy to change the configuration to "deploy only" (so it doesn't create the package). It prevents the crash, and it also makes the mod "compilation" faster.
 
Perhaps I shouldn't keep the mod's "source code" in the Mods folder.
No

But it didn't cause any problems earlier.
Famous last words ;)

The mod source code should be in a sub-directory under (by default) "C:\Users\{username}\Documents\Firaxis ModBuddy" as then the "packages" (.civ5mod files) get placed into a sub-dir of "{mod_name}\packages" and the "deployed" mod will be placed into "C:\Users\{username}\Documents\My Games\Sid Meier's Civilization 5\MODS\{mod_name} (v {mod_version})"

If the packages (.civ5mod files) are being placed into the MODS sub-directory, the game core is going to try and unzip them as it starts, which at best will slow down the start-up (as the deployed mod is already unzipped) and at worst will crash as it will try to over-write a file in the already deployed mod that the game core has locked. Sounds like you've just encountered the latter.
 
Back
Top Bottom