Civ5 Mod Manager

osmuni

Chieftain
Joined
Apr 26, 2016
Messages
38


This is the initial beta release of Civ5 Mod Manager.

Features:

Take away the control of your mods from the Steam Workshop. Manage installed mods, save and restore mod sets, set install and enabled options for mods, install mods to Civ5, and then start Civ5 and play with all your mods already loaded and activated.

Automatically update mods from the Steam Workshop or from http://www.picknmixmods.com with the latest version with the click of a button.

Add new mods by simply copying the mod page URL to the clipboard and then clicking a button.

Check mod dependencies and automatically download and enable missing mods (if they are already on the list). Get a report on missing dependency mods.

How to use:

Since this is just a beta version, after installing, run the program and click on the "Mods Folder" button, and make a backup of your mods folder somewhere. Also backup Civ5ModsDatabase.db located in the cache folder one level up from the mods folder.

Now that your current mods and mod config are safely backed up, you start by importing your currently subscribed Workshop mods by clicking on "Import"

After importing the workshop mods, you should unsubscribe from all the mods in the Workshop DON'T UNSUBSCRIBE YET UNTIL A MORE STABLE VERSION IS AVAILABLE. ALSO, BACKUP EVERYTHING AS INSTRUCTED BEFORE TESTING THE PROGRAM. (Use the link in the menu, top right button with three bars)

The install program just creates a folder and copies files in that folder, nothing else is copied elsewhere in your computer.

Comments, bug reports and feature requests are welcomed.

There are two files: One provides an installer, the other is a simple zip.

Do not install in the Programs folder!

Of course being a beta version there will be lots of bugs and the usual disclaimers apply.

The "DIES" columns in the grid:

"D" Download: When enabled, it will actually download this mod or update it when you click "Update". The mods are downloaded into a "mods" folder inside the Civ5 Mod Manager folder, no mods or anything is touched in the Civ5 install. You can enable/disable by double clicking in the checkmark symbol in the column of the grid ot clicking the "D" button in the toolbar.

"I" Install: When enabled, this will install the selected mod to the mods folder of Civ5 when you click "Install mods"

"E" Enable: When enabled, this will enable the mod in Civ5, just as you enable a mod in the mods screen in Civ5

"S" Source: Indicates the detected source of the mod: Workshop or www.picknmixmods.com

How it works

The mods are saved in a mods folder inside the Civ5 Mod Manager install folder, without interfering at all with the Civ5 install.

When you click on "Import", the program reads data stored in the "...\My Games\Sid Meier's Civilization 5\cache\Civ5ModsDatabase.db" file to extract information on the subcribed Workshop mods.

"Update" just checks the Workshop and www.picknmixmods.com for new versions of the mods in the list, and replace old versions with new versions if available. This does not affect the mods folder of Civ5, all mods are saved in the mods folder of Civ5 Mod Manager. In the future old versions of mods will be kept, and new versions will be added to the list.

You select mods to install and enable by clicking on the "I" and "E" columns or using the "I" and "E" buttons on the toolbar. When you are finished, you can create a "SET" and save it, so you can recall it latter. Then you click "Install mods" and only then all selected mods are installed to Civ5. If a mod is already installed, it is deleted and reinstalled.

RIGHT NOW CIV5 MOD MANAGER WILL OVERWRITE OLDER VERSIONS OF MODS WITH THE LATEST VERSION IF ONE IS AVAILABLE WHEN YOU DO AN UPDATE. THIS WILL BE CHANGED IN THE NEXT VERSION
 

Attachments

  • civ5mm_setup.zip
    4 MB · Views: 1,634
  • CIV5MM.zip
    4.1 MB · Views: 1,018
Import added my steam subscribed mods to the Mod Manager.
How do I get it to import all of whoward69's mods (that are already in my mod folder)?

I haven't clicked Update yet, but I think it should be 3 separate buttons (and I hope the Update button doesn't do all three at once!):

Check for update - just display in the mod manager if there is an update
Download Update - download (selectable) updates
Install update - Actually install the (selectable) update (optionally download if not already downloaded, optionally install again (even if there isnt an update)).

I do not see in the Mod Manager if the mod I have is current or if an update is available. It just gives a version (known if this is the latest version, or my version).
 
Import added my steam subscribed mods to the Mod Manager.
How do I get it to import all of whoward69's mods (that are already in my mod folder)?

In the "3 bars" button there is an option for adding all the mods from whoward69's site to the mods list (the latest versions). I have realized this is not the optimal way to do things.

Right now I am adding a feature to download/update all of whoward69's mods into a separate table.

With that table, I will be able to also import currently installed whoward69's mods, including the exact mod version. And from that list, you will be able to select mods to add to the main mods list.

Also I will add the importing of other mods not from the workshop or picknmixmods. It is just a matter of reziping the mod folder into a "civ5mod" file.


I haven't clicked Update yet, but I think it should be 3 separate buttons (and I hope the Update button doesn't do all three at once!):

Check for update - just display in the mod manager if there is an update
Download Update - download (selectable) updates

Right now when you click "Update", it checks the Steam Workshop and whoward69's mods for updates, and downloads the new version, overwriting the old version.

I understand now that some would like to keep old versions of mods to play saved games or any other reason, so in the next version, clicking "Update" will do this:

1. Check Workshop and picknmixmods site for new version of mods.
2. If there are new versions, add the new versions to the list without deleting the old versions.

From there, you will be able todo as you like, keep old versions, pick which version to use, etc. I will add a check to see if multiple versions of the same mod are chosen for install.

Install update - Actually install the (selectable) update (optionally download if not already downloaded, optionally install again (even if there isnt an update)).

"Install" actually does not happen until you click the "Install mods" button. The install process checks if the modinfo files are valid, deletes invalid files, downloads missing mods, checks dependencies, activates and downloads dependencies (if they are on the mods list), then deletes the mods to be installed from the Civ5 mods folder and copies them over again, unzipped, each in its own folder. Then the Civ5ModsDatabase.db is rebuilt to a default state, and then all the data is added to the Civ5ModsDatabase.db just as Civ5 would do, including the "enabled" state of each mod. After doing "Install mods" you are ready to launch Civ5 and play.

I do not see in the Mod Manager if the mod I have is current or if an update is available. It just gives a version (known if this is the latest version, or my version).

See my previous coment. With multiple versions, after you do "Update" you will see if you are using the latest version of not.

NOTE: If you make a backup of the mods folder and of Civ5ModsDatabase.db and don't unsubscribe from any mods, you can test out current functionality, but subscribed mods will reload when you get to the mods screen in Civ5.

This way you can test things out safely, with the ability to restore everything to the previous state.

Regarding mod versions, I always play with the latest versions of mods, and never play a game more than a day, so never thought about mod versions and the need to keep old versions around, but I understand that some players may need that feature.

Thank you for your comments, and if there is anything else you would like to know, just ask.

Note: I will edit the main post to explain the "DIES" columns in the grid.
 
This is the actual log you will see in the lower pane when clicking "Install Mods" with only one mode selected:

Spoiler :
Checking mod dependencies...
Done checking dependencies
Retrieving Mod Ids for current mods in Mods folder...
Deleting currently installed mods...
Installing mod Smoky Skies Steampunk Sandbox for BNW (v 11).civ5mod ...
Checking if Civ5 is running...
C:\Users\Carlos\Documents\My Games\Sid Meier's Civilization 5\cache\Civ5ModsDatabase.db deleted.
Creating empty C:\Users\Carlos\Documents\My Games\Sid Meier's Civilization 5\cache\Civ5ModsDatabase.db ...
Setting pragmas...
Result 0
Recreating table SteamWorkshopSubscribedFiles ...
Result 0
Recreating table SteamWorkshopMods ...
Result 0
Recreating table Mods ...
Result 0
Recreating table ModActions ...
Result 0
Recreating table ModRelationships ...
Result 0
Recreating table DlcRelationships ...
Result 0
Recreating table GameVersionRelationships ...
Result 0
Recreating table ModEntryPoints ...
Result 0
Recreating table ModRatings ...
Result 0
Recreating table ModFiles ...
Result 0
Recreating table ModProperties ...
Result 0
Recreating table ModSystemSettings ...
Result 0
Recreating table ScannedFiles ...
Result 0
Recreating index ModsEnabledIndex ...
Result 0
Recreating index ModActionsIndex ...
Result 0
Recreating index ModRelationshipsIndex ...
Result 0
Recreating index DlcRelationshipsIndex ...
Result 0
Recreating index GameVersionRelationshipsIndex ...
Result 0
Recreating trigger OnDeleteMod ...
Result 0
Recreating trigger OnDeleteScannedFile ...
Result 0
Recreating trigger OnDeleteSteamWorkshopMod ...
Result 0
Populating Civ5ModsDatabase modsystemsettings table...
Result 0
Refreshing sqlite_stat1 table...
Result 0
Done
Searching for modinfo files in mods folder...
Searching for modinfo files in Civ5 folder...
Parsing modinfo files and populating temporary cursors...
Populating Civ5ModsDatabase scannedfiles table...
Result 0
Populating Civ5ModsDatabase mods table...
Result 0
Populating Civ5ModsDatabase modrelationships table...
Result 0
Populating Civ5ModsDatabase modproperties table...
Result 0
Populating Civ5ModsDatabase modfiles table...
Result 0
Populating Civ5ModsDatabase modentrypoints table...
Result 0
Populating Civ5ModsDatabase modactions table...
Result 0
Populating Civ5ModsDatabase gameversionrelationships table...
Result 0
Populating Civ5ModsDatabase dlcrelationships table...
Result 0
Refreshing sqlite_stat1 table...
Result 0
Done!
Mods have been installed!



The log is too verbose right now, I know.
 
One suggestion I might add to this program is to detect whether or not a mod has a .dll, and if you're more ambitious, a list of all .lua's and conflicting names and display that - this will make it much easier to detect potential conflicts.
 
One suggestion I might add to this program is to detect whether or not a mod has a .dll, and if you're more ambitious, a list of all .lua's and conflicting names and display that - this will make it much easier to detect potential conflicts.

Right now the program checks mods dependencies and references, and activates the required mods if they are available, or warns of missing dependencies.

I am more ambitious, and with time anything can be done. Right now I am focusing on finishing the Workshop Mod Manager, from where you can download directly any new mod without the need to subscribe, and the PickNMix mod manager, to download mods from the picknmix site.

Regarding the detection of dlls and lua conflicts, I am afraid I don't know that much about what a mod does and how it works, but I can learn. If you have any links I can read, I will check them out.

Another plan is to add the capability to read a saved game and retrieve the mods used, and automatically set everything up to play that saved game.

I will contact you on Steam. Thanks.
 
There really should be a single button to launch Civ V.
This would probably mean either running the install mods button script or checking that no changes have been made since it ran. I'm actually a fan of the latter because it goes along with another idea I have, an indicator for when the configuration is set (ie when it's a WYSIWYG configuration).


Based on the way the DB is being stored, it looks like you're using Alpha Five/Anywhere. Is there any particular reason for that over say WPF (or Windows Forms or even MFC) through Visual Studio? There seems like no reason to use their proprietary file format over plain SQL (or any variant thereof), CSV, or XML (or MS Access which, while still a proprietary RDBMS, is at least popular enough to be a standard of sorts).

EDIT: I don't mean to be that F/OSS guy, I am mostly just curious, as it seems like a strange choice to use alpha...

If you need help, let me know.
Oh and regarding .lua and .dll conflicts, I'm not sure of exactly how best to implement this, probably by generating and storing it as an additional piece of metadata for the mod, using the 7zip LZMA SDK (.civ5mod files are LZMA archives). What should be checked is if more than one of the .civ5mod archives have [foo].lua and if any of them have a DLL file. There can only be one DLL loaded, likewise there can only be one something.lua loaded at a time (whichever one is loaded last in this case is what will be called [though this can be the desired behavior with mod mods]).
(I'd implement this by storing the file structure (eg filenames) and when checking for incompatibility, comparing the various [name].lua and checking for more than one .dll file to warn the user of the possible incompatibility. There needs to be a way to ignore/override this for the case of mod mods, and ideally that would also be part of the metadata database. [at least locally, I'm not talking about turning this into some huge synchronized/centralized database project])
 
Last edited:
Hi,

A Civ V mod manager is sorely needed; thank you for taking up that banner. In other threads I've read that install order does matter, so if you could implement a way to set that, that would be great.

Eldrin
 
Great idea and a very good start. Reminds me a bit of NMM (Nexus Mod Manager). Sadly, the development seems to have been abandoned and Osmuni hasn't been seen since 15 August 2017...
 
oops sorry I abandoned this ages ago. You are probably using Windows in an asian language?
 
Top Bottom