[Solved] Can't change the data directory.

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [Solved] Can't change the data directory.

Post by eradicator »

AndyMissed wrote:
eradicator wrote:1. Use steam "move install folder" to move the bulk data.
"Move Install Folder" Is useless to me because the "bulk data" is already in the D drive since I told Steam that's where I wanted to put stuff. There's no need for that step.
Well i mean like...the guide is supposed to work for people who haven't moved their stuff yet, yes?
AndyMissed wrote:
eradicator wrote:1. Move config to X:\???\writedata
2. Create a symlink at C:\Users\<Username>\AppData\Roaming\Factorio to X:\???\writedata
3. done.
In order for that to work, you would have to move all the files out, not just the config. And then you would have to create a symlink called "Factorio" not "saves". Therefore, that's not technically changing the directory without changing the contents of config.ini.
Moving a folder or it's content and changing the content of a file is technically pretty different yes. Most users know how to move files but don't like to edit scary ini files. And you need to move the content of that folder anyway. The name of the target of the symlink is pretty irrelevant though, you could name it bananas if you wanted. Otherwise i don't know what you mean. I didn't say anything about "saves".
AndyMissed wrote:
eradicator wrote:1. Move config (And the entire contents of the Factorio folder) to X:\???\writedata
2. Change config write-data
3. add --config to steam launch options
4. done.
Which is what is supposed to work, right? Well, it doesn't. And I don't know why.

That solution works, up until the point where Steam decides to re-create the folders necessary to store all your saves from the cloud in "C:\Users\<Username>\AppData\Roaming\Factorio\saves". That is why I need to use symlink. But only for the saves folder.
Well, um ok. That's one of those issues with steam cloud sync. Factorio probably would just ignore that new folder if you specify --config with a different directory. But then sync wouldn't work without the symlink. That's the missing piece i didn't understand i guess. But for the guide i'd say...if you need to create the symlink in both cases then the whole fiddling with --config and config.ini becomes redundant as factorio can just use the symlink too.

My argument being... if you're going to write a guide it would be nice to have a "minimal working solution" to make it easier for others? I guess they could just read the whole thread, but everybody knows they won't :P.

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2339
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: [Solved] Can't change the data directory.

Post by Jap2.0 »

AndyMissed wrote:
Jap2.0 wrote:But less than 1% of those people played Factorio, so it's not that much of an understatement :P .
Even 0.1% of 33 Million active users is still 30,000. And Factorio often has much more than 1,000 daily users. 1k users on any given day is usually a low day. Anyway, you get my point. lol.

Not trying to argue or anything by the way, just thought what you said was funny.
Acually I think it's only about 10-15k ;) .


Also, this entire thread is testimony to why this should be an option. It should be as simple as a "change data directory" button or "Data directory:" or something. In theory. Maybe. Or something.
There are 10 types of people: those who get this joke and those who don't.

AndyMissed
Burner Inserter
Burner Inserter
Posts: 12
Joined: Thu Feb 08, 2018 7:16 am
Contact:

Re: [Solved] Can't change the data directory.

Post by AndyMissed »

eradicator wrote:My argument being... if you're going to write a guide it would be nice to have a "minimal working solution" to make it easier for others? I guess they could just read the whole thread, but everybody knows they won't :P.
Though you are right to an extent, (I do have a tendency to over-explain things) the problem I have with most guides is that they provide the solution "as-is" and you're left stranded with this one-way solution that you don't understand by the end of it. My guide assumes you know how to use a computer, and that you already told Steam where to install stuff, but are annoyed that the Factorio folder is not where you want it. It also assumes you don't hate reading.

Conclusion?:
Factorio is better installed from the zip than through Steam, and I suck at explaining basic logic.
Jap2.0 wrote:Also, this entire thread is testimony to why this should be an option. It should be as simple as a "change data directory" button.
Yes. For the Steam version. Though most people don't care about this stuff so that's why it's not implemented I think.

Zavian
Smart Inserter
Smart Inserter
Posts: 1641
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: [Solved] Can't change the data directory.

Post by Zavian »

I suggested using the .zip version because it is the simplest way to achieve what the OP wants. I also think it is a better choice if you are playing a modded game, and don't want factorio to auto-update (potentially breaking some mods), or when you want multiple different versions installed, or want to have multiple different modpacks.

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2339
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: [Solved] Can't change the data directory.

Post by Jap2.0 »

AndyMissed wrote:
Jap2.0 wrote:Also, this entire thread is testimony to why this should be an option. It should be as simple as a "change data directory" button.
Yes. For the Steam version. Though most people don't care about this stuff so that's why it's not implemented I think.
That's true, but it's certainly not completely unused - this thread has had something like 25 posts by 6 people in 18 hours. However, some people might not even know it exists, if they haven't looked for it, don't frequent the forum, and don't poke around in configs, so this might also be helpful to them

And last I checked there were a couple other people who use non-default data directories as well.
Zavian wrote:I suggested using the .zip version because it is the simplest way to achieve what the OP wants. I also think it is a better choice if you are playing a modded game, and don't want factorio to auto-update (potentially breaking some mods), or when you want multiple different versions installed, or want to have multiple different modpacks.
In properties > betas on Steam you can set Factorio to a certain version - doing nothing uses the latest stable, but there are options for latest stable .12, .13, .14, .15, every .16 experimental, and .16.x. I agree that it would be better if you're running multiple versions simoultaneously - although it only takes a couple minutes to switch between versions on Steam (although that is a couple less minutes playing Factorio...). I imagine modpacks would be the same either way - just enable/disable in-game, or switch out mod folders in more extreme scenerios?
There are 10 types of people: those who get this joke and those who don't.

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

Re: [Solved] Can't change the data directory.

Post by eradicator »

AndyMissed wrote: Factorio is better installed from the zip than through Steam, and I suck at explaining basic logic.
Well, i kinda assumed that you wanted steam sync to work. Because you mentiond you're using it. (And because i talked to some idiot the other day who got rude when i suggested that steam-sync might not be the ultimate syncing solution, and seemed to be somewhat intellectually socially challenged. Eherm, ok..back to topic..)
Jap2.0 wrote:Also, this entire thread is testimony to why this should be an option. It should be as simple as a "change data directory" button.
Well the conclusion was that the steam version kinda offers this for everything but the save-files right? And the zip version does it for everything. Also the current --config option has the benefit of allowing to specify a different directory for --mods which i quite like because i have to handle different mod sets for my dev stuff.

juliejayne
Inserter
Inserter
Posts: 41
Joined: Sat Apr 01, 2017 1:52 pm
Contact:

Re: [Solved] Can't change the data directory.

Post by juliejayne »

Pardon my stupidity, but I WANT to use the Zip version, becasuse I want to run different versions with different mod packs etc.

But everytime I install anew version it somehow connects back to the mods and save on my primary version, which was installed by Steam.

Does anyone know what config file I have to change to enable my Zip versions to run independently from my existing steam saves.

Zavian
Smart Inserter
Smart Inserter
Posts: 1641
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: [Solved] Can't change the data directory.

Post by Zavian »

Are you sure that you are running the factorio.exe that was created when you unpacked the zip-file, and not running another copy of factorio on your computer, using a menu entry or a shortcut? Because when I use the .zip version it always stores saves and mods inside its directory.

juliejayne
Inserter
Inserter
Posts: 41
Joined: Sat Apr 01, 2017 1:52 pm
Contact:

Re: [Solved] Can't change the data directory.

Post by juliejayne »

Absolutely... the Factorio.exe under C:\Program Files\Factorio2\bin\x64

Zavian
Smart Inserter
Smart Inserter
Posts: 1641
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: [Solved] Can't change the data directory.

Post by Zavian »

I unpack the .zip to d:\games\ Factorio.... (C:\games should also work, but I keep games on d:). Normal programs do not have write access to Program Files. I'm not sure how factorio handles that, but it might detect that situation, and fall back to using your %Appdat%\factorio.

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

Re: [Solved] Can't change the data directory.

Post by eradicator »

juliejayne wrote:Does anyone know what config file I have to change to enable my Zip versions to run independently from my existing steam saves.
config-path.cfg and or config.ini
If the steam version stores stuff in some common folder like \mydocuments the zip version probably also looks there first and uses the config there by default. You can just copy it somewhere else.

Zavian
Smart Inserter
Smart Inserter
Posts: 1641
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: [Solved] Can't change the data directory.

Post by Zavian »

@Eradicator. I have both the steam version (which I use when playing vanilla) and multiple .zip versions installed (which I use when playing modded games). In my case the .zip versions always store their data inside their directory structure (but I don't unpack the .zip versions to c:\Program Files).

Config-path.cfg for the .zip version contains

Code: Select all

config-path=__PATH__executable__/../../config

#This value specifies the way the aplication generates default values for path.read-data and path.write-data
#When set to true, it will use system directories (Users/Name/AppData/Roaming/Factorio on windows), this is set to true
#for the installer versions of Factorio, as people will usualy install it in program files, and the aplication can't write
#to program files by default (without UAC turned off), similar with osx/linux packages.
#When set to false (default value for zip package), it will use application root directory, this is usable to create self-sustainable
#Factorio directory that can be copied anywhere needed (on usb etc), also for people, who don't like to manipulate saves
#in the windows users directory structure (as me, kovarex).
#Note, that once the values in config are generated, this value has no effects (unless you delete config, or the path.read-data/path.write-data values)
use-system-read-write-data-directories=false
Config.ini contains

Code: Select all

[path]
read-data=__PATH__executable__\..\..\data
write-data=__PATH__executable__\..\..

juliejayne
Inserter
Inserter
Posts: 41
Joined: Sat Apr 01, 2017 1:52 pm
Contact:

Re: [Solved] Can't change the data directory.

Post by juliejayne »

Thanks, that was it...... set the directory to C:\Factorio.... and it works.

AndyMissed
Burner Inserter
Burner Inserter
Posts: 12
Joined: Thu Feb 08, 2018 7:16 am
Contact:

Re: [Solved] Can't change the data directory.

Post by AndyMissed »

juliejayne wrote:Thanks, that was it...... set the directory to C:\Factorio.... and it works.
Glad you got that figured out. A bit of a necro, I was surprised anyone was replying to this thread 3 months later. Regardless, the community helped you out, and I like that.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: [Solved] Can't change the data directory.

Post by darkfrei »

Make it portable:

Factorio/config-path.cfg must be:

Code: Select all

config-path=__PATH__executable__/../../config

#This value specifies the way the aplication generates default values for path.read-data and path.write-data
#When set to true, it will use system directories (Users/Name/AppData/Roaming/Factorio on windows), this is set to true
#for the installer versions of Factorio, as people will usualy install it in program files, and the aplication can't write
#to program files by default (without UAC turned off), similar with osx/linux packages.
#When set to false (default value for zip package), it will use application root directory, this is usable to create self-sustainable
#Factorio directory that can be copied anywhere needed (on usb etc), also for people, who don't like to manipulate saves
#in the windows users directory structure (as me, kovarex).
#Note, that once the values in config are generated, this value has no effects (unless you delete config, or the path.read-data/path.write-data values)
use-system-read-write-data-directories=false
Factorio/config/config.ini must have:

Code: Select all

[path]
read-data=__PATH__executable__\..\..\data
write-data=__PATH__executable__\..\..
It would be nice to have this information in the wiki.

Post Reply

Return to “Technical Help”