Advertisement
tinboye

server_start.bat

Mar 23rd, 2017
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.46 KB | None | 0 0
  1. @echo off
  2.  
  3. ::Refer to the following URL for any commandline Parameter
  4. ::
  5. ::https://community.bistudio.com/wiki/Arma_3_Startup_Parameters
  6. ::
  7. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  8. :: Name of Server
  9. set "_servername=Name of Server"
  10. ::
  11. title %_servername%
  12. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  13. :: paths to programs without \
  14. ::
  15. set "_armaserverpath=D:\Games\Servers\epoch"
  16. set "_ServerMonitorPath=%_armaserverpath%"
  17. set "_becpath="%_armaserverpath%\bec"
  18. set "_ASM="%_armaserverpath%"
  19. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  20. :: port to server
  21. ::
  22. set "_port=2302"
  23. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  24. :: path to server.cfg or config.cfg
  25. ::
  26. set "_config=%_armaserverpath%\sc\config.cfg"
  27. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  28. :: path to basic.cfg or arma3.cfg
  29. ::
  30. set "_cfg=%_armaserverpath%\sc\basic.cfg"
  31. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  32. :: folder name in your arma3server folder to store rpt
  33. set "_profiles=%_armaserverpath%\a3ds"
  34. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  35. :: will create user folder under profiles folder
  36. ::
  37. set "_name=a3ds"
  38. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  39. :: enter your client mods below
  40. ::
  41. set "_mods=@Epoch;@Ryanzombies"
  42. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  43. :: enter mods that are only required by the server and not the clients.
  44. ::
  45. set "_servermods=@epochhive"
  46. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  47. :: path to ranking.log
  48. ::
  49. set "_ranking=%_cfg%\ranking.log"
  50. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  51. :: set the max memory your server will be allowed.
  52. :: 32-bit Windows + 32-bit game: 2047
  53. :: 64-bit Windows + 32-bit game: 3071
  54. set "_maxmem=3071"
  55. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  56. :: If Intel Processor Enable HyperThreading
  57. set "_HT=-enableHT"
  58. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  59. ::If Intel Processor Change to a number 0,1,3,5,7. This will override
  60. ::auto detection (which use 3 for dualcore and 7 for quadcore).
  61. ::Example add below -exThreads=7
  62. set "_exThreads=-enableHT=7"
  63. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  64. ::Option which allows define number of CPUs/cores available. The
  65. ::best way to simulate dual core on quad core is to use -cpuCount=2
  66. ::when you run the game and then change the affinity to 2 cores to
  67. ::make sure additional cores can never be used when some over-scheduling
  68. ::happens. It might be also possible to set the affinity in the OS
  69. ::before you launch the process, that would work as well.
  70. ::
  71. set "_cpu=4"
  72. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  73. :: tbb4malloc_bi or jemalloc_bi or system
  74. ::
  75. set "_malloc=system"
  76. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  77. ::
  78. taskkill /im Bec.exe
  79. taskkill /im ArmaServerMonitor.exe
  80. taskkill /f /fi "status eq not responding" /im arma3server.exe
  81. taskkill /f /im arma3server.exe
  82. timeout 1
  83. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  84. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  85. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  86. taskkill /f /im cmd.exe /fi "windowtitle eq servermonitor.bat"
  87. timeout 1
  88. ::
  89. echo Kill all instances for safety
  90. timeout 3
  91. ::
  92. echo Starting %_servername% Server...
  93. ::CHANGE THE DIRECTORY BELOW TO THE PROPER LOCATION
  94. cd /d %_armaserverpath%
  95. start "arma3server" /min /high "arma3server.exe" -port=%_port% "-config=%_config%" "-cfg=%_cfg%" "-profiles=%_profiles%" -name=%_name% "-servermod=%_servermods%" "-mod=%_mods%" "-ranking=%_ranking%" -cpuCount=%_cpu% %_HT% %_exThreads% -maxMem=%_maxmem% -malloc=%_malloc% -nosplash -noSound -noPause -nobenchmark -world=empty -autoinit
  96. timeout 5
  97. echo %_servername% has started..
  98. timeout 5
  99.  
  100. ::CHANGE THE DIRECTORY BELOW TO THE PROPER LOCATION
  101. set ServerMonitorPath="C:\arma3serverconfig\"
  102. cd /d %ServerMonitorPath%
  103. start "" "servermonitor.bat"
  104. echo Server Monitor has started. Have Fun
  105. timeout 3
  106.  
  107. ::CHANGE THE DIRECTORY BELOW TO THE PROPER LOCATION
  108. cd /d %_becpath%
  109. start "" /min "Bec.exe" -f Config.cfg
  110. timeout 1
  111. echo Battleye Extended Controls has started..
  112. timeout 3
  113.  
  114. ::CHANGE THE DIRECTORY BELOW TO THE PROPER LOCATION
  115. cd /d %_ASM%
  116. start "" /min "ArmaServerMonitor.exe"
  117. timeout 1
  118. echo ArmaServerMonitor has started..
  119. timeout 3
  120. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement