切换语言: Deutsch English Polski Русский Türkçe

Application directory/zh: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(Created page with "{{Languages}} == Overview == Depending on your installation method and OS, you will have one or two directories that contain Factorio assets. == Application directory == T...")
 
(Update New Page)
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Languages}}
{{Languages}}


== Overview ==  
== 概述 ==  


Depending on your installation method and OS, you will have one or two directories that contain Factorio assets.
根据你安装游戏的安装方式和所使用的操作系统不同,可能会有一个或两个文件夹内存储有异星工厂的游戏文件。


== Application directory ==
== 用户数据目录 ==
The application directory stores three things:
用户数据目录是存放用户个人文件的目录,例如游戏存档,Mod,日志,崩溃转储文件等。你可以在文件管理器中搜索下列目录,或者直接输入到地址栏内:
* Factorio executables (./bin)
* Data for vanilla Factorio (./data)
* API documentation


== User Data directory ==
=== Locations ===  
The save directory is where user-personal files are stored, such as world saves. A list of all things found here:


* Save games (as zip files)
Windows:
* 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.
%appdata%\Factorio


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


== Directory locations by OS and installation method ==
~/Library/Application Support/factorio
=== Windows ===
==== Installation via [http://steampowered.com Steam] ====
Application directory:
C:\Program Files (x86)\Steam\steamapps\common\Factorio


User data directory:
Linux:
%appdata%\factorio


==== Installation by Zip-package ====
~/.factorio
Application directory and User data directory will be the location to which Factorio was unpacked.


:For example, if you unpacked the zip to:
在 Windows 上使用 Steam 时, config.ini, achievements.dat, modded-achievements.dat 和 player-data.json 可以在下方地址找到
C:\Factorio
:Then your saves can be found in:
C:\Factorio\saves
:and mods in:
C:\Factorio\mods


==== Installation via native Installer ====
  C:\Program Files (x86)\Steam\userdata\[user number]\427520\remote
Application directory:
  C:\Users\<username>\AppData\Roaming\Factorio
User data directory:
%appdata%\factorio


=== Mac OSX ===
== 应用程序文件夹 ==
应用程序文件夹存储下列三种文件:
* Factorio 可执行文件 (./bin)
* Factorio 资源文件 (./data)
* API 文档 (./doc-html)


==== Installation via Steam ====
位置:  
Application directory:


<code>/Users/<replace with your username>/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents/</code>
Windows:


==== Installation via Installer ====
C:\Program Files (x86)\Steam\steamapps\common\Factorio
The application should be by default installed in the Apps-folder.
C:\Program Files\Factorio


Whereas the data is stored under
MacOSX:
/users/<replace with your username>/Library/Application Support/factorio


Which is equivalent to
  ~/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents
  ~/Library/Application Support/factorio
/Applications/factorio.app/Contents
You can type in this into the Finder (press SHIFT-COMMAND-G for goto folder) and put in exactly this line.'
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 factorio internal application-data can be found (when you have installed it) in
Linux:


  /Applications/factorio.app/Contents/data
  ~/.factorio


Same directory structure as in Application support.
== 更改用户数据目录 ==


=== Linux ===
你可以创建文件 <code>config-path.cfg</code> 去配置 Factorio 到任意文件夹。


Data is stored under <code>~/.factorio</code>.
'''[http://www.factorioforums.com/forum/viewtopic.php?f=49&t=12819&p=87281#p87281 请看这个讨论]''' (适用于MacOS,但应适用于任何其他操作系统).


==== Installation via Steam ====
为了更改用户数据目录, 你必须编辑文件中 "write-data" 的位置 <code>(游戏安装目录)/config/config.ini</code>. 这会影响Mods,剧情和缓存文件. 如果你只是想更改存档位置你可以 '''[[Application_Directory/Changing_the_save_directory|使用 symlinks 更改保存目录]]''' 但是这意味着当前计算机上所有用户共享同一份数据文件,包括设置文件。
Data is stored under <code>~/.factorio</code>.


====Changing the application directory====
====Linux====
更改 <code>游戏安装目录/config-path.cfg</code>


You can create a file <code>config-path.config</code> to configure Factorio to any directory.
use-system-read-write-data-directories=true


'''[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).
更新 <code>游戏安装目录/config/config.ini</code>


In order to change the application 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.
[path]
read-data=__PATH__executable__/../../data
write-data=.local/share/factorio
 
如果你愿意,你可以设置 <code>write-data</code> 的值为 '''<code>.factorio</code>''' 。


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.
完成这个操作后,你可以设置 '''除了''' <code>config/config.ini</code>, 文件以外的文件设置成只读,如果想要正常的游戏 <code>config/config.ini</code> 文件 '''必须''' 是要可写的。


====Linux====
注意:如果某个用户在游戏中改变了设置,这会影响到所有在同一台计算机上玩游戏的用户。
Update <code>__Game_Install_directory/config-path.cfg</code>


use-system-read-write-data-directories=true
== 通过 Zip 文件安装 ==


Update <code>__Game_Install_directory/config/config.ini</code>
解压 Factorio 文件夹.


[path]
所有文件的列表如下:
read-data=__PATH__executable__/../../data
write-data=.local/share/factorio


You could set the <code>write-data</code> value to '''<code>.factorio</code>''' if you prefer.
* 游戏存档 (作为 zip 文件)
* 用户安装/创建的 [[Mods]].
* 用户安装/创建的剧情.
* 用户的设置
* [[Log file|日志文件]] (factorio-*.log)
* 玩家数据 (player-data.json)


Once you have done this, you can remove write permissions to the entire game installation directory '''except''' for <code>config/config.ini</code>, which '''must''' be writable by all people who wish to play the game.
注意: 删除配置文件会导致下一次 Factorio 启动时自动生成默认配置。


Note that if someone changes any options, in-game, those option changes will apply to everyone who plays on the same computer.
建议在安装新版本时备份存档以及配置文件


== See also ==
== 参见 ==
* [[Download and Installation]]
* [[Download and Installation/zh|下载和安装]]
* [[Install Guide]]
* [[Install Guide/zh|安装向导]]
* [[Mods]]
* [[Modding/zh|模组]]
* [[Installing Mods]]
* [[Installing Mods/zh|安装模组]]
* [http://www.factorioforums.com/forum/viewtopic.php?f=34&t=3389 Forum discussion]
* [http://www.factorioforums.com/forum/viewtopic.php?f=34&t=3389 论坛的讨论]
* [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 - $HOME 下的任意地方保存游戏存档]

Latest revision as of 12:28, 14 March 2019


概述

根据你安装游戏的安装方式和所使用的操作系统不同,可能会有一个或两个文件夹内存储有异星工厂的游戏文件。

用户数据目录

用户数据目录是存放用户个人文件的目录,例如游戏存档,Mod,日志,崩溃转储文件等。你可以在文件管理器中搜索下列目录,或者直接输入到地址栏内:

Locations

Windows:

%appdata%\Factorio

MacOSX:

~/Library/Application Support/factorio

Linux:

~/.factorio

在 Windows 上使用 Steam 时, config.ini, achievements.dat, modded-achievements.dat 和 player-data.json 可以在下方地址找到

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

应用程序文件夹

应用程序文件夹存储下列三种文件:

  • Factorio 可执行文件 (./bin)
  • Factorio 资源文件 (./data)
  • API 文档 (./doc-html)

位置:

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

更改用户数据目录

你可以创建文件 config-path.cfg 去配置 Factorio 到任意文件夹。

请看这个讨论 (适用于MacOS,但应适用于任何其他操作系统).

为了更改用户数据目录, 你必须编辑文件中 "write-data" 的位置 (游戏安装目录)/config/config.ini. 这会影响Mods,剧情和缓存文件. 如果你只是想更改存档位置你可以 使用 symlinks 更改保存目录 但是这意味着当前计算机上所有用户共享同一份数据文件,包括设置文件。

Linux

更改 游戏安装目录/config-path.cfg

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

更新 游戏安装目录/config/config.ini

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

如果你愿意,你可以设置 write-data 的值为 .factorio

完成这个操作后,你可以设置 除了 config/config.ini, 文件以外的文件设置成只读,如果想要正常的游戏 config/config.ini 文件 必须 是要可写的。

注意:如果某个用户在游戏中改变了设置,这会影响到所有在同一台计算机上玩游戏的用户。

通过 Zip 文件安装

解压 Factorio 文件夹.

所有文件的列表如下:

  • 游戏存档 (作为 zip 文件)
  • 用户安装/创建的 Mods.
  • 用户安装/创建的剧情.
  • 用户的设置
  • 日志文件 (factorio-*.log)
  • 玩家数据 (player-data.json)

注意: 删除配置文件会导致下一次 Factorio 启动时自动生成默认配置。

建议在安装新版本时备份存档以及配置文件

参见