森林游戏吧 关注:66,461贴子:349,299

The Forest 专用服务器设置向导

只看楼主收藏回复

The Forest 专用服务器设置向导
本帖内容翻译了由 Steam社区的SurvivalistGaming [C.M.] 和其他 3 人合作完成的帖子,在此表以感谢。
本向导解释了如何启动The Forest的专用服务器,请上报任何你遇到的程序错误以帮助改进,谢谢。
-------------------------------------------------------------
游戏版本: V1.07
--------------------------------------------
一,安装并加载专用服务器程序
你可以从Steam主界面中的库-工具中搜索并下载The Forest Dedicated Server安装。如果你想在不登录Steam账号的情况下启动专用服务器,可以下载SteamCMD。
注意:
l 如果从Steam启动专用服务器后,在游戏里的互联网服务器列表中仍然找不到你的服务器,那么尝试到专用服务器的文件夹中找到相关可执行文件或用它的快捷方式直接启动。
l 若要在后台运行专用服务器,可以通过用“-batchmode” 作为命令行参数来启动专用服务器程序。
安装后在Steam-库-已安装-工具里面,运行一次The Forest Dedicated Server来在你的电脑上创建服务器的相关文件夹。
-----------------------------------------------------------------
二,配置
如下有两种方式来配置专用服务器。
l 或用命令行参数;
l 或用Server.cfg文件。
注意:用命令行参数会覆盖在配置文件中的相关条目。
------------------------ ------------
二,甲.使用命令行来配置:
用命令行工具启动专用服务器需要:
1,在你的路由器和防火墙中为TCP/UDP打开8766, 27015 和 27016端口。
2,创建快捷方式并添加:
-------------------------------------
-serverip xxx.xxx.xxx.xxx -serversteamport8766 -servergameport 27015 -serverqueryport 27016 -servername TheForestGameDS-serverplayers 8 -difficulty Normal -inittype Continue -slot 1
-------------------------------------
3,用这个快捷方式启动专用服务器或启动游戏。
可用的命令行参数有:
-------------------------------------
l -serverip<ip> // If you have a router, this address is the internal address,and you need to configure ports forwarding 设置服务器IP,注意,如果你使用内部网,这个IP就是你的内网IP
l -serversteamport<port> // Set the steam server port, default is 8766 设置Steam 通讯端口,如果你有路由器,需要在路由器里面打开该端口。下两个端口设置相同步骤。该端口默认是 8766
l -servergameport<port> // 同上,默认 27015
l -serverqueryport<port> // 同上,默认 27016
l -servername<name> // Set the server display name 设置服务器显示名称
l -serverplayers<maxPlayers> // Set the max. number of players, default is 8 设置允许加入的最多玩家数,默认8
l -serverpassword<password> // Set the server password, default is none 设置服务器密码,空着表示没有密码,默认无
l -serverpassword_admin<password> // Set the server admin password, default is none 设置服务器管理员密码,空着表示没有。默认无
l -serversteamaccount<name> // Set the steam account, blank means anonymous (see Steam serveraccount bellow) 设置Steam账号,空着表示匿名或无名(参考如下的Steam服务器账号)
l -enableVAC //Enable Valve Anti Cheat 设置是否允许作弊,必须设置on/开或off/关
l -serverautosaveinterval<Interval> // Set the autosave interval in minutes, default is 15 设置自动保存的时间间隔,默认15分钟
l -difficulty<Peaceful|Normal|Hard> // Set the game difficult level, default is Normal 设置游戏难度Peaceful/和平, Normal/一般或Hard/困难
l -inittype<New|Continue> // Set the init type of game, default is New 设置每次进入服务器需要玩家新开/new还是继续游戏/continue,强烈建议设置为 continue
l -slot<1|2|3|4|5> // Set the save slot to use, default is 1 设置保存位置,默认1
l -showlogs //Enable server log window 设置事件记录日志,必设项
l -veganmode //Enable the vegan mode cheat (no enemies) 设置有/on 或无/off野人
l -vegetarianmode// Enable the vegetarian mode cheat (no enemies during daytime) 设置是否允许白天有无野人
l -resetholesmode// Reset all existing floor holes when loading a save 加载存档时是否重设已有地板孔洞,不知道是不是我翻译的这意思
l -treeregrowmode// Enable Tree regrowth when sleeping 允许在玩家睡觉时被砍倒的树木生长
l -nobuildingdestruction// Enemie and players cannot destroy buildings 是否允许建筑损毁
l -allowenemiescreative// Enable enemy spawn in creative games 在创建模式下允许野人再生
l -allowcheats //Allow clients to use the built in development console 是否允许玩家使用内置控制台
l -configfilepath// Changes the config file path used by the server 允许自定义配置文档位置,空白为默认位置
l -savefolderpath// Allows defining a custom folder for save slots 允许自定义保存文档位置,空白为默认位置
-------------------------------------
注意:对配置文档的路径,所在文件夹必须先建立,但也可以通过启动专用服务器来建立相关文件夹。使用斜杠如/。比如:
-------------------------------------
-configfilepath"d:/Your/Custom/Path/YourServerConfigFileName.cfg"
-------------------------------------
------------------------------------------------------------------
二,乙.使用配置文档Server.cfg来配置
Server.cfg文档可在你第一次启动专用服务器的时候自动被创建。
Server.cfg文档默认位置位于:
-------------------------------------
C:\Users\%USER%\AppData\LocalLow\SKS\TheForestDedicatedServer\ds\Server.cfg
-------------------------------------
当然,你也可以通过如下方法找到该文件夹。
同时按键盘左边的windows键+R键打开查找/搜索框,并输入 “%appdata%”回车。在弹出的文件夹栏里向上,找到Appdata 文件夹。一路向下:Appdata – LocalLow – SKS – TheForestDedicatedServer – DS - Server.cfg。
用记事本打开该文档,Server.cfg中的内容如下(注意括号及内的内容是我加的):
-------------------------------------
//Dedicated Server Settings.
// ServerIP address - Note: If you have a router, this address is the internal address,and you need to configure ports forwarding (设置服务器IP,注意,如果你使用路由器,这个IP就是你的内网IP,你还需要设置端口转发。)
serverIP192.168.1.***
// SteamCommunication Port - Note: If you have a router you will need to open thisport. (Steam 通讯端口,如果你有路由器,需要在路由器里面打开该端口。下两个端口设置相同步骤。)
serverSteamPort8766
// GameCommunication Port - Note: If you have a router you will need to open thisport. (同上)
serverGamePort27015
// QueryCommunication Port - Note: If you have a router you will need to open thisport. (同上)
serverQueryPort27016
// Serverdisplay name (服务器显示的名字)
serverName *********/NoModding,No Cheating
// Maximumnumber of players (允许加入服务器的最多玩家数)
serverPlayers8
// EnableVAC (Valve Anti-cheat System at the server. Must be set off or on (是否允许作弊,必须设置on/开或off/关)
enableVACon
// Serverpassword. blank means no password (服务器密码,空着表示没密码)
serverPassword
// Serveradministration password. blank means no password(服务器管理员密码,空着表示没密码)
serverPasswordAdmin***************
// YourSteam account name. blank means anonymous (你的Steam账号,空着表示匿名或无名)
serverSteamAccount******
// Timebetween server auto saves in minutes - The minumum time is 15 minutes, thedefault time is 30 (自动保存时间间隔,最短15分钟,默认30分钟)
serverAutoSaveInterval15
// Gamedifficulty mode. Must be set to Peaceful Normal or Hard(游戏难度,必须设置成和平/ Peaceful、一般/ Normal或困难/ Hard)
difficultyNormal
// New orcontinue a game. Must be set to New or Continue(玩家进入服务器后是新开/new还是继续/Continue,必须设置项,强烈建议设置为继续/continue)
initTypeContinue
// Slot tosave the game. Must be set 1 2 3 4 or 5 (设置保存位置,默认1)
slot 3
// Showevent log. Must be set off or on ( 事件记录日志,必设项)
showLogs on
// Contactemail for server admin (管理员电邮)
serverContact************@****.com
// Noenemies (设置有无野人)
veganModeoff
// Noenemies during day time (设置白天有无野人)
vegetarianModeoff
// Resetall structure holes when loading a save (加载存档时是否重设已有地板孔洞,不知道是不是我翻译的这意思)
resetHolesModeoff
// Regrow10% of cut down trees when sleeping(设置是否允许在玩家睡觉时被砍倒的树木生长10%)
treeRegrowModeoff
// Allowbuilding destruction(是否允许建筑物损毁)
allowBuildingDestructionon
// Allowenemies in creative games(创造模式下是否允许有野人)
allowEnemiesCreativeModeoff
-------------------------------------
以下几项是在配置文档里面可能有的内容,做补充。
-------------------------------------
// Allowsdefining a custom folder for save slots, leave empty to use the defaultlocation (允许自定义保存文档位置,空白为默认位置)
saveFolderPath
// Target FPS when no client is connected (服务器内没玩家的时候设置刷新率)
targetFpsIdle 5
// Target FPS when there is at least one client connected (服务器内至少1个玩家连线时服务器刷新率)
targetFpsActive 60
-------------------------------------
设置完成后,保存并关闭。
现在可以点击打开专用服务器了。
注意:
如果想在同一台机器上运行服务器,以及同时运行The Forest游戏,需要先点击The Forest运行,出现The Forest Configuration 小窗口后,别急着点击Play。先打开专用服务器运行。注意,别最小化专用服务器窗口,切换到The Forest Configuration窗口直接点击Play就是。
-----------------------------------------------------------------------------------------
三,Steam 服务器账户
为帮助玩家尽快定位曾玩过的你的游戏服务器,Steam提供了一种方法来识别服务器。
你首先需要在 SteamCommunity :: Steam Game Server Account Management(链接地址为:https://steamcommunity.com/dev/managegameservers)中为你的服务器创建一个账号。游戏The Forest 的appid是242760。注意,请勿向第三方透露游戏服务器的登录令牌。
一旦创建了你的游戏服务器账户,复制你的登录令牌到或者命令行
-------------------------------------
-serversteamaccount <token>
-------------------------------------
或者添加到配置文件Server.cfg中的
-------------------------------------
serverSteamAccount <token>
-------------------------------------
然后,重启服务器。
----------------------------------------------------------------------------
完毕。


IP属地:澳大利亚1楼2018-05-24 21:58回复
    首先,这个链接是我发布内容的pdf文档。
    https://pan.baidu.com/s/1cniyBCt6R0boO5vmBe_GZA
    The Forest的专用服务器的启动程序可参考我的路径,我的所有游戏都安装在Steam的默认安装目录下。
    ---------------------------------------------------
    *:\Program Files\Steam\steamapps\common\TheForestDedicatedServer\TheForestDedicatedServer.exe
    ---------------------------------------------------
    补充:请确保***作系统是windows 64位。
    某的惨痛教训让我补充此条。


    IP属地:澳大利亚3楼2018-05-24 22:19
    回复


      IP属地:广东4楼2018-05-25 16:49
      回复
        补充几点:
        1,服务器启动后是黑屏。
        2,如果是正版用户,则可以在Steam库里面正常下载并安装The Forest Dedicated Server。
        3,正版用户要想在不同机器上运行服务器程序,则需注意不要在服务器所在机器上从Steam里打开服务器,而是从The Forest Dedicated Server的所在文件夹中找到TheForestDedicatedServer.exe程序并打开即可。需要注意到是,其配置文件Server.cfg中,一定要把serverSteamAccount一项空白表示不用登录账号。其实,我强烈推荐玩家专门注册个运行服务器的账号,不一定非要把ID加入配置文件,只是为了下载并配置时方便。
        4,如果用SteamCMD脚本下载、安装并运行服务器,则可以不用登录账号。需注意用SteamCMD创建并运行的服务器的版本是官方最新版,至于盗版玩家能否连线到该服务器,我没尝试过,不知道。
        5,用Steam命令行版客户端(SteamCMD)下载并更新The Forest专用服务器。
        首先下载(https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip)并解压缩文件到文件夹你已经创建的文件夹里面。然后点击运行该文件夹中的steamcmd.exe。
        其次,在该文件夹中创建个文本文档,并将下面文字复制粘贴到该文本文档。
        --------------------------------------------------
        // 不登录Steam账号而创建并更新The Forest专用服务器
        login anonymous
        //如果想要将The Forest专用服务器下载并安装在D盘根目录下名为TheForestDedicatedServer的文件夹内,则为
        force_install_dir D:\ TheForestDedicatedServer
        //下载服务器文件并校验,其中The Forest的专用服务器的SteamID是556450,Validate是校验命令
        app_update 556450 validate
        //退出
        quit
        ------------------------------------------------------
        然后将该文档格式更改为.bat。注意有些玩家的文件夹浏览模式中是隐藏已知文件扩展名的,需要在文件夹窗口中点击工具-文件夹选项-查看-隐藏已知文件扩展名中把勾去掉。
        再点击该文件,SteamCMD会自动下载The Forest Dedicated Server文件到你指定的文件夹。
        下载完成后,点击The Forest Dedicated Server文件夹中的TheForestDedicatedServer.exe以运行服务器。
        再然后,就可以根据1楼中的 “二,乙.使用配置文档Server.cfg来配置” 来配置服务器了。
        6,1楼内容中,因为贴吧系统问题,把我的配置文档Server.cfg中的命令行中的空格给去掉了,正确格式如下
        ------------------------
        serverPasswordAdmin一个空格***************
        serverSteamAccount一个空格******
        serverAutoSaveInterval一个空格15
        difficulty一个空格Normal
        veganMode一个空格off
        vegetarianMode一个空格off
        resetHolesMode一个空格off
        treeRegrowMode一个空格off
        allowBuildingDestruction一个空格on
        allowEnemiesCreativeMode一个空格off
        ----------------------------------------
        其他类同。
        祝顺利。


        IP属地:澳大利亚5楼2018-05-26 19:49
        回复(4)
          为啥我显示连接不上STEAM


          IP属地:江苏来自Android客户端6楼2018-05-29 20:19
          回复
            楼主你好,我想问一下,为什么我进游戏在局域网里搜到自己的服务器之后,提示我密码不对,我并没有设置密码。


            IP属地:吉林7楼2018-06-16 14:43
            回复(4)
              我想说服务器配置要怎么样,多少核多少g,宽带多少


              IP属地:重庆来自Android客户端8楼2018-06-18 23:45
              回复(1)
                楼主我是用steam正版的,进了游戏后能找到自己的服务器,但是输了密码进入房间显示“server does not seem to be set up correctly”我想请问下是我的配置文件出错了吗?我是用server.cfg配置的


                IP属地:福建9楼2018-06-20 09:10
                回复(9)
                  楼主 我现在服务器大概弄好了我自己能进去 但是我朋友进不来怎么解决


                  IP属地:广东10楼2018-06-24 00:44
                  回复(7)


                    IP属地:广东11楼2018-06-24 10:47
                    收起回复
                      我用这个方式建立服务器后~自己的账号进服务器无法砍树和建造物品,也看不到其他玩家!但自己的朋友进服务器却没有任何问题。不知道是什么问题?其他朋友有遇到这个问题么?


                      IP属地:重庆12楼2018-07-02 23:55
                      收起回复
                        楼主知道怎么开32人房间吗


                        IP属地:湖南13楼2018-07-03 16:22
                        收起回复
                          请问,打开服务器后显示Failed to connect to Steam怎么办?


                          IP属地:安徽来自Android客户端14楼2018-07-11 02:21
                          收起回复
                            请问服务器开了之后其他人不能从互联网搜到,并且进游戏再拉人会显示服务器无响应是怎么回事


                            IP属地:安徽来自Android客户端15楼2018-07-11 19:44
                            回复(2)
                              为什么我建的服务器,其他都正常,就是世界经常被清空数据,之前得建筑都没有了,标记也没有了。只能回档。我安装了Ox的manager,也遇到这个问题。我去墙外一顿搜索,发现很多老外说是官方服务端得bug,关于autosave得问题。我现在把autosave给关闭了。目前没有遇到问题。lz遇到过吗?


                              IP属地:辽宁16楼2018-07-19 18:07
                              回复(4)