In other languages: Deutsch Polski Русский Türkçe 简体中文

Application directory: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
No edit summary
(category main instead of technical, since this page has several translations)
 
(33 intermediate revisions by 14 users not shown)
Line 1: Line 1:
{{Languages}}
{{Languages}}
The application directory stores
== Overview ==
* the saves (every save is a zip-file)
Depending on your installation method and OS, you will have one or two directories that contain Factorio assets, and one that contains user data, such as saves and mods.
* the [[Mods]]
* scenarios
* configuration
* [[Log File]] (since v0.10.0).


The directory structure is self-explaining.
== User data directory ==
The user data directory is where personal files are stored:
* Save files <code>./saves</code>
* Mods <code>./mods</code>
* Script-output, e.g. from /screenshot <code>./script-output</code>
* Local [[scenario system|scenarios]] <code>./scenarios</code>
* Local settings <code>./config/config.ini</code>
* [[log file]]s <code>factorio-*.log</code>
* Crash dump files <code>factorio-dump-*.dmp</code>


You can delete for example the configuration-file; it will be generated new with the defaults.
=== Locations ===
Search your computer for the directory location, or type the path into your file manager address bar.


It is recommended to create backups from this directory, before you install a new version.
Windows:


== Windows ==
%appdata%\Factorio
=== Installation by Zip-package ===
Application directory is the same as the unpacked factorio directory.


For example, if you unpacked the zip to
:The <code>%appdata%</code> shorthand translates to your local version of <code>C:\Users\[user name]\AppData\Roaming</code>
C:\Factorio
Then your saves can be found in
C:\Factorio\saves
and mods in
C:\Factorio\mods


=== Installation via Installer ===
MacOSX:
The installation package will extract based on UAC (User Access Control) standards. In other words, the factorio directory will be wherever you installed it (Program files by default) and the user data folders (saves, player data etc) can be found in
C:\Users\<username>\AppData\Roaming\Factorio
For computers running Windows Vista or newer (with UAC active):
%appdata%\factorio


== MacOSx ==
~/Library/Application Support/factorio
The application should be by default installed in the Apps-folder.
 
Linux distributions:
 
~/.factorio


Whereas the data is stored under
When using Steam on Windows, the config.ini, achievements.dat, modded-achievements.dat and player-data.json can also be found in
/users/<replace with your username>/Library/Application Support/factorio


Which is equivalent to
  C:\Program Files (x86)\Steam\userdata\[user number]\427520\remote
  ~/Library/Application Support/factorio
 
You can type in this into the Finder (press SHIFT-COMMAND-G for goto folder) and put in exactly this line.'
== Application directory ==
Or you can use in Finder the 'Find a folder' and write '~/Library/Application Support' (See [http://www.factorioforums.com/forum/viewtopic.php?f=49&t=9345 Can't find Mods folder]).
The application directory stores three things:
* Factorio executables <code>./bin</code>
* Data for vanilla Factorio <code>./data</code>
* API documentation <code>./doc-html</code>
 
=== Locations ===


The factorio internal application-data can be found (when you have installed it) in
Windows:


  /Applications/factorio.app/Contents/data
  C:\Program Files (x86)\Steam\steamapps\common\Factorio
C:\Program Files\Factorio


Same directory structure as in Application support.
MacOSX:


== Linux ==
~/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents
Data is stored under
  /Applications/factorio.app/Contents
  __Game_Install_Directory__


==Changing the application directory==
Linux:


You can create a file <code>config-path.config</code> to configure Factorio to any directory.
~/.factorio


'''[http://www.factorioforums.com/forum/viewtopic.php?f=49&t=12819&p=87281#p87281 Please see this discussion]''' (for MacOS, but should work on any other OS).
== Changing the user data directory ==


'''Windows''': there is also the [[Install_guide#Installer_or_Zip-Package|ZIP-Package]], that can be installed in any directory.
You can create a file <code>config-path.cfg</code> to configure Factorio to any directory.


In order to change the user data directory, user must edit the location of the "write-data" entry in the file <code>(Game install directory)/config/config.ini</code>. This affects the location of mods, scenario and temp.


=== The following discussion applies to version 0.11.13. ===
==== macOS ====
Create <code>factorio.app/config-path.cfg</code> with the following contents:


It is possible to change the application directory location for Factorio.
config-path=__PATH__executable__/../config
use-system-read-write-data-directories=false


This can be done by editing the location of the "write-data" entry in the file <code>__Game_Install_directory/config/config.ini</code>. This affects the location of mods, scenario and temp.
Update <code>factorio.app/Contents/config/config.ini</code>
[path]
read-data=__PATH__executable__/../data
write-data=__PATH__executable__/..  


If you want to move only the location of your save files you can '''[[Application_Directory/Changing_the_save_directory|change the the save directory using symlinks]]''' but this still means that all users of the computer will share the same data, including settings.
'''[http://www.factorioforums.com/forum/viewtopic.php?f=49&t=12819&p=87281#p87281 Please see this discussion]''' (for older versions of macOS, but may work on any other OS).


===Linux===
==== Linux ====
Update <code>__Game_Install_directory/config-path.cfg</code>  
Update <code>__Game_Install_directory/config-path.cfg</code>  


Line 84: Line 92:


Note that if someone changes any options, in-game, those option changes will apply to everyone who plays on the same computer.
Note that if someone changes any options, in-game, those option changes will apply to everyone who plays on the same computer.
== Installation from Zip File ==
The unzipped Factorio directory.
A list of all things found here:
* Save games (as zip files)
* User-installed/created [[Mods]].
* User-installed/created scenarios.
* User configuration and settings storage
* [[Log file]] (factorio-*.log)
* Player data (player-data.json)
Note: Deleting the configuration file will result in a default replacement being generated upon the next Factorio launch.
It is recommended to create backups from this directory (of saves, config, etc) before installing a new version.


== See also ==
== See also ==
 
* [[Install guide]]
* [[Download and Installation]]
* [[Install Guide]]
* [[Mods]]
* [[Installing Mods]]
* [[Installing Mods]]
* [http://www.factorioforums.com/forum/viewtopic.php?f=34&t=3389 Forum discussion]
* [http://www.factorioforums.com/forum/viewtopic.php?f=5&t=8294 Linux Version - Save games in $HOME somewhere]
* [http://www.factorioforums.com/forum/viewtopic.php?f=5&t=8294 Linux Version - Save games in $HOME somewhere]
{{C|Main}}

Latest revision as of 09:01, 12 November 2023

Overview

Depending on your installation method and OS, you will have one or two directories that contain Factorio assets, and one that contains user data, such as saves and mods.

User data directory

The user data directory is where personal files are stored:

  • Save files ./saves
  • Mods ./mods
  • Script-output, e.g. from /screenshot ./script-output
  • Local scenarios ./scenarios
  • Local settings ./config/config.ini
  • log files factorio-*.log
  • Crash dump files factorio-dump-*.dmp

Locations

Search your computer for the directory location, or type the path into your file manager address bar.

Windows:

%appdata%\Factorio
The %appdata% shorthand translates to your local version of C:\Users\[user name]\AppData\Roaming

MacOSX:

~/Library/Application Support/factorio

Linux distributions:

~/.factorio

When using Steam on Windows, the config.ini, achievements.dat, modded-achievements.dat and player-data.json can also be found in

C:\Program Files (x86)\Steam\userdata\[user number]\427520\remote

Application directory

The application directory stores three things:

  • Factorio executables ./bin
  • Data for vanilla Factorio ./data
  • API documentation ./doc-html

Locations

Windows:

C:\Program Files (x86)\Steam\steamapps\common\Factorio
C:\Program Files\Factorio

MacOSX:

~/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents
/Applications/factorio.app/Contents

Linux:

~/.factorio

Changing the user data directory

You can create a file config-path.cfg to configure Factorio to any directory.

In order to change the user data directory, user must edit the location of the "write-data" entry in the file (Game install directory)/config/config.ini. This affects the location of mods, scenario and temp.

macOS

Create factorio.app/config-path.cfg with the following contents:

config-path=__PATH__executable__/../config
use-system-read-write-data-directories=false

Update factorio.app/Contents/config/config.ini

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

Please see this discussion (for older versions of macOS, but may work on any other OS).

Linux

Update __Game_Install_directory/config-path.cfg

use-system-read-write-data-directories=true

Update __Game_Install_directory/config/config.ini

[path]
read-data=__PATH__executable__/../../data
write-data=.local/share/factorio

You could set the write-data value to .factorio if you prefer.

Once you have done this, you can remove write permissions to the entire game installation directory except for config/config.ini, which must be writable by all people who wish to play the game.

Note that if someone changes any options, in-game, those option changes will apply to everyone who plays on the same computer.

Installation from Zip File

The unzipped Factorio directory.

A list of all things found here:

  • Save games (as zip files)
  • User-installed/created Mods.
  • User-installed/created scenarios.
  • User configuration and settings storage
  • Log file (factorio-*.log)
  • Player data (player-data.json)

Note: Deleting the configuration file will result in a default replacement being generated upon the next Factorio launch.

It is recommended to create backups from this directory (of saves, config, etc) before installing a new version.

See also