Vor dem selben Problem standen wir auch am Anfang.
Das Problem ist erstens das du mit jeder Validierung der ServerFiles deine Daten überschreibst.
Sprich Validierung der Files muss aus sein.
Und das 2 Problem ist das er irgendwie nur die defaultengine.ini nimmt um seine Daten daraus zu beziehen.
Ich kann dir mal meine .bat posten mit der ich aktuell arbeite.
Ich hab mit dem Entwickler von dem Script jetzt lange hin und hergeschrieben und hab auch ne .exe die so gut wie alles vollautomatisch macht.
Hab auch sein OK das hier zu posten sowie dann auch die .exe die dann automatisch in einem Intervall prüft ob es ein Update gibt.
Aber fürn Anfang sollte es damit eigentlich mal funktionieren .. sobald ich das morgen mit dem Programm das er geschrieben hat getestet habe kann ich euch das auch zur Verfügung stellen.
Die INI ist eigentlich relativ selbsterklärend.. aber bei Fragen .. fragt ruhig =)
@ECHO OFF
::By Dateranoth - January 31, 2017
::Used by https://www.gamercide.org on their server.
::Feel free to change, adapt, and distribute
::DecToHex conversion code FROM http://stackoverflow.com/users/778560/aacini
::V1.2-Added more Server Options and the ability to turn off Steam Validate.
::V1.1-Added known server options. Added ability to change processor affinity.-------::
::-----------------------------------------------------------------------------------::
::V1.0-Initial Version Created. Simple Loop Script to download server files from-----::
::Steam. No useage other than that yet.----------------------------------------------::
::-----------------------------------------------------------------------------------::
::--------------------User Variables-------------------------------------------------::
::-----------------------------------------------------------------------------------::
::Set RustDedicated.exe Directory (Be sure to include Trailing Slash)
SET ServerPath=C:\Game_Servers\Conan_Exiles_Server\
::Set Time between server Failed or Stopped and Server Restarted (in seconds)
SET Timer=10
::---------------------------------------------------------------------------------------::
::--------------------Server Settings------No space after = -----------------------------::
::---------------------------------------------------------------------------------------::
::-SERVER NAME CANNOT BE SET FROM THIS LAUNCHER. You need to set it in your game folder--::
::-Open SERVER\ConanSandBox\Saved\Config\WindowServer\Engine.ini ------------------------::
::-If not there add [OnlineSubsystemSteam] to the bottom of the file---------------------::
::-Below that Add ServerName=YOURSERVERNAME ---------------------------------------------::
::-For a server Password (to prevent public access) Add ServerPassword=YOURPASS ---------::
::-Save the file. The remainder of settings are in ServerSettings.ini - Modify as needed-::
::Set the IP for the Server.
SET IP=192.168.0.45
::Set the Game Port for the Server (This is what players will connect to)
SET GamePort=27015
::Set the Query Port for the Server (Admin purposes? Not sure yet)
SET QueryPort=27016
::Set the Maximum Players Allowed on your server.
SET MaxPlayers=30
::Set the Admin Password. This is what you will use to get administrator rights from the menu.
SET AdminPass=CHANGEME
::Set the Server Password. This is what will be required to connect
SET ServerPass=
::Set the name for your server.
SET ServerName=Conan Exiles Server
::Enable Console. With this disabled your server still runs and logs, but you get no visible window
SET EnableConsole=yes
::-----------------------------------------------------------------------------------::
::--------------------Update Server on Each Restart----------------------------------::
::-----------------------------------------------------------------------------------::
::Update and Verify server files on each restart using SteamCMD? (yes or no)
SET EnableUpdate=yes
::Set steamcmd.exe Directory (Be sure to include Trailing Slash)
SET SteamCmdPath=C:\Game_Servers\SteamCMD\
::Validate every time SteamCMD runs? (yes or no)
SET validate="no"
::---------------------------------------------------------------------------------------::
::--------------------Affinity Settings------No space after = ---------------------------::
::Use these to set the affinity of your Conan Server if needed. You will need to enter---::
::the affinity in binary by number of cores. To use Cores 0,1,&2 in a Four Core System---::
::you would set bin=0111 ----To use cores 0,2,4,5 in a 6 core system set bin=110101 -----::
::First binary number is the last core. Last binary number is the first core ------------::
::Make sure there is a 1 or 0 for ALL available cores, including hyper threads. If you---::
::leave anything out it will set the cores incorrectly-----------------------------------::
::---------------------------------------------------------------------------------------::
::Enable setting affinity for the server. Leave this no if you wish to use all cores (yes or no)
SET EnableAffinity=no
::Set which cores you wish to use. Refer to the information above.
SET bin=11111100
::------------------------------------------------------------------------------------------------------------------------------::
::!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!No Setting Changes Below Here!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!::
::------------------------------------------------------------------------------------------------------------------------------::
:Start
title Conan Server Utility
endlocal
setlocal
:AffinityCheck
IF /i %EnableAffinity%==yes (
set hex=
goto AffinityStart
) ELSE (
set hex=
goto LogCheck
)
:AffinityStart
call :bin2hex hex=%bin%
echo hex: %hex%
set hex=/AFFINITY %hex%
goto :LogCheck
:bin2hex hexVar=binValue
setlocal EnableDelayedExpansion
for %%a in (0000-0;0001-1;0010-2;0011-3;0100-4;0101-5;0110-6;0111-7;1000-8;1001-9;1010-A;1011-B;1100-C;1101-D;1110-E;1111-F) do (
for /F "tokens=1,2 delims=-" %%b in ("%%a") do (
set "hextable[%%b]=%%c"
)
)
set "hex="
set "bin=000%~2"
:bin2hexloop
set "hex=!hextable[%bin:~-4%]!%hex%"
set "bin=%bin:~0,-4%"
if defined bin if "%bin:~3%" neq "" goto bin2hexloop
endlocal & set "%~1=%hex%"
set hex=/AFFINITY %hex%
goto :LogCheck
:LogCheck
setlocal
IF /i %EnableConsole%==yes (
SET log=-log
) ELSE (
SET log=
goto UpdateCheck
)
:UpdateCheck
IF /i %EnableUpdate%==yes (goto UpdateStart) ELSE (goto GameStart)
:UpdateStart
::Update if updates available and Verify Rust Server via steamcmd.
cd /d "%SteamCmdPath%"
IF /i %validate%==yes (
"%SteamCmdPath%"steamcmd.exe +@ShutdownOnFailedCommand 1 +@NoPromptForPassword 1 +login anonymous +force_install_dir %ServerPath% +app_update 443030 validate +quit
) ELSE (
"%SteamCmdPath%"steamcmd.exe +@ShutdownOnFailedCommand 1 +@NoPromptForPassword 1 +login anonymous +force_install_dir %ServerPath% +app_update 443030 +quit
)
goto GameStart
:GameStart
ECHO.
ECHO Starting Server Loop.
ECHO This window needs to stay open to properly monitor server.
ECHO.
ConanSandboxServer-Win64-Test.exe
start "Conan Server" /D "%ServerPath%ConanSandbox\Binaries\Win64" %HEX%/WAIT "%ServerPath%ConanSandbox\Binaries\Win64\ConanSandboxServer-Win64-Test.exe" ConanSandBox -Port=%GamePort% -QueryPort=%QueryPort% -MaxPlayers=%MaxPlayers% -AdminPassword=%AdminPass% -ServerPassword=%ServerPass% -ServerName="%ServerName%" -listen -nosteamclient -game -server %log%
::start "Conan Server" /D "%ServerPath%" %HEX%/WAIT "%ServerPath%ConanSandboxServer.exe" ConanSandBox?Multihome=%IP%?GameServerPort=%GamePort%?GameServerQueryPort=%QueryPort%?MaxPlayers=%MaxPlayers%?listen?AdminPassword=%AdminPass% -nosteamclient -game -server %log%
endlocal
goto RemainingLoop
:RemainingLoop
::Checks if timer has counted down to 0. If so restarts backup
setlocal enableDelayedExpansion
for /l %%N in (%Timer% -1 1) do (
SET /a "min=%%N/60, sec=%%N%%60, n-=1"
if !sec! lss 10 SET sec=0!sec!
cls
choice /c:CR1 /n /m "Server Restart in !min!:!sec! - Press R to Restart Server Now, or C to Cancel. " /t:1 /d:1
if not errorlevel 3 goto :CheckAnswer
)
:CheckAnswer
if errorlevel 2 (goto Start) else (goto End)
::Shut Down The Batch File.
:End
choice /c:YN /m "Do you really want to quit"
If Errorlevel 2 goto Start
If Errorlevel 1 goto Shutdown
:Shutdown
taskkill /f /im "ConanSandboxServer-Win64-Test.exe"
taskkill /f /im "ConanSandboxServer.exe"
endlocal
Exit
::Here in case of any major errors.
:CatchAllEnd
endlocal
pause
Exit
Alles anzeigen
https://www.gamercide.org