Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: __ __ ___ __
- :: / ` / \ |\ | |__ | / _`
- :: \__, \__/ | \| | | \__>
- ::
- ::by Royal cuz he is tired of editing these things
- ::Notes:
- :: >>anything<< after the = in this file is included in the variable, even quotes and spaces, it finishes on newline
- :: When setting up a new server be sure to check these files:
- ::Set this to the drive the server is on:
- C:
- ::Set the server exe folder
- set ServerFolder=C:\
- ::Set the server exe file name
- set ExeFile=arma2oaserverasd
- ::Set the server exe file name
- set HC=ArmA2OA
- :: Set the server pbo folder name (servers -serverMod line)
- set ServerPbo=@Dayz_Epoch_server
- :: Set the mission file folder name
- set MissionPbo=DayZ_Epoch_11.Chernarus
- :: Set the server config folder name
- set ConfigFolder=Config
- :: Set the server config file name (exclude file extension)
- set ConfigFile=config
- :: Set the network config file name (exclude file extension)
- set netConfigFile=basic
- :: Set the server game port (steamport and steamquery port set through ConfigFile)
- set Port=2302
- :: Set the servers mods (-mod param)
- :: @DayzOrigins1795;@DayzOverwatch;@DayZ_Epoch;@ExtDB;
- set ServerMods=@DayzOverwatch;@DayZ_Epoch;@extDB;
- :: set ServerMods=@DayzOverwatch;@DayZ_Epoch;@ExtDB;
- :: Set the server max RAM (-maxMem param, 2047 is max)
- set MaxRAM=4096
- :: Set any additional launch options (noCB disables multi-core, noLogs disables script error log)
- :: Test Server Version
- set LaunchOpts=-nosound "-exThreads=1" "-bandwidthAlg=2" -noMap -noCB "-world=empty" "-name=[QG]" -malloc=tbb4malloc_bi "-BEpath=\Battleye"
- :: Live Server Version:
- ::set LaunchOpts=-bandwidthAlg=2 -noLogs -noCB
- set pack_mission=0
- set pack_server=0
- ::CPU Core Affinity Binary/Decimal -> Hex Helper by Royal
- :: CORE 1 2 3 4 5 6 7 8
- :: BINARY 0 0 0 0 0 0 0 0
- :: Change a 0 to a 1 for each core of the CPU you want to use
- :: Then convert it to hexadecimal online:
- :: http://www.binaryhexconverter.com/binary-to-hex-converter
- :: >>>>> THIS IS NO LONGER NECCESARY MY RESTARTER TAKES CARES OF THIS <<<<<<
- :: Kill Server Process
- @echo off
- echo Killing current server process...
- taskkill /IM %ExeFile%.exe /F
- taskkill /IM BEC.exe /F
- echo.
- echo Server Process Killed.
- timeout 2
- ::LOGS
- echo Saving Logs
- CD "%ServerFolder%\%ConfigFolder%"
- CALL rotatelogs.bat
- echo Logs saved
- ::Clean up
- CD "%ServerFolder%\%ConfigFolder%"
- ::DEL "*.log" /f
- CALL cleanup.bat
- echo Finished clean up.
- C:
- CD "%ServerFolder%\%ConfigFolder%"
- ::Delete temp config files
- DEL "%ConfigFile%_temp.cfg" /f
- DEL "%netConfigFile%_temp.cfg" /f
- :: Copy config files into temp config files to use at run time
- COPY %ConfigFile%.cfg %ConfigFile%_temp.cfg
- COPY %netConfigFile%.cfg %netConfigFile%_temp.cfg
- For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b)
- For /f "tokens=1-2 delims=/:" %%a in ("%TIME%") do (set mytime=%%a.%%b)
- set hour=%time:~0,2%
- if "%time:~0,1%"==" " set hour=0%time:~1,1%
- set datestamp=%date:~10,4%-%date:~4,2%-%date:~7,2%_%hour%%time:~3,2%
- if %pack_mission% == 1 (
- :: Recomile PBO Files
- timeout 1
- echo Updating Mission PBO
- cd "%ServerFolder%\MPMissions"
- COPY %MissionPbo%.pbo %ServerFolder%\PBOBackUPs\Mission\%MissionPbo%.%datestamp%.pbo
- del %MisionPbo%.pbo
- cd %ServerFolder%\%ConfigFolder%
- cpbo -y -p "%ServerFolder%\MPMissions\%MissionPbo%"
- echo Mission PBO Updated.
- timeout 1
- )
- if %pack_server% == 1 (
- :: Recomile PBO Files
- timeout 1
- echo Updating Server PBO
- cd "%ServerFolder%\%ServerPbo%\addons"
- COPY dayz_server.pbo %ServerFolder%\PBOBackUPs\Server\dayz_server.%datestamp%.pbo
- del dayz_server.pbo
- cd %ServerFolder%\%ConfigFolder%
- cpbo -y -p "%ServerFolder%\%ServerPbo%\addons\dayz_server"
- echo Server PBO Updated.
- timeout 1
- )
- ::Start the Server
- echo Starting Server...
- cd "%ServerFolder%"
- ::timeout 20
- start /min /high %ExeFile%.exe "-mod=%ServerMods%%ServerPbo%" "-profiles=%ConfigFolder%" "-name=%ConfigFolder%" "-config=%ConfigFolder%\%ConfigFile%_temp.cfg" "-cfg=%ConfigFolder%\%netConfigFile%_temp.cfg" "-port=%Port%" "-maxMem=%MaxRAM%" %LaunchOpts%
- echo.
- echo Server Started.
- timeout 1
- ::Start BEC
- cd "%ServerFolder%\@BEC"
- echo Starting BEC.
- start BEC.exe
- timeout 1
- ::exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement