<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.factorio.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Thrimbda</id>
	<title>Official Factorio Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.factorio.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Thrimbda"/>
	<link rel="alternate" type="text/html" href="https://wiki.factorio.com/Special:Contributions/Thrimbda"/>
	<updated>2026-08-21T06:59:22Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Multiplayer/zh&amp;diff=191075</id>
		<title>Multiplayer/zh</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Multiplayer/zh&amp;diff=191075"/>
		<updated>2023-03-12T07:19:15Z</updated>

		<summary type="html">&lt;p&gt;Thrimbda: /* 更多指南 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}{{Stub/zh}}&lt;br /&gt;
&lt;br /&gt;
除了单人游戏之外，Factorio还支持多人游戏，允许许多玩家合作并互相帮助，或者在PVP中相互对抗。本页面介绍如何设置多人游戏以及如何加入。默认情况下，多人游戏运行合作[[Game modes and options/zh|自由模式]]，所有玩家一起工作，发射一颗卫星进入太空的火箭。其他场景，包括PvP地图，可以从[https://forums.factorio.com/viewforum.php?f=36&amp;amp;sid=93d1fbe9336d31d6bac60847b6c97985 地图和场景论坛]下载。&lt;br /&gt;
&lt;br /&gt;
== 设置多人游戏 ==&lt;br /&gt;
&lt;br /&gt;
玩家可以加入多人游戏，或以本机为主机建立多人游戏，亦或由专用服务器托管。建立好的多人游戏可以被同一局域网玩家或全球其他玩家找到并加入。&lt;br /&gt;
&lt;br /&gt;
使用&#039;&#039;开始游戏&#039;&#039;菜单中的&#039;&#039;多人游戏&#039;&#039;按钮开始多人游戏，选择&#039;&#039;新游戏&#039;&#039;或&#039;&#039;载入游戏&#039;&#039;或&#039;&#039;游戏场景&#039;&#039;建立主机并开始游戏，或者选择&#039;&#039;局域网游戏&#039;&#039;或&#039;&#039;互联网游戏&#039;&#039;以连接到已经其他人的的游戏中。主机也可以选择不在服务器列表中显示建立的游戏，在这种情况下，您需要服务器的（公共或其他方式）IP地址;然后你可以选择&#039;&#039;连接服务器&#039;&#039;以加入游戏。&lt;br /&gt;
&lt;br /&gt;
注意与提示：&lt;br /&gt;
&lt;br /&gt;
* 所有玩家的游戏版本和安装的mod必须完全一致。&lt;br /&gt;
* 游戏使用端口&#039;&#039;&#039;34197&#039;&#039;&#039;。端口可以在[[Application directory|设置]]中更改。&lt;br /&gt;
* 游戏仅支持 &#039;&#039;&#039;UDP&#039;&#039;&#039;协议。请确保你的路由器有正确的设置。(游戏拥有自己的“可靠通信层”建立在UDP之上来解决丢包问题。)&lt;br /&gt;
** 请确保没有防火墙或杀毒软件阻止了UDP数据包。&lt;br /&gt;
* 同时联机人数的理论上限是[http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6481&amp;amp;p=50661#p50586 65535]，然而，实际的限制要低得多。&lt;br /&gt;
&lt;br /&gt;
===专用/Headless服务器===&lt;br /&gt;
&lt;br /&gt;
从Factorio版本0.12.0开始，可以使用--start-server命令行选项启动专用（或Headless）服务器。您可以运行factorio --help来获取Factorio接受的所有命令行参数的列表。&lt;br /&gt;
&lt;br /&gt;
在Headless模式下：&lt;br /&gt;
&lt;br /&gt;
* 图形界面未初始化。（启动速度更快，内存使用量更少，适用于Headless服务器）&lt;br /&gt;
* 在键入命令后，游戏立即开始，并按照给出的参数（存档名）加载存档。&lt;br /&gt;
* 服务器在游戏中没有角色。&lt;br /&gt;
* 在没有玩家连接的情况下，游戏会暂停。（尽管可以使用server-settings.json中的no-auto-pause选项覆盖此选项）&lt;br /&gt;
* 退出时保存游戏。（并正常执行自动保存）&lt;br /&gt;
&lt;br /&gt;
从0.13开始，--start-server命令后需要加上存档文件的路径。&lt;br /&gt;
&lt;br /&gt;
您需要在启动服务器之前创建保存文件，因为专用服务器需要提供保存文件。这可以使用--create命令行参数轻松完成。例如：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/x64/factorio --create ./saves/my-save.zip       # 这将建立一个新存档，就像在游戏中点击新游戏那样&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/x64/factorio --start-server ./saves/my-save.zip # 这将启动游戏服务端，并且会使用上一行中创建的存档&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
有几个JSON配置文件可供factorio用来更改服务器和地图设置：&lt;br /&gt;
&lt;br /&gt;
* 在map-gen-settings中设置地图生成器使用的参数，例如宽度和高度，矿块的频率和大小等。（在0.13中添加）&lt;br /&gt;
* 编辑map-settings来控制污染扩散，扩散和演变等等。（0.15版本中增加）&lt;br /&gt;
* server-setting将多个命令行选项合并到单个文件中（在0.14.12中添加）&lt;br /&gt;
&lt;br /&gt;
data子目录中包含每个参数的示例文件。&lt;br /&gt;
&lt;br /&gt;
创建新地图时，必须将--map-gen-settings和--map-settings选项与--create选项一起使用。例如：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/x64/factorio --create saves/my-save.zip --map-gen-settings my-map-gen-settings.json --map-settings my-map-settings.json&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
启动factorio服务器需要您指定server-settings.json文件的位置。默认情况下，这是在factorio数据文件夹中。例如，要使用最新保存的地图启动factorio，您可以运行：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/x64/factorio --start-server-load-latest --server-settings ./data/server-settings.json&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
要在同一台计算机上启动服务器和客户端，需要使用以下启动选项启动客户端：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--no-log-rotation&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===设置Linux Factorio服务器===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;注意&#039;&#039;&#039;：Factorio现在需要glibc 2.18版本，但CentOS / RHEL 7仅附带2.17版本，因此如果不[https://forums.factorio.com/viewtopic.php?t=54654#p324493 手动编译glibc 2.18]，本指南将不再起作用。&lt;br /&gt;
&lt;br /&gt;
本分步指南已在新安装的CentOS 7和RHEL 7环境下进行了验证，同时在大多数发行版中几乎不用做任何更改。&lt;br /&gt;
&lt;br /&gt;
本指南假设您将在/ opt / factorio下安装Headless服务器，请根据您自己的设置调整路径。我们还建议您将Factorio服务器在单独的用户中运行，以加强安全性。&lt;br /&gt;
&lt;br /&gt;
请注意，Linux有两种不同的软件包可用于运行Headless服务器。首先是普通的Linux下载，其中包含完整的游戏。另一种是特殊的[https://www.factorio.com/download-headless/stable Headless]包。Headless包不包含与纯服务器无关的任何文件，如图形和声音。它也不与服务器机器上不存在的库链接，如Xlib，libGL或libasound。如果在第三方托管服务器中运行，应选择此选项。&lt;br /&gt;
&lt;br /&gt;
本指南不处理防火墙/端口转发，因为这可以在Linux中以各种方式完成（请务必在您的特定发行版上以Linux管理员的身份了解这些内容）&lt;br /&gt;
&lt;br /&gt;
您可以使用[https://github.com/Bisa/factorio-init Linux factorio-init脚本]以更好的方式启动/停止无头服务器。该脚本将确保您只能在服务器启动时使用最新的存档（即使这是自动保存），同时还可以设置许多其他设置项，例如自动保存频率和延迟设置。此脚本还将简化与[https://github.com/narc0tiq/factorio-updater Linux factorio-updater脚本]结合使用时更新服务器的流程。&lt;br /&gt;
&lt;br /&gt;
* 下载所选软件包 - 完整游戏或是无头包 - 并将Linux tar.gz或tar.xz软件包上传到您的服务器的/tmp目录下&lt;br /&gt;
* 将/tmp中的软件包解压到/opt/factorio中&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$cd /opt/&lt;br /&gt;
&lt;br /&gt;
$sudo tar -xzf /tmp/factorio.tar.gz # 请使用正确的文件名称。它包含factorio版本号&lt;br /&gt;
$sudo tar -xJf /tmp/factorio.tar.xz # 如果您下载了.tar.xz文件请使用这条命令（版本0.15.x）&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 将一个新用户添加到您的系统中，并为其分配factorio目录的所有权（请不要以root用户身份运行，可能需要sudo）&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$useradd factorio&lt;br /&gt;
$chown -R factorio:factorio /opt/factorio&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 尝试运行服务端二进制可执行文件&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$su factorio&lt;br /&gt;
$/opt/factorio/bin/x64/factorio --start-server savename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
如果失败并提示它无法找到或打开你设置的savename.zip，这时只需从自己的计算机上传一个保存，并将其保存在/opt/factorio/saves目录中，或者使用--create ./saves/newgame.zip创建一个存档。&lt;br /&gt;
&lt;br /&gt;
===如何在匹配服务器中列出服务器托管的游戏===&lt;br /&gt;
&lt;br /&gt;
为了将游戏发布到匹配服务器，需要给Factorio一些额外的信息，而不仅仅是保存文件的位置。这些信息在&#039;&#039;服务器设置文件&#039;&#039;中提供。&lt;br /&gt;
&lt;br /&gt;
要创建服务器设置文件，请查看Factorio [[Application_directory|Application目录]]中data/server-settings.example.json中的示例文件。推荐的方法是制作此示例文件的副本并编辑副本。&lt;br /&gt;
&lt;br /&gt;
以下值可以更改：&lt;br /&gt;
&lt;br /&gt;
; Name: 这将是服务器在服务器列表中显示的名称&lt;br /&gt;
; Description: 服务器的简要说明&lt;br /&gt;
; Tags: 游戏标签列表&lt;br /&gt;
; Max Players: 允许您限制可以同时连接到服务器的玩家数量。如果你不想要限制，只需将max_players设置为0即可。&lt;br /&gt;
&lt;br /&gt;
* 服务器浏览器的可见性：可以是公共的，局域网可见的或隐藏的。&lt;br /&gt;
** 公开：服务器将出现在公共服务器列表中。这需要在下方填写登录凭据。&lt;br /&gt;
** 局域网：服务器不会出现在公共服务器列表中，但可通过“局域网游戏”按钮使用&lt;br /&gt;
** 隐藏：客户端必须使用服务器的IP地址进行连接&lt;br /&gt;
* 使用用户名和密码或验证令牌的用户凭证（可在factorio网站或player-data.json中找到）：如果您希望公开服务器，则这些是必需的。否则可以留空。&lt;br /&gt;
** 出于安全原因，建议使用身份验证令牌，因为此文档以纯文本形式存储。应该指出，身份验证令牌也是敏感信息，因此建议您保密。&lt;br /&gt;
* 服务器密码&lt;br /&gt;
** 字段名称是game_password&lt;br /&gt;
* 是否验证用户身份&lt;br /&gt;
&lt;br /&gt;
（factorio的v0.14中还有其他值。）&lt;br /&gt;
&lt;br /&gt;
===技术实施细节===&lt;br /&gt;
&lt;br /&gt;
关于多人游戏的一些技术细节的注意事项由开发团队在几个Friday Facts博客文章中发布：&lt;br /&gt;
&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-76 步调一致架构]&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-99 客户端 - 服务器连接]&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-143 NAT穿透，0.13引入]&lt;br /&gt;
&lt;br /&gt;
===更多指南===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/factoriotools/factorio-docker/blob/master/README_zh_CN.md 使用docker简化部署Factorio服务器（中文）]&lt;br /&gt;
* [https://www.chef.io/blog/2016/03/21/building-a-factorio-multiplayer-server-on-digital-ocean/ 如何用Cookbook设置Factorio服务器]&lt;br /&gt;
* [http://youtube.com/watch?v=MqsqRWNsbPM 如何设置Factorio多人游戏服务器 | 指南 | 教程]&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=53&amp;amp;t=6720 多人联机小技巧]&lt;br /&gt;
&lt;br /&gt;
===杂项===&lt;br /&gt;
&lt;br /&gt;
* [[Console/zh|控制台命令]]的按键也用于多人游戏中的开始聊天。要执行命令而不是聊天，您需要在命令前键入/c。执行的命令对所有玩家都是可见的。此外，多人游戏必须启用了允许命令工作的设置。&lt;br /&gt;
* 使用该命令设置玩家的颜色：&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/c game.players[&amp;quot;player_name&amp;quot;].color = {r=0.7, g=0.5, b=0.1, a=0.9}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
r，g和b分别代表红色，绿色和蓝色（可能的值介于0和1之间，请使用http://prideout.net/archive/colors.php上的最右边一列将颜色转换为rgb数字）。 a是阿尔法通道，也就是透明度。&lt;br /&gt;
&lt;br /&gt;
== 加入多人游戏 ==&lt;br /&gt;
&lt;br /&gt;
从版本0.13开始，端口转发不再是玩家加入多人游戏的唯一选择。现在玩家还可以通过Steam服务彼此加入游戏。&lt;br /&gt;
&lt;br /&gt;
玩家可以通过多种方式来加入一个多人游戏：&lt;br /&gt;
&lt;br /&gt;
* 通过直接输入公共IP和端口加入Factorio。&lt;br /&gt;
* 从活跃的公共服务器菜单中选择服务器加入。&lt;br /&gt;
* 通过Steam服务加入游戏。&lt;br /&gt;
* 通过局域网进行联机游戏。&lt;br /&gt;
&lt;br /&gt;
建议玩家使用语音聊天（TeamSpeak，Discord，Mumble，（译注：或者中国特色语音软件）），因为您需要协调连接，构建，处理攻击等等。TeamSpeak服务器发布在[https://forums.factorio.com/viewforum.php?f=53 多人论坛]中。 Factorio社区的公共Discord频道可以在[https://discord.gg/yGQWgy5 这里]找到。&lt;br /&gt;
&lt;br /&gt;
=== 通过输入IP以及端口加入游戏 ===&lt;br /&gt;
&lt;br /&gt;
要通过IP加入多人游戏，您需要知道有效的服务器公网IP。您可以通过社交媒体，网站或口耳相传来得到这些信息。获得IP和端口后，只需进入开始游戏 -&amp;gt;多人游戏 -&amp;gt;连接服务器，并提供所需的IP以及端口即可加入游戏。&lt;br /&gt;
&lt;br /&gt;
如果服务器设置正确并可以接受公共连接，你应该可以正常加入游戏。&lt;br /&gt;
&lt;br /&gt;
=== 通过服务器列表加入游戏 ===&lt;br /&gt;
&lt;br /&gt;
Factorio的开发者维护了一个包含所有公开服务器的列表，这些服务器向官方服务端声明并认证后，即可允许玩家通过Factorio直接加入。大多数服务器需要密码，但同时也有许多完全公用的服务器可以无密码连接。要通过服务器列表加入，请转到开始游戏 -&amp;gt;多人游戏 -&amp;gt;互联网游戏。如果询问，请提供您的Factorio.com用户名，并显示公共服务器列表。只需选择一个并加入就可以开始游戏啦。&lt;br /&gt;
&lt;br /&gt;
=== 通过Steam服务加入游戏 ===&lt;br /&gt;
&lt;br /&gt;
Steam提供了一个“游戏邀请”系统，只需使用它即可加入别人的游戏。你可以在相关文档中找到更多关于如何使用steam的信息。这是普通玩家与朋友一起进行多人游戏的最（简单）佳方式，因为它允许Steam处理所有事务。&lt;br /&gt;
&lt;br /&gt;
=== 加入一个局域网游戏 ===&lt;br /&gt;
&lt;br /&gt;
如果你在同一个局域网内有一些朋友建立了游戏（在同一个建筑物中），你就可以通过局域网加入。只需转到开始游戏 - &amp;gt;多人游戏 - &amp;gt;局域网游戏即可。&lt;br /&gt;
&lt;br /&gt;
=== 寻找其他玩家 ===&lt;br /&gt;
&lt;br /&gt;
* 使用论坛的[https://forums.factorio.com/viewforum.php?f=53 多人游戏版块]。&lt;br /&gt;
* 许多玩家使用Evolve等其他软件来与其他玩家会面。这也具有在玩家中创建虚拟局域网的“优势”。&lt;br /&gt;
* 有些人还使用[https://forums.factorio.com/viewtopic.php?f=5&amp;amp;t=9136 Steam]来寻找其他玩家。&lt;br /&gt;
* 通过一个带有各种搜索选项的外部[http://serverlist.lgms.nl/ 服务器浏览器]。&lt;br /&gt;
* 告诉你的朋友购买Factorio，然后和他们一起玩！&lt;br /&gt;
&lt;br /&gt;
=== 穿过NAT连接服务器 ===&lt;br /&gt;
&lt;br /&gt;
Factorio要求服务器（在客户端 - 服务器模式下）具有可公开访问的IP地址，或者所有播放器都在同一局域网内。如果您位于NAT后面，则必须设置端口转发（请[[Multiplayer/zh#MPlaying_over_LAN_.2F_Internet|参阅上面]]的端口号）或使用虚拟LAN软件（如Hamachi或Evolve）。&lt;br /&gt;
&lt;br /&gt;
多人游戏将以客户端 - 服务器模式启动（也是[http://www.factorio.com/blog/post/fff-99 多人转发]模式）。在这种模式下，所有客户端都将其数据包发送到服务器，服务器将流量转发给其他客户端。这样做的好处是它允许一些玩家在局域网内而另一些在外网进行游戏。由于数据包必须经过额外的转发（通过服务器），因此这样做的缺点是可能稍微有些延迟。&lt;br /&gt;
&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=53&amp;amp;t=6393 不登录到路由器转发端口]&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=53&amp;amp;t=7714 Evolve连接指南]&lt;br /&gt;
* [http://steamcommunity.com/sharedfiles/filedetails/?id=653628496 蛤蟆吃连接指南]&lt;br /&gt;
&lt;br /&gt;
== 游戏类别 ==&lt;br /&gt;
&lt;br /&gt;
=== Coop ===&lt;br /&gt;
&lt;br /&gt;
Coop-game runs without any further preparation ( http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6501 )&lt;br /&gt;
&lt;br /&gt;
=== PvP ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=14&amp;amp;t=8352 PvP with craftable biters]&lt;br /&gt;
&lt;br /&gt;
== Technical Implementation ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-76 Friday facts article]&lt;br /&gt;
&lt;br /&gt;
== More Tools/Infos ==&lt;br /&gt;
* use mods for planning. See [http://www.factorioforums.com/forum/viewtopic.php?f=14&amp;amp;t=6788 basic planner], [http://www.factorioforums.com/forum/viewtopic.php?f=14&amp;amp;t=4022 Planning-Tool-Mod]...&lt;br /&gt;
* look into [http://www.factorioforums.com/forum/viewforum.php?f=53 multiplayer forum], most other questions are answered there.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;And always remember that Factorio in v0.11 isn&#039;t intended to work well on internet connections, so keep patient. ;)&lt;br /&gt;
&lt;br /&gt;
== More Guides ==&lt;br /&gt;
&lt;br /&gt;
* [http://youtube.com/watch?v=MqsqRWNsbPM How To set up a Factorio Multiplayer Server | Guide | Tutorial], by Teaspoon&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6585 Dedicated Multiplayer Server Guide], by Icecube45&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6720 Tips to connect in multiplayer], by Nondre&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous tips ==&lt;br /&gt;
* the key for [[Console commands]] will now initiate a chat in MP. To execute commands you need to type &#039;/c&#039; before the command!&lt;br /&gt;
* Set the player&#039;s color using the command&lt;br /&gt;
 /c game.players[x].color = {r=0.7, g=0.5, b=0.1, a=0.9}&lt;br /&gt;
Where x is the player number. r, g and b are for red, green and blue respectively (possible values are between 0 and 1, use the right-most column on http://prideout.net/archive/colors.php). a is alpha channel aka Transparency of the color to the base texture. For single player, leave off the &amp;quot;[x]&amp;quot; to set the color.&lt;br /&gt;
&lt;br /&gt;
== Software for routing / establishing connection ==&lt;br /&gt;
&lt;br /&gt;
* http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6393&lt;br /&gt;
* http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6386&lt;br /&gt;
* http://www.factorioforums.com/forum/viewtopic.php?f=49&amp;amp;t=7690&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=7714 A guide for connecting with evolve]&lt;/div&gt;</summary>
		<author><name>Thrimbda</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Multiplayer&amp;diff=184607</id>
		<title>Multiplayer</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Multiplayer&amp;diff=184607"/>
		<updated>2021-02-18T14:50:37Z</updated>

		<summary type="html">&lt;p&gt;Thrimbda: add link to factorio docker repository&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
[[File:players_colored_preview.png|190px|right]]In addition to being a single-player game, Factorio also supports multiplayer, allowing many [[player]]s to cooperate and assist each other, or work against each other in pvp. This page documents how to set up a multiplayer game, how to join one, and the Multiplayer Admin features for managing other users and the server. By default, multiplayer games run the CO-OP [[Game modes and options|freeplay scenario]] where all players work together to launch a rocket with a satellite into space. Other scenarios, including PvP maps, are available for download from the [https://forums.factorio.com/viewforum.php?f=36&amp;amp;sid=93d1fbe9336d31d6bac60847b6c97985 Maps and Scenarios forum].&lt;br /&gt;
&lt;br /&gt;
== Setting Up a Multiplayer Game ==&lt;br /&gt;
&lt;br /&gt;
[[File:multiplayer_game_night.png|thumb|250px|A multiplayer game.]]Multiplayer games can be joined, hosted while playing, or hosted by a dedicated server.  Multiplayer games can be advertised to other players on the same LAN or worldwide.&lt;br /&gt;
&lt;br /&gt;
Use the &#039;&#039;Multiplayer&#039;&#039; button in the &#039;&#039;Play&#039;&#039; menu to start playing a multiplayer game, choose &#039;&#039;New&#039;&#039; or &#039;&#039;Load&#039;&#039; or &#039;&#039;Scenarios&#039;&#039; to host and play, or &#039;&#039;Browse&#039;&#039; or &#039;&#039;Play on LAN&#039;&#039; to connect to an already-running game. The host can also choose not to advertise the game at all, in which case you&#039;ll need the server&#039;s (public or otherwise reachable) IP address; you can then &#039;&#039;Connect&#039;&#039; directly to that to join the game.&lt;br /&gt;
&lt;br /&gt;
Notes and tips:&lt;br /&gt;
&lt;br /&gt;
* All game instances need the installation of &#039;&#039;exactly the same&#039;&#039; game-versions and mods.&lt;br /&gt;
* Factorio servers use port &#039;&#039;&#039;34197&#039;&#039;&#039;. The port can be changed in the [[Application directory|config]] file.&lt;br /&gt;
* Factorio uses &#039;&#039;&#039;UDP only&#039;&#039;&#039;. The game builds its own &amp;quot;reliable delivery&amp;quot; layer built on UDP to deal with packet loss and reordering issues.&lt;br /&gt;
** Make sure you configure your router&#039;s port forwarding correctly for port &#039;&#039;&#039;34197&#039;&#039;&#039;.&lt;br /&gt;
** Make sure your router does not [https://doc.pfsense.org/index.php/Static_Port randomize the source port] on packets outbound from &#039;&#039;&#039;34197&#039;&#039;&#039;.  Some routers do this and require [https://forum.pfsense.org/index.php?PHPSESSID=3k4h9n5o2tksgqv910fknf7qt7&amp;amp;topic=142188.msg798594#msg798594 additional configuration] to prevent it.&lt;br /&gt;
** Make sure there is no firewall or anti-virus blocking the UDP-packets.&lt;br /&gt;
* The hard limit for the number of players is [https://forums.factorio.com/viewtopic.php?f=53&amp;amp;t=6481&amp;amp;p=50661#p50586 65,535]. However, practical limit for this is much lower, popular streamers have managed to get well over a hundred players.&lt;br /&gt;
&lt;br /&gt;
=== Dedicated/Headless server ===&lt;br /&gt;
&lt;br /&gt;
As of Factorio version 0.12.0 onwards, a dedicated (or headless) server can be started using the --start-server command line option. You can run factorio --help to get a list of all command-line arguments that Factorio accepts.&lt;br /&gt;
&lt;br /&gt;
In the headless mode:&lt;br /&gt;
* Graphics are not initialized (faster start up, less memory usage, works on completely headless servers)&lt;br /&gt;
* Game starts immediately and loads a save given as a parameter to the command&lt;br /&gt;
* The server has no character in game&lt;br /&gt;
* Game is paused while there are no players connected (though this can be overridden using the no-auto-pause option in the server-settings.json)&lt;br /&gt;
* Saves the game on exit (and autosaves normally)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;0.13 onwards expects --start-server to be followed by a path to a save file.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You will need to create your save file before you start the server, as the dedicated server REQUIRES a save file to be provided. This can easily be done using the --create command-line argument. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/x64/factorio --create ./saves/my-save.zip       # This creates a new save, as if by clicking the New Game button in the GUI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/x64/factorio --start-server ./saves/my-save.zip # This starts a server that will host the file created on the previous line&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are several JSON configuration files that factorio can make use of to change the server and map settings:&lt;br /&gt;
* &#039;&#039;&#039;map-gen-settings&#039;&#039;&#039; to set parameters used by the map generator such as width and height, ore patch frequency and size, etc. (Added in 0.13)&lt;br /&gt;
* &#039;&#039;&#039;map-settings&#039;&#039;&#039; to control pollution spread, biter expansion and evolution, and more (Added in 0.15)&lt;br /&gt;
* &#039;&#039;&#039;server-settings&#039;&#039;&#039; which consolidated several command-line options into a single file (Added in 0.14.12)&lt;br /&gt;
Example files for each of these parameters are included in the data subdirectory.&lt;br /&gt;
&lt;br /&gt;
The --map-gen-settings and --map-settings options must be used with the --create option when you create a new map.  For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;./bin/x64/factorio --create saves/my-save.zip --map-gen-settings my-map-gen-settings.json --map-settings my-map-settings.json&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Starting the factorio server requires you to specify the location of the server-settings.json file. By default this is in the factorio data folder. For example to start factorio using the most recent saved map, you would run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;./bin/x64/factorio --start-server-load-latest --server-settings ./data/server-settings.json&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On windows, it may be useful to start the server with a .bat file. The bat file should have the following content:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;start /wait .\bin\x64\factorio.exe --start-server-load-latest --server-settings .\data\server-settings.json&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;See [[Command_line_parameters]] for more command line parameters.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Setting up a Linux Factorio server ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Factorio now requires &amp;lt;tt&amp;gt;glibc&amp;lt;/tt&amp;gt; version 2.18, but CentOS/RHEL 7 only ship with version 2.17 so this guide will no longer work without [https://forums.factorio.com/viewtopic.php?t=54654#p324493 manually compiling &amp;lt;tt&amp;gt;glibc&amp;lt;/tt&amp;gt; 2.18].&lt;br /&gt;
&lt;br /&gt;
This step-by-step guide has been verified on fresh CentOS 7 and RHEL 7 installs but should be applicable with little to no changes on most distributions.&lt;br /&gt;
&lt;br /&gt;
The guide assumes you will install the headless server under &#039;&#039;&#039;/opt/factorio&#039;&#039;&#039;, adjust paths according to your own setup. We will also suggest that you run the Factorio server as a separate user to harden security of your setup.&lt;br /&gt;
&lt;br /&gt;
Note that there are two distinct packages for Linux that can be used to run a headless server. First is the usual Linux download, that contains the full game. The other is the special  [https://www.factorio.com/download-headless headless package]. The headless package does not contain any files irrelevant for a pure server, such as graphics and sounds. It is also not linked against libraries that may not be present on a server machine, such as Xlib, libGL or libasound. This option should be selected if running in a 3rd party hosted server.&lt;br /&gt;
&lt;br /&gt;
This guide does not handle firewall/port forwarding since this can be done in various ways on Linux (make sure to read up how this is done as a Linux admin on your particular distribution)&lt;br /&gt;
&lt;br /&gt;
==== Basic installation ====&lt;br /&gt;
&lt;br /&gt;
* Download the selected package -- either full game or the headless package -- and upload the Linux tar.gz or tar.xz package to your server /tmp&lt;br /&gt;
* Extract the package in /tmp to /opt/factorio&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$cd /opt/&lt;br /&gt;
&lt;br /&gt;
$sudo tar -xzf /tmp/factorio.tar.gz # Use the correct file name. It includes the factorio version number&lt;br /&gt;
$sudo tar -xJf /tmp/factorio.tar.xz # if you downloaded a .tar.xz file (ver 0.15.x)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add a new user to your system and assign ownership of the factorio dir to it (please, do not run as the root user, sudo may be needed)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$useradd factorio&lt;br /&gt;
$chown -R factorio:factorio /opt/factorio&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Try the binary&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$su factorio&lt;br /&gt;
$/opt/factorio/bin/x64/factorio --start-server savename&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As long as it fails saying it cannot find/open the savename.zip you are set! Just upload a save from your own computer and put it in the /opt/factorio/saves directory, or use the --create ./saves/newgame.zip argument.&lt;br /&gt;
&lt;br /&gt;
==== Additional configuration ====&lt;br /&gt;
&lt;br /&gt;
You can use a [https://github.com/Bisa/factorio-init Linux factorio-init script] to start/stop your headless server in a much better way. The script will ensure you only ever use the most recent save when your server starts (even if that was an auto-save) while also letting you set a number of other settings like Autosave frequency and Latency settings. This script can also simplify updating the server when combined with a [https://github.com/narc0tiq/factorio-updater Linux factorio-updater script].&lt;br /&gt;
&lt;br /&gt;
Additionally, if you plan to enable mods on your server a mod updater script can greatly simplify this process. Here are several existing options, or you can write your own!&lt;br /&gt;
* [https://github.com/pdemonaco/factorio-mod-updater Python Mod Updater]&lt;br /&gt;
* [https://github.com/astevens/factorio-mod-updater Ruby Mod Updater]&lt;br /&gt;
&lt;br /&gt;
=== How to list a server-hosted game on the matching server ===&lt;br /&gt;
&lt;br /&gt;
In order to publish the game to the matching server, Factorio needs to be given some more information than just the save file location. These information are provided in a &#039;&#039;server settings file&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
To create a server settings file, look at the example file located in &#039;&#039;&#039;data/server-settings.example.json&#039;&#039;&#039; in the Factorio [[Application directory]]. The recommended way is to make a copy of this example file and edit the copy.&lt;br /&gt;
&lt;br /&gt;
The following values can be changed:&lt;br /&gt;
; Name: This will be the name under which the server will be listed in the server browser&lt;br /&gt;
; Description: A brief description of your server&lt;br /&gt;
; Tags: A list of game tags&lt;br /&gt;
; Max Players: Allows you to limit the number of players that can be connected to the server at the same time. If you want no limit, just set max_players to 0.&lt;br /&gt;
* Visibility for server browser: May be either public, LAN or hidden.&lt;br /&gt;
** Public: The server will appear in the public server list. This requires the login credentials below to be filled in.&lt;br /&gt;
** LAN: The server will not appear in the public server list, but will be available through the Play On LAN button&lt;br /&gt;
** Hidden: Clients will have to connect using the server&#039;s IP address&lt;br /&gt;
* User credentials using a username and password or authentication token (found on the factorio website or in the player-data.json): These are necessary if you wish to make the server public. Otherwise, they can be left empty.&lt;br /&gt;
** For security reasons it is recommended to use authentication token as this document is stored as plain text. Though it should be noted that an authentication token is a sensitive piece of information as well, and you are well-advised to keep it secret.&lt;br /&gt;
* Server Password&lt;br /&gt;
** Field name is game_password&lt;br /&gt;
* Whether to verify user identity&lt;br /&gt;
(There are additional values in v0.14 of factorio.)&lt;br /&gt;
&lt;br /&gt;
=== Technical Implementation Details ===&lt;br /&gt;
&lt;br /&gt;
Notes about some technical details surrounding multiplayer have been published by the development team in several Friday Facts blog posts:&lt;br /&gt;
&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-76 Lock step architecture]&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-99 Client-server connections]&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-143 NAT punching, introduced in 0.13]&lt;br /&gt;
&lt;br /&gt;
=== More Guides ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/factoriotools/factorio-docker run factorio as a docker container]&lt;br /&gt;
* [https://www.chef.io/blog/2016/03/21/building-a-factorio-multiplayer-server-on-digital-ocean/ How to set up Factorio server with cookbook]&lt;br /&gt;
* [http://youtube.com/watch?v=MqsqRWNsbPM How To set up a Factorio Multiplayer Server | Guide | Tutorial], by Teaspoon&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=53&amp;amp;t=6720 Tips to connect in multiplayer], by Nondre&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous Tips ===&lt;br /&gt;
* The key for [[Console|console commands]] is also used initiate chat in multiplayer. To execute a command instead of chatting, you need to type &#039;&#039;/c&#039;&#039; before the command. Commands executed are &#039;&#039;visible to all players&#039;&#039;. Additionally, the multiplayer game must have been started with commands allowable for commands to work.&lt;br /&gt;
* Set the player&#039;s color using the command&lt;br /&gt;
 /color r g b a&lt;br /&gt;
r, g and b are for red, green and blue respectively (possible values are between 0 and 1, use [https://www.w3schools.com/colors/colors_converter.asp this site] to convert colors to rgb numbers). a is alpha channel aka transparency of the color to the base texture.&lt;br /&gt;
* To give yourself admin access, you need to create a server-adminlist.json in the same directory as factorio-current.log. The file should contain a list of admins, like so: &amp;lt;code&amp;gt;[ &amp;quot;user1&amp;quot;, &amp;quot;user2&amp;quot; ]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This file will be created if you promote a player through the console.&lt;br /&gt;
&lt;br /&gt;
== Joining a Multiplayer game ==&lt;br /&gt;
&lt;br /&gt;
As of version 0.13, players no longer necessarily have to port-forward to play with others. Players may join each other through Steam, or by just the port-forwarded host.&lt;br /&gt;
&lt;br /&gt;
Players wishing to join a game may do so in multiple ways:&lt;br /&gt;
&lt;br /&gt;
* Joining by directly inputting a public IP and port into Factorio.&lt;br /&gt;
* Selecting the server from the active public server menu.&lt;br /&gt;
* Joining through Steam&#039;s services.&lt;br /&gt;
* Playing a local LAN game.&lt;br /&gt;
&lt;br /&gt;
=== Joining by IP ===&lt;br /&gt;
&lt;br /&gt;
To join a multiplayer game by IP, you will need to know the public IP of a valid server. You can find this through social media, websites, or by word of mouth. After acquiring the IP and port, simply go to play -&amp;gt; Multiplayer -&amp;gt; Connect to server, and provide all the information it asks for.&lt;br /&gt;
&lt;br /&gt;
If the server has been set up correctly to accept public connections, you should be able to join the game.&lt;br /&gt;
&lt;br /&gt;
=== Joining via server list ===&lt;br /&gt;
&lt;br /&gt;
Factorio&#039;s devs keep a list of all public servers that declare themselves to the service, allowing players to join directly through Factorio. Most of these servers will be password-requiring, but many completely public servers can be connected to. To join via server list, go to Play -&amp;gt; Multiplayer -&amp;gt; Browse public games. Provide your Factorio.com login if asked, and a list of public servers will appear. Simply select one.&lt;br /&gt;
&lt;br /&gt;
=== Joining through Steam ===&lt;br /&gt;
&lt;br /&gt;
Steam provides a &amp;quot;game invite&amp;quot; system, simply use that to join. You can find more info about how to use steam in it&#039;s documentation. &#039;&#039;This is the most recommended way for the average player to use multiplayer with their friends, as it allows Steam to handle everything&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Joining a local LAN game ===&lt;br /&gt;
&lt;br /&gt;
If you have some friends on the same internet connection as you (in the same building or network), you may play a LAN game. Simply go to Play -&amp;gt; Multiplayer -&amp;gt; Play on LAN.&lt;br /&gt;
&lt;br /&gt;
=== Finding Other Players ===&lt;br /&gt;
&lt;br /&gt;
* Use the [https://forums.factorio.com/viewforum.php?f=53 multiplayer board in the forum].&lt;br /&gt;
* Many players use other software like Evolve to meet other players. This also has the &amp;quot;advantage&amp;quot; of creating a virtual LAN among the players. See down under software.&lt;br /&gt;
* Some also use [https://forums.factorio.com/viewtopic.php?f=5&amp;amp;t=9136 Steam] to find other players.&lt;br /&gt;
* There is an external [http://serverlist.lgms.nl/ server browser] with various search options.&lt;br /&gt;
* Tell your friends to buy Factorio, then play with them!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Connecting to a Server Behind NAT ===&lt;br /&gt;
&lt;br /&gt;
Factorio requires that the server (in client-server mode) have a publicly accessible IP address or that all players are on the same LAN. If you are behind NAT, you must set up port forwarding ([[Multiplayer#Playing_over_LAN_.2F_Internet|see above]] for port number) or use virtual LAN software such as Hamachi or Evolve.&lt;br /&gt;
&lt;br /&gt;
Multiplayer games will be launched in client-server mode (also [http://www.factorio.com/blog/post/fff-99 multiplayer forwarding] mode). In this mode, all clients send their network traffic to the server and the server forwards the traffic to the other clients. The advantage of this is that it allows games where some players are inside a LAN and others are outside. The disadvantage may be slightly more lag as packets must travel an extra hop (through the server).&lt;br /&gt;
&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=53&amp;amp;t=6393 Forwarding ports without logging into your router]&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=53&amp;amp;t=7714 A guide for connecting with Evolve]&lt;br /&gt;
* [http://steamcommunity.com/sharedfiles/filedetails/?id=653628496 A guide for connecting with Hamachi]&lt;br /&gt;
&lt;br /&gt;
== PvP ==&lt;br /&gt;
&lt;br /&gt;
In PvP mode, players can be on different forces. Each force can have one (free-for-all) or more players (teams). Each force has its own independent research progression. Additionally, each force&#039;s [[Military units and structures]] will attack other players as enemies, unless a cease fire is set. Note that, depending on the scenario, cease fires may be unidirectional — setting a cease fire with an opposing force does not guarantee a cease fire from them in return.&lt;br /&gt;
&lt;br /&gt;
To start a PvP game, you can select the &#039;PvP&#039; scenario from the &#039;Play&#039; menu, or download a custom scenario which also supports PvP.&lt;br /&gt;
&lt;br /&gt;
After downloading a PvP scenario, you need to move it to your application directory, and create the multiplayer game using the scenario.&lt;br /&gt;
&lt;br /&gt;
# Download the scenario and place the scenario directory in the &#039;&#039;scenarios&#039;&#039; directory within your [[Application_directory#Directory_locations_by_OS_and_installation_method|user data directory]].&lt;br /&gt;
# Launch Factorio&lt;br /&gt;
# Click &#039;&#039;Play&#039;&#039;&lt;br /&gt;
# Click &#039;&#039;Multiplayer&#039;&#039;&lt;br /&gt;
# Click &#039;&#039;Scenario&#039;&#039;&lt;br /&gt;
# Choose the PvP scenario you want and click &#039;&#039;Create&#039;&#039;&lt;br /&gt;
# Choose latency and other settings, then click &#039;&#039;Play&#039;&#039;&lt;br /&gt;
# Other players can now join the game&lt;br /&gt;
&lt;br /&gt;
=== Forces ===&lt;br /&gt;
&lt;br /&gt;
Forces can be manually created via the console. This allows any map/scenario to be used for PvP. This may not be as convenient as a pre-made PvP scenario, as there will be no way for players to turn on/off cease fires other than through the console.&lt;br /&gt;
&lt;br /&gt;
Each created force has its own research progression and different forces may attack each other.&lt;br /&gt;
&lt;br /&gt;
The console commands for setting up and controlling forces are below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
game.create_force(&amp;quot;Name&amp;quot;)&lt;br /&gt;
--Creates the force &amp;quot;Name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
game.players[&amp;quot;Player_name&amp;quot;].force = game.forces[&amp;quot;Name&amp;quot;]&lt;br /&gt;
--Sets this player to the new force&lt;br /&gt;
&lt;br /&gt;
game.forces[&amp;quot;Name&amp;quot;].set_cease_fire(&amp;quot;Other_force_name&amp;quot;, true)&lt;br /&gt;
--Sets the new force ceasefire to the &amp;quot;other force&amp;quot;&lt;br /&gt;
&lt;br /&gt;
game.forces[&amp;quot;Name&amp;quot;].set_spawn_position({x = 10, y = 20}, game.surfaces[1])&lt;br /&gt;
--Sets the spawn position of the force&lt;br /&gt;
&lt;br /&gt;
game.print(#game.forces)&lt;br /&gt;
--Prints the number of forces&lt;br /&gt;
&lt;br /&gt;
for name, force in pairs (game.forces) do&lt;br /&gt;
   game.print(name)&lt;br /&gt;
end&lt;br /&gt;
--Prints the name of all the forces&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ability of players and entities belonging to one force to interact with structures belonging to another, non-friendly force is limited. However, some types of interactions are still possible:&lt;br /&gt;
&lt;br /&gt;
;Manual pickup from belts&lt;br /&gt;
: Players can pick up items traveling along a transport belt that belongs to an opposing force. Note however that this can&#039;t be automated: Inserters will &#039;&#039;not&#039;&#039; take items from an opposing force&#039;s belts.&lt;br /&gt;
;Belt network connection&lt;br /&gt;
: Belts will connect to each other regardless of force membership, so it&#039;s possible to extend an opposing force&#039;s belt line, and items will flow to them. It is also possible to side-load into, and place items onto (with inserters) an opposing force&#039;s belt line.&lt;br /&gt;
;Fluid network connection&lt;br /&gt;
: Pipes (and storage tanks, and pumps, &amp;amp;c) will connect to each other regardless of force membership. For example, it&#039;s possible to pump fluids out of or into a storage tank belonging to an opposing force.&lt;br /&gt;
;Power leeching&lt;br /&gt;
: Players can draw power from an opposing force&#039;s electric network, by building structures inside the coverage area of a power pole belonging to an opposing force. Power poles that you build next to a power pole belonging to an opposing force will automatically connect to it, but will be impossible to connect or disconnect manually.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
=== Narrative history ===&lt;br /&gt;
&lt;br /&gt;
Because of the potentially immense amount of activity on a map, the game engine utilizes a [https://www.factorio.com/blog/post/fff-76 lock step architecture]. All instances of the game run full simulations of the entire world and only player actions are transferred across the network.&lt;br /&gt;
&lt;br /&gt;
Multiplayer games were introduced to Factorio with version 0.11.0. The only connection method available was peer-to-peer mode which meant every player had to be able to directly communicate with every other player. In version 0.12.4, a client-server mode of communication was introduced in which the server (either a dedicated one or the player who hosted the game) relays messages to all peers. This means that direct connection between all players is no longer necessary. As of version 0.13, P2P connecting is completely removed.&lt;br /&gt;
&lt;br /&gt;
As of version 0.12.0, the game features &amp;quot;latency hiding&amp;quot; mechanics where the game simulates some of the player&#039;s actions locally to make some common interactions (such as moving the player&#039;s character) more fluid.  Not every action is a part of latency hiding – most notably, car or train driving and shooting are not a part of it.&lt;br /&gt;
&lt;br /&gt;
=== Version history ===&lt;br /&gt;
&lt;br /&gt;
Maintainer note: The following history may not be fully up to date, or comprehensive. Factorio&#039;s multiplayer has undergone a great deal of small changes since its inception, however this history will provide a rough overview.&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.14|&lt;br /&gt;
* Added multiplayer server option &amp;quot;Autosave only on server&amp;quot;.&lt;br /&gt;
* Deconstructing/canceling deconstruction sets the &amp;quot;last user&amp;quot; on an entity.&lt;br /&gt;
* Decreased the size of connection accept message with lot of mod which could help some people with 50+ mod multiplayer games.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.13|&lt;br /&gt;
* Reconnecting to multiplayer game that the player is already in (due to being dropped, most often) instantly closes the previous connection and connects the player.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.11|&lt;br /&gt;
* Multiplayer user names can only consist of letters, and &amp;lt;code&amp;gt; -_. &amp;lt;/code&amp;gt; characters.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.10|&lt;br /&gt;
* Disabled 32bit (x86) multiplayer. All hosts and members must be running the 64bit (x86_64) version of the game.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.8|&lt;br /&gt;
* More than 10 players in one game will reduce the rate the game is saved to the server.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.6|&lt;br /&gt;
* Username is now set to username setting, not email.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.5|&lt;br /&gt;
* Added AFK Auto kick interval to multiplayer host settings (with never as default).}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.3|&lt;br /&gt;
* When save of scenario is loaded in multiplayer, it&#039;s scenario is saved in user scenarios.&lt;br /&gt;
* Added &amp;lt;code&amp;gt;/time&amp;lt;/code&amp;gt; command to print the current map age.&lt;br /&gt;
* Added option to host multiplayer game with scenario (it only had new game/load game there).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.2|&lt;br /&gt;
* Can specify limit of upload speed when hosting.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.14.0|&lt;br /&gt;
* Server doesn&#039;t stop/slow down the game when some client is too slow, stops communicating or saves the game longer than the server.&lt;br /&gt;
* Players automatically quit game after 3 desyncs.&lt;br /&gt;
* Removed the option to enable/disable latency hiding, it is always on on clients (and off on the server).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.13.10|&lt;br /&gt;
* Server stdout messages now contain time stamps and message-type tags}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.13.2|&lt;br /&gt;
* Limit multiplayer player name to 60 characters.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.13.0|&lt;br /&gt;
* Improved Multiplayer game UX&lt;br /&gt;
* Server games are published to the server and clients can browse existing games.&lt;br /&gt;
* Removed multiplayer peer-to-peer mode.&lt;br /&gt;
* Building sound is played also for other players in multiplayer.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.31|&lt;br /&gt;
* Human readable error notice when multiplayer connection wasn&#039;t successful. (https://forums.factorio.com/23132)&lt;br /&gt;
* Improved map download speed when connecting to multiplayer game.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.30|&lt;br /&gt;
* Mod checksums are calculated when the game starts and are compared with other peers when joining a multiplayer game. This is to ensure everyone has exactly the same mod in order to prevent desyncs caused by local changes made to mod files.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.28|&lt;br /&gt;
* Added --port to specify which network port the game should use, when hosting with --start-server or --mp-load-game.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.27|&lt;br /&gt;
* The report of different mods when trying to connect to multiplayer game is now scroll-able when needed.&lt;br /&gt;
* Better message when the server leaves a multiplayer game}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.11|&lt;br /&gt;
* Added --no-auto-pause: When running as a server, --no-auto-pause will prevent stopping the game when no players are connected.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.9|&lt;br /&gt;
* Added resume button to multiplayer game menu}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.7|&lt;br /&gt;
*New command line options for the headless server: --disallow-commands and --peer-to-peer}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.5|&lt;br /&gt;
* Multiplayer broadcast (heartbeats) is done via a single message when not using peer2peer.&lt;br /&gt;
* Further optimizations in size of the Multiplayer heartbeat (message sent every tick).&lt;br /&gt;
* LatencyState is suspended when player is killed (and waiting for respawn) in Multiplayer.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.4|&lt;br /&gt;
* Simple mechanism for multiplayer relaying via the server.&lt;br /&gt;
* Less annoying glitches when running and shooting in multiplayer with latency hiding.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.0|&lt;br /&gt;
* Multiplayer latency hiding (gives impression that some common tasks are performed immediately)&lt;br /&gt;
* Factorio can run as a dedicated server without graphics.&lt;br /&gt;
* Basic PvP: New forces can now be created and merged back together; a cease-fire can be agreed upon between forces&lt;br /&gt;
* IPv6 support for multiplayer.&lt;br /&gt;
* DNS names can be used when connecting to multiplayer game.&lt;br /&gt;
* Player&#039;s logistic filters are now remembered after respawn in multiplayer&lt;br /&gt;
* Smaller multiplayer heartbeat packet size.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.11.19|&lt;br /&gt;
* Multiplayer dropping threshold is doubled during map upload / download.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.11.17|&lt;br /&gt;
* Autosaves in multiplayer are performed at the same time by all clients (interval is set by hosting player).&lt;br /&gt;
* Progress bar is shown when non-responsive peers are about to be dropped from the game in the Multiplayer.&lt;br /&gt;
* Progress bar is shown when other peers in multiplayer are saving map.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.11.16|&lt;br /&gt;
* Revived character (after dying in multiplayer) are placed on the spawn point instead of the center of the map.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.11.2|&lt;br /&gt;
*  Mods that don&#039;t affect game state are not needed to be synchronized when playing multiplayer game or replaying game.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.11.0|&lt;br /&gt;
* Introduced}}&lt;/div&gt;</summary>
		<author><name>Thrimbda</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Multiplayer/zh&amp;diff=156227</id>
		<title>Multiplayer/zh</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Multiplayer/zh&amp;diff=156227"/>
		<updated>2018-03-04T07:31:13Z</updated>

		<summary type="html">&lt;p&gt;Thrimbda: /* 加入一个多人游戏 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
&lt;br /&gt;
除了单人游戏之外，Factorio还支持多人游戏，允许许多玩家合作并互相帮助，或者在PVP中相互对抗。本页面介绍如何设置多人游戏以及如何加入。默认情况下，多人游戏运行合作[[Game modes and options/zh|自由模式]]，所有玩家一起工作，发射一颗卫星进入太空的火箭。其他场景，包括PvP地图，可以从[https://forums.factorio.com/viewforum.php?f=36&amp;amp;sid=93d1fbe9336d31d6bac60847b6c97985 地图和场景论坛]下载。&lt;br /&gt;
&lt;br /&gt;
== 设置多人游戏 ==&lt;br /&gt;
&lt;br /&gt;
玩家可以加入多人游戏，或以本机为主机建立多人游戏，亦或由专用服务器托管。建立好的多人游戏可以被同一局域网玩家或全球其他玩家找到并加入。&lt;br /&gt;
&lt;br /&gt;
使用&#039;&#039;开始游戏&#039;&#039;菜单中的&#039;&#039;多人游戏&#039;&#039;按钮开始多人游戏，选择&#039;&#039;新游戏&#039;&#039;或&#039;&#039;载入游戏&#039;&#039;或&#039;&#039;游戏场景&#039;&#039;建立主机并开始游戏，或者选择&#039;&#039;局域网游戏&#039;&#039;或&#039;&#039;互联网游戏&#039;&#039;以连接到已经其他人的的游戏中。主机也可以选择不在服务器列表中显示建立的游戏，在这种情况下，您需要服务器的（公共或其他方式）IP地址;然后你可以选择&#039;&#039;连接服务器&#039;&#039;以加入游戏。&lt;br /&gt;
&lt;br /&gt;
注意与提示：&lt;br /&gt;
&lt;br /&gt;
* 所有玩家的游戏版本和安装的mod必须完全一致。&lt;br /&gt;
* 游戏使用端口&#039;&#039;&#039;34197&#039;&#039;&#039;。端口可以在[[Application directory|设置]]中更改。&lt;br /&gt;
* 游戏仅支持 &#039;&#039;&#039;UDP&#039;&#039;&#039;协议。请确保你的路由器有正确的设置。(游戏拥有自己的“可靠通信层”建立在UDP之上来解决丢包问题。)&lt;br /&gt;
** 请确保没有防火墙或杀毒软件阻止了UDP数据包。&lt;br /&gt;
* 同时联机人数的理论上限是[http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6481&amp;amp;p=50661#p50586 65535]，然而，实际的限制要低得多。&lt;br /&gt;
&lt;br /&gt;
===专用/Headless服务器===&lt;br /&gt;
&lt;br /&gt;
从Factorio版本0.12.0开始，可以使用--start-server命令行选项启动专用（或Headless）服务器。您可以运行factorio --help来获取Factorio接受的所有命令行参数的列表。&lt;br /&gt;
&lt;br /&gt;
在Headless模式下：&lt;br /&gt;
&lt;br /&gt;
* 图形界面未初始化。（启动速度更快，内存使用量更少，适用于Headless服务器）&lt;br /&gt;
* 在键入命令后，游戏立即开始，并按照给出的参数（存档名）加载存档。&lt;br /&gt;
* 服务器在游戏中没有角色。&lt;br /&gt;
* 在没有玩家连接的情况下，游戏会暂停。（尽管可以使用server-settings.json中的no-auto-pause选项覆盖此选项）&lt;br /&gt;
* 退出时保存游戏。（并正常执行自动保存）&lt;br /&gt;
&lt;br /&gt;
从0.13开始，--start-server命令后需要加上存档文件的路径。&lt;br /&gt;
&lt;br /&gt;
您需要在启动服务器之前创建保存文件，因为专用服务器需要提供保存文件。这可以使用--create命令行参数轻松完成。例如：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/x64/factorio --create ./saves/my-save.zip       # 这将建立一个新存档，就像在游戏中点击新游戏那样&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/x64/factorio --start-server ./saves/my-save.zip # 这将启动游戏服务端，并且会使用上一行中创建的存档&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
有几个JSON配置文件可供factorio用来更改服务器和地图设置：&lt;br /&gt;
&lt;br /&gt;
* 在map-gen-settings中设置地图生成器使用的参数，例如宽度和高度，矿块的频率和大小等。（在0.13中添加）&lt;br /&gt;
* 编辑map-settings来控制污染扩散，扩散和演变等等。（0.15版本中增加）&lt;br /&gt;
* server-setting将多个命令行选项合并到单个文件中（在0.14.12中添加）&lt;br /&gt;
&lt;br /&gt;
data子目录中包含每个参数的示例文件。&lt;br /&gt;
&lt;br /&gt;
创建新地图时，必须将--map-gen-settings和--map-settings选项与--create选项一起使用。例如：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/x64/factorio --create saves/my-save.zip --map-gen-settings my-map-gen-settings.json --map-settings my-map-settings.json&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
启动factorio服务器需要您指定server-settings.json文件的位置。默认情况下，这是在factorio数据文件夹中。例如，要使用最新保存的地图启动factorio，您可以运行：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/x64/factorio --start-server-load-latest --server-settings ./data/server-settings.json&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
要在同一台计算机上启动服务器和客户端，需要使用以下启动选项启动客户端：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--no-log-rotation&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===设置Linux Factorio服务器===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;注意&#039;&#039;&#039;：Factorio现在需要glibc 2.18版本，但CentOS / RHEL 7仅附带2.17版本，因此如果不[https://forums.factorio.com/viewtopic.php?t=54654#p324493 手动编译glibc 2.18]，本指南将不再起作用。&lt;br /&gt;
&lt;br /&gt;
本分步指南已在新安装的CentOS 7和RHEL 7环境下进行了验证，同时在大多数发行版中几乎不用做任何更改。&lt;br /&gt;
&lt;br /&gt;
本指南假设您将在/ opt / factorio下安装Headless服务器，请根据您自己的设置调整路径。我们还建议您将Factorio服务器在单独的用户中运行，以加强安全性。&lt;br /&gt;
&lt;br /&gt;
请注意，Linux有两种不同的软件包可用于运行Headless服务器。首先是普通的Linux下载，其中包含完整的游戏。另一种是特殊的[https://www.factorio.com/download-headless/stable Headless]包。Headless包不包含与纯服务器无关的任何文件，如图形和声音。它也不与服务器机器上不存在的库链接，如Xlib，libGL或libasound。如果在第三方托管服务器中运行，应选择此选项。&lt;br /&gt;
&lt;br /&gt;
本指南不处理防火墙/端口转发，因为这可以在Linux中以各种方式完成（请务必在您的特定发行版上以Linux管理员的身份了解这些内容）&lt;br /&gt;
&lt;br /&gt;
您可以使用[https://github.com/Bisa/factorio-init Linux factorio-init脚本]以更好的方式启动/停止无头服务器。该脚本将确保您只能在服务器启动时使用最新的存档（即使这是自动保存），同时还可以设置许多其他设置项，例如自动保存频率和延迟设置。此脚本还将简化与[https://github.com/narc0tiq/factorio-updater Linux factorio-updater脚本]结合使用时更新服务器的流程。&lt;br /&gt;
&lt;br /&gt;
* 下载所选软件包 - 完整游戏或是无头包 - 并将Linux tar.gz或tar.xz软件包上传到您的服务器的/tmp目录下&lt;br /&gt;
* 将/tmp中的软件包解压到/opt/factorio中&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$cd /opt/&lt;br /&gt;
&lt;br /&gt;
$sudo tar -xzf /tmp/factorio.tar.gz # 请使用正确的文件名称。它包含factorio版本号&lt;br /&gt;
$sudo tar -xJf /tmp/factorio.tar.xz # 如果您下载了.tar.xz文件请使用这条命令（版本0.15.x）&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 将一个新用户添加到您的系统中，并为其分配factorio目录的所有权（请不要以root用户身份运行，可能需要sudo）&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$useradd factorio&lt;br /&gt;
$chown -R factorio:factorio /opt/factorio&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 尝试运行服务端二进制可执行文件&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$su factorio&lt;br /&gt;
$/opt/factorio/bin/x64/factorio --start-server savename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
如果失败并提示它无法找到或打开你设置的savename.zip，这时只需从自己的计算机上传一个保存，并将其保存在/opt/factorio/saves目录中，或者使用--create ./saves/newgame.zip创建一个存档。&lt;br /&gt;
&lt;br /&gt;
===如何在匹配服务器中列出服务器托管的游戏===&lt;br /&gt;
&lt;br /&gt;
为了将游戏发布到匹配服务器，需要给Factorio一些额外的信息，而不仅仅是保存文件的位置。这些信息在&#039;&#039;服务器设置文件&#039;&#039;中提供。&lt;br /&gt;
&lt;br /&gt;
要创建服务器设置文件，请查看Factorio [[Application_directory|Application目录]]中data/server-settings.example.json中的示例文件。推荐的方法是制作此示例文件的副本并编辑副本。&lt;br /&gt;
&lt;br /&gt;
以下值可以更改：&lt;br /&gt;
&lt;br /&gt;
; Name: 这将是服务器在服务器列表中显示的名称&lt;br /&gt;
; Description: 服务器的简要说明&lt;br /&gt;
; Tags: 游戏标签列表&lt;br /&gt;
; Max Players: 允许您限制可以同时连接到服务器的玩家数量。如果你不想要限制，只需将max_players设置为0即可。&lt;br /&gt;
&lt;br /&gt;
* 服务器浏览器的可见性：可以是公共的，局域网可见的或隐藏的。&lt;br /&gt;
** 公开：服务器将出现在公共服务器列表中。这需要在下方填写登录凭据。&lt;br /&gt;
** 局域网：服务器不会出现在公共服务器列表中，但可通过“局域网游戏”按钮使用&lt;br /&gt;
** 隐藏：客户端必须使用服务器的IP地址进行连接&lt;br /&gt;
* 使用用户名和密码或验证令牌的用户凭证（可在factorio网站或player-data.json中找到）：如果您希望公开服务器，则这些是必需的。否则可以留空。&lt;br /&gt;
** 出于安全原因，建议使用身份验证令牌，因为此文档以纯文本形式存储。应该指出，身份验证令牌也是敏感信息，因此建议您保密。&lt;br /&gt;
* 服务器密码&lt;br /&gt;
** 字段名称是game_password&lt;br /&gt;
* 是否验证用户身份&lt;br /&gt;
&lt;br /&gt;
（factorio的v0.14中还有其他值。）&lt;br /&gt;
&lt;br /&gt;
===技术实施细节===&lt;br /&gt;
&lt;br /&gt;
关于多人游戏的一些技术细节的注意事项由开发团队在几个Friday Facts博客文章中发布：&lt;br /&gt;
&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-76 步调一致架构]&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-99 客户端 - 服务器连接]&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-143 NAT穿透，0.13引入]&lt;br /&gt;
&lt;br /&gt;
===更多指南===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/Thrimbda/docker_factorio_server 使用docker简化部署Factorio服务器（中文）]&lt;br /&gt;
* [https://www.chef.io/blog/2016/03/21/building-a-factorio-multiplayer-server-on-digital-ocean/ 如何用Cookbook设置Factorio服务器]&lt;br /&gt;
* [http://youtube.com/watch?v=MqsqRWNsbPM 如何设置Factorio多人游戏服务器 | 指南 | 教程]&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=53&amp;amp;t=6720 多人联机小技巧]&lt;br /&gt;
&lt;br /&gt;
===杂项===&lt;br /&gt;
&lt;br /&gt;
* [[Console/zh|控制台命令]]的按键也用于多人游戏中的开始聊天。要执行命令而不是聊天，您需要在命令前键入/c。执行的命令对所有玩家都是可见的。此外，多人游戏必须启用了允许命令工作的设置。&lt;br /&gt;
* 使用该命令设置玩家的颜色：&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/c game.players[&amp;quot;player_name&amp;quot;].color = {r=0.7, g=0.5, b=0.1, a=0.9}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
r，g和b分别代表红色，绿色和蓝色（可能的值介于0和1之间，请使用http://prideout.net/archive/colors.php上的最右边一列将颜色转换为rgb数字）。 a是阿尔法通道，也就是透明度。&lt;br /&gt;
&lt;br /&gt;
== 加入多人游戏 ==&lt;br /&gt;
&lt;br /&gt;
从版本0.13开始，端口转发不再是玩家加入多人游戏的唯一选择。现在玩家还可以通过Steam服务彼此加入游戏。&lt;br /&gt;
&lt;br /&gt;
玩家可以通过多种方式来加入一个多人游戏：&lt;br /&gt;
&lt;br /&gt;
* 通过直接输入公共IP和端口加入Factorio。&lt;br /&gt;
* 从活跃的公共服务器菜单中选择服务器加入。&lt;br /&gt;
* 通过Steam服务加入游戏。&lt;br /&gt;
* 通过局域网进行联机游戏。&lt;br /&gt;
&lt;br /&gt;
建议玩家使用语音聊天（TeamSpeak，Discord，Mumble，（译注：或者中国特色语音软件）），因为您需要协调连接，构建，处理攻击等等。TeamSpeak服务器发布在[https://forums.factorio.com/viewforum.php?f=53 多人论坛]中。 Factorio社区的公共Discord频道可以在[https://discord.gg/yGQWgy5 这里]找到。&lt;br /&gt;
&lt;br /&gt;
=== 通过输入IP以及端口加入游戏 ===&lt;br /&gt;
&lt;br /&gt;
要通过IP加入多人游戏，您需要知道有效的服务器公网IP。您可以通过社交媒体，网站或口耳相传来得到这些信息。获得IP和端口后，只需进入开始游戏 -&amp;gt;多人游戏 -&amp;gt;连接服务器，并提供所需的IP以及端口即可加入游戏。&lt;br /&gt;
&lt;br /&gt;
如果服务器设置正确并可以接受公共连接，你应该可以正常加入游戏。&lt;br /&gt;
&lt;br /&gt;
=== 通过服务器列表加入游戏 ===&lt;br /&gt;
&lt;br /&gt;
Factorio的开发者维护了一个包含所有公开服务器的列表，这些服务器向官方服务端声明并认证后，即可允许玩家通过Factorio直接加入。大多数服务器需要密码，但同时也有许多完全公用的服务器可以无密码连接。要通过服务器列表加入，请转到开始游戏 -&amp;gt;多人游戏 -&amp;gt;互联网游戏。如果询问，请提供您的Factorio.com用户名，并显示公共服务器列表。只需选择一个并加入就可以开始游戏啦。&lt;br /&gt;
&lt;br /&gt;
=== 通过Steam服务加入游戏 ===&lt;br /&gt;
&lt;br /&gt;
Steam提供了一个“游戏邀请”系统，只需使用它即可加入别人的游戏。你可以在相关文档中找到更多关于如何使用steam的信息。这是普通玩家与朋友一起进行多人游戏的最（简单）佳方式，因为它允许Steam处理所有事务。&lt;br /&gt;
&lt;br /&gt;
=== 加入一个局域网游戏 ===&lt;br /&gt;
&lt;br /&gt;
如果你在同一个局域网内有一些朋友建立了游戏（在同一个建筑物中），你就可以通过局域网加入。只需转到开始游戏 - &amp;gt;多人游戏 - &amp;gt;局域网游戏即可。&lt;br /&gt;
&lt;br /&gt;
=== 寻找其他玩家 ===&lt;br /&gt;
&lt;br /&gt;
* 使用论坛的[https://forums.factorio.com/viewforum.php?f=53 多人游戏版块]。&lt;br /&gt;
* 许多玩家使用Evolve等其他软件来与其他玩家会面。这也具有在玩家中创建虚拟局域网的“优势”。&lt;br /&gt;
* 有些人还使用[https://forums.factorio.com/viewtopic.php?f=5&amp;amp;t=9136 Steam]来寻找其他玩家。&lt;br /&gt;
* 通过一个带有各种搜索选项的外部[http://serverlist.lgms.nl/ 服务器浏览器]。&lt;br /&gt;
* 告诉你的朋友购买Factorio，然后和他们一起玩！&lt;br /&gt;
&lt;br /&gt;
=== 穿过NAT连接服务器 ===&lt;br /&gt;
&lt;br /&gt;
Factorio要求服务器（在客户端 - 服务器模式下）具有可公开访问的IP地址，或者所有播放器都在同一局域网内。如果您位于NAT后面，则必须设置端口转发（请[[Multiplayer/zh#MPlaying_over_LAN_.2F_Internet|参阅上面]]的端口号）或使用虚拟LAN软件（如Hamachi或Evolve）。&lt;br /&gt;
&lt;br /&gt;
多人游戏将以客户端 - 服务器模式启动（也是[http://www.factorio.com/blog/post/fff-99 多人转发]模式）。在这种模式下，所有客户端都将其数据包发送到服务器，服务器将流量转发给其他客户端。这样做的好处是它允许一些玩家在局域网内而另一些在外网进行游戏。由于数据包必须经过额外的转发（通过服务器），因此这样做的缺点是可能稍微有些延迟。&lt;br /&gt;
&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=53&amp;amp;t=6393 不登录到路由器转发端口]&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=53&amp;amp;t=7714 Evolve连接指南]&lt;br /&gt;
* [http://steamcommunity.com/sharedfiles/filedetails/?id=653628496 蛤蟆吃连接指南]&lt;br /&gt;
&lt;br /&gt;
== 游戏类别 ==&lt;br /&gt;
&lt;br /&gt;
=== Coop ===&lt;br /&gt;
&lt;br /&gt;
Coop-game runs without any further preparation ( http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6501 )&lt;br /&gt;
&lt;br /&gt;
=== PvP ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=14&amp;amp;t=8352 PvP with craftable biters]&lt;br /&gt;
&lt;br /&gt;
== Technical Implementation ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-76 Friday facts article]&lt;br /&gt;
&lt;br /&gt;
== More Tools/Infos ==&lt;br /&gt;
* use mods for planning. See [http://www.factorioforums.com/forum/viewtopic.php?f=14&amp;amp;t=6788 basic planner], [http://www.factorioforums.com/forum/viewtopic.php?f=14&amp;amp;t=4022 Planning-Tool-Mod]...&lt;br /&gt;
* look into [http://www.factorioforums.com/forum/viewforum.php?f=53 multiplayer forum], most other questions are answered there.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;And always remember that Factorio in v0.11 isn&#039;t intended to work well on internet connections, so keep patient. ;)&lt;br /&gt;
&lt;br /&gt;
== More Guides ==&lt;br /&gt;
&lt;br /&gt;
* [http://youtube.com/watch?v=MqsqRWNsbPM How To set up a Factorio Multiplayer Server | Guide | Tutorial], by Teaspoon&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6585 Dedicated Multiplayer Server Guide], by Icecube45&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6720 Tips to connect in multiplayer], by Nondre&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous tips ==&lt;br /&gt;
* the key for [[Console commands]] will now initiate a chat in MP. To execute commands you need to type &#039;/c&#039; before the command!&lt;br /&gt;
* Set the player&#039;s color using the command&lt;br /&gt;
 /c game.players[x].color = {r=0.7, g=0.5, b=0.1, a=0.9}&lt;br /&gt;
Where x is the player number. r, g and b are for red, green and blue respectively (possible values are between 0 and 1, use the right-most column on http://prideout.net/archive/colors.php). a is alpha channel aka Transparency of the color to the base texture. For single player, leave off the &amp;quot;[x]&amp;quot; to set the color.&lt;br /&gt;
&lt;br /&gt;
== Software for routing / establishing connection ==&lt;br /&gt;
&lt;br /&gt;
* http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6393&lt;br /&gt;
* http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6386&lt;br /&gt;
* http://www.factorioforums.com/forum/viewtopic.php?f=49&amp;amp;t=7690&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=7714 A guide for connecting with evolve]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Stub}}&lt;/div&gt;</summary>
		<author><name>Thrimbda</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Multiplayer/zh&amp;diff=155914</id>
		<title>Multiplayer/zh</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Multiplayer/zh&amp;diff=155914"/>
		<updated>2018-02-20T17:35:34Z</updated>

		<summary type="html">&lt;p&gt;Thrimbda: /* 更多指南 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
&lt;br /&gt;
除了单人游戏之外，Factorio还支持多人游戏，允许许多玩家合作并互相帮助，或者在PVP中相互对抗。本页面介绍如何设置多人游戏以及如何加入。默认情况下，多人游戏运行合作[[Game modes and options/zh|自由模式]]，所有玩家一起工作，发射一颗卫星进入太空的火箭。其他场景，包括PvP地图，可以从[https://forums.factorio.com/viewforum.php?f=36&amp;amp;sid=93d1fbe9336d31d6bac60847b6c97985 地图和场景论坛]下载。&lt;br /&gt;
&lt;br /&gt;
== 设置多人游戏 ==&lt;br /&gt;
&lt;br /&gt;
玩家可以加入多人游戏，或以本机为主机建立多人游戏，亦或由专用服务器托管。建立好的多人游戏可以被同一局域网玩家或全球其他玩家找到并加入。&lt;br /&gt;
&lt;br /&gt;
使用&#039;&#039;开始游戏&#039;&#039;菜单中的&#039;&#039;多人游戏&#039;&#039;按钮开始多人游戏，选择&#039;&#039;新游戏&#039;&#039;或&#039;&#039;载入游戏&#039;&#039;或&#039;&#039;游戏场景&#039;&#039;建立主机并开始游戏，或者选择&#039;&#039;局域网游戏&#039;&#039;或&#039;&#039;互联网游戏&#039;&#039;以连接到已经其他人的的游戏中。主机也可以选择不在服务器列表中显示建立的游戏，在这种情况下，您需要服务器的（公共或其他方式）IP地址;然后你可以选择&#039;&#039;连接服务器&#039;&#039;以加入游戏。&lt;br /&gt;
&lt;br /&gt;
注意与提示：&lt;br /&gt;
&lt;br /&gt;
* 所有玩家的游戏版本和安装的mod必须完全一致。&lt;br /&gt;
* 游戏使用端口&#039;&#039;&#039;34197&#039;&#039;&#039;。端口可以在[[Application directory|设置]]中更改。&lt;br /&gt;
* 游戏仅支持 &#039;&#039;&#039;UDP&#039;&#039;&#039;协议。请确保你的路由器有正确的设置。(游戏拥有自己的“可靠通信层”建立在UDP之上来解决丢包问题。)&lt;br /&gt;
** 请确保没有防火墙或杀毒软件阻止了UDP数据包。&lt;br /&gt;
* 同时联机人数的理论上限是[http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6481&amp;amp;p=50661#p50586 65535]，然而，实际的限制要低得多。&lt;br /&gt;
&lt;br /&gt;
===专用/Headless服务器===&lt;br /&gt;
&lt;br /&gt;
从Factorio版本0.12.0开始，可以使用--start-server命令行选项启动专用（或Headless）服务器。您可以运行factorio --help来获取Factorio接受的所有命令行参数的列表。&lt;br /&gt;
&lt;br /&gt;
在Headless模式下：&lt;br /&gt;
&lt;br /&gt;
* 图形界面未初始化。（启动速度更快，内存使用量更少，适用于Headless服务器）&lt;br /&gt;
* 在键入命令后，游戏立即开始，并按照给出的参数（存档名）加载存档。&lt;br /&gt;
* 服务器在游戏中没有角色。&lt;br /&gt;
* 在没有玩家连接的情况下，游戏会暂停。（尽管可以使用server-settings.json中的no-auto-pause选项覆盖此选项）&lt;br /&gt;
* 退出时保存游戏。（并正常执行自动保存）&lt;br /&gt;
&lt;br /&gt;
从0.13开始，--start-server命令后需要加上存档文件的路径。&lt;br /&gt;
&lt;br /&gt;
您需要在启动服务器之前创建保存文件，因为专用服务器需要提供保存文件。这可以使用--create命令行参数轻松完成。例如：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/x64/factorio --create ./saves/my-save.zip       # 这将建立一个新存档，就像在游戏中点击新游戏那样&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/x64/factorio --start-server ./saves/my-save.zip # 这将启动游戏服务端，并且会使用上一行中创建的存档&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
有几个JSON配置文件可供factorio用来更改服务器和地图设置：&lt;br /&gt;
&lt;br /&gt;
* 在map-gen-settings中设置地图生成器使用的参数，例如宽度和高度，矿块的频率和大小等。（在0.13中添加）&lt;br /&gt;
* 编辑map-settings来控制污染扩散，扩散和演变等等。（0.15版本中增加）&lt;br /&gt;
* server-setting将多个命令行选项合并到单个文件中（在0.14.12中添加）&lt;br /&gt;
&lt;br /&gt;
data子目录中包含每个参数的示例文件。&lt;br /&gt;
&lt;br /&gt;
创建新地图时，必须将--map-gen-settings和--map-settings选项与--create选项一起使用。例如：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/x64/factorio --create saves/my-save.zip --map-gen-settings my-map-gen-settings.json --map-settings my-map-settings.json&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
启动factorio服务器需要您指定server-settings.json文件的位置。默认情况下，这是在factorio数据文件夹中。例如，要使用最新保存的地图启动factorio，您可以运行：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/x64/factorio --start-server-load-latest --server-settings ./data/server-settings.json&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
要在同一台计算机上启动服务器和客户端，需要使用以下启动选项启动客户端：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--no-log-rotation&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===设置Linux Factorio服务器===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;注意&#039;&#039;&#039;：Factorio现在需要glibc 2.18版本，但CentOS / RHEL 7仅附带2.17版本，因此如果不[https://forums.factorio.com/viewtopic.php?t=54654#p324493 手动编译glibc 2.18]，本指南将不再起作用。&lt;br /&gt;
&lt;br /&gt;
本分步指南已在新安装的CentOS 7和RHEL 7环境下进行了验证，同时在大多数发行版中几乎不用做任何更改。&lt;br /&gt;
&lt;br /&gt;
本指南假设您将在/ opt / factorio下安装Headless服务器，请根据您自己的设置调整路径。我们还建议您将Factorio服务器在单独的用户中运行，以加强安全性。&lt;br /&gt;
&lt;br /&gt;
请注意，Linux有两种不同的软件包可用于运行Headless服务器。首先是普通的Linux下载，其中包含完整的游戏。另一种是特殊的[https://www.factorio.com/download-headless/stable Headless]包。Headless包不包含与纯服务器无关的任何文件，如图形和声音。它也不与服务器机器上不存在的库链接，如Xlib，libGL或libasound。如果在第三方托管服务器中运行，应选择此选项。&lt;br /&gt;
&lt;br /&gt;
本指南不处理防火墙/端口转发，因为这可以在Linux中以各种方式完成（请务必在您的特定发行版上以Linux管理员的身份了解这些内容）&lt;br /&gt;
&lt;br /&gt;
您可以使用[https://github.com/Bisa/factorio-init Linux factorio-init脚本]以更好的方式启动/停止无头服务器。该脚本将确保您只能在服务器启动时使用最新的存档（即使这是自动保存），同时还可以设置许多其他设置项，例如自动保存频率和延迟设置。此脚本还将简化与[https://github.com/narc0tiq/factorio-updater Linux factorio-updater脚本]结合使用时更新服务器的流程。&lt;br /&gt;
&lt;br /&gt;
* 下载所选软件包 - 完整游戏或是无头包 - 并将Linux tar.gz或tar.xz软件包上传到您的服务器的/tmp目录下&lt;br /&gt;
* 将/tmp中的软件包解压到/opt/factorio中&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$cd /opt/&lt;br /&gt;
&lt;br /&gt;
$sudo tar -xzf /tmp/factorio.tar.gz # 请使用正确的文件名称。它包含factorio版本号&lt;br /&gt;
$sudo tar -xJf /tmp/factorio.tar.xz # 如果您下载了.tar.xz文件请使用这条命令（版本0.15.x）&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 将一个新用户添加到您的系统中，并为其分配factorio目录的所有权（请不要以root用户身份运行，可能需要sudo）&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$useradd factorio&lt;br /&gt;
$chown -R factorio:factorio /opt/factorio&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 尝试运行服务端二进制可执行文件&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$su factorio&lt;br /&gt;
$/opt/factorio/bin/x64/factorio --start-server savename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
如果失败并提示它无法找到或打开你设置的savename.zip，这时只需从自己的计算机上传一个保存，并将其保存在/opt/factorio/saves目录中，或者使用--create ./saves/newgame.zip创建一个存档。&lt;br /&gt;
&lt;br /&gt;
===如何在匹配服务器中列出服务器托管的游戏===&lt;br /&gt;
&lt;br /&gt;
为了将游戏发布到匹配服务器，需要给Factorio一些额外的信息，而不仅仅是保存文件的位置。这些信息在&#039;&#039;服务器设置文件&#039;&#039;中提供。&lt;br /&gt;
&lt;br /&gt;
要创建服务器设置文件，请查看Factorio [[Application_directory|Application目录]]中data/server-settings.example.json中的示例文件。推荐的方法是制作此示例文件的副本并编辑副本。&lt;br /&gt;
&lt;br /&gt;
以下值可以更改：&lt;br /&gt;
&lt;br /&gt;
; Name: 这将是服务器在服务器列表中显示的名称&lt;br /&gt;
; Description: 服务器的简要说明&lt;br /&gt;
; Tags: 游戏标签列表&lt;br /&gt;
; Max Players: 允许您限制可以同时连接到服务器的玩家数量。如果你不想要限制，只需将max_players设置为0即可。&lt;br /&gt;
&lt;br /&gt;
* 服务器浏览器的可见性：可以是公共的，局域网可见的或隐藏的。&lt;br /&gt;
** 公开：服务器将出现在公共服务器列表中。这需要在下方填写登录凭据。&lt;br /&gt;
** 局域网：服务器不会出现在公共服务器列表中，但可通过“局域网游戏”按钮使用&lt;br /&gt;
** 隐藏：客户端必须使用服务器的IP地址进行连接&lt;br /&gt;
* 使用用户名和密码或验证令牌的用户凭证（可在factorio网站或player-data.json中找到）：如果您希望公开服务器，则这些是必需的。否则可以留空。&lt;br /&gt;
** 出于安全原因，建议使用身份验证令牌，因为此文档以纯文本形式存储。应该指出，身份验证令牌也是敏感信息，因此建议您保密。&lt;br /&gt;
* 服务器密码&lt;br /&gt;
** 字段名称是game_password&lt;br /&gt;
* 是否验证用户身份&lt;br /&gt;
&lt;br /&gt;
（factorio的v0.14中还有其他值。）&lt;br /&gt;
&lt;br /&gt;
===技术实施细节===&lt;br /&gt;
&lt;br /&gt;
关于多人游戏的一些技术细节的注意事项由开发团队在几个Friday Facts博客文章中发布：&lt;br /&gt;
&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-76 步调一致架构]&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-99 客户端 - 服务器连接]&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-143 NAT穿透，0.13引入]&lt;br /&gt;
&lt;br /&gt;
===更多指南===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/Thrimbda/docker_factorio_server 使用docker简化部署Factorio服务器（中文）]&lt;br /&gt;
* [https://www.chef.io/blog/2016/03/21/building-a-factorio-multiplayer-server-on-digital-ocean/ 如何用Cookbook设置Factorio服务器]&lt;br /&gt;
* [http://youtube.com/watch?v=MqsqRWNsbPM 如何设置Factorio多人游戏服务器 | 指南 | 教程]&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=53&amp;amp;t=6720 多人联机小技巧]&lt;br /&gt;
&lt;br /&gt;
===杂项===&lt;br /&gt;
&lt;br /&gt;
* [[Console/zh|控制台命令]]的按键也用于多人游戏中的开始聊天。要执行命令而不是聊天，您需要在命令前键入/c。执行的命令对所有玩家都是可见的。此外，多人游戏必须启用了允许命令工作的设置。&lt;br /&gt;
* 使用该命令设置玩家的颜色：&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/c game.players[&amp;quot;player_name&amp;quot;].color = {r=0.7, g=0.5, b=0.1, a=0.9}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
r，g和b分别代表红色，绿色和蓝色（可能的值介于0和1之间，请使用http://prideout.net/archive/colors.php上的最右边一列将颜色转换为rgb数字）。 a是阿尔法通道，也就是透明度。&lt;br /&gt;
&lt;br /&gt;
== 异星工厂服务器：为什么要p2p？ ==&lt;br /&gt;
&lt;br /&gt;
有人争论，为什么异星工厂不使用客户-服务器的模式，却采用玩家-玩家的模式。&lt;br /&gt;
在v0.11没有明确支持一个异星工厂 “服务器”。而v0.12会支持！&lt;br /&gt;
&lt;br /&gt;
如果你想制作一个24/7不间断运行的世界，你需要在你的服务器上运行异星工厂并保持运行，它的原理就如同一个玩家。服务器将如同其他人一样，成为一个在游戏中的角色。&lt;br /&gt;
&lt;br /&gt;
一些链接：&lt;br /&gt;
&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=38&amp;amp;p=74091#p73402 开发者接口]&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=5&amp;amp;t=6077#p47283 早期的接口]&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=38&amp;amp;p=70874 更好的解释]&lt;br /&gt;
&lt;br /&gt;
==== 无中央配置服务端 ====&lt;br /&gt;
&lt;br /&gt;
* Linux 无中央配置服务端 / 虚拟网络计算机 (以后可能有): http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6449&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6585 Dedicated Multiplayer Server Guide]&lt;br /&gt;
&lt;br /&gt;
== 游戏类别 ==&lt;br /&gt;
&lt;br /&gt;
=== Coop ===&lt;br /&gt;
&lt;br /&gt;
Coop-game runs without any further preparation ( http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6501 )&lt;br /&gt;
&lt;br /&gt;
=== PvP ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=14&amp;amp;t=8352 PvP with craftable biters]&lt;br /&gt;
&lt;br /&gt;
== Technical Implementation ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-76 Friday facts article]&lt;br /&gt;
&lt;br /&gt;
== More Tools/Infos ==&lt;br /&gt;
* use mods for planning. See [http://www.factorioforums.com/forum/viewtopic.php?f=14&amp;amp;t=6788 basic planner], [http://www.factorioforums.com/forum/viewtopic.php?f=14&amp;amp;t=4022 Planning-Tool-Mod]...&lt;br /&gt;
* look into [http://www.factorioforums.com/forum/viewforum.php?f=53 multiplayer forum], most other questions are answered there.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;And always remember that Factorio in v0.11 isn&#039;t intended to work well on internet connections, so keep patient. ;)&lt;br /&gt;
&lt;br /&gt;
== More Guides ==&lt;br /&gt;
&lt;br /&gt;
* [http://youtube.com/watch?v=MqsqRWNsbPM How To set up a Factorio Multiplayer Server | Guide | Tutorial], by Teaspoon&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6585 Dedicated Multiplayer Server Guide], by Icecube45&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6720 Tips to connect in multiplayer], by Nondre&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous tips ==&lt;br /&gt;
* the key for [[Console commands]] will now initiate a chat in MP. To execute commands you need to type &#039;/c&#039; before the command!&lt;br /&gt;
* Set the player&#039;s color using the command&lt;br /&gt;
 /c game.players[x].color = {r=0.7, g=0.5, b=0.1, a=0.9}&lt;br /&gt;
Where x is the player number. r, g and b are for red, green and blue respectively (possible values are between 0 and 1, use the right-most column on http://prideout.net/archive/colors.php). a is alpha channel aka Transparency of the color to the base texture. For single player, leave off the &amp;quot;[x]&amp;quot; to set the color.&lt;br /&gt;
&lt;br /&gt;
== Software for routing / establishing connection ==&lt;br /&gt;
&lt;br /&gt;
* http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6393&lt;br /&gt;
* http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6386&lt;br /&gt;
* http://www.factorioforums.com/forum/viewtopic.php?f=49&amp;amp;t=7690&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=7714 A guide for connecting with evolve]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Stub}}&lt;/div&gt;</summary>
		<author><name>Thrimbda</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Multiplayer/zh&amp;diff=155913</id>
		<title>Multiplayer/zh</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Multiplayer/zh&amp;diff=155913"/>
		<updated>2018-02-20T17:33:54Z</updated>

		<summary type="html">&lt;p&gt;Thrimbda: /* 如何在匹配服务器中列出服务器托管的游戏 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
&lt;br /&gt;
除了单人游戏之外，Factorio还支持多人游戏，允许许多玩家合作并互相帮助，或者在PVP中相互对抗。本页面介绍如何设置多人游戏以及如何加入。默认情况下，多人游戏运行合作[[Game modes and options/zh|自由模式]]，所有玩家一起工作，发射一颗卫星进入太空的火箭。其他场景，包括PvP地图，可以从[https://forums.factorio.com/viewforum.php?f=36&amp;amp;sid=93d1fbe9336d31d6bac60847b6c97985 地图和场景论坛]下载。&lt;br /&gt;
&lt;br /&gt;
== 设置多人游戏 ==&lt;br /&gt;
&lt;br /&gt;
玩家可以加入多人游戏，或以本机为主机建立多人游戏，亦或由专用服务器托管。建立好的多人游戏可以被同一局域网玩家或全球其他玩家找到并加入。&lt;br /&gt;
&lt;br /&gt;
使用&#039;&#039;开始游戏&#039;&#039;菜单中的&#039;&#039;多人游戏&#039;&#039;按钮开始多人游戏，选择&#039;&#039;新游戏&#039;&#039;或&#039;&#039;载入游戏&#039;&#039;或&#039;&#039;游戏场景&#039;&#039;建立主机并开始游戏，或者选择&#039;&#039;局域网游戏&#039;&#039;或&#039;&#039;互联网游戏&#039;&#039;以连接到已经其他人的的游戏中。主机也可以选择不在服务器列表中显示建立的游戏，在这种情况下，您需要服务器的（公共或其他方式）IP地址;然后你可以选择&#039;&#039;连接服务器&#039;&#039;以加入游戏。&lt;br /&gt;
&lt;br /&gt;
注意与提示：&lt;br /&gt;
&lt;br /&gt;
* 所有玩家的游戏版本和安装的mod必须完全一致。&lt;br /&gt;
* 游戏使用端口&#039;&#039;&#039;34197&#039;&#039;&#039;。端口可以在[[Application directory|设置]]中更改。&lt;br /&gt;
* 游戏仅支持 &#039;&#039;&#039;UDP&#039;&#039;&#039;协议。请确保你的路由器有正确的设置。(游戏拥有自己的“可靠通信层”建立在UDP之上来解决丢包问题。)&lt;br /&gt;
** 请确保没有防火墙或杀毒软件阻止了UDP数据包。&lt;br /&gt;
* 同时联机人数的理论上限是[http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6481&amp;amp;p=50661#p50586 65535]，然而，实际的限制要低得多。&lt;br /&gt;
&lt;br /&gt;
===专用/Headless服务器===&lt;br /&gt;
&lt;br /&gt;
从Factorio版本0.12.0开始，可以使用--start-server命令行选项启动专用（或Headless）服务器。您可以运行factorio --help来获取Factorio接受的所有命令行参数的列表。&lt;br /&gt;
&lt;br /&gt;
在Headless模式下：&lt;br /&gt;
&lt;br /&gt;
* 图形界面未初始化。（启动速度更快，内存使用量更少，适用于Headless服务器）&lt;br /&gt;
* 在键入命令后，游戏立即开始，并按照给出的参数（存档名）加载存档。&lt;br /&gt;
* 服务器在游戏中没有角色。&lt;br /&gt;
* 在没有玩家连接的情况下，游戏会暂停。（尽管可以使用server-settings.json中的no-auto-pause选项覆盖此选项）&lt;br /&gt;
* 退出时保存游戏。（并正常执行自动保存）&lt;br /&gt;
&lt;br /&gt;
从0.13开始，--start-server命令后需要加上存档文件的路径。&lt;br /&gt;
&lt;br /&gt;
您需要在启动服务器之前创建保存文件，因为专用服务器需要提供保存文件。这可以使用--create命令行参数轻松完成。例如：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/x64/factorio --create ./saves/my-save.zip       # 这将建立一个新存档，就像在游戏中点击新游戏那样&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/x64/factorio --start-server ./saves/my-save.zip # 这将启动游戏服务端，并且会使用上一行中创建的存档&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
有几个JSON配置文件可供factorio用来更改服务器和地图设置：&lt;br /&gt;
&lt;br /&gt;
* 在map-gen-settings中设置地图生成器使用的参数，例如宽度和高度，矿块的频率和大小等。（在0.13中添加）&lt;br /&gt;
* 编辑map-settings来控制污染扩散，扩散和演变等等。（0.15版本中增加）&lt;br /&gt;
* server-setting将多个命令行选项合并到单个文件中（在0.14.12中添加）&lt;br /&gt;
&lt;br /&gt;
data子目录中包含每个参数的示例文件。&lt;br /&gt;
&lt;br /&gt;
创建新地图时，必须将--map-gen-settings和--map-settings选项与--create选项一起使用。例如：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/x64/factorio --create saves/my-save.zip --map-gen-settings my-map-gen-settings.json --map-settings my-map-settings.json&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
启动factorio服务器需要您指定server-settings.json文件的位置。默认情况下，这是在factorio数据文件夹中。例如，要使用最新保存的地图启动factorio，您可以运行：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/x64/factorio --start-server-load-latest --server-settings ./data/server-settings.json&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
要在同一台计算机上启动服务器和客户端，需要使用以下启动选项启动客户端：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--no-log-rotation&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===设置Linux Factorio服务器===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;注意&#039;&#039;&#039;：Factorio现在需要glibc 2.18版本，但CentOS / RHEL 7仅附带2.17版本，因此如果不[https://forums.factorio.com/viewtopic.php?t=54654#p324493 手动编译glibc 2.18]，本指南将不再起作用。&lt;br /&gt;
&lt;br /&gt;
本分步指南已在新安装的CentOS 7和RHEL 7环境下进行了验证，同时在大多数发行版中几乎不用做任何更改。&lt;br /&gt;
&lt;br /&gt;
本指南假设您将在/ opt / factorio下安装Headless服务器，请根据您自己的设置调整路径。我们还建议您将Factorio服务器在单独的用户中运行，以加强安全性。&lt;br /&gt;
&lt;br /&gt;
请注意，Linux有两种不同的软件包可用于运行Headless服务器。首先是普通的Linux下载，其中包含完整的游戏。另一种是特殊的[https://www.factorio.com/download-headless/stable Headless]包。Headless包不包含与纯服务器无关的任何文件，如图形和声音。它也不与服务器机器上不存在的库链接，如Xlib，libGL或libasound。如果在第三方托管服务器中运行，应选择此选项。&lt;br /&gt;
&lt;br /&gt;
本指南不处理防火墙/端口转发，因为这可以在Linux中以各种方式完成（请务必在您的特定发行版上以Linux管理员的身份了解这些内容）&lt;br /&gt;
&lt;br /&gt;
您可以使用[https://github.com/Bisa/factorio-init Linux factorio-init脚本]以更好的方式启动/停止无头服务器。该脚本将确保您只能在服务器启动时使用最新的存档（即使这是自动保存），同时还可以设置许多其他设置项，例如自动保存频率和延迟设置。此脚本还将简化与[https://github.com/narc0tiq/factorio-updater Linux factorio-updater脚本]结合使用时更新服务器的流程。&lt;br /&gt;
&lt;br /&gt;
* 下载所选软件包 - 完整游戏或是无头包 - 并将Linux tar.gz或tar.xz软件包上传到您的服务器的/tmp目录下&lt;br /&gt;
* 将/tmp中的软件包解压到/opt/factorio中&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$cd /opt/&lt;br /&gt;
&lt;br /&gt;
$sudo tar -xzf /tmp/factorio.tar.gz # 请使用正确的文件名称。它包含factorio版本号&lt;br /&gt;
$sudo tar -xJf /tmp/factorio.tar.xz # 如果您下载了.tar.xz文件请使用这条命令（版本0.15.x）&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 将一个新用户添加到您的系统中，并为其分配factorio目录的所有权（请不要以root用户身份运行，可能需要sudo）&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$useradd factorio&lt;br /&gt;
$chown -R factorio:factorio /opt/factorio&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 尝试运行服务端二进制可执行文件&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$su factorio&lt;br /&gt;
$/opt/factorio/bin/x64/factorio --start-server savename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
如果失败并提示它无法找到或打开你设置的savename.zip，这时只需从自己的计算机上传一个保存，并将其保存在/opt/factorio/saves目录中，或者使用--create ./saves/newgame.zip创建一个存档。&lt;br /&gt;
&lt;br /&gt;
===如何在匹配服务器中列出服务器托管的游戏===&lt;br /&gt;
&lt;br /&gt;
为了将游戏发布到匹配服务器，需要给Factorio一些额外的信息，而不仅仅是保存文件的位置。这些信息在&#039;&#039;服务器设置文件&#039;&#039;中提供。&lt;br /&gt;
&lt;br /&gt;
要创建服务器设置文件，请查看Factorio [[Application_directory|Application目录]]中data/server-settings.example.json中的示例文件。推荐的方法是制作此示例文件的副本并编辑副本。&lt;br /&gt;
&lt;br /&gt;
以下值可以更改：&lt;br /&gt;
&lt;br /&gt;
; Name: 这将是服务器在服务器列表中显示的名称&lt;br /&gt;
; Description: 服务器的简要说明&lt;br /&gt;
; Tags: 游戏标签列表&lt;br /&gt;
; Max Players: 允许您限制可以同时连接到服务器的玩家数量。如果你不想要限制，只需将max_players设置为0即可。&lt;br /&gt;
&lt;br /&gt;
* 服务器浏览器的可见性：可以是公共的，局域网可见的或隐藏的。&lt;br /&gt;
** 公开：服务器将出现在公共服务器列表中。这需要在下方填写登录凭据。&lt;br /&gt;
** 局域网：服务器不会出现在公共服务器列表中，但可通过“局域网游戏”按钮使用&lt;br /&gt;
** 隐藏：客户端必须使用服务器的IP地址进行连接&lt;br /&gt;
* 使用用户名和密码或验证令牌的用户凭证（可在factorio网站或player-data.json中找到）：如果您希望公开服务器，则这些是必需的。否则可以留空。&lt;br /&gt;
** 出于安全原因，建议使用身份验证令牌，因为此文档以纯文本形式存储。应该指出，身份验证令牌也是敏感信息，因此建议您保密。&lt;br /&gt;
* 服务器密码&lt;br /&gt;
** 字段名称是game_password&lt;br /&gt;
* 是否验证用户身份&lt;br /&gt;
&lt;br /&gt;
（factorio的v0.14中还有其他值。）&lt;br /&gt;
&lt;br /&gt;
===技术实施细节===&lt;br /&gt;
&lt;br /&gt;
关于多人游戏的一些技术细节的注意事项由开发团队在几个Friday Facts博客文章中发布：&lt;br /&gt;
&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-76 步调一致架构]&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-99 客户端 - 服务器连接]&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-143 NAT穿透，0.13引入]&lt;br /&gt;
&lt;br /&gt;
===更多指南===&lt;br /&gt;
&lt;br /&gt;
* [https://www.chef.io/blog/2016/03/21/building-a-factorio-multiplayer-server-on-digital-ocean/ 如何用Cookbook设置Factorio服务器]&lt;br /&gt;
* [http://youtube.com/watch?v=MqsqRWNsbPM 如何设置Factorio多人游戏服务器 | 指南 | 教程]&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=53&amp;amp;t=6720 多人联机小技巧]&lt;br /&gt;
&lt;br /&gt;
===杂项===&lt;br /&gt;
&lt;br /&gt;
* [[Console/zh|控制台命令]]的按键也用于多人游戏中的开始聊天。要执行命令而不是聊天，您需要在命令前键入/c。执行的命令对所有玩家都是可见的。此外，多人游戏必须启用了允许命令工作的设置。&lt;br /&gt;
* 使用该命令设置玩家的颜色：&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/c game.players[&amp;quot;player_name&amp;quot;].color = {r=0.7, g=0.5, b=0.1, a=0.9}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
r，g和b分别代表红色，绿色和蓝色（可能的值介于0和1之间，请使用http://prideout.net/archive/colors.php上的最右边一列将颜色转换为rgb数字）。 a是阿尔法通道，也就是透明度。&lt;br /&gt;
&lt;br /&gt;
== 异星工厂服务器：为什么要p2p？ ==&lt;br /&gt;
&lt;br /&gt;
有人争论，为什么异星工厂不使用客户-服务器的模式，却采用玩家-玩家的模式。&lt;br /&gt;
在v0.11没有明确支持一个异星工厂 “服务器”。而v0.12会支持！&lt;br /&gt;
&lt;br /&gt;
如果你想制作一个24/7不间断运行的世界，你需要在你的服务器上运行异星工厂并保持运行，它的原理就如同一个玩家。服务器将如同其他人一样，成为一个在游戏中的角色。&lt;br /&gt;
&lt;br /&gt;
一些链接：&lt;br /&gt;
&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=38&amp;amp;p=74091#p73402 开发者接口]&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=5&amp;amp;t=6077#p47283 早期的接口]&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=38&amp;amp;p=70874 更好的解释]&lt;br /&gt;
&lt;br /&gt;
==== 无中央配置服务端 ====&lt;br /&gt;
&lt;br /&gt;
* Linux 无中央配置服务端 / 虚拟网络计算机 (以后可能有): http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6449&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6585 Dedicated Multiplayer Server Guide]&lt;br /&gt;
&lt;br /&gt;
== 游戏类别 ==&lt;br /&gt;
&lt;br /&gt;
=== Coop ===&lt;br /&gt;
&lt;br /&gt;
Coop-game runs without any further preparation ( http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6501 )&lt;br /&gt;
&lt;br /&gt;
=== PvP ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=14&amp;amp;t=8352 PvP with craftable biters]&lt;br /&gt;
&lt;br /&gt;
== Technical Implementation ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-76 Friday facts article]&lt;br /&gt;
&lt;br /&gt;
== More Tools/Infos ==&lt;br /&gt;
* use mods for planning. See [http://www.factorioforums.com/forum/viewtopic.php?f=14&amp;amp;t=6788 basic planner], [http://www.factorioforums.com/forum/viewtopic.php?f=14&amp;amp;t=4022 Planning-Tool-Mod]...&lt;br /&gt;
* look into [http://www.factorioforums.com/forum/viewforum.php?f=53 multiplayer forum], most other questions are answered there.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;And always remember that Factorio in v0.11 isn&#039;t intended to work well on internet connections, so keep patient. ;)&lt;br /&gt;
&lt;br /&gt;
== More Guides ==&lt;br /&gt;
&lt;br /&gt;
* [http://youtube.com/watch?v=MqsqRWNsbPM How To set up a Factorio Multiplayer Server | Guide | Tutorial], by Teaspoon&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6585 Dedicated Multiplayer Server Guide], by Icecube45&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6720 Tips to connect in multiplayer], by Nondre&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous tips ==&lt;br /&gt;
* the key for [[Console commands]] will now initiate a chat in MP. To execute commands you need to type &#039;/c&#039; before the command!&lt;br /&gt;
* Set the player&#039;s color using the command&lt;br /&gt;
 /c game.players[x].color = {r=0.7, g=0.5, b=0.1, a=0.9}&lt;br /&gt;
Where x is the player number. r, g and b are for red, green and blue respectively (possible values are between 0 and 1, use the right-most column on http://prideout.net/archive/colors.php). a is alpha channel aka Transparency of the color to the base texture. For single player, leave off the &amp;quot;[x]&amp;quot; to set the color.&lt;br /&gt;
&lt;br /&gt;
== Software for routing / establishing connection ==&lt;br /&gt;
&lt;br /&gt;
* http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6393&lt;br /&gt;
* http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6386&lt;br /&gt;
* http://www.factorioforums.com/forum/viewtopic.php?f=49&amp;amp;t=7690&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=7714 A guide for connecting with evolve]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Stub}}&lt;/div&gt;</summary>
		<author><name>Thrimbda</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Multiplayer/zh&amp;diff=155912</id>
		<title>Multiplayer/zh</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Multiplayer/zh&amp;diff=155912"/>
		<updated>2018-02-20T17:32:49Z</updated>

		<summary type="html">&lt;p&gt;Thrimbda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
&lt;br /&gt;
除了单人游戏之外，Factorio还支持多人游戏，允许许多玩家合作并互相帮助，或者在PVP中相互对抗。本页面介绍如何设置多人游戏以及如何加入。默认情况下，多人游戏运行合作[[Game modes and options/zh|自由模式]]，所有玩家一起工作，发射一颗卫星进入太空的火箭。其他场景，包括PvP地图，可以从[https://forums.factorio.com/viewforum.php?f=36&amp;amp;sid=93d1fbe9336d31d6bac60847b6c97985 地图和场景论坛]下载。&lt;br /&gt;
&lt;br /&gt;
== 设置多人游戏 ==&lt;br /&gt;
&lt;br /&gt;
玩家可以加入多人游戏，或以本机为主机建立多人游戏，亦或由专用服务器托管。建立好的多人游戏可以被同一局域网玩家或全球其他玩家找到并加入。&lt;br /&gt;
&lt;br /&gt;
使用&#039;&#039;开始游戏&#039;&#039;菜单中的&#039;&#039;多人游戏&#039;&#039;按钮开始多人游戏，选择&#039;&#039;新游戏&#039;&#039;或&#039;&#039;载入游戏&#039;&#039;或&#039;&#039;游戏场景&#039;&#039;建立主机并开始游戏，或者选择&#039;&#039;局域网游戏&#039;&#039;或&#039;&#039;互联网游戏&#039;&#039;以连接到已经其他人的的游戏中。主机也可以选择不在服务器列表中显示建立的游戏，在这种情况下，您需要服务器的（公共或其他方式）IP地址;然后你可以选择&#039;&#039;连接服务器&#039;&#039;以加入游戏。&lt;br /&gt;
&lt;br /&gt;
注意与提示：&lt;br /&gt;
&lt;br /&gt;
* 所有玩家的游戏版本和安装的mod必须完全一致。&lt;br /&gt;
* 游戏使用端口&#039;&#039;&#039;34197&#039;&#039;&#039;。端口可以在[[Application directory|设置]]中更改。&lt;br /&gt;
* 游戏仅支持 &#039;&#039;&#039;UDP&#039;&#039;&#039;协议。请确保你的路由器有正确的设置。(游戏拥有自己的“可靠通信层”建立在UDP之上来解决丢包问题。)&lt;br /&gt;
** 请确保没有防火墙或杀毒软件阻止了UDP数据包。&lt;br /&gt;
* 同时联机人数的理论上限是[http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6481&amp;amp;p=50661#p50586 65535]，然而，实际的限制要低得多。&lt;br /&gt;
&lt;br /&gt;
===专用/Headless服务器===&lt;br /&gt;
&lt;br /&gt;
从Factorio版本0.12.0开始，可以使用--start-server命令行选项启动专用（或Headless）服务器。您可以运行factorio --help来获取Factorio接受的所有命令行参数的列表。&lt;br /&gt;
&lt;br /&gt;
在Headless模式下：&lt;br /&gt;
&lt;br /&gt;
* 图形界面未初始化。（启动速度更快，内存使用量更少，适用于Headless服务器）&lt;br /&gt;
* 在键入命令后，游戏立即开始，并按照给出的参数（存档名）加载存档。&lt;br /&gt;
* 服务器在游戏中没有角色。&lt;br /&gt;
* 在没有玩家连接的情况下，游戏会暂停。（尽管可以使用server-settings.json中的no-auto-pause选项覆盖此选项）&lt;br /&gt;
* 退出时保存游戏。（并正常执行自动保存）&lt;br /&gt;
&lt;br /&gt;
从0.13开始，--start-server命令后需要加上存档文件的路径。&lt;br /&gt;
&lt;br /&gt;
您需要在启动服务器之前创建保存文件，因为专用服务器需要提供保存文件。这可以使用--create命令行参数轻松完成。例如：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/x64/factorio --create ./saves/my-save.zip       # 这将建立一个新存档，就像在游戏中点击新游戏那样&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/x64/factorio --start-server ./saves/my-save.zip # 这将启动游戏服务端，并且会使用上一行中创建的存档&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
有几个JSON配置文件可供factorio用来更改服务器和地图设置：&lt;br /&gt;
&lt;br /&gt;
* 在map-gen-settings中设置地图生成器使用的参数，例如宽度和高度，矿块的频率和大小等。（在0.13中添加）&lt;br /&gt;
* 编辑map-settings来控制污染扩散，扩散和演变等等。（0.15版本中增加）&lt;br /&gt;
* server-setting将多个命令行选项合并到单个文件中（在0.14.12中添加）&lt;br /&gt;
&lt;br /&gt;
data子目录中包含每个参数的示例文件。&lt;br /&gt;
&lt;br /&gt;
创建新地图时，必须将--map-gen-settings和--map-settings选项与--create选项一起使用。例如：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/x64/factorio --create saves/my-save.zip --map-gen-settings my-map-gen-settings.json --map-settings my-map-settings.json&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
启动factorio服务器需要您指定server-settings.json文件的位置。默认情况下，这是在factorio数据文件夹中。例如，要使用最新保存的地图启动factorio，您可以运行：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/x64/factorio --start-server-load-latest --server-settings ./data/server-settings.json&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
要在同一台计算机上启动服务器和客户端，需要使用以下启动选项启动客户端：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--no-log-rotation&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===设置Linux Factorio服务器===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;注意&#039;&#039;&#039;：Factorio现在需要glibc 2.18版本，但CentOS / RHEL 7仅附带2.17版本，因此如果不[https://forums.factorio.com/viewtopic.php?t=54654#p324493 手动编译glibc 2.18]，本指南将不再起作用。&lt;br /&gt;
&lt;br /&gt;
本分步指南已在新安装的CentOS 7和RHEL 7环境下进行了验证，同时在大多数发行版中几乎不用做任何更改。&lt;br /&gt;
&lt;br /&gt;
本指南假设您将在/ opt / factorio下安装Headless服务器，请根据您自己的设置调整路径。我们还建议您将Factorio服务器在单独的用户中运行，以加强安全性。&lt;br /&gt;
&lt;br /&gt;
请注意，Linux有两种不同的软件包可用于运行Headless服务器。首先是普通的Linux下载，其中包含完整的游戏。另一种是特殊的[https://www.factorio.com/download-headless/stable Headless]包。Headless包不包含与纯服务器无关的任何文件，如图形和声音。它也不与服务器机器上不存在的库链接，如Xlib，libGL或libasound。如果在第三方托管服务器中运行，应选择此选项。&lt;br /&gt;
&lt;br /&gt;
本指南不处理防火墙/端口转发，因为这可以在Linux中以各种方式完成（请务必在您的特定发行版上以Linux管理员的身份了解这些内容）&lt;br /&gt;
&lt;br /&gt;
您可以使用[https://github.com/Bisa/factorio-init Linux factorio-init脚本]以更好的方式启动/停止无头服务器。该脚本将确保您只能在服务器启动时使用最新的存档（即使这是自动保存），同时还可以设置许多其他设置项，例如自动保存频率和延迟设置。此脚本还将简化与[https://github.com/narc0tiq/factorio-updater Linux factorio-updater脚本]结合使用时更新服务器的流程。&lt;br /&gt;
&lt;br /&gt;
* 下载所选软件包 - 完整游戏或是无头包 - 并将Linux tar.gz或tar.xz软件包上传到您的服务器的/tmp目录下&lt;br /&gt;
* 将/tmp中的软件包解压到/opt/factorio中&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$cd /opt/&lt;br /&gt;
&lt;br /&gt;
$sudo tar -xzf /tmp/factorio.tar.gz # 请使用正确的文件名称。它包含factorio版本号&lt;br /&gt;
$sudo tar -xJf /tmp/factorio.tar.xz # 如果您下载了.tar.xz文件请使用这条命令（版本0.15.x）&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 将一个新用户添加到您的系统中，并为其分配factorio目录的所有权（请不要以root用户身份运行，可能需要sudo）&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$useradd factorio&lt;br /&gt;
$chown -R factorio:factorio /opt/factorio&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 尝试运行服务端二进制可执行文件&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$su factorio&lt;br /&gt;
$/opt/factorio/bin/x64/factorio --start-server savename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
如果失败并提示它无法找到或打开你设置的savename.zip，这时只需从自己的计算机上传一个保存，并将其保存在/opt/factorio/saves目录中，或者使用--create ./saves/newgame.zip创建一个存档。&lt;br /&gt;
&lt;br /&gt;
===如何在匹配服务器中列出服务器托管的游戏===&lt;br /&gt;
&lt;br /&gt;
为了将游戏发布到匹配服务器，需要给Factorio一些额外的信息，而不仅仅是保存文件的位置。这些信息在&#039;&#039;服务器设置文件&#039;&#039;中提供。&lt;br /&gt;
&lt;br /&gt;
要创建服务器设置文件，请查看Factorio [https://wiki.factorio.com/Application_directory Application目录]中data/server-settings.example.json中的示例文件。推荐的方法是制作此示例文件的副本并编辑副本。&lt;br /&gt;
&lt;br /&gt;
以下值可以更改：&lt;br /&gt;
&lt;br /&gt;
; Name: 这将是服务器在服务器列表中显示的名称&lt;br /&gt;
; Description: 服务器的简要说明&lt;br /&gt;
; Tags: 游戏标签列表&lt;br /&gt;
; Max Players: 允许您限制可以同时连接到服务器的玩家数量。如果你不想要限制，只需将max_players设置为0即可。&lt;br /&gt;
&lt;br /&gt;
* 服务器浏览器的可见性：可以是公共的，局域网可见的或隐藏的。&lt;br /&gt;
** 公开：服务器将出现在公共服务器列表中。这需要在下方填写登录凭据。&lt;br /&gt;
** 局域网：服务器不会出现在公共服务器列表中，但可通过“局域网游戏”按钮使用&lt;br /&gt;
** 隐藏：客户端必须使用服务器的IP地址进行连接&lt;br /&gt;
* 使用用户名和密码或验证令牌的用户凭证（可在factorio网站或player-data.json中找到）：如果您希望公开服务器，则这些是必需的。否则可以留空。&lt;br /&gt;
** 出于安全原因，建议使用身份验证令牌，因为此文档以纯文本形式存储。应该指出，身份验证令牌也是敏感信息，因此建议您保密。&lt;br /&gt;
* 服务器密码&lt;br /&gt;
** 字段名称是game_password&lt;br /&gt;
* 是否验证用户身份&lt;br /&gt;
&lt;br /&gt;
（factorio的v0.14中还有其他值。）&lt;br /&gt;
&lt;br /&gt;
===技术实施细节===&lt;br /&gt;
&lt;br /&gt;
关于多人游戏的一些技术细节的注意事项由开发团队在几个Friday Facts博客文章中发布：&lt;br /&gt;
&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-76 步调一致架构]&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-99 客户端 - 服务器连接]&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-143 NAT穿透，0.13引入]&lt;br /&gt;
&lt;br /&gt;
===更多指南===&lt;br /&gt;
&lt;br /&gt;
* [https://www.chef.io/blog/2016/03/21/building-a-factorio-multiplayer-server-on-digital-ocean/ 如何用Cookbook设置Factorio服务器]&lt;br /&gt;
* [http://youtube.com/watch?v=MqsqRWNsbPM 如何设置Factorio多人游戏服务器 | 指南 | 教程]&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=53&amp;amp;t=6720 多人联机小技巧]&lt;br /&gt;
&lt;br /&gt;
===杂项===&lt;br /&gt;
&lt;br /&gt;
* [[Console/zh|控制台命令]]的按键也用于多人游戏中的开始聊天。要执行命令而不是聊天，您需要在命令前键入/c。执行的命令对所有玩家都是可见的。此外，多人游戏必须启用了允许命令工作的设置。&lt;br /&gt;
* 使用该命令设置玩家的颜色：&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/c game.players[&amp;quot;player_name&amp;quot;].color = {r=0.7, g=0.5, b=0.1, a=0.9}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
r，g和b分别代表红色，绿色和蓝色（可能的值介于0和1之间，请使用http://prideout.net/archive/colors.php上的最右边一列将颜色转换为rgb数字）。 a是阿尔法通道，也就是透明度。&lt;br /&gt;
&lt;br /&gt;
== 异星工厂服务器：为什么要p2p？ ==&lt;br /&gt;
&lt;br /&gt;
有人争论，为什么异星工厂不使用客户-服务器的模式，却采用玩家-玩家的模式。&lt;br /&gt;
在v0.11没有明确支持一个异星工厂 “服务器”。而v0.12会支持！&lt;br /&gt;
&lt;br /&gt;
如果你想制作一个24/7不间断运行的世界，你需要在你的服务器上运行异星工厂并保持运行，它的原理就如同一个玩家。服务器将如同其他人一样，成为一个在游戏中的角色。&lt;br /&gt;
&lt;br /&gt;
一些链接：&lt;br /&gt;
&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=38&amp;amp;p=74091#p73402 开发者接口]&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=5&amp;amp;t=6077#p47283 早期的接口]&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=38&amp;amp;p=70874 更好的解释]&lt;br /&gt;
&lt;br /&gt;
==== 无中央配置服务端 ====&lt;br /&gt;
&lt;br /&gt;
* Linux 无中央配置服务端 / 虚拟网络计算机 (以后可能有): http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6449&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6585 Dedicated Multiplayer Server Guide]&lt;br /&gt;
&lt;br /&gt;
== 游戏类别 ==&lt;br /&gt;
&lt;br /&gt;
=== Coop ===&lt;br /&gt;
&lt;br /&gt;
Coop-game runs without any further preparation ( http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6501 )&lt;br /&gt;
&lt;br /&gt;
=== PvP ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=14&amp;amp;t=8352 PvP with craftable biters]&lt;br /&gt;
&lt;br /&gt;
== Technical Implementation ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-76 Friday facts article]&lt;br /&gt;
&lt;br /&gt;
== More Tools/Infos ==&lt;br /&gt;
* use mods for planning. See [http://www.factorioforums.com/forum/viewtopic.php?f=14&amp;amp;t=6788 basic planner], [http://www.factorioforums.com/forum/viewtopic.php?f=14&amp;amp;t=4022 Planning-Tool-Mod]...&lt;br /&gt;
* look into [http://www.factorioforums.com/forum/viewforum.php?f=53 multiplayer forum], most other questions are answered there.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;And always remember that Factorio in v0.11 isn&#039;t intended to work well on internet connections, so keep patient. ;)&lt;br /&gt;
&lt;br /&gt;
== More Guides ==&lt;br /&gt;
&lt;br /&gt;
* [http://youtube.com/watch?v=MqsqRWNsbPM How To set up a Factorio Multiplayer Server | Guide | Tutorial], by Teaspoon&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6585 Dedicated Multiplayer Server Guide], by Icecube45&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6720 Tips to connect in multiplayer], by Nondre&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous tips ==&lt;br /&gt;
* the key for [[Console commands]] will now initiate a chat in MP. To execute commands you need to type &#039;/c&#039; before the command!&lt;br /&gt;
* Set the player&#039;s color using the command&lt;br /&gt;
 /c game.players[x].color = {r=0.7, g=0.5, b=0.1, a=0.9}&lt;br /&gt;
Where x is the player number. r, g and b are for red, green and blue respectively (possible values are between 0 and 1, use the right-most column on http://prideout.net/archive/colors.php). a is alpha channel aka Transparency of the color to the base texture. For single player, leave off the &amp;quot;[x]&amp;quot; to set the color.&lt;br /&gt;
&lt;br /&gt;
== Software for routing / establishing connection ==&lt;br /&gt;
&lt;br /&gt;
* http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6393&lt;br /&gt;
* http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6386&lt;br /&gt;
* http://www.factorioforums.com/forum/viewtopic.php?f=49&amp;amp;t=7690&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=7714 A guide for connecting with evolve]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Stub}}&lt;/div&gt;</summary>
		<author><name>Thrimbda</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Multiplayer/zh&amp;diff=155911</id>
		<title>Multiplayer/zh</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Multiplayer/zh&amp;diff=155911"/>
		<updated>2018-02-20T17:30:58Z</updated>

		<summary type="html">&lt;p&gt;Thrimbda: /* 在局域网/互联网上联机 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
&lt;br /&gt;
除了单人游戏之外，Factorio还支持多人游戏，允许许多玩家合作并互相帮助，或者在PVP中相互对抗。本页面介绍如何设置多人游戏以及如何加入。默认情况下，多人游戏运行合作[[Game modes and options/zh|自由模式]]，所有玩家一起工作，发射一颗卫星进入太空的火箭。其他场景，包括PvP地图，可以从[https://forums.factorio.com/viewforum.php?f=36&amp;amp;sid=93d1fbe9336d31d6bac60847b6c97985 地图和场景论坛]下载。&lt;br /&gt;
&lt;br /&gt;
== 设置多人游戏 ==&lt;br /&gt;
&lt;br /&gt;
玩家可以加入多人游戏，或以本机为主机建立多人游戏，亦或由专用服务器托管。建立好的多人游戏可以被同一局域网玩家或全球其他玩家找到并加入。&lt;br /&gt;
&lt;br /&gt;
使用&#039;&#039;开始游戏&#039;&#039;菜单中的&#039;&#039;多人游戏&#039;&#039;按钮开始多人游戏，选择&#039;&#039;新游戏&#039;&#039;或&#039;&#039;载入游戏&#039;&#039;或&#039;&#039;游戏场景&#039;&#039;建立主机并开始游戏，或者选择&#039;&#039;局域网游戏&#039;&#039;或&#039;&#039;互联网游戏&#039;&#039;以连接到已经其他人的的游戏中。主机也可以选择不在服务器列表中显示建立的游戏，在这种情况下，您需要服务器的（公共或其他方式）IP地址;然后你可以选择&#039;&#039;连接服务器&#039;&#039;以加入游戏。&lt;br /&gt;
&lt;br /&gt;
注意与提示：&lt;br /&gt;
&lt;br /&gt;
* 所有玩家的游戏版本和安装的mod必须完全一致。&lt;br /&gt;
* 游戏使用端口&#039;&#039;&#039;34197&#039;&#039;&#039;。端口可以在[[Application directory|设置]]中更改。&lt;br /&gt;
* 游戏仅支持 &#039;&#039;&#039;UDP&#039;&#039;&#039;协议。请确保你的路由器有正确的设置。(游戏拥有自己的“可靠通信层”建立在UDP之上来解决丢包问题。)&lt;br /&gt;
** 请确保没有防火墙或杀毒软件阻止了UDP数据包。&lt;br /&gt;
* 同时联机人数的理论上限是[http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6481&amp;amp;p=50661#p50586 65535]，然而，实际的限制要低得多。&lt;br /&gt;
&lt;br /&gt;
===专用/Headless服务器===&lt;br /&gt;
&lt;br /&gt;
从Factorio版本0.12.0开始，可以使用--start-server命令行选项启动专用（或Headless）服务器。您可以运行factorio --help来获取Factorio接受的所有命令行参数的列表。&lt;br /&gt;
&lt;br /&gt;
在Headless模式下：&lt;br /&gt;
&lt;br /&gt;
* 图形界面未初始化。（启动速度更快，内存使用量更少，适用于Headless服务器）&lt;br /&gt;
* 在键入命令后，游戏立即开始，并按照给出的参数（存档名）加载存档。&lt;br /&gt;
* 服务器在游戏中没有角色。&lt;br /&gt;
* 在没有玩家连接的情况下，游戏会暂停。（尽管可以使用server-settings.json中的no-auto-pause选项覆盖此选项）&lt;br /&gt;
* 退出时保存游戏。（并正常执行自动保存）&lt;br /&gt;
&lt;br /&gt;
从0.13开始，--start-server命令后需要加上存档文件的路径。&lt;br /&gt;
&lt;br /&gt;
您需要在启动服务器之前创建保存文件，因为专用服务器需要提供保存文件。这可以使用--create命令行参数轻松完成。例如：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/x64/factorio --create ./saves/my-save.zip       # 这将建立一个新存档，就像在游戏中点击新游戏那样&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/x64/factorio --start-server ./saves/my-save.zip # 这将启动游戏服务端，并且会使用上一行中创建的存档&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
有几个JSON配置文件可供factorio用来更改服务器和地图设置：&lt;br /&gt;
&lt;br /&gt;
* 在map-gen-settings中设置地图生成器使用的参数，例如宽度和高度，矿块的频率和大小等。（在0.13中添加）&lt;br /&gt;
* 编辑map-settings来控制污染扩散，扩散和演变等等。（0.15版本中增加）&lt;br /&gt;
* server-setting将多个命令行选项合并到单个文件中（在0.14.12中添加）&lt;br /&gt;
&lt;br /&gt;
data子目录中包含每个参数的示例文件。&lt;br /&gt;
&lt;br /&gt;
创建新地图时，必须将--map-gen-settings和--map-settings选项与--create选项一起使用。例如：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/x64/factorio --create saves/my-save.zip --map-gen-settings my-map-gen-settings.json --map-settings my-map-settings.json&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
启动factorio服务器需要您指定server-settings.json文件的位置。默认情况下，这是在factorio数据文件夹中。例如，要使用最新保存的地图启动factorio，您可以运行：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/x64/factorio --start-server-load-latest --server-settings ./data/server-settings.json&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
要在同一台计算机上启动服务器和客户端，需要使用以下启动选项启动客户端：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--no-log-rotation&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===设置Linux Factorio服务器===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;注意&#039;&#039;&#039;：Factorio现在需要glibc 2.18版本，但CentOS / RHEL 7仅附带2.17版本，因此如果不[https://forums.factorio.com/viewtopic.php?t=54654#p324493 手动编译glibc 2.18]，本指南将不再起作用。&lt;br /&gt;
&lt;br /&gt;
本分步指南已在新安装的CentOS 7和RHEL 7环境下进行了验证，同时在大多数发行版中几乎不用做任何更改。&lt;br /&gt;
&lt;br /&gt;
本指南假设您将在/ opt / factorio下安装Headless服务器，请根据您自己的设置调整路径。我们还建议您将Factorio服务器在单独的用户中运行，以加强安全性。&lt;br /&gt;
&lt;br /&gt;
请注意，Linux有两种不同的软件包可用于运行Headless服务器。首先是普通的Linux下载，其中包含完整的游戏。另一种是特殊的[https://www.factorio.com/download-headless/stable Headless]包。Headless包不包含与纯服务器无关的任何文件，如图形和声音。它也不与服务器机器上不存在的库链接，如Xlib，libGL或libasound。如果在第三方托管服务器中运行，应选择此选项。&lt;br /&gt;
&lt;br /&gt;
本指南不处理防火墙/端口转发，因为这可以在Linux中以各种方式完成（请务必在您的特定发行版上以Linux管理员的身份了解这些内容）&lt;br /&gt;
&lt;br /&gt;
您可以使用[https://github.com/Bisa/factorio-init Linux factorio-init脚本]以更好的方式启动/停止无头服务器。该脚本将确保您只能在服务器启动时使用最新的存档（即使这是自动保存），同时还可以设置许多其他设置项，例如自动保存频率和延迟设置。此脚本还将简化与[https://github.com/narc0tiq/factorio-updater Linux factorio-updater脚本]结合使用时更新服务器的流程。&lt;br /&gt;
&lt;br /&gt;
* 下载所选软件包 - 完整游戏或是无头包 - 并将Linux tar.gz或tar.xz软件包上传到您的服务器的/tmp目录下&lt;br /&gt;
* 将/tmp中的软件包解压到/opt/factorio中&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$cd /opt/&lt;br /&gt;
&lt;br /&gt;
$sudo tar -xzf /tmp/factorio.tar.gz # 请使用正确的文件名称。它包含factorio版本号&lt;br /&gt;
$sudo tar -xJf /tmp/factorio.tar.xz # 如果您下载了.tar.xz文件请使用这条命令（版本0.15.x）&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 将一个新用户添加到您的系统中，并为其分配factorio目录的所有权（请不要以root用户身份运行，可能需要sudo）&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$useradd factorio&lt;br /&gt;
$chown -R factorio:factorio /opt/factorio&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 尝试运行服务端二进制可执行文件&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$su factorio&lt;br /&gt;
$/opt/factorio/bin/x64/factorio --start-server savename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
如果失败并提示它无法找到或打开你设置的savename.zip，这时只需从自己的计算机上传一个保存，并将其保存在/opt/factorio/saves目录中，或者使用--create ./saves/newgame.zip创建一个存档。&lt;br /&gt;
&lt;br /&gt;
===如何在匹配服务器中列出服务器托管的游戏===&lt;br /&gt;
&lt;br /&gt;
为了将游戏发布到匹配服务器，需要给Factorio一些额外的信息，而不仅仅是保存文件的位置。这些信息在&#039;&#039;服务器设置文件&#039;&#039;中提供。&lt;br /&gt;
&lt;br /&gt;
要创建服务器设置文件，请查看Factorio [https://wiki.factorio.com/Application_directory Application目录]中data/server-settings.example.json中的示例文件。推荐的方法是制作此示例文件的副本并编辑副本。&lt;br /&gt;
&lt;br /&gt;
以下值可以更改：&lt;br /&gt;
&lt;br /&gt;
; Name: 这将是服务器在服务器列表中显示的名称&lt;br /&gt;
; Description: 服务器的简要说明&lt;br /&gt;
; Tags: 游戏标签列表&lt;br /&gt;
; Max Players: 允许您限制可以同时连接到服务器的玩家数量。如果你不想要限制，只需将max_players设置为0即可。&lt;br /&gt;
&lt;br /&gt;
* 服务器浏览器的可见性：可以是公共的，局域网可见的或隐藏的。&lt;br /&gt;
** 公开：服务器将出现在公共服务器列表中。这需要在下方填写登录凭据。&lt;br /&gt;
** 局域网：服务器不会出现在公共服务器列表中，但可通过“局域网游戏”按钮使用&lt;br /&gt;
** 隐藏：客户端必须使用服务器的IP地址进行连接&lt;br /&gt;
* 使用用户名和密码或验证令牌的用户凭证（可在factorio网站或player-data.json中找到）：如果您希望公开服务器，则这些是必需的。否则可以留空。&lt;br /&gt;
** 出于安全原因，建议使用身份验证令牌，因为此文档以纯文本形式存储。应该指出，身份验证令牌也是敏感信息，因此建议您保密。&lt;br /&gt;
* 服务器密码&lt;br /&gt;
** 字段名称是game_password&lt;br /&gt;
* 是否验证用户身份&lt;br /&gt;
&lt;br /&gt;
（factorio的v0.14中还有其他值。）&lt;br /&gt;
&lt;br /&gt;
===技术实施细节===&lt;br /&gt;
&lt;br /&gt;
关于多人游戏的一些技术细节的注意事项由开发团队在几个Friday Facts博客文章中发布：&lt;br /&gt;
&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-76 步调一致架构]&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-99 客户端 - 服务器连接]&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-143 NAT穿透，0.13引入]&lt;br /&gt;
&lt;br /&gt;
===更多指南===&lt;br /&gt;
&lt;br /&gt;
* [https://www.chef.io/blog/2016/03/21/building-a-factorio-multiplayer-server-on-digital-ocean/如何用Cookbook设置Factorio服务器]&lt;br /&gt;
* [http://youtube.com/watch?v=MqsqRWNsbPM 如何设置Factorio多人游戏服务器 | 指南 | 教程]&lt;br /&gt;
* [https://forums.factorio.com/viewtopic.php?f=53&amp;amp;t=6720 多人联机小技巧]&lt;br /&gt;
&lt;br /&gt;
===杂项===&lt;br /&gt;
&lt;br /&gt;
* [[Console/zh|控制台命令]]的按键也用于多人游戏中的开始聊天。要执行命令而不是聊天，您需要在命令前键入/c。执行的命令对所有玩家都是可见的。此外，多人游戏必须启用了允许命令工作的设置。&lt;br /&gt;
* 使用该命令设置玩家的颜色：&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/c game.players[&amp;quot;player_name&amp;quot;].color = {r=0.7, g=0.5, b=0.1, a=0.9}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
r，g和b分别代表红色，绿色和蓝色（可能的值介于0和1之间，请使用http://prideout.net/archive/colors.php上的最右边一列将颜色转换为rgb数字）。 a是阿尔法通道，也就是透明度。&lt;br /&gt;
&lt;br /&gt;
== 异星工厂服务器：为什么要p2p？ ==&lt;br /&gt;
&lt;br /&gt;
有人争论，为什么异星工厂不使用客户-服务器的模式，却采用玩家-玩家的模式。&lt;br /&gt;
在v0.11没有明确支持一个异星工厂 “服务器”。而v0.12会支持！&lt;br /&gt;
&lt;br /&gt;
如果你想制作一个24/7不间断运行的世界，你需要在你的服务器上运行异星工厂并保持运行，它的原理就如同一个玩家。服务器将如同其他人一样，成为一个在游戏中的角色。&lt;br /&gt;
&lt;br /&gt;
一些链接：&lt;br /&gt;
&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=38&amp;amp;p=74091#p73402 开发者接口]&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=5&amp;amp;t=6077#p47283 早期的接口]&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=38&amp;amp;p=70874 更好的解释]&lt;br /&gt;
&lt;br /&gt;
==== 无中央配置服务端 ====&lt;br /&gt;
&lt;br /&gt;
* Linux 无中央配置服务端 / 虚拟网络计算机 (以后可能有): http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6449&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6585 Dedicated Multiplayer Server Guide]&lt;br /&gt;
&lt;br /&gt;
== 游戏类别 ==&lt;br /&gt;
&lt;br /&gt;
=== Coop ===&lt;br /&gt;
&lt;br /&gt;
Coop-game runs without any further preparation ( http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6501 )&lt;br /&gt;
&lt;br /&gt;
=== PvP ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=14&amp;amp;t=8352 PvP with craftable biters]&lt;br /&gt;
&lt;br /&gt;
== Technical Implementation ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-76 Friday facts article]&lt;br /&gt;
&lt;br /&gt;
== More Tools/Infos ==&lt;br /&gt;
* use mods for planning. See [http://www.factorioforums.com/forum/viewtopic.php?f=14&amp;amp;t=6788 basic planner], [http://www.factorioforums.com/forum/viewtopic.php?f=14&amp;amp;t=4022 Planning-Tool-Mod]...&lt;br /&gt;
* look into [http://www.factorioforums.com/forum/viewforum.php?f=53 multiplayer forum], most other questions are answered there.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;And always remember that Factorio in v0.11 isn&#039;t intended to work well on internet connections, so keep patient. ;)&lt;br /&gt;
&lt;br /&gt;
== More Guides ==&lt;br /&gt;
&lt;br /&gt;
* [http://youtube.com/watch?v=MqsqRWNsbPM How To set up a Factorio Multiplayer Server | Guide | Tutorial], by Teaspoon&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6585 Dedicated Multiplayer Server Guide], by Icecube45&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6720 Tips to connect in multiplayer], by Nondre&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous tips ==&lt;br /&gt;
* the key for [[Console commands]] will now initiate a chat in MP. To execute commands you need to type &#039;/c&#039; before the command!&lt;br /&gt;
* Set the player&#039;s color using the command&lt;br /&gt;
 /c game.players[x].color = {r=0.7, g=0.5, b=0.1, a=0.9}&lt;br /&gt;
Where x is the player number. r, g and b are for red, green and blue respectively (possible values are between 0 and 1, use the right-most column on http://prideout.net/archive/colors.php). a is alpha channel aka Transparency of the color to the base texture. For single player, leave off the &amp;quot;[x]&amp;quot; to set the color.&lt;br /&gt;
&lt;br /&gt;
== Software for routing / establishing connection ==&lt;br /&gt;
&lt;br /&gt;
* http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6393&lt;br /&gt;
* http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6386&lt;br /&gt;
* http://www.factorioforums.com/forum/viewtopic.php?f=49&amp;amp;t=7690&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=7714 A guide for connecting with evolve]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Stub}}&lt;/div&gt;</summary>
		<author><name>Thrimbda</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Multiplayer/zh&amp;diff=155907</id>
		<title>Multiplayer/zh</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Multiplayer/zh&amp;diff=155907"/>
		<updated>2018-02-20T14:45:22Z</updated>

		<summary type="html">&lt;p&gt;Thrimbda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
&lt;br /&gt;
除了单人游戏之外，Factorio还支持多人游戏，允许许多玩家合作并互相帮助，或者在PVP中相互对抗。本页面介绍如何设置多人游戏以及如何加入。默认情况下，多人游戏运行合作[[Game modes and options/zh|自由模式]]，所有玩家一起工作，发射一颗卫星进入太空的火箭。其他场景，包括PvP地图，可以从[https://forums.factorio.com/viewforum.php?f=36&amp;amp;sid=93d1fbe9336d31d6bac60847b6c97985 地图和场景论坛]下载。&lt;br /&gt;
&lt;br /&gt;
== 在局域网/互联网上联机 ==&lt;br /&gt;
&lt;br /&gt;
v0.11版游戏可能不能正常在互联网上玩。注意，卡顿和延迟取决于连接速度和响应时间。&lt;br /&gt;
&lt;br /&gt;
* 所有玩家的游戏版本和安装的mod必须完全一致。 (提示：也许有人没有装剧情包？)&lt;br /&gt;
* 为了更流畅的进行游戏，主机可以关闭自动保存。&lt;br /&gt;
* 游戏使用端口&#039;&#039;&#039;34197&#039;&#039;&#039;。端口可以在[[Application directory|设置]]中更改。&lt;br /&gt;
* 游戏仅支持 &#039;&#039;&#039;UDP&#039;&#039;&#039;协议。请确保你的路由器有正确的设置。(游戏拥有自己的“可靠通信层”建立在UDP之上来解决丢包问题。)&lt;br /&gt;
** 请确保没有防火墙或杀毒软件阻止了UDP数据包。&lt;br /&gt;
** 请看“更多指导”来正确设置路由器。&lt;br /&gt;
** 所有的玩家都能互相连接是十分必要的。不仅仅是必要，而是从理论上说，所有的玩家都需要有公共的IP地址，即使在NAT中也是如此。看 [http://www.factorioforums.com/forum/viewtopic.php?f=30&amp;amp;p=51201#p50553 为什么我不能超过三人同时联机？]&#039;&#039;&lt;br /&gt;
* 同时联机人数的理论上限是[http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6481&amp;amp;p=50661#p50586 65535]. :) &lt;br /&gt;
&lt;br /&gt;
=== 语音聊天 ===&lt;br /&gt;
* 建议使用一些聊天软件，因为你会需要说很多话(配合连接，建造，传递物品...)。 语音服务器：[http://www.factorioforums.com/forum/viewforum.php?f=53 多人游戏论坛]。&lt;br /&gt;
&lt;br /&gt;
=== 寻找其他玩家 ===&lt;br /&gt;
&lt;br /&gt;
* 使用[http://www.factorioforums.com/forum/viewforum.php?f=53 论坛中的多人游戏版面].&lt;br /&gt;
* 很多人使用蛤蟆吃（Hamachi）或Evolve来寻找其他玩家。这有助于在玩家之间建立一个虚拟私有网络。看看下面的软件。&lt;br /&gt;
* 一些人在 [http://www.factorioforums.com/forum/viewtopic.php?f=5&amp;amp;t=9136 Steam] 上寻找其他玩家。&lt;br /&gt;
&lt;br /&gt;
== 异星工厂服务器：为什么要p2p？ ==&lt;br /&gt;
&lt;br /&gt;
有人争论，为什么异星工厂不使用客户-服务器的模式，却采用玩家-玩家的模式。&lt;br /&gt;
在v0.11没有明确支持一个异星工厂 “服务器”。而v0.12会支持！&lt;br /&gt;
&lt;br /&gt;
如果你想制作一个24/7不间断运行的世界，你需要在你的服务器上运行异星工厂并保持运行，它的原理就如同一个玩家。服务器将如同其他人一样，成为一个在游戏中的角色。&lt;br /&gt;
&lt;br /&gt;
一些链接：&lt;br /&gt;
&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=38&amp;amp;p=74091#p73402 开发者接口]&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=5&amp;amp;t=6077#p47283 早期的接口]&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=38&amp;amp;p=70874 更好的解释]&lt;br /&gt;
&lt;br /&gt;
==== 无中央配置服务端 ====&lt;br /&gt;
&lt;br /&gt;
* Linux 无中央配置服务端 / 虚拟网络计算机 (以后可能有): http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6449&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6585 Dedicated Multiplayer Server Guide]&lt;br /&gt;
&lt;br /&gt;
== 游戏类别 ==&lt;br /&gt;
&lt;br /&gt;
=== Coop ===&lt;br /&gt;
&lt;br /&gt;
Coop-game runs without any further preparation ( http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6501 )&lt;br /&gt;
&lt;br /&gt;
=== PvP ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=14&amp;amp;t=8352 PvP with craftable biters]&lt;br /&gt;
&lt;br /&gt;
== Technical Implementation ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.factorio.com/blog/post/fff-76 Friday facts article]&lt;br /&gt;
&lt;br /&gt;
== More Tools/Infos ==&lt;br /&gt;
* use mods for planning. See [http://www.factorioforums.com/forum/viewtopic.php?f=14&amp;amp;t=6788 basic planner], [http://www.factorioforums.com/forum/viewtopic.php?f=14&amp;amp;t=4022 Planning-Tool-Mod]...&lt;br /&gt;
* look into [http://www.factorioforums.com/forum/viewforum.php?f=53 multiplayer forum], most other questions are answered there.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;And always remember that Factorio in v0.11 isn&#039;t intended to work well on internet connections, so keep patient. ;)&lt;br /&gt;
&lt;br /&gt;
== More Guides ==&lt;br /&gt;
&lt;br /&gt;
* [http://youtube.com/watch?v=MqsqRWNsbPM How To set up a Factorio Multiplayer Server | Guide | Tutorial], by Teaspoon&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6585 Dedicated Multiplayer Server Guide], by Icecube45&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6720 Tips to connect in multiplayer], by Nondre&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous tips ==&lt;br /&gt;
* the key for [[Console commands]] will now initiate a chat in MP. To execute commands you need to type &#039;/c&#039; before the command!&lt;br /&gt;
* Set the player&#039;s color using the command&lt;br /&gt;
 /c game.players[x].color = {r=0.7, g=0.5, b=0.1, a=0.9}&lt;br /&gt;
Where x is the player number. r, g and b are for red, green and blue respectively (possible values are between 0 and 1, use the right-most column on http://prideout.net/archive/colors.php). a is alpha channel aka Transparency of the color to the base texture. For single player, leave off the &amp;quot;[x]&amp;quot; to set the color.&lt;br /&gt;
&lt;br /&gt;
== Software for routing / establishing connection ==&lt;br /&gt;
&lt;br /&gt;
* http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6393&lt;br /&gt;
* http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=6386&lt;br /&gt;
* http://www.factorioforums.com/forum/viewtopic.php?f=49&amp;amp;t=7690&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=53&amp;amp;t=7714 A guide for connecting with evolve]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Stub}}&lt;/div&gt;</summary>
		<author><name>Thrimbda</name></author>
	</entry>
</feed>