Code: Select all
C:\Users\(Name)\AppData\Roaming\Factorio
Code: Select all
D:\Games\Factorio
How I did it:
I modified config-path.cfg. I changed "config-path=(default path)" to "config-path=D:/Games/Factorio/config" and also changed "use-system-read-write-data-directories" to "false" (Changing this to true or false seems to change nothing). I proceeded to cut the Factorio folder from %AppData% into "D:\Games". I then changed both "write-data=" and "read-data=" to have "D:\Games\Factorio" as their directory. I was fairly certain this should work.
What happened:
I clicked "Play" through Steam and it said "Preparing to launch Factorio...", and come to find out, Steam was pulling my saves from the cloud and putting them in %Appdata%\Factorio\saves (the folders were generated). And after it did that, this happened:
So obviously I'm dumb, and now I can't launch the game. I've tried looking on this forum and other places but can't seem to find what I'm looking for, so I hope this post is not unwarranted. Any help is appreciated. Thank you.
Edit:
[Solved] How to change the entire default user data directory (Steam version)(Windows):
This is a guide to change the default directory of where all the data from Factorio goes. It's mostly fail proof and should be easy to do for moderate PC users, but if you're unsure about any of these steps, then proceed with caution.
Step 1:
With some patience, you'll need to start by modifying "config-path.cfg", which will just look like "config-path" with extensions hidden.
(This file should be in C:\Program Files(x86)\Steam\steamapps\common\Factorio\config by default on windows. This is mainly a walkthrough for windows users, so if you're using OSX or Linux I'm sorry)
You'll want to modify "config-path=" (I highly suggest you use Notepad++) to something like this:
Code: Select all
config-path=<Drive letter>:\<Any combo of folders>\Factorio\config
config-path=D:\Games\Factorio\config
Code: Select all
--config=<Drive letter>:\<Your combo of folders>\Factorio\config\config.ini
--config=D:\Games\Factorio\config\config.ini
Step 2:
Backup your Factorio directory before you move it to where you want it.
(Default location of the data directory is C:\Users\<Username>\AppData\Roaming\Factorio. AppData is a hidden folder on windows, so you may have to enable "Show hidden files, folders, and drives" in File Explorer Options)
After that's done, move\cut that Factorio folder into your folder of choice. Example: D:\Games (If moving from one explorer window to another, make sure to hold the shift key to move instead of copy if between 2 drives)
Step 3:
Open up the config.ini file with Notepad++ and change "write-data=" to:
Code: Select all
write-data=<Drive letter>:\<Wherever you end up putting the Factorio folder>\Factorio
write-data=D:\Games\Factorio
Step 4(?):
If you follow the steps correctly, everything should work, but Steam is a derpy creature. If you click "Play" and you get the "Preparing to launch Factorio..." for a while, let it load. Steam is taking your saves from the cloud and PUTTING THEM BACK in C:\Users\<Username>\AppData\Roaming\Factorio\saves. So if you are having this problem, you'll have to create a system link, as I don't know how to officially "fix" this issue. This only appears to happen with Steam. Below are some steps to make the system link.
1. Delete the "saves" folder Steam just created.
2. Open command prompt in administrator. Right click the Windows icon in the task bar at the bottom left and there should be an option called "Command Prompt (Admin)".
3. In command prompt type:
Code: Select all
cd C:\Users\<Username>\AppData\Roaming\Factorio
Code: Select all
mklink(This is the command to make the link) /<Drive Letter> <System Link Name> <Directory Symlink Points To>
mklink /D saves D:\Games\Factorio\saves
Tips:
-Make sure NOT to type "cd C:\Users\<Username>\Appdata\Roaming\Factorio\saves" in cmd prompt before using the mklink command or you will create a symlink called "saves" that is inside "saves" and the symlink will not work.
-Inside config-path.cfg, there is an option called "use-system-read-write-data-directories", and for the Steam version, this appears to do nothing. But if you encounter problems in the future, try changing it to "false".
Phew, that's all I've got for now. Hopefully if you're reading this and you were encountering the same issues, this helped. If it did, let me know. Thanks.
Sources:
https://wiki.factorio.com/Application_directory
https://wiki.factorio.com/Application_d ... _directory