KennethCheng
Published on 2025-02-11 / 44 Visits
0
0

windows森林之子开服

需要安装STEAEMCMD环境

官方网站:https://developer.valvesoftware.com/wiki/SteamCMD
Windows版本下载地址:https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip

解压SteamCMD

我的目录是C:\steamcmd

下载服务端

C:\steamcmd下新建TheSonOfTheForest_startup.bat,运行下载森林之子服务端
脚本内容

steamcmd +login anonymous +app_update 2465200 validate +quit

增加管理员

文件目录 C:\Users\Administrator\AppData\LocalLow\Endnight\SonsOfTheForestDS\ownerswhitelist.txt

# In order to be able to administrate your server from in game directly, you will need to setup server ownership.
# Add below the steam ids of every server owner, one steam id per line.
# To find your SteamID, open Steam and click on your name on the top right, then go to Account Details.
# You can use # to comment out a line. That can be helpful to keep track of SteamIDs, you can include their name in the line above or below, starting with a #.

xxxxx

修改配置文件

服务器配置文件 自动生成
C:\Users\Administrator\AppData\LocalLow\Endnight\SonsOfTheForestDS\dedicatedserver.cfg

{
  "IpAddress": "0.0.0.0",
  "GamePort": 8766,
  "QueryPort": 27016,
  "BlobSyncPort": 27017,
  "ServerName": "name",
  "MaxPlayers": 8,
  "Password": "112451",
  "LanOnly": false,
  "SaveSlot": 1,
  "SaveMode": "Continue",
  "GameMode": "Normal",
  "SaveInterval": 600,
  "IdleDayCycleSpeed": 0.0,
  "IdleTargetFramerate": 5,
  "ActiveTargetFramerate": 60,
  "LogFilesEnabled": false,
  "TimestampLogFilenames": true,
  "TimestampLogEntries": true,
  "SkipNetworkAccessibilityTest": false,
  "GameSettings": {},
  "CustomGameModeSettings": {}
}

开启服务端

C:\steamcmd\steamapps\common\Sons Of The Forest Dedicated Server\StartSOTFDedicated.bat

配置文件目录

C:\Users\Administrator\AppData\LocalLow\Endnight\SonsOfTheForestDS

存档目录

C:\Users\Administrator\AppData\LocalLow\Endnight\SonsOfTheForestDS\Saves

自动存档脚本

@echo off

if "%1"=="hide" goto CmdBegin
start mshta vbscript:createobject("wscript.shell").run("""%~0"" hide",0)(window.close)&&exit
:CmdBegin

if %time:~0,2% leq 9 (set hour=0%time:~1,1%) else (set hour=%time:~0,2%)

::设置7z的命令行程序路径
set Bandizip=C:\Program Files\Bandizip\Bandizip.exe
::设置压缩包保存路径
set Save=C:\Users\Administrator\AppData\LocalLow\Endnight\SonsOfTheForestDS\Saves
::当天日期,备份文件名
set curdate=%date:~0,4%-%date:~5,2%-%date:~8,2%_%hour%:%time:~3,2%:%time:~6,2%

::备份命令
"%Bandizip%" c "Z:\bak\SonOfTheForest\%curdate%.zip" "C:\Users\Administrator\AppData\LocalLow\Endnight\SonsOfTheForestDS\Saves"

配置文件可修改配置

Pasted-image-20250205003848.md.png

相关参数

GameSetting.Multiplayer.Cheats(是否允许作弊)
可修改的值为true, false
GameSetting.Multiplayer.PvpDamage(pvp伤害)
可修改的值为off, reduced, normal
GameSetting.Vail.EnemySpawn(敌人)
可修改的值为true, false
GameSetting.Vail.EnemyHealth(敌人血量)
可修改的值为low, normal, high
GameSetting.Vail.EnemyDamage(敌人杀伤力)
可修改的值为low, normal, high
GameSetting.Vail.EnemyArmour(敌人盔甲)
可修改的值为low, normal, high
GameSetting.Vail.EnemyAggression(敌人敌意程度)
可修改的值为low, normal, high
GameSetting.Vail.EnemySearchParties(敌方搜寻队)
可修改的值为low, normal, high
GameSetting.Vail.AnimalSpawnRate(动物数量)
可修改的值为low, normal, high
GameSetting.Environment.StartingSeason(初始季节)
可修改的值为spring, summer, autumn, winter
GameSetting.Environment.SeasonLength(季节长度)
可修改的值为short, default, long, realistic
GameSetting.Environment.DayLength(日间长度)
可修改的值为short, default, long, realistic
GameSetting.Environment.PrecipitationFrequency(降雨频率)
可修改的值为low, default, high
GameSetting.Survival.PlayerStatsDamage(生存伤害)
可修改的值为off, normal, hard
GameSetting.Survival.ConsumableEffects(消耗品效果)
可修改的值为normal, hard
GameSetting.Survival.ColdPenalties(寒冷惩罚)
可修改的值为off, normal, hard
GameSetting.Survival.StatRegenerationPenalty(属性恢复惩罚)
可修改的值为off, normal, hard
GameSetting.Survival.ReducedFoodInContainers(容器中的食物更少)
可修改的值为true, false
GameSetting.Survival.SingleUseContainers(加载存档时容器不会重新填充)
可修改的值为true, false
GameSetting.Survival.BuildingResistance(建筑抵抗力)
可修改的值为low, normal, high
GameSetting.Survival.CreativeMode(创意模式)
可修改的值为true, false
GameSetting.Survival.PlayersImmortalMode(上帝模式)
可修改的值为true, false
GameSetting.FreeForm.ForcePlaceFullLoad(集体放置)
可修改的值为true,false
GameSetting.Construction.NoCuttingsSpawn(不生成木屑)
可修改的值为true, false
GameSetting.Survival.OneHitToCutTrees(即时间砍树)
可修改的值为true, false

Comment