Dedicated Server (Chinese Traditional) – Arma 3

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "ArmA 3" to "Arma 3")
Tag: New redirect
 
(27 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]] to Traditional 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 3: Multiplayer]]

Latest revision as of 00:20, 5 May 2024