The Forest

The Forest

Not enough ratings
森林专用服务器开服指南(Windows系统)
By Colorful
本教学教你创建一个服务端与客户端分开的服务器。这个指南主要是参考这篇文章写的。https://steamproxy.net/sharedfiles/filedetails/?id=907906289
   
Award
Favorite
Favorited
Unfavorite
搭建服务器
  1. 你需要一个搭载着Windows系统的服务器,云服务器或者个人电脑都可以。
  2. 在你的路由器(如果你有的话)和防火墙中开放8766, 27015 和 27016端口,使得其支持TCP/UDP协议。
  3. 安装森林服务端工具
    • 直接在你的steam库中搜索The Forest Dedicated Server Tool,下载即可。
    • 如果你不想登陆你的steam账号下载的话,你也可以通过steamCMD下载。steamCMD下载链接:https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip
      安装好steamCMD之后,在steamCMD的安装目录,新建一个记事本,输入
      steamcmd +login anonymous +app_update 556450 +quit
      另存为theforestupdatescript.bat后,打开这个文件,即可安装森林的服务端工具。
  4. 进入你的The Forest Dedicated Server Tool安装目录,打开TheForestDedicatedServer.exe之后关闭,服务器工具就会开始创建服务器配置文件。
  5. 之后是配置你的服务器配置文件,这里有两种方法。
    • 创建TheForestDedicatedServer.exe的快捷方式,右键属性,在路径后面添加参数(这里的serverip替换为你的内网ip)
      -serverip xxx.xxx.xxx.xxx -serversteamport8766 -servergameport 27015 -serverqueryport 27016 -servername TheForestGameDS-serverplayers 8 -difficulty Normal -inittype Continue -slot 1
      具体可用的参数可以参考这篇指南 网站链接
    • 你也可以直接修改server.cfg文件,这个文件在你第一次打开服务端时被创建。默认路径
      C:\Users\%USER%\AppData\LocalLow\SKS\TheForestDedicatedServer\ds\Server.cfg
      server.cfg的文件内容如下,“#”后面的内容是我的说明
      // Dedicated Server Settings. // Server IP address - Note: If you have a router, this address is the internal address, and you need to configure ports forwarding#替换为内网ip serverIP **.*.*.* // Steam Communication Port - Note: If you have a router you will need to open this port. serverSteamPort 8766 // Game Communication Port - Note: If you have a router you will need to open this port. serverGamePort 27015 // Query Communication Port - Note: If you have a router you will need to open this port. serverQueryPort 27016 // Server display name#服务器显示名字 serverName xxx'sDedicatedServer // Maximum number of players#服务器最大人数 serverPlayers 6 // Enable VAC (Valve Anti-cheat System at the server. Must be set off or on#打开vac反作弊 enableVAC off // Server password. blank means no password#服务器密码 serverPassword // Server administration password. blank means no password#管理员密码 serverPasswordAdmin // Your Steam account name. blank means anonymous#管理员token,这个token的获取在后文说明 serverSteamAccount // Time between server auto saves in minutes - The minumum time is 15 minutes, the default time is 30#服务器自动备份时间,单位分钟 serverAutoSaveInterval 15 // Game difficulty mode. Must be set to Peaceful Normal or Hard#服务器难度 difficulty Normal // New or continue a game. Must be set to New or Continue initType Continue // Slot to save the game. Must be set 1 2 3 4 or 5#使用哪个存档槽 slot 1 // Show event log. Must be set off or on#服务端是否显示日志,建议打开,否则服务端打开只有黑屏。 showLogs on // Contact email for server admin serverContact xxx@xxx.org // No enemies veganMode off // No enemies during day time vegetarianMode off // Reset all structure holes when loading a save resetHolesMode off // Regrow 10% of cut down trees when sleeping treeRegrowMode off // Allow building destruction allowBuildingDestruction on // Allow enemies in creative games allowEnemiesCreativeMode off // Allow clients to use the built in debug console allowCheats off // Use full weapon damage values when attacking other players realisticPlayerDamage off // Allows defining a custom folder for save slots, leave empty to use the default location saveFolderPath // Target FPS when no client is connected targetFpsIdle 5 // Target FPS when there is at least one client connected targetFpsActive 60
      你至少需要配置ip,你的服务器就可以运行了。
  6. 运行你的服务端工具,你的服务器应该就可以运行了。
加入服务器的方法
打开游戏——多人游戏——加入游戏——左侧选择Internet(dedicated)——搜索你的服务器名字——刷新,过一会儿应该就会显示出你的服务器。
如何获取管理员token
steam提供管理与你的steam账户关联的专用服务器账户,详情打开这个链接:
输入the Forest的APP ID:242760
即可获得你的token。
评论区里面遇到的问题
Q:打不开服务端应用,初始化DX9失败,应该怎么办?
报错信息
Failed to initialize Direct3D. Make sure you have at least DirectX 9.0c installed, have drivers for your graphics card and have not disabled 3D acceleration in display settings. InitializeEngineGraphics failed

A:试试安装/修复DirectX Runtime Web Installer。

https://www.microsoft.com/en-us/download/details.aspx?id=35

Q:我的服务器显卡性能很糟糕,无法安装/修复DX9,打不开服务端,应该怎么办?

A:试试用-nographics -batchmode参数运行服务端。
15 Comments
Colorful  [author] 13 Mar @ 4:14am 
@Jeremy JT 不明白你卡在哪里了,加个好友吧。
Jeremy JT 13 Mar @ 3:41am 
楼主卡在第5操作 没明白你写的操作方法 可以详细说一下吗?
Colorful  [author] 4 Sep, 2022 @ 10:49pm 
链接这里发不出来,我加你好友吧
ClearSky.MuYang 4 Sep, 2022 @ 8:45pm 
{LINK REMOVED} 复制链接到浏览器打开查看日志文件
Colorful  [author] 4 Sep, 2022 @ 8:43pm 
看下日志文件
ClearSky.MuYang 4 Sep, 2022 @ 8:41pm 
我刚刚尝试了添加-nographics参数启动 程序提示还需要添加-batchmode进行启动,我添加之后程序启动了,但是只生成了appcache以及config以及logs文件夹,并没有生成ds/server.cfg文件
Colorful  [author] 4 Sep, 2022 @ 8:36pm 
也可以试试安装DirectX Runtime Web Installer

https://www.microsoft.com/en-us/download/details.aspx?id=35

如果别人也遇到这个问题,并且显卡支持DX9,这个应该可以解决问题。
Colorful  [author] 4 Sep, 2022 @ 8:34pm 
@ConfidentDaniel
试一下用-nographics参数启动一下试试。
ClearSky.MuYang 4 Sep, 2022 @ 8:28pm 
这些文件还没生成因为我点击TheForestDedicatedServer.exe就直接报错了,没有生成相关的服务端文件
Colorful  [author] 4 Sep, 2022 @ 8:27pm 
@ConfidentDaniel
\steamcmd\steamapps\common\TheForestDedicatedServer\logs