Dedicated Server (Chinese Simplified) – Arma 3

From Bohemia Interactive Community
Jump to navigation Jump to search
(This is a translation of Arma 3 Dedicated Server page into Simplified Chinese)
 
Tag: New redirect
 
(31 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[File:Arma 3_logo_black.png|200px|center]]
#REDIRECT [[Arma 3: Dedicated Server]]
This is a translation of [[Arma 3 Dedicated Server]] into Simplified Chinese
 
<span style="color:red"><b>在建项目</b>
<!--
<br>反垃圾邮件系统出现了问题。尝试添加链接 [url......] 时,该系统不允许页面保存,并弹出消息
您的编辑包含新的外部链接。为了帮助防范自动发送的垃圾邮件,请输入您在以下方框中看到的两个词语:</span>
<span style="color:red">然而没有词语,也没有方框,因此无法解决此问题。
<br>正因如此,所有链接被定义为 [ht tp..........,而非 http...........
</span>
-->
 
==<span style=”color:#0000ff”><b>简介</b></span>==
此页包含与安装和配置 ARMA 3 服务器相关的有用信息,并包括安装过程的分步指南。此外还有关于如何配置和运行服务器的信息。
大多数的目录和路径可自定义,然而这些定义的信息应均与教程说明一致。
<br><br>
教程的很多内容是使用论坛中的指导编写的 http://forums.bistudio.com/showthread.php?147537-Tutorial-How-to-run-ArmA3-on-a-dedicated-server<br><br>
 
关于 steamCMD 实用工具的说明:如果在专用主机上使用该工具安装和更新 Arma 3 专用服务器,则最好创建一个单独的 steam 帐户。可免费使用 Arma 3 专用服务器包(无需购买正式 Arma 3)。
 
==<span style="color:#0000ff"><b>安装</b></span>==
 
===要求===
# Steam 帐户
# 支持的操作系统
#* Windows: 2008 或更高版本
#* 现代 Linux 发行版
# 最低硬件配置:
#* CPU:
#* RAM:
#* 硬盘
 
===<span style="color:#B22222"><b>说明(Windows 操作系统)</b></span>===
 
以下说明将指导您在 1 个沙盒上设置 Arma 3,然而这些说明也会设置用于在同一沙盒上安装多个服务器的基本条件
# 安装最新版的 [http://support.microsoft.com/kb/179113 DirectX]
# 创建以下空目录
#* D:\Apps\Steam
#* D:\Games\ArmA3\A3Master
#* D:\Games\ArmA3\A3Files
# 下载 [https://developer.valvesoftware.com/wiki/SteamCMD steamcmd.exe],并将其保存到目标 Steam 安装目录(E.g <b>D:\Apps\Steam</b>)
# 运行 steamcmd.exe。(此操作将下载和安装所需 steam 文件到您的自定义 steam 目录)
# 创建 [[#Arma3server_steamcmd_example.cmd]] 文件,并将其保存到D:\Games\ArmA3\A3Files
# 运行 [[#Arma3server_steamcmd_example.cmd]] 文件
# 登录 Steam 之后,控制台窗口便会出现,并要求验证密钥。
#* Steam 将会自动向您发送带有验证代码的电子邮件,您需要在命令提示符处输入该代码
#* 随后“更新”控制台窗口应该继续运行并安装 ArmA3 ((开发或稳定)版本到 .cmd 文件中定义的目标目录)例如 (D:\Games\ArmA3\A3Master)
# 在服务器桌面创建 ArmA3Server.exe 的快捷方式
# 将以下参数添加到新创建的桌面快捷方式的快捷方式标签页中的目标行
#* -port=2302 (如果运行包含任意 ArmA2 实例的多个服务器实例,则必需)
#* "-profiles=d:\Games\Arma3\A3Master"
#* -config=CONFIG_server.cfg
#* -world=empty
#** 即看起来与以下形式相似
#** "D:\Games\Arma3\A3Master\arma3server.exe" <b>"-profiles=d:\Games\Arma3\A3Master" -port=2302 -config=CONFIG_server.cfg -world=empty</b>
# 相应地在您的防火墙中设置 [[#端口转发]]
# 创建名为 "[[#CONFIG_server.cfg|CONFIG_server.cfg]]" 的简单 Notepad 文档,并将其保存到服务器上 ArmA3 安装的根文件夹 D:\Games\ArmA3\A3Master
# 启动快捷方式,检查服务器是否运行。(几秒之后您将在桌面看到控制台弹出)
# 关闭控制台窗口,然后您将需要编辑以下会自动创建的文件。
#* D:\Games\Arma3\A3Master\Users\Adminstrator\Administrator.Arma3Profile
#* D:\Games\Arma3\A3Master\Users\Administrator\Arma3.cfg
# 重启服务器
# 启动您的客户端 Arma3.exe (运行相同的分支版本(例如稳定版或开发版)作为服务器),之后您将可以在服务器浏览器中看到您的服务器(可使用筛选器简化服务器列表)
# 使用您在 [[#CONFIG_server.cfg]] 中定义的密码登录到您的服务器,方法是通过输入“/”打开聊天窗口,然后输入(#登录管理密码),之后输入 <pre style="color: red">警告:请务必在任何服务器命令前加上“#”!</pre>
# 一旦登录,您将看到一个任务列表,选择其中一个开始游戏
# 在最初通过运行 BIS 任务证明服务器的稳定性之后再开始添加用户制作的内容
 
===<span style="color:#B22222"><b>说明(Linux 操作系统)</b></span>===
====安装====
 
作为一项最佳安全规范,请创建一个用户去运行 steam,而不是以根用户或管理员身份运行。这样,如果您的 ArmA 服务器遭到破坏,攻击者将会发现访问其余操作系统更加困难。
<code>useradd -m -s /bin/bash steam</code>
 
切换到新建的 steam 用户。
<code>sudo -i -u steam</code>
 
为 SteamCMD 新建一个目录,以避免扰乱主目录。
<code>mkdir ~/steamcmd && cd ~/steamcmd</code>
 
从 Valve Developer Community(Valve 开发者社区)页面的链接下载 [https://developer.valvesoftware.com/wiki/SteamCMD#Linux Linux 版 SteamCMD] tarball。使用命令行下载工具,例如 <tt>wget</tt> 或 <tt>curl</tt>。
 
提取 tarball。
<code>tar xf steamcmd_linux.tar.gz</code>
 
执行 steamcmd.sh。这将安装 Steam 客户端的其余部分,并启动 Steam 客户端外壳。如果在 64 位操作系统上此步失败,则您可能需要 [https://developer.valvesoftware.com/wiki/SteamCMD#32-bit_libraries_on_64-bit_Linux_systems 安装 32 位库]。
<code>./steamcmd.sh</code>
 
在 Steam 客户外壳端中,使用有效的 Steam 用户名和密码登录。[https://developer.valvesoftware.com/wiki/SteamCMD#SteamCMD_Login Valve Developer Community Wiki 建议您为此创建一个新的 Steam 帐户。] SteamCMD 将缓存登录凭据,任何有权访问您的服务器的人员将可以登录此处使用的帐户。此外,无法同时从两个地方登录单个 Steam 帐户。无需在此处使用的 Steam 帐户上购买 Arma 3 便可下载此服务器。因此,您应该创建一个新的无购买的 Steam 帐户,仅用于此服务器。
<code>login myusername</code>
 
更改 SteamCMD 将安装服务器的目录。
<code>force_install_dir ./arma3/</code>
 
安装 Arma 3 Linux 专用服务器。验证选项将检查是否存在损坏。
<code>app_update 233780 validate</code>
 
退出 SteamCMD。
<code>exit</code>
 
创建用于存储配置文件和 Arma3.cfg 文件的目录。
<code>mkdir -p ~/".local/share/Arma 3" && mkdir -p ~/".local/share/Arma 3 - Other Profiles"</code>
 
注意:创建指向 "mpmissions" 的名为 "MPmissions" 的符号链接,以解决随机段错误
ln -s /<path to a3server directory>/mpmissions /<path to a3server directory>/MPMissions
 
====更新====
 
只要 Steam 上发布补丁,您将不得不更新服务器。
 
如果服务器正在运行,则通过在服务器连接的终端(或屏幕/tmux 实例)按住 Ctrl+C 停止服务器。否则,切换至 steam 用户。
<code>sudo -u steam -i</code>
 
启动 steamcmd。
<code> cd /home/steam/steamcmd</code>
<code>./steamcmd.sh</code>
 
登录到以上安装部分使用的帐户。
<code>login myusername</code>
 
将 ArmA 3 安装目录设置为以上使用的同一目录。
<code>force_install_dir ./arma3/</code>
 
更新 Arma 3 Linux 专用服务器。验证选项将检查是否存在损坏。
<code>app_update 233780 validate</code>
 
退出 SteamCMD。
<code>exit</code>
 
====配置====
 
您很可能需要使用 server.cfg 文件自定义您的服务器名称、密码、安全设置等。更改至 arma3 目录,并创建和编辑您的 server.cfg 文件。
<code>cd ~/steamcmd/arma3</code>
<code>vim server.cfg</code>
如果您不知道如何使用 vim,则使用 nano 代替。
<code>nano server.cfg</code>
文档和示例参见 [[server.cfg]]。
 
首次运行服务器时,服务器将在 <tt>~/.local/share/Arma 3 - Other Profiles/server/server.Arma3Profile</tt> 中自动创建一个配置文件。编辑此文件以自定义难度设置。NB:Linux 上的 -profiles= 参数损坏 - 您必须将您的配置文件置于此目录。
 
====启动====
 
提供了可执行 Linux,以便启动服务器。确保您正在以 steam 用户而非根用户或其他管理员运行它!
<code>cd /home/steam/steamcmd/arma3</code>
<code>./arma3server -name=server -config=server.cfg</code>
 
NB:如果您正在使用 -mods= 参数,则必须指定相对路径,而非绝对路径。
Arma3server 进程将附属于当前终端。如果您是通过 SSH 连接至服务器,则当你断开时服务器将停止。您可以使用 [https://www.gnu.org/software/screen/ GNU Screen] 或 [http://tmux.sourceforge.net/ tmux] 使服务器在后台运行。网上有许多关于如何使用这些程序从终端分离进程或重新链接进程的教程。
 
您可以通过在服务器连接至的终端(或屏幕/tmux 实例)上按 Ctrl+C 安全地停止服务器。
 
====区分大小写 & 修改模块====
如果文件名称中存在大写字母,则诸如 @ALiVE 和 @A3MP 的修改模块将无法工作。如果未定期更新您的修改模块,则可以使用修改模块所在目录中
<code>find . -depth -exec rename 's/(.*)\/([^\/]*)/$1\/\L$2/' {} \;</code>
的命令。此命令将以递归方式搜索目录树,并使所有文件名都成为小写字母。
 
如果使用诸如 ArmA3Sync 定期更新您的修改模块,您将发现每次运行时这会重新下载任何改变了大小写的文件/文件夹。解决这一问题的方法是使用名为 “ciopfs”(在目的文件系统上不区分大小写)的数据包。应该首先运行上面在您的修改模块文件夹中提到的 "find . -depth..." 命令。然后,建立一个在修改模块目录之外的空目录,例如 mods_caseinsensitive。然后您使用
<code>ciopfs mods mods_caseinsensitive</code>
挂载目录,并通知 ArmA3Sync 在 mods_caseinsensitive 目录中同步。一旦完成,即可使用以下命令卸载目录
<code>fusermount -u mods_caseinsensitive</code>
您应该会发现原始修改模块目录中的所有文件均是小写。
 
<span style="color:red"><b>在建项目</b></span>
 
==<span style="color:#0000ff"><b>其他消息</b></span>==
 
===<span style="color:#B22222"><b>有用链接</b></span>===
 
====更多阅读材料====
* [https://developer.valvesoftware.com/wiki/SteamCMD Steam Cmd 教程]
* [http://forums.bistudio.com/showthread.php?148288-Dedicated-server-status 专用服务器状态(Linux 信息)]
* [http://www.kellys-heroes.eu/files/tutorials/dedicated/arma3dedicated.php#one《战略大作战》(Kelly’s Heroes) 专用服务器指南]
* [[In_Game_Server_Commands|游戏内服务器命令]]
* [[Multiplayer_Server_Commands|游戏内管理命令]]
* [[Arma2:_Startup_Parameters|命令行参数]]
* [[basic.cfg|Basic.cfg]]
* [[server.armaprofile|Steam 难度设置]]
* [[ArmA:_Server_configuration|服务器配置]]
* [https://code.google.com/p/symlinker/ Sim-link GUI]
 
====工具====
 
* [http://forums.bistudio.com/showthread.php?155881-Arma-Server-Monitor-(very-small-but-useful) Arma3 服务器监视器]
* [http://www.firedaemon.com/ Firedeamon]
* [http://www.youtube.com/watch?v=37ifEKAZqlM&feature 使用 TA2DST 方法的 ArmA3 服务器]
** Kirkwood364 上传的使用 Tophe's Arma 2 专用服务器工具管理和运行 A3 服务器的 You-Tube 视频
**(所有必要文件的链接位于该 You-Tube 视频的第一条评论中)
* [http://forums.bistudio.com/showthread.php?155881-Arma-Server-Monitor-(very-small-but-useful) 用于 Linux 的 arma3server]
** arma3server 是快速简单部署和管理 ARMA 3 Linux 专用服务器的命令行工具。
 
====有用插件====
* [http://forums.bistudio.com/showthread.php?152393-zeu_ServerSkill-(Serverside-AI-skill-setting-addon-with-userconfig-configuration) Zeu_Serverskills](AI 技能设置插件)
* [http://forums.bistudio.com/showthread.php?149882-zeu_A3ServerBriefing-(-A-Serverside-addon) Zeu_ServerBriefing](自动将服务器信息注入所有任务
 
===<span style="color:#B22222"><b>文件位置</b></span>===
当使用特定命令行参数时会自动创建某些文件。
某些文件不得不手动创建。
如果准确按照说明,则除干净安装之外,现在您将有以下文件和目录
 
* d:\Games\Arma3\A3Master\  <span style="color:#000080">Users\Administrator\<b>Administrator.Arma3Profile</b></span> ‘’(难度设置)’’
* d:\Games\Arma3\A3Master\  <span style="color:#000080">Users\Administrator\<b>Administrator.vars.Arma3Profile</b></span> ''(您无法编辑的二进制内容)''
* d:\Games\Arma3\A3Master\  <span style="color:#000080">Users\Administrator\<b>Arma3.cfg</b></span> ''(带宽设置)''
* d:\Games\Arma3\A3Master\  <span style="color:#000080"><b>MPMissions\</b></span> ''这是定制 mission.pbo 需要位于的地方)''
* d:\Games\Arma3\A3Master\  <span style="color:#000080"><b>arma3.rpt</b></span> ''(调试日志,每次启动 arma3server.exe 时自动创建)''
* d:\Games\Arma3\A3Master\  <span style="color:#000080"><b>CONFIG_server.cfg</b></span> ''(手动创建)''
* d:\Games\ArmA3\A3Files\    <span style="color:#000080"><b>Arma3server_steamcmd_example.cmd</b></span> ''(手动创建)''
* d:\Apps\Steam\
 
===<span style="color:#B22222"><b>端口转发</b></span>===
 
Arma 3 使用与 Arma 2 相同的默认端口,外加 2 个 steam 端口。所以如果您打算在相同机器上运行 A2 和 A3 服务器,则需要编辑所使用的端口。
'''默认端口全是 UDP''',并如下所示
<br /><b>传入:</b>
* 2302(Arma3 游戏端口)+(由于 NAT 问题,VON 现在属于主游戏端口的一部分)
* 2303(STEAM 查询)
* 2304(Steam 端口)
* 2305(VON 端口 - 非已使用的 atm.,而是分配的)
<b>传出:</b><br />
{| class="bikitable"
|-
!DST 端口
!协议
!目的地
!评论
|-
|2344
|TCP+UDP
|81.0.236.111
|BattlEye - arma31.battleye.com
|-
|2345
|TCP
|81.0.236.111
|BattlEye - arma31.battleye.com
|-
|2302-2305
|UDP
|任何
|Arma 服务器到客户端流量
|-
|2303
|UDP
|任何
|Arma 服务器 STEAM 查询端口
|-
|2304
|UDP
|任何
|Arma 服务器到 STEAM 主流量
|}
 
<br /><br />
要定义所使用的 ArmA3 游戏端口,
命令行参数中 state -port= ****(其中 *** 是新的初始 Arma 3 游戏,例如 2302)
 
要定义您的 Steam 端口
将以下行添加到您的 CONFIG_server.cfg(按照要求编辑实际端口号)
 
// STEAM 端口现在链接到游戏端口,+1 用于查询,而 +2 连接至主端口
 
如果您正在运行多个服务器,则建议以下格式
 
<b><u>服务器 1</u></b>
<br>2302 UDP(游戏端口 + VON)
<br>2303 UDP(STEAM 查询端口)
<br>2304 UDP(STEAM 主端口)
<br>2305 UDP(VON 保留端口,但并非使用的 atm.)
<br>因此打开端口 2302-2305
<br>并在下一服务器集之间保留至少 10 个端口
 
<b><u>服务器 2</u></b>
<br>2312 UDP(游戏端口 + VON)
<br>2313 UDP(STEAM 查询端口)
<br>2314 UDP(STEAM 主端口)
<br>2315 UDP(VON 保留端口,但并非使用的 atm.)
<br>因此打开端口 2312-2315
<Br>并在下一个第三方服务器集之间保留至少 10 个端口
 
====NAT 穿越====
UPnP 使您可以在路由器上自动创建端口转发以绕过 NAT(需要支持 UPnP 的路由器)。如 [[server.cfg#Server_Options | server.cfg]] 页面所述,该功能可在服务器配置中轻松启动。
 
===<span style=”color:#B22222”><b>为稳定版或开发版分支版本进行配置</b></span>===
 
按照以下定义编辑 Arma3server_steamcmd_example.cmd,然后运行
 
*要选择开发版本
SET A3BRANCH=107410 -beta development
*要选择稳定版本(专用服务器包)
SET A3BRANCH=233780 -beta
*要选择稳定版本(完整客户端/服务器包)
SET A3BRANCH=107410
 
<b>重要功能</b>
从 2013 年 3 月 12 日起,开发版和稳定版分支版本不再兼容。这意味着:
<br>只有开发版客户端才能连接至开发版服务器
<br>只有稳定版客户端才能连接至稳定版服务器
 
===<span style="color:#B22222"><b>高级配置</b></span>===
<span style="color:red"><b>在建项目</b></span>
 
===<span style="color:#B22222"><b>带宽优化</b></span>===
<span style="color:red"><b>在建项目</b></span>
 
===<span style="color:#B22222"><b>多服务器配置</b></span>===
 
在同一沙盒上有各种方法可用于运行多个专用 Arma 3 服务器。
各服务器实例要求具备
*自己唯一的端口集
*自己的配置文件
*自己的配置
 
该[http://forums.bistudio.com/showthread.php?147537-Tutorial-How-to-run-ArmA3-server-on-a-dedicated-server&p=2402555&viewfull=1#post2402555帖子]对此进行了深入说明
 
每种方法都有一些优点和缺点
要选择适合自己要求的首选方法,您需要考虑以下几点
* “密钥”文件夹的使用
* "MpMissions" 文件夹的使用
* 可用的硬盘空间
* 更新管理
 
====<b><u>方法 1</u></b>====
 
参见[http://forums.bistudio.com/showthread.php?147537-Tutorial-How-to-run-ArmA3-server-on-a-dedicated-server&p=2401936&viewfull=1#post2401936该帖子]获得更详细信息
此方法是将主安装包复制到不同目录
空间够用情况下次数尽量多
 
<b>优点</b>
* 最可靠
* 独一无二的 MpMissions 文件夹
* 独一无二的“密钥”文件夹
* 允许运行游戏不同分支版本(例如稳定版或开发版)的单独实例
 
<b>缺点</b>
* 占用更多硬盘空间
* 要求更多工作量来创建和自动化更新进程
 
====<b><u>方法 2</u></b>====
 
此方法使用 1 个主安装文件夹,并在主安装文件夹的子文件夹中重命名了 arma3server.exe。
参见该帖子获得更详细信息
 
<b>优点</b>(与方法 1 相比)
* 占用空间比方法 1 小
* 更新更加简单
 
<b>缺点</b>(与方法 1 相比)
* 不十分可靠
* 与所有其他 exe 共享 MpMissions 文件夹(将创建非常混乱的 MpMissions 文件夹,允许管理员为此服务器实例未在运行的修改模块选择需要插件的任务
* 与所有其他 exe 共享“密钥”文件夹(这会导致运行各种不同修改模块服务器时出现问题)
* 不允许运行游戏不同分支的单独实例
 
====<b><u>方法 3</u></b>====
 
这是方法 1 的混合方法,这种方法中本质上是将主安装文件“虚拟”复制到不同文件夹
区别是许多文件夹[http://en.wikipedia.org/wiki/Symbolic_link 符号链接]到初始主目录
simlink GUI:
 
<b>优点</b>(与方法 1 相比)
* 占用硬盘空间更小(因为您不会拥有插件文件夹的多个副本)
* 如果需要,允许独一无二的 MpMissions 文件夹
* 如果需要,允许独一无二的 MpMissions 文件夹
* 更新更加简单
 
<b>缺点</b>(与方法 1 相比)
* 要求更多工作量来初步创建仿真软件链接和目录
* 不允许同时运行游戏不同分支(例如稳定版或开发版)的单独实例
 
====<b><u>方法 4</u></b>====
 
当然,您可以混合及搭配所有 3 种方法,以满足您的特定需求。
 
 
===<span style="color:#B22222"><b>专用服务器和客户端配置</b></span>===
唯一已知的问题是确保在启动 steam 客户端之前启动服务器
做不到这点会导致 steam 端口问题,且您的客户端将不能连接至服务器
 
===<span style="color:#B22222"><b>无外设客户端</b></span>===
<span style="color:#B22222"><b>内容:</b></span>参见[[Arma 3 无外设客户端]]获得无外设客户端的变化('''TODO:根据情况更新此部分''')
 
--[[User:JacmacBrian|JacmacBrian]] ([[User talk:JacmacBrian|谈话]]) 2014 年 2 月 23 日 22:14 (CET)
 
无外设客户端可由任务用于卸载 AI 处理至专用客户端,将专用服务器进程从大多数 AI 处理释放。因此可以生成更多 AI 单元,服务器进程将能够使大多数处理朝向与客户端的通信。为了使无外设客户端/专用服务器在一起有效工作,它们均需要通过极低时延和高带宽彼此连接。为了高效运行,它们至少需要处于相同 LAN,但是最好在相同计算机上运行。
 
====设置与执行====
 
* 用于 ARMA 3 的无外设客户端需要 '''有效活动 Steam 帐户登录''' 以正常工作([http://forums.bistudio.com/showthread.php?149412-Arma-3-Headless-Client&p=2544027&viewfull=1#post2544027 Dwarden 帖子])
* 无外设客户端就是从带有参数的命令行运行的 Arma3.exe,例如:
<pre>
arma3.exe -connect=localhost -port=2444 -client -nosound -password=some_server_password -name=HC -profile=HC -mod=@CBA_A3;@blah;@blah;@blah
</pre>
 
在以上示例中,无外设客户端运行在与专用服务器相同的主机上。该客户端使用名为 '''HC''' 的配置文件,并按照服务器要求使用密码连接至服务器(密码用于密码保护服务器,可选)。此示例中的服务器运行于端口 2444,将此端口更改为您的服务器的端口。
 
* 无外设客户端配置文件需要像 Arma 3 中的任何其他配置文件一样创建(注意:最好将此配置文件命名为 '''HC''')
无需配置任何配置文件,但是创建之后,编辑位于 '''C:\Users\yourusername\Documents\Arma 3 - Other Profiles\HC''' 的 '''HC.Arma3Profile''',并添加此行:
<pre>
battleyeLicense=1;
</pre>
 
或者,您可以使用完整的 Arma 3 客户端连接至任意开启 BattlEye 的多人游戏服务器,并接受 BattlEye 使用许可协议,这与手动编辑 '''HC.Arma3Profile''' 效果一样。
 
配置文件一旦准备好,便将配置文件目录复制到服务器上的 '''C:\Users\yourusername\Documents\Arma 3 - Other Profiles'''(如果配置文件并非在服务器上创建)。如果配置文件是在服务器上创建,或不会在服务器上运行,且已经位于将运行的计算机上,则已准备好运行。
 
* 如果无外设客户端位于服务器上,则服务器的 cfg 必须拥有本地环回地址,如下所示(例如 A3Server.cfg):
<pre>
localClient[]={"127.0.0.1"};
headlessClients[]={"127.0.0.1"};
battleyeLicense=1;
</pre>
Dwarden 建议 '''battleyeLicense=1;''' 位于服务器的配置文件中,但是不清楚是否真的必要。 ([http://forums.bistudio.com/showthread.php?160029-Headless-client-battleye&p=2473647&viewfull=1#post2473647 Dwarden 帖子])
 
* 如果无外设客户端正在相同网络或相同计算机上运行,则服务器的配置文件必须在 '''localClient[]=x.x.x.x''' 中拥有地址。这将允许服务器使用不受限制的带宽与无外设客户端通信。还要求将地址添加到 '''headlessClients[]={"x.x.x.x"};'''。可以添加不同地址中的多个无外设客户端:
<pre>
localClient[]={"127.0.0.1", "192.168.1.10", "192.168.1.210"};
headlessClients[]={"127.0.0.1","192.168.1.10","192.168.1.210"};
battleyeLicense=1;
</pre>
 
====专用服务器无外设客户端说明====
如果 Arma 3 无外设客户端和 Arma 3 专用服务器正在相同 Windows 计算机(虚拟机或实际计算机)上运行,则设置处理器亲和性以防止执行密集线程在相同 CPU 上被调度是有好处的。操作系统一般将有效地调度线程,但是手动 CPU 分配是可能的。这可以通过在 Windows 任务管理器中的'''进程选项卡'''中右击进程(例如 Arma3Server.exe(*32)),并选择'''设置亲和性...'''实现。注意在物理英特尔 CPU 上,奇数个 CPU 是超线程技术核心。
 
注意:您可以利用命令行''CMD /AFFINITY HEXvalue''经批处理文件使用亲和性分配的自动化解决方案,例如'''CMD /C START /AFFINITY 0xF3 arma3server.exe'''
 
已经观察到虽然 ARMA 服务器和客户端进程将启动多个线程,但是大部分处理最多仅有一个或两个线程使用。例如,生成 50 个 AI 单元并不会生成 50 个线程。无论生成了多少线程,进程中仅有一个线程处理所有 AI 单元。这样,ARMA 服务器和客户端进程不会最大化利用现代处理器所具备的处理能力,因此 AI 数量不会轻易增加。同样,更快的 CPU 核心速度才是关键,而对于包含许多 AI 单元的复杂任务,在相同计算机上将 AI 卸载至多个无外设客户端或许将产生可能的最佳结果(尽管是一种昂贵的获取结果的方式)。
 
阅读完整详细的无外设客户端使用指南:https://community.bistudio.com/wiki/Arma_3_Headless_Client
 
===<span style="color:#B22222"><b>示例文件</b></span>===
 
====Arma3server_steamcmd_example.cmd====
* 独立服务器包(无需 STEAM 帐户的游戏所有权)
* 注意:由于 STEAMguard,您可能会被要求授权您的 STEAM 帐户(检查电子邮件)
* 注意:需要运行两次或三次(第一次授权,第二次 STEAMcmd 自身更新,(完成时,退出),第三次更新 Arma 3 服务器数据包)
* 注意:STEAMcmd 需要位于来自 STEAMclient 的独立文件夹(因此始终使用像 "STEAMcmd" 的独特文件夹),以避免文件冲突
* 注意:Arma 3 服务器数据包需要位于来自 Arma 3 客户端的独立文件夹(因此始终使用像 "A3server" 或 "Arma3server" 的独特文件夹),以避免文件冲突
* 代码:
<pre>@echo off
@rem http://media.steampowered.com/installer/steamcmd.zip
SETLOCAL ENABLEDELAYEDEXPANSION
 
      :: DEFINE the following variables where applicable to your install
 
    SET STEAMLOGIN=mylogin mypassword
    SET A3serverBRANCH=233780 -beta
        :: For stable use 233780 -beta
        :: For Dev use 233780 -beta development
                :: Note, the missing qotation marks, these need to be wrapped around the entire "+app_data......"
                :: There is no DEV branch data yet for Arma 3 Dedicated Server package !!!
 
    SET A3serverPath=D:\Games\ArmA3\A3Master
        SET STEAMPATH=D:\Apps\Steam
 
:: _________________________________________________________
 
echo.
echo    You are about to update ArmA 3 server
echo        Dir: %A3serverPath%
echo        Branch: %A3serverBRANCH%
echo.
echo    Key "ENTER" to proceed
pause
%STEAMPATH%\steamcmd.exe +login %STEAMLOGIN% +force_install_dir %A3serverPath% +"app_update %A3serverBRANCH%" validate +quit
echo .
echo    Your ArmA 3 server is now up to date
echo    key "ENTER" to exit
pause
 
</pre>
 
====CONFIG_server.cfg====
 
<pre>//
// server.cfg
//
// comments are written with "//" in front of them.
 
// NOTE: More parameters and details are available at http://community.bistudio.com/wiki/server.cfg
 
// STEAM PORTS (not needed anymore, it's +1 +2 to gameport)
// steamPort      = 8766;    // default 8766, needs to be unique if multiple serves on same box
// steamQueryPort  = 27016;    // default 27016, needs to be unique if multiple servers on same box
 
// GENERAL SETTINGS
hostname      = "My Arma 3 Server";    // Name of the server displayed in the public server list
//password    = "ServerPassword";      // Password required to join the server (remove // at start of line to enable)
passwordAdmin  = "AdminPassword";      // Password to login as admin. Open the chat and type: #login password
maxPlayers    = 40;    // Maximum amount of players, including headless clients. Anybody who joins the server is considered a player, regardless of their role or team.
persistent    = 1;    // If set to 1, missions will continue to run after all players have disconnected; required if you want to use the -autoInit startup parameter
 
// VOICE CHAT
disableVoN      = 0;    // If set to 1, voice chat will be disabled
vonCodecQuality  = 10;    // Supports range 1-30; 1-10 is 8kHz (narrowband), 11-20 is 16kHz (wideband), 21-30 is 32kHz (ultrawideband); higher = better sound quality, more bandwidth consumption
 
// VOTING
voteMissionPlayers  = 1;      // Minimum number of players required before displaying the mission selection screen, if you have not already selected a mission in this config
voteThreshold      = 0.33;    // Percentage (0.00 to 1.00) of players needed to vote something into effect, for example an admin or a new mission. Set to 9999 to disable voting.
allowedVoteCmds[] =            // Voting commands allowed to players
{
// {command, preinit, postinit, threshold} - specifying a threshold value will override "voteThreshold" for that command
{"admin", false, false}, // vote admin
{"kick", false, true, 0.51}, // vote kick
{"missions", false, false}, // mission change
{"mission", false, false}, // mission selection
{"restart", false, false}, // mission restart
{"reassign", false, false} // mission restart with roles unassigned
};
 
// WELCOME MESSAGE ("message of the day")
// It can be several lines, separated by comma
// Empty messages "" will not be displayed, but can be used to increase the delay before other messages
motd[] =
{
"Welcome to My Arma 3 Server",
"Teamspeak: ts.somewhere.com",
"Website: www.example.com"
};
motdInterval = 5;    // Number of seconds between each message
 
// MISSIONS CYCLE
class Missions
{
class Mission1
{
template = "MyMission.Altis"; // Filename of pbo in MPMissions folder
difficulty = "Regular"; // "Recruit", "Regular", "Veteran", "Custom"
};
};
 
// LOGGING
timeStampFormat  = "short";                // Timestamp format used in the server RPT logs. Possible values are "none" (default), "short", "full"
logFile          = "server_console.log";    // Server console output filename
 
// SECURITY
BattlEye            = 1;    // If set to 1, BattlEye Anti-Cheat will be enabled on the server (default: 1, recommended: 1)
verifySignatures    = 2;    // If set to 2, players with unknown or unsigned mods won't be allowed join (default: 0, recommended: 2)
kickDuplicate        = 1;    // If set to 1, players with an ID that is identical to another player will be kicked (recommended: 1)
allowedFilePatching  = 1;    // Prevents clients with filePatching enabled from joining the server (0 = block filePatching, 1 = allow headless clients, 2 = allow all) (default: 0, recommended: 1)
 
// FILE EXTENSIONS
allowedLoadFileExtensions[] =      {"hpp","sqs","sqf","fsm","cpp","paa","txt","xml","inc","ext","sqm","ods","fxy","lip","csv","kb","bik","bikb","html","htm","biedi"}; // only allow files with those extensions to be loaded via loadFile command (since Arma 3 v1.19.124216)
allowedPreprocessFileExtensions[] = {"hpp","sqs","sqf","fsm","cpp","paa","txt","xml","inc","ext","sqm","ods","fxy","lip","csv","kb","bik","bikb","html","htm","biedi"}; // only allow files with those extensions to be loaded via preprocessFile / preprocessFileLineNumbers commands (since Arma 3 v1.19.124323)
allowedHTMLLoadExtensions[] =      {"htm","html","php","xml","txt"}; // only allow files and URLs with those extensions to be loaded via htmlLoad command (since Arma 3 v1.27.126715)
 
// EVENT SCRIPTS - see http://community.bistudio.com/wiki/ArmA:_Server_Side_Scripting
onUserConnected    = "";    // command to run when a player connects
onUserDisconnected  = "";    // command to run when a player disconnects
doubleIdDetected    = "";    // command to run if a player has the same ID as another player in the server
onUnsignedData      = "kick (_this select 0)";    // command to run if a player has unsigned files
onHackedData        = "kick (_this select 0)";    // command to run if a player has tampered files
 
// HEADLESS CLIENT
headlessClients[]  = {"127.0.0.1"};    // list of IP addresses allowed to connect using headless clients; example: {"127.0.0.1", "192.168.1.100"};
localClient[]      = {"127.0.0.1"};    // list of IP addresses to which are granted unlimited bandwidth; example: {"127.0.0.1", "192.168.1.100"};
</pre>
 
====****.Arma3Profile====
 
<pre>version=2;
 
viewDistance=3000;
preferredObjectViewDistance=3000;
terrainGrid=12.5;
activeKeys[]=
{
};
 
 
class Difficulties
{
    class recruit
    {
        class Flags
        {
            Armor=1;
            FriendlyTag=0;
            EnemyTag=0;
            MineTag=1;
            HUD=1;
            HUDPerm=1;
            HUDWp=1;
            HUDWpPerm=1;
            HUDGroupInfo=1;
            AutoSpot=1;
            Map=1;
            WeaponCursor=1;
            AutoGuideAT=1;
            ClockIndicator=1;
            3rdPersonView=1;
            UltraAI=0;
            CameraShake=0;
            UnlimitedSaves=1;
            DeathMessages=1;
            NetStats=1;
            VonID=1;
            ExtendetInfoType=1;
        };
        skillFriendly=0.6;
        skillEnemy=0.6;
        precisionFriendly=0.28;
        precisionEnemy=0.28;
    };
    class regular
    {
        class Flags
        {
            Armor=1;
            FriendlyTag=1;
            EnemyTag=0;
            MineTag=1;
            HUD=1;
            HUDPerm=1;
            HUDWp=1;
            HUDWpPerm=1;
            HUDGroupInfo=1;
            AutoSpot=1;
            Map=1;
            WeaponCursor=1;
            AutoGuideAT=1;
            ClockIndicator=1;
            3rdPersonView=1;
            UltraAI=0;
            CameraShake=1;
            UnlimitedSaves=1;
            DeathMessages=1;
            NetStats=1;
            VonID=1;
            ExtendetInfoType=1;
        };
        skillFriendly=0.6;
        skillEnemy=0.6;
        precisionFriendly=0.28;
        precisionEnemy=0.28;
    };
    class veteran
    {
        class Flags
        {
            Armor=0;
            FriendlyTag=0;
            EnemyTag=0;
            MineTag=1;
            HUD=1;
            HUDWp=1;
            HUDWpPerm=1;
            HUDGroupInfo=1;
            AutoSpot=0;
            WeaponCursor=0;
            ClockIndicator=1;
            3rdPersonView=1;
            UltraAI=0;
            CameraShake=0;
            DeathMessages=0;
            NetStats=1;
            VonID=1;
            ExtendetInfoType=0;
        };
        skillFriendly=0.6;
        skillEnemy=0.6;
        precisionFriendly=0.28;
        precisionEnemy=0.28;
    };
    class mercenary
    {
        class Flags
        {
            HUD=1;
            AutoSpot=0;
            WeaponCursor=0;
            DeathMessages=0;
            NetStats=1;
            VonID=1;
        };
        skillFriendly=0.6;
        skillEnemy=0.6;
        precisionFriendly=0.28;
        precisionEnemy=0.28;
    };
};
 
difficulty="veteran";</pre>
 
====Arma3.cfg====
更多信息参见 [[basic.cfg]]
<pre>language="English";
adapter=-1;
MinBandwidth=800000;
MaxBandwidth=25000000;
MaxMsgSend=384;
MaxSizeGuaranteed=512;
MaxSizeNonguaranteed=256;
MinErrorToSend=0.003;
MaxCustomFileSize=100000;
Windowed=0;
serverLongitude=0;
serverLatitude=52;
serverLongitudeAuto=0;
serverLatitudeAuto=52;</pre>
 
==<span style="color:#0000ff"><b>支持 &amp; 故障排除</b></span>==
 
===<span style="color:#B22222"><b>已知问题</b></span>===
 
# 服务器浏览器中 ping 我的服务器是 2500ms(这是由于使用非管理员身份运行 steam 客户端导致) 参见 http://feedback.arma3.com/view.php?id=9374
# MaxMsgSend 默认值是 128,如果服务器可用的处理和/或带宽不能支持较高值,则较高值会产生 Desync 问题
# 如果在同时安装了客户端的系统上运行 Arma 3 专用服务器数据包,则服务器可能会加载完整客户端数据,而不是服务器数据包,这是由于注册表中的优先检查所致。该问题的解决方案/解决办法是使用 arma3server.exe “-mod=”(其中空的 modline 确保其从服务器所在位置加载数据)
# 服务器配置中的 upnp=1; //可能导致带有活动防火墙/抗拒绝服务系统的服务器 600 秒时间不启动,不建议服务器进程相关端口默认为开放/转发的专用服务器使用此设置。
 
===<span style="color:#B22222"><b>在线帮助</b></span>===
 
对于在线帮助,加入 Skype 组频道
最初由 Dwarden 发出的引述
所有服务器托管服务提供商,我们有供服务器管理员协同工作的 Skype 频道 http://forums.bistudio.com/showthread.php?131825-Skype-groups-amp-other-contact-groups ... 谢谢
 
===<span style="color:#B22222"><b>常见问题</b></span>===
<span style="color:red"><b>在建项目</b></span>
 
==另请参阅==
 
[[Arma 3 Dedicated Server]]
 
[[ArmA: Server configuration|ArmA 服务器配置]]
 
[[Multiplayer_Server_Commands|多人游戏服务器命令]]
 
[[Arma3:_Startup_Parameters#Server_Options|服务器选项]]
 
[[BattlEye#RCon|Battleye 的 RCON]]
 
[[Arma_3_Headless_Client|Arma 3 的无外设客户端]]
 
[[Category:ArmA:_Multiplayer|专用服务器]]
[[Category:Arma 2]]
[[Category:Arma 3]]
[[Category:Arma 3: 教程]]
[[Category:Arma 3 多人游戏]]

Latest revision as of 00:20, 5 May 2024