Mod Control (Python Script)

Enhance your gameplay with these tools. This category is also the right place for tools useful for modders.
Mod databases, calculators, cheatsheets, multiplayer, scripts, libs and other useful stuff that is not strictly in-game mods.
Post Reply
vector
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Jan 14, 2017 9:39 am
Contact:

Mod Control (Python Script)

Post by vector »

Hi.

I wrote a 'mod control' Python script that someone else might like, so I figured I'd share it.

The script allows you to set up 'mod sets' (a fancy term for a specific combination of mods to make enabled). When you run the script, it will enable all of the mods listed in the mod set, and disable all other mods. The general idea is that you can set up a mod set for each combination of mods that you normally play with, and set up a bunch of shortcuts to run the script for each mod set. This is to save all of the mucking around with enabling and disabling individual mods from the UI. (Why can't we select multiple items on that screen?!?!)

This script operates on the mod list JSON file, and so Factorio should probably not be running when you execute the script. You'd have to restart Factorio anyway to apply the new modset, so it doesn't make much difference.

You can find the script and instructions on GitHub at vector-kerr/factorio-mod-control.

Cheers!
- Vector


[Edit: updated post to include an actual hyperlink (new users can't post URLs!)]

User avatar
Narc
Filter Inserter
Filter Inserter
Posts: 278
Joined: Mon Feb 11, 2013 7:25 am
Contact:

Re: Mod Control (Python Script)

Post by Narc »

Just out of curiosity, is it not easier to pass the `--mod-directory` argument at Factorio startup? I mean, sure, if you have duplicate mods between mod sets, that can lead to some extra disk space usage, but it seems to me the extra convenience would be worth it (assuming you can't just symlink your way to space saving).

vector
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Jan 14, 2017 9:39 am
Contact:

Re: Mod Control (Python Script)

Post by vector »

Hello! I looked for something similar a while ago, but wasn't aware of the --mod-directory argument. Nevertheless, as you said, the main advantage is not requiring duplication of mod directories. This approach also has the benefit of only having one mod directory to maintain updates in. Thanks for the reply... I now have another option! :)

Post Reply

Return to “Tools”