该教程截止最后一次修正日期:2021年11月27日可用 仅供参考


1.开服工具准备

方法1:使用Steam客户端并通过自己账号获得Unturned Dedicated Server服务端
获得Steam客户端:https://store.steampowered.com/about/

登录到Steam:(请勿泄露向他人泄露账号密码 保护账号安全)

按此路径寻找:库 -> 工具 -> Unturned Dedicated Server(首先确保所登录账号拥有Unturned[https://store.steampowered.com/app/304930/Unturned])


点击安装后等待下载完成
方法2:使用Steamcmd获取Unturned Dedicated Server服务端
获得Steamcmd:
https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip
注意:Steamcmd在系统盘运行需要管理员权限 且目录不能为中文

匿名登录:输入login anonymous后回车(推荐)
账号密码登录:输入login 用户名后回车后在password:后输入密码并回车登录

设置你的应用安装目录(注意:在 Linux/macOS 下使用正斜杠/,在Windows 下使用反斜杠\)。
force_install_dir <路径>

例如 一个名叫unturned_server的在当前目录下的目录:
force_install_dir ./unturned_server/
在Windows : force_install_dir .\csgo_ds\

安装或更新应用使用app_update命令(在这里提供Steam 应用 ID)。 要同时校验应用的话,需添加validate到命令里。要下载测试分支的话,使用-beta <测试名称>选项 – 例如,半条命专用服务器的测试分支名为beta以及起源专用服务器的测试分支名为prerelease。一些测试分支设置了密码;如果要从它那里下载,需同时添加-betapassword <密码>选项。
app_update <应用ID> [-beta <测试名称>] [-betapassword <密码>] [validate]

安装Unturned Dedicated Server:app_update 1110390
默认安装路径在Steamcmd存放目录\steamapps\common\U3DS



2.开服准备

方法1:通过修改ExampleServer.bat内容开启服务器
在U3DS目录下找到ExampleServer.bat并使用文本编辑器打开
推荐使用Visual Studio Code,获取地址:https://code.visualstudio.com/

修改start "" "%~dp0ServerHelper.bat" +LanServer/Example
如果要创建互联网服务器(即可通过外网连入的服务器) 将+LanServer更改为+InternetServer
如果需要区别服务器档案数据(一个服务端对应多个服务器数据) 将Example更改为其他不重名内容(例Default)
修改完成后保存关闭该文档
方法2:通过创建快捷方式开启服务器(经典)
鼠标右击Unturned.exe -> 发送到 -> 桌面快捷方式创建快捷方式
在桌面上找到创建的快捷方式右击 -> 属性

在目标输入框最后加入-batchmode -nographics +LanServer/Example(同上) 点击确定完成编辑


3.开启服务器

运行你创建的快捷方式或ExampleServer.dat

    Ayndpa 对ExampleServer.dat中内容的翻译

    @ suppresses echo command from being echoed, and then disables echoing in this script.
    @ 禁止echo命令被回显,然后在这个脚本中禁止回显。


    Unturned will run as a dedicated server if +InternetServer/ServerId or +LanServer/ServerId are found on the command-line.
    Unturned将作为一个专用服务器运行,如果+InternetServer/ServerId或+LanServer/ServerId在命令行上。


    ServerId differentiates multiple servers running from the same installation, and a directory for each server's savedata and configuration will be created in the Servers/ServerId directory. Startup commands can be specified in the ServerId/Server/Commands.dat file, or on the command-line with -CommandName/Arg0/Arg1/Arg#.
    ServerId将从同一个安装中运行的多个服务器区分开来,每个服务器的保存数据和配置将在servers /ServerId目录中创建一个目录。启动命令可以在ServerId/Server/ commands .dat文件中指定,也可以在-CommandName/Arg0/Arg1/ arg#命令行中指定。


    Running multiple internet servers simultaneously requires specifying different ports using the Port command. Unturned will use the specified port for game traffic, port + 1 for server list queries and port + 2 for the Steam backend. Recommended port values are 27015 for the first server, 27018 for the second server, so on and so forth. These can be set as a line in Commands.dat e.g. "Port 27018" (without quotes) or on the command-line "-Port/27018" (without quotes).
    同时运行多个internet服务器需要使用Port命令指定不同的端口。unturn将使用指定的端口进行游戏流量,端口+ 1用于服务器列表查询,端口+ 2用于Steam后端。第一个服务器的建议端口值是27015,第二个服务器的建议端口值是27018,以此类推。这些可以在Commands.dat中设置为一行。“端口27018”(不带引号)或命令行“-Port/27018”(不带引号)。


    Other common startup commands to use in Commands.dat are:
    Name XYZ - Advertise server as "XYZ", or "Unturned" if left unset.
    Owner SteamId - Allows player to invoke admin commands in chat e.g. "/give 132" to spawn a Dragonfang.
    Password XYZ - Requires password "XYZ" to join server. Note that password is only SHA1 hashed, so don't use the same password anywhere else.
    Perspective Both - Can be set to "First", "Third", "Both", or "Vehicle" to change camera options.
    Cheats - Allows admins to invoke cheat commands like spawning items or vehicles from the chat.
    在commands .dat中使用的其他常见启动命令有:
    名称 XYZ -宣称服务器为“XYZ”,如果未设置则为“未打开”。
    拥有者 SteamId -允许玩家在聊天中调用管理命令。“/给予132”产卵龙牙。
    密码 XYZ -需要密码“XYZ”加入服务器。请注意,密码只经过SHA1哈希处理,所以不要在其他任何地方使用相同的密码。
    透视 两者-可以设置为“第一”,“第三”,“两者”,或“车辆”来改变相机选项。
    作弊 -允许管理员调用作弊命令,如在聊天中生成物品或车辆。


    Useful commands to use from chat or console while server is running are:
    Help XYZ - List all commands, or describe XYZ command.
    Shutdown - Save and cleanly exit server process.
    在服务器运行时从聊天或控制台使用的有用命令有:
    帮助XYZ -列出所有命令,或描述XYZ命令。
    关闭-保存并干净地退出服务器进程。


    %dp0 expands to the path to this script's directory, allowing it to be called from a different working directory.
    ServerHelper.bat acts as an intermediary for any future required Unity arguments.
    Custom scripts can pass additional arguments to ServerHelper.bat e.g. "-Port/27018 +InternetServer/My Server" (without quotes).
    By default this script will launch a LAN server and save to the Servers/Example directory.
    %dp0展开到此脚本目录的路径,允许从不同的工作目录调用它。
    bat作为任何未来需要的Unity参数的中介。
    自定义脚本可以向ServerHelper.bat传递额外的参数。"-Port/27018 +InternetServer/My Server"(不带引号)。
    默认情况下,这个脚本将启动一个LAN服务器,并保存到Servers/Example目录下。

    浙ICP备17045578号-1