Page 1 of 1

Separate "mods" settings and more (warning, prevents updates)

Posted: Fri Feb 06, 2026 9:21 pm
by Green Cat
Feel free to use anything for yourself, i won't create this mod so please don't assume i am "sharing what i am working".

Warning: "this mod" = the mod i am suggestiong. I did not give it a name since whoever makes this mod will be the one who has the privilige to name it

Did you ever play with mods but then are like... i can just open settings and increase the value and restart the game?

Or, mods like rampant... where you can activate or deactivate survival mod?

The ideea of this mod is: Freedom

Aka, you start a game with this new mod, settings and everything? Well this mod will ask you if you are ok to create a new folder, with the name you chose, and all the mods, and settings, will be duplicated and put there (this means few GB if you are using HD graphics). Like this, when you load said save, it will be loaded from there. If you start a new game, different mods, different settings, it will also be saved separatly.

And

If you deactavate this mod, you can't load any of those save, but you can play factorio like usually, no issues or otherwise.

Risks: this essentially prevent mod updates due to the mods are essentially copy, real copies of the zips..... but that also means that the mod simple just create separate mod folder containing the original mods with separate mod settings + prevent you from chaging any settings, regardless what..... or to spell it out, all if a mod needs and update, all you do is a backup (since risk of different bugs), and overwrite (manually, no in game) the zip to "update" the mod. And no, i strongly suggest against adding in game way to do this. 1st of all, risk of bugs, secondly the ideea that you need to manually do it will give you a "penalty" for touching the files when the whole ideea of this mod is that no touching anything once you started a game (similar to no mod vanilla Space age)

Also, 2 options for this mod

1st is an ingame way to
updating all the mod's info.json so that, if the the game get's update, the mods to still work despite the difference in version. Also as a reminder that any previous factorio version can be found so it's not a "locked out" if update.

2nd to create a copy of your game created via this mod to a "save i can load without this mod on" but at a cost. whatever mod you have on, whatever mod settings you have, all will be replaced by the mods and settings that mod save had.... Essentially, even if this mod is deactivated, if you don't touch any other mods and any other mod's settings, the save you load will be the exact save you copied (all mods, but no others, all settings).

So again, this is a mod where you essentially can add whatever mod you want. Can set stats and more... but you simple can NOT pause the game to ajust stats.

While at the same time gives possibilities to "fix" issues via direct editing the files, but because it's not a simple way, it still makes us want to not touch anything and find in game solutions

And also the ability to have mutiple different mods, ready to be loaded, meaning that modpacks can have a complete new meaning... as in just like how we use map generator strings, we can use similar in this mod to export, share, and import ready to use mod packs with settings ajusted and more.

And lastly, due to this being just a mod, everyone can simple deactivate it, or not install it in the 1st place.

I hope i managed to explain why i said that this mod allows freedom. Because you installing this mod to ensure you will not touch settings is a freedom from temptation of "easy way".

And worse comes to worse, as i meantioned, the ideea of being able to create a copy of the save, with all mods and settings as base game, and then, deactivate this mod, so you can change settings and more IF it is really neccesary, including adding or removing more mods. Then, once finished, continue the same, check if everything is ok. Save. Then reactivate this mod, and load the game you just saved, and as i mentioned at the start, this mod will ask you a question: do you want to create a new folder to save everything via create a copy. So you can continue with this. Ah, also, for people nitpicking this part, i want to remind you that this is in case of update needed, broken mods (causes errors), game breaking bugs, new updates that are a must, and so on. Because if someone wants to change settings and mods, all they need to do is not use this mod in the 1st place.

Re: Separate "mods" settings and more (warning, prevents updates)

Posted: Tue Feb 10, 2026 1:50 am
by BraveCaperCat
Green Cat wrote: Fri Feb 06, 2026 9:21 pm Feel free to use anything for yourself, i won't create this mod so please don't assume i am "sharing what i am working".

Warning: "this mod" = the mod i am suggestiong. I did not give it a name since whoever makes this mod will be the one who has the privilige to name it

Did you ever play with mods but then are like... i can just open settings and increase the value and restart the game?

Or, mods like rampant... where you can activate or deactivate survival mod?

The ideea of this mod is: Freedom

Aka, you start a game with this new mod, settings and everything? Well this mod will ask you if you are ok to create a new folder, with the name you chose, and all the mods, and settings, will be duplicated and put there (this means few GB if you are using HD graphics). Like this, when you load said save, it will be loaded from there. If you start a new game, different mods, different settings, it will also be saved separatly.

And

If you deactavate this mod, you can't load any of those save, but you can play factorio like usually, no issues or otherwise.

Risks: this essentially prevent mod updates due to the mods are essentially copy, real copies of the zips..... but that also means that the mod simple just create separate mod folder containing the original mods with separate mod settings + prevent you from chaging any settings, regardless what..... or to spell it out, all if a mod needs and update, all you do is a backup (since risk of different bugs), and overwrite (manually, no in game) the zip to "update" the mod. And no, i strongly suggest against adding in game way to do this. 1st of all, risk of bugs, secondly the ideea that you need to manually do it will give you a "penalty" for touching the files when the whole ideea of this mod is that no touching anything once you started a game (similar to no mod vanilla Space age)

Also, 2 options for this mod

1st is an ingame way to
updating all the mod's info.json so that, if the the game get's update, the mods to still work despite the difference in version. Also as a reminder that any previous factorio version can be found so it's not a "locked out" if update.

2nd to create a copy of your game created via this mod to a "save i can load without this mod on" but at a cost. whatever mod you have on, whatever mod settings you have, all will be replaced by the mods and settings that mod save had.... Essentially, even if this mod is deactivated, if you don't touch any other mods and any other mod's settings, the save you load will be the exact save you copied (all mods, but no others, all settings).

So again, this is a mod where you essentially can add whatever mod you want. Can set stats and more... but you simple can NOT pause the game to ajust stats.

While at the same time gives possibilities to "fix" issues via direct editing the files, but because it's not a simple way, it still makes us want to not touch anything and find in game solutions

And also the ability to have mutiple different mods, ready to be loaded, meaning that modpacks can have a complete new meaning... as in just like how we use map generator strings, we can use similar in this mod to export, share, and import ready to use mod packs with settings ajusted and more.

And lastly, due to this being just a mod, everyone can simple deactivate it, or not install it in the 1st place.

I hope i managed to explain why i said that this mod allows freedom. Because you installing this mod to ensure you will not touch settings is a freedom from temptation of "easy way".

And worse comes to worse, as i meantioned, the ideea of being able to create a copy of the save, with all mods and settings as base game, and then, deactivate this mod, so you can change settings and more IF it is really neccesary, including adding or removing more mods. Then, once finished, continue the same, check if everything is ok. Save. Then reactivate this mod, and load the game you just saved, and as i mentioned at the start, this mod will ask you a question: do you want to create a new folder to save everything via create a copy. So you can continue with this. Ah, also, for people nitpicking this part, i want to remind you that this is in case of update needed, broken mods (causes errors), game breaking bugs, new updates that are a must, and so on. Because if someone wants to change settings and mods, all they need to do is not use this mod in the 1st place.
I don't see how you (or anyone else for that matter) could make this mod happen. You just don't have the required low level (ish) access required to manipulate files like that. Plus, it wouldn't be able to change the startup settings or prototype data on loading a save. I think the best you could do is make a mod that crashes to the main menu if the save game is ever loaded on a different configuration than the one the mod was first loaded on.

Re: Separate "mods" settings and more (warning, prevents updates)

Posted: Tue Feb 10, 2026 4:31 am
by benlove007
I'm not entirely sure what you are trying to achieve here, but there is something you may be interested in:

mods are stored in a directory called "mods" inside your game folder (right next to saves). The executable has an option to specify a different directory. So, without having different saves or even game installations, you can have different sets of mods that you pick from when starting the game.

factorio.exe --mod-directory "mods-testing"

I have three different shortcuts to start Factorio: multiplayer, testing, and "normal". If you attempt to start a save with the wrong mods directory, the game will warn you. If you proceed, the save will update to the new mod set. As long as you don't save over it, the old save can still be opened with the original mod set without any issues or warnings. But if you save with the new mod set, then you will again get a warning trying to change the mod set back.

You can get even more sophisticated with a script that will keep the various mods directories in sync, but this is overkill. But here goes anyway: I keep my Factorio user data (config, saves, mods) separate from the game files, in %APPDATA%\Factorio. This is my update-mods.bat file, called from the various shortcuts as e.g. %APPDATA%\Factorio\update-mods.bat multiplayer, with "Start in" set to %APPDATA%\Factorio. I use hardlinks so that I don't actually need multiple copies of each mod. The mod directories will actually share the underlying data. The key here is the mods\mod-list.json file (not synced in my script) which allows mods to be individually turned off or on within the mods directory. (This whole setup would be much easier if the command line flag allowed specifying a different mod-list.json file instead of a whole directory. But I'm satisfied with what I came up with anyway.)

Code: Select all

@echo off

FOR /F %%G in ('dir /AL /B mods 2^>NUL ^| find /V /C ""') DO SET junctions=%%G

SET dirs=0
SET links=0
FOR /F "delims=" %%G in ('dir /AD /B mods-* 2^>NUL') DO (call :procdir "%%G")
ECHO processed %dirs% directories...
ECHO created %links% hardlinks...

SET verified=0
SET /a dirs+=1
call :verifydir mods
FOR /F "delims=" %%G in ('dir /AD /B mods-* 2^>NUL') DO (call :verifydir "%%G")
ECHO verified %verified% hardlinks...

IF %1.==. GOTO done

IF %1==multiplayer GOTO multiplayer
IF %1==testing GOTO testing
IF %1==default GOTO default

ECHO Unknown arg: %1
GOTO timeout

:multiplayer
START "Factorio (multiplayer)" /D "C:\Program Files\Factorio" /I "C:\Program Files\Factorio\bin\x64\factorio.exe" --mod-directory "%APPDATA%\Factorio\mods-multi"
GOTO :eof
:testing
START "Factorio (testing)" /D "C:\Program Files\Factorio" /I "C:\Program Files\Factorio\bin\x64\factorio.exe" --mod-directory "%APPDATA%\Factorio\mods-testing"
GOTO :eof

:default
START "Factorio (default)" /D "C:\Program Files\Factorio" /I "C:\Program Files\Factorio\bin\x64\factorio.exe"
GOTO :eof

:done
ECHO Done.
pause
GOTO :eof

:timeout
TIMEOUT /T 2 >NUL
GOTO :eof

:procdir
 SET /a dirs+=1
 FOR /F "delims=" %%H in ('dir /B %1\*.zip 2^>NUL') DO (call :hardlink %1 "%%H" mods)
 FOR /F "delims=" %%H in ('dir /B mods\*.zip 2^>NUL') DO (call :hardlink mods "%%H" %1)
 call :countjunctions %1
 GOTO :eof

:countjunctions
 FOR /F %%H in ('dir /AL /B %1 2^>NUL ^| find /V /C ""') DO SET local=%%H
 IF %local% NEQ %junctions% (
   ECHO WARNING: directory %1 has %local% junctions, expected %junctions%!
 )
 GOTO :eof

:hardlink
 IF NOT EXIST %3\%2 mklink /H %3\%2 %1\%2 >NUL 2>&1 && ECHO linked %3\%2 %1\%2 && SET /a links+=1
 GOTO :eof

:verifydir
 FOR /F "delims=" %%H in ('dir /B %1\*.zip 2^>NUL') DO (call :verifyfile %1 "%%H")
 GOTO :eof

:verifyfile
 FOR /F "delims=" %%I in ('dir /B/S %1\%2 2^>NUL') DO (call :countlinks "%%I")
 GOTO :eof

:countlinks
 SET count=0
 FOR /F "delims=" %%I in ('fsutil hardlink list %1 2^>NUL') DO (SET /a count+=1)
 IF %count% NEQ %dirs% (
  ECHO %1: Expected %dirs% links, got %count%
 ) ELSE (
  SET /a verified+=1
 )
 GOTO :eof
I use folder junctions for mods that are being developed (not in zip form). I do not attempt to auto-sync those at this time, though I have recently considered adding that feature.

(If you're using Linux instead of Windows, this is actually so much easier. But that is left as an exercise for the reader. :) )