Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- set Options=Depot_All?Game=TH?LightingScenario=Day?TerroristCount=40?RoundTime=3600
- :: MapList
- :: ----------------------------------------------------
- :: To use a map list, make sure it is located under /GroundBranch/MapLists
- :: and then use the command line "MapList=<NameOfMapList>".
- :: e.g. Options=MapList=TerroristHunt
- ::
- :: To create a map list, run a non-dedicated server build of Ground Branch.
- :: Bring up the console.
- :: Type 'ShowServerManagementTools' and select MapListEditor.
- :: Once created, export your map list.
- :: If you are using a dedicated server build, make sure you move your newly
- :: created map list to the a dedicated server install location.
- :: Maps Lighting Scenarios Game Modes
- :: -------------------------------------------------------------------------------
- :: Depot_All Day, Night TE, TH
- :: Depot_Compound Day, Night DM, TDM, TE
- :: NatureArea Day, Night DM, TDM
- :: TankerShip_All Day, Night DM, TDM, TE, TH
- :: TankerShip_RearOnly Day, Night DM, TDM, TE
- :: SmallTown Day, Night DM, TDM, TE, TH
- :: StorageFacility Day TE
- :: PowerStation Day, Night DM, TDM, TE, TH
- :: Game Modes
- :: i.e. ?Game=<game mode name or alias>)
- :: ----------------------------------------------------
- :: TeamElimination or TE
- :: TerroristHunt or TH
- :: DeathMatch or DM
- :: TeamDeathMatch or TDM
- :: Other options (after map, separated using "?")
- :: e.g. Running Depot All Team Elimination with 5 minute round time & 60 second warmup.
- :: Options=Depot_All?Game=?TE?RoundTime=300?WarmupTime=60
- :: --------------------------------
- :: LightingScenario What daytime to load.
- :: Day or Night.
- :: TimeLimit End the game and change map after this many minutes has passed.
- :: 0+ min.
- :: ReadyCountdownTime Delay before sending everyone that is ready to the gameplay area.
- :: 5+ sec.
- :: PreRoundFreezeTime How long keep people frozen before the round begins.
- :: 5+ sec.
- :: RoundTime How long each round should go for.
- :: 20+ sec.
- :: PostRoundDelayTime End of round delay before sneding everyone back to the ready room.
- :: 5+ sec.
- :: TerroristCount How many terrorists to load when Terrorist Hunt gametpe is selected.
- :: 0+
- :: There is no need to modify anything below this point.
- :: It is a script to find the correct executable file and restart the server if it goes down.
- set "BinPath=.\GroundBranch\Binaries\Win64\"
- set "EngineBinPath=..\GBEngine\Engine\Binaries\Win64\"
- set "ProjectPath=%cd%\GroundBranch.uproject"
- set "ServerCommand=-server -log"
- :Find_Exec
- if exist %BinPath%GroundBranchServer-Win64-Shipping.exe (
- @echo GroundBranchServer-Win64-Shipping.exe is valid.
- set "Exec=%BinPath%GroundBranchServer-Win64-Shipping.exe"
- ) else if exist %BinPath%GroundBranch-Win64-Shipping.exe (
- @echo GroundBranch-Win64-Shipping.exe is valid.
- set "Exec=%BinPath%GroundBranch-Win64-Shipping.exe"
- else if exist %BinPath%GroundBranchServer.exe (
- @echo GroundBranchServer.exe is valid.
- set "Exec=%BinPath%GroundBranchServer.exe"
- ) else if exist %BinPath%GroundBranch.exe (
- @echo GroundBranch.exe is valid.
- set "Exec=%BinPath%GroundBranch.exe"
- ) else if exist %EngineBinPath%UE4Editor.exe (
- @echo UE4Editor.exe is valid.
- set "Exec=%EngineBinPath%UE4Editor.exe %ProjectPath%"
- set NoLoop=True
- ) else (
- @echo Couldn't find .exe to use!
- goto Exit
- )
- :Start_Server
- start "Dedicated Server" /max %Exec% %Options% %ServerCommand%
- :: Skip the loop if asked too.
- if defined NoLoop goto Exit
- :Check_Task_Loop
- @echo Waiting for server executable to no longer exist in task list.
- :: Waits 30 seconds, then checks for executable in task list.
- :: If it isn't found, the server will be restarted using the existing options.
- >NUL timeout /nobreak /t 5
- tasklist | findstr /i "Dedicated Server"
- if %errorlevel% neq 0 goto Restart
- cls
- goto Check_Task_Loop
- :Restart
- @echo Server executable no longer in task list.
- >NUL timeout /nobreak /t 5
- for /l %%# in (5,-1,1) do (
- cls
- set/p "=Restarting dedicated server in %%#..."<NUL:
- >NUL timeout /nobreak /t 1
- )
- cls
- goto Start_Server
- :Exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement