切换语言: Deutsch English Polska Русский Turkish

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...")
 
No edit summary
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:
应用目录下存放有如下三种类型的文件:
* Factorio executables (./bin)
* 异星工厂的可执行文件 (./bin)
* Data for vanilla Factorio (./data)
* 异星工厂的资源文件 (./data)
* API documentation
* API 文档


== User Data directory ==
== 用户数据目录 ==
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)
* 游戏存档(zip 文件)
* User-installed/created [[Mods]].
* 用户安装或创建的[[Mods/zh|模组]]* 用户安装或创建的剧本。* 用户配置文件和设置文件
* User-installed/created scenarios.
* [[Log File/zh|记录文件]] (factorio-*.log)
* User configuration and settings storage
* 玩家数据 (player-data.json)
* [[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, or installing mods.
建议在安装新版本或新[[Mods/zh|模组]]之前,对这些目录和文件(存档,设置等)进行备份。


== Directory locations by OS and installation method ==
== 依赖于操作系统和安装方法的目录 ==
=== Windows ===
=== Windows ===
==== Installation via [http://steampowered.com Steam] ====
==== 通过[http://steampowered.com Steam]下载安装 ====
Application directory:
应用目录:
  C:\Program Files (x86)\Steam\steamapps\common\Factorio
  C:\Program Files (x86)\Steam\steamapps\common\Factorio


User data directory:
用户数据目录
  %appdata%\factorio
  %appdata%\factorio


==== Installation by Zip-package ====
==== 通过解压缩Zip文件安装 ====
Application directory and User data directory will be the location to which Factorio was unpacked.
应用目录和用户数据目录会在你解压缩的目录下。


:For example, if you unpacked the zip to:
:假如你解压缩zip文件到:
  C:\Factorio
  C:\Factorio
:Then your saves can be found in:
:则你的存档目录会在
  C:\Factorio\saves
  C:\Factorio\saves
:and mods in:
:[[Mods/zh|模组]]目录会在
  C:\Factorio\mods
  C:\Factorio\mods


==== Installation via native Installer ====
==== 通过安装程序安装 ====
Application directory:
应用目录:
  C:\Users\<username>\AppData\Roaming\Factorio
  C:\Users\<username>\AppData\Roaming\Factorio
User data directory:
用户数据目录
  %appdata%\factorio
  %appdata%\factorio


=== Mac OSX ===
=== Mac OSX ===


==== Installation via Steam ====
==== 通过[http://steampowered.com Steam]下载安装 ====
Application directory:
用户目录:


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


==== Installation via Installer ====
==== 通过安装文件安装 ====
The application should be by default installed in the Apps-folder.
应用应该默认安装在Apps-folder。


Whereas the data is stored under
用户数据则存放在
  /users/<replace with your username>/Library/Application Support/factorio
  /users/<replace with your username>/Library/Application Support/factorio


Which is equivalent to
这相当于
  ~/Library/Application Support/factorio
  ~/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.'
你可以将这个地址输入 Finder (SHIFT-COMMAND-G 来打开文件夹) 。或者使用 Finder 'Find a folder' 功能,输入 '~/Library/Application Support' (参见 [http://www.factorioforums.com/forum/viewtopic.php?f=49&t=9345 找不到Mods文件夹])
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
异星工厂的内部应用数据存储在你安装目录下的


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


Same directory structure as in Application support.
Application support.目录下也是一样的结构。


=== Linux ===
=== Linux ===


Data is stored under <code>~/.factorio</code>.
用户数据存放在 <code>~/.factorio</code>


==== Installation via Steam ====
==== 通过[http://steampowered.com Steam]下载安装 ====
Data is stored under <code>~/.factorio</code>.
用户数据存放在<code>~/.factorio</code>


====Changing the application directory====
====更改应用目录====


You can create a file <code>config-path.config</code> to configure Factorio to any directory.
你可以创建文件 <code>config-path.config</code> 来配置存放于任意目录下的异星工厂文件。


'''[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).
'''[http://www.factorioforums.com/forum/viewtopic.php?f=49&t=12819&p=87281#p87281 请参见讨论]''' (虽然这是MacOS下的,但是也应该在其他OS下生效)


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.
为了改变应用目录,用户必须编辑<code>__Game_Install_directory/config/config.ini</code>文件中"write-data"字段。这会作用于Mods文件,剧情文件和临时文件。


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.
如果你只是想更改存档文件,那么你可以 '''[[Application_Directory/Changing_the_save_directory/zh|使用 symlinks 更改存档目录]]''' ,但是这依旧意味着当前计算机上所有用户共享同一份数据文件,包括设置文件。


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


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


Update <code>__Game_Install_directory/config/config.ini</code>
更新 <code>__Game_Install_directory/config/config.ini</code>


  [path]
  [path]
Line 102: Line 99:
  write-data=.local/share/factorio
  write-data=.local/share/factorio


You could set the <code>write-data</code> value to '''<code>.factorio</code>''' if you prefer.
如果你愿意,你可以将<code>write-data</code> 字段的值改为为 '''<code>.factorio</code>'''


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.
当你这样做时,你可以移除整个游戏安装目录的写权限,'''除了''' <code>config/config.ini</code>文件,此文件 '''必须''' 为想玩游戏的用户设置为可写的。


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]]
* [[Mods/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 下的任意地方保存游戏存档]

Revision as of 11:04, 31 August 2016


概述

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

应用目录

应用目录下存放有如下三种类型的文件:

  • 异星工厂的可执行文件 (./bin)
  • 异星工厂的资源文件 (./data)
  • API 文档

用户数据目录

用户存档目录是存放用户个人文件的目录,例如世界的存档。你可以在其中找到下边列表中说明的文件:

  • 游戏存档(zip 文件)
  • 用户安装或创建的模组。* 用户安装或创建的剧本。* 用户配置文件和设置文件
  • 记录文件 (factorio-*.log)
  • 玩家数据 (player-data.json)

注意:删除配置文件后,会在下一次启动异星工厂时自动创建默认的配置文件。

建议在安装新版本或新模组之前,对这些目录和文件(存档,设置等)进行备份。

依赖于操作系统和安装方法的目录

Windows

通过Steam下载安装

应用目录:

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

用户数据目录

%appdata%\factorio

通过解压缩Zip文件安装

应用目录和用户数据目录会在你解压缩的目录下。

假如你解压缩zip文件到:
C:\Factorio
则你的存档目录会在
C:\Factorio\saves
模组目录会在
C:\Factorio\mods

通过安装程序安装

应用目录:

C:\Users\<username>\AppData\Roaming\Factorio

用户数据目录

%appdata%\factorio

Mac OSX

通过Steam下载安装

用户目录:

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

通过安装文件安装

应用应该默认安装在Apps-folder。

用户数据则存放在

/users/<replace with your username>/Library/Application Support/factorio

这相当于

~/Library/Application Support/factorio

你可以将这个地址输入 Finder (按 SHIFT-COMMAND-G 来打开文件夹) 。或者使用 Finder 的 'Find a folder' 功能,输入 '~/Library/Application Support' (参见 找不到Mods文件夹)。

异星工厂的内部应用数据存储在你安装目录下的

/Applications/factorio.app/Contents/data

Application support.目录下也是一样的结构。

Linux

用户数据存放在 ~/.factorio

通过Steam下载安装

用户数据存放在~/.factorio

更改应用目录

你可以创建文件 config-path.config 来配置存放于任意目录下的异星工厂文件。

请参见讨论 (虽然这是MacOS下的,但是也应该在其他OS下生效)。

为了改变应用目录,用户必须编辑__Game_Install_directory/config/config.ini文件中"write-data"字段。这会作用于Mods文件,剧情文件和临时文件。

如果你只是想更改存档文件,那么你可以 使用 symlinks 更改存档目录 ,但是这依旧意味着当前计算机上所有用户共享同一份数据文件,包括设置文件。

Linux

更新 __Game_Install_directory/config-path.cfg

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

更新 __Game_Install_directory/config/config.ini

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

如果你愿意,你可以将write-data 字段的值改为为 .factorio

当你这样做时,你可以移除整个游戏安装目录的写权限,除了 config/config.ini文件,此文件 必须 为想玩游戏的用户设置为可写的。

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

参见