Mods management for different savegames???

Anything that prevents you play the game properly. Do you have issues with paying for the game, downloading it or properly running it on your computer? Let us know here.
Post Reply
andre2
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Fri Mar 04, 2016 2:25 pm
Contact:

Mods management for different savegames???

Post by andre2 »

Hi,

i have a game going with the Krastorio mod.
I want to start a game with the DyWorld Mod.
I just dont want to screw over my savegames in games with other full conversion mods.

Do I have to manage the mods manually by myself? Like I have to deactivate Krastorio, before I activate DyWorld every time I switch from Savegame to Savegame? Or do the savegames activate their included mods by themthelfs?

I have the feeling, that the game could need some kind of a profile management system, in with people can create their own profile of setups. Like for Joe, Susi, Jim. Like when several people play on one computer. Other games have that feature too.
One could use that profile system then to set it up for several full conversion mods like: PyMod, Vanilla, DyWorld, Krastorio.

Adamo
Filter Inserter
Filter Inserter
Posts: 476
Joined: Sat May 24, 2014 7:00 am
Contact:

Re: Mods management for different savegames???

Post by Adamo »

andre2 wrote:
Thu Sep 19, 2019 2:36 pm
The only trick I know you can use in the game would be to setup your mod list for your new saved game the first time, then start and save the game. Then any time you load either game, you would first click the "sync mods" button for that saved game, which will sync your client's mod to the mod list you had whenever you saved the saved game you are syncing with. So you have to be careful you have the right mod list every time you save the game again.

Personally, I do it myself, yes, using a bash script.

Karlito15
Burner Inserter
Burner Inserter
Posts: 14
Joined: Mon Dec 18, 2017 8:10 pm
Contact:

Re: Mods management for different savegames???

Post by Karlito15 »

I do it as following:
The mods are stored in: C:\Users\<user>\AppData\Roaming\Factorio\mods
I make sure that all mods for a savegame are installed, activated and configured (all files are in this mod folder automaticly). Then I pack the mod folder into a rar and delete all files inside. Then I configure everything for the other save and pack the folder in a rar again. I then have two rar's, and I only have to delete the mod folder and select "unpack here" on the right rar to get the mods I want. As said, all the configs are included too, so...
That is the easiest possibility I found so far. You just have to update the rar, everytime you update a mod, but I don't do that often, so it's ok for me.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5020
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Mods management for different savegames???

Post by eradicator »

Either use the "sync mods" button on the "load savegame" screen. Or download the zip version from the official website (not steam) and extract it anywhere you want as often as you want. The zip version stores savegames inside it's own folder, so you can run a different "installation" per mod-set. If you're "computer savvy" you can also achieve the same effect with command line options and config files (factorio.exe /help) without needing the diskspace for a full installation.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

andre2
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Fri Mar 04, 2016 2:25 pm
Contact:

Re: Mods management for different savegames???

Post by andre2 »

Thanks for the tips, guys. I found the sync button for the savegame. And it works well enough.

I have the steam version.So there is the opportunity to have several 2 ore more folders with the game in it, of which I can set up every folder differently?
Does every folder work with the ingame updater?

Doing the setup manually would be too labor intensive for me, as you always forget something of the ~20 mods I use. And that is payed with additional time one has to spend to get it going.
It would make a difference if for every folder, the ingame mod manager would work for that particular folder.

User avatar
Jon8RFC
Filter Inserter
Filter Inserter
Posts: 512
Joined: Tue May 10, 2016 3:39 pm
Contact:

Re: Mods management for different savegames???

Post by Jon8RFC »

I think a handy solution would be using symlinks. Although I am 100% positive that you can do them on linux, I can't direct you...on mac, I have absolutely no clue if they can be done.

I'll just give you specific instructions for what you're asking instead of just making symlinks for the mods folder, which is what I originally wrote about. I don't like the idea of unnecessary duplicates or having to manage multiple files of the same thing, such as config.ini, but you asked for multiple folders, so here you go...

On my computer, my Factorio appdata folder is here:
C:\users\JPB\AppData\Roaming\Factorio
Whatever your username is, it will be where JPB is.

Be sure that Factorio isn't running. You'll want to move that folder, Factorio, somewhere else. It can be anywhere, for for simplicity in explaining, you can make a new folder on your c drive. Name it factorio_custom and move the folder called Factorio there, and rename it Factorio_setup1.

Now, open up notepad and paste this in, replacing JPB with whatever your username is, and if there's a space in it, put quotes around the folder name:

Code: Select all

rmdir c:\users\JPB\AppData\Roaming\Factorio
mklink /d c:\users\JPB\AppData\Roaming\Factorio c:\factorio_custom\Factorio_setup1
start C:\"Program Files (x86)"\Steam\Steam.exe -applaunch 427520 --load-game save1.zip
exit /b
For the standalone game, you'd change the start line to this:

Code: Select all

start C:\"Program Files"\Factorio\bin\x64\factorio.exe --load-game save1.zip
And to just launch it, you'd remove the --load-game part:

Code: Select all

start C:\"Program Files (x86)"\Steam\Steam.exe -applaunch 427520

Code: Select all

start C:\"Program Files"\Factorio\bin\x64\factorio.exe
Or remove that line entirely if you don't want the batch file launching your game.

Save the file into your c:\factorio_custom folder as setup1.bat and be sure that you're saving the file type as "all files" and not as "text documents". You can then copy & paste Factorio_setup1, rename it Factorio_setup2, make another batch file, and adjust the folder and file names accordingly. I'm not sure how Vista/7/8/10 act about batch files, symlinks, or tinkering in the appdata folders if UAC and other nuisances are enabled, so you may have to turn off UAC if it complains.

To save a little more time on loading, I'd suggest in your config.ini (open in notepad):
Factorio\config\config.ini
that you enable atlas caching. Set this line:

Code: Select all

; cache-sprite-atlas=false
to this:

Code: Select all

cache-sprite-atlas=true
You'll need to set that in every config.ini file, now that you'll have multiple config.ini files.

Now, just run whichever batch file for whichever mods setup or save you want to load, or make a new shortcut to the batch file, or whatever is convenient. It should all be transparent to Factorio, and it won't act or know any different. What the batch file will do is remove the symlink, create a new one to whichever Factorio_setupX folder it's set to, then launch the game and your save file.

I don't know how symlinks work with overwriting themselves, so I just set it to remove it first. You can also just delete the symlink yourself like you'd delete a folder or file if you ever change your mind and want to go back to normal. That's the way I do it when I don't need a symlink anymore.
You could further use symlinks to make a wonderful mess and avoid duplicates while also allowing seamless atlas-cache creation (it has to update whenever stuff changes). BUT, the first time you rename or move something, if you're not sure of the consequences and what you need to update in your batch files, you're going to wish you didn't do it that way. It's more of a "fun because I can" than a worthwhile thing to do, when you can just symlink the entire folder or symlink just the mods folder.


EDIT: The updater will work normally and it'll just be one installation which only updates once, but your mods will all have to update independently. It will be a separate way of running the game, uniquely, for your mod sets. Symlinks are incredibly handy for situations like this. Factorio and Steam won't know any different. To them, nothing has changed.
Last edited by Jon8RFC on Fri Sep 20, 2019 4:37 pm, edited 2 times in total.
Image

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5020
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Mods management for different savegames???

Post by eradicator »

andre2 wrote:
Fri Sep 20, 2019 1:17 pm
It would make a difference if for every folder, the ingame mod manager would work for that particular folder.
That's exactly how it works. They would be completely seperated from each other and not know the other side exists. I don't use steam, but i don't think it supports that. If you bought the game on steam you can link your steam account to an official factorio account (not this forum account), and then get the official zip version. If you don't want to "fiddle around" and don't mind downloading all the updates twice/thrice that's the fastest solution.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5020
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Mods management for different savegames???

Post by eradicator »

@Jon8RFC:

There's no need to mess with symlinks. As i said in my first post, factorio supports multiple mod folders via cli.

Code: Select all

-c, --config PATH             config file to use
 --mod-directory PATH      Mod directory to use
The atlas will only do you any good if you use seperate savegame paths too (which requires editing "[path] write-data=" in each config.ini). Otherwise it'll be rebuilt every time you switch between mod groups. Problem is that write-data is also the folder containing the blueprint storage, so if you don't want that to be seperate between mod groups i recommend using the same write-data folder for all groups.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

User avatar
Jon8RFC
Filter Inserter
Filter Inserter
Posts: 512
Joined: Tue May 10, 2016 3:39 pm
Contact:

Re: Mods management for different savegames???

Post by Jon8RFC »

Oh, that's pretty convenient!

@andre2, there's no real reason to use symlinks then, other than a saved atlas which doesn't have to be rebuilt for each set of mods, but that's not reason enough unless you use just one mod on one save which happens to have hoards and hoards of sprites.
Stick with --mod-directory and avoid the extra complication, like eradicator has mentioned. You can just use steam to make a shortcut, then right-click on it, hit properties, and edit the steamgame://link to add --mod-directory at the end of it.
Image

User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 696
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: Mods management for different savegames???

Post by DRY411S »

Jon8RFC wrote:
Fri Sep 20, 2019 5:04 pm
and edit the steamgame://link to add --mod-directory at the end of it.
Did you try this? For me, the --mod-directory argument is ignored.

Post Reply

Return to “Technical Help”