Difference between revisions of "Running a Server"

From DCS World Wiki - Hoggitworld.com
Line 12: Line 12:
 
See the [https://forums.eagle.ru/showthread.php?t=169387 Official Documentation] for more info.
 
See the [https://forums.eagle.ru/showthread.php?t=169387 Official Documentation] for more info.
  
== AutoExec.cfg ==
+
== Scripts and Code ==
 +
 
 +
=== Auto Restart ===
 +
Copy the following into a .bat file and use it to start DCS. Make sure to change DCS.exe location if it's different.
 +
@echo off
 +
 
 +
:CheckDCS
 +
echo "Checking for DCS running"
 +
TASKLIST /FI "IMAGENAME eq DCS.exe" 2>NUL | find /I /N "DCS.exe">NUL
 +
IF NOT %ERRORLEVEL%==0 GOTO StartDCS
 +
echo "DCS Already running. Checking again in 30 seconds."
 +
timeout /t 30 /nobreak > NUL
 +
GOTO CheckDCS
 +
 
 +
:StartDCS
 +
echo "DCS Not running, starting it up."
 +
start "" "C:\Program Files\Eagle Dynamics\DCS World\bin\DCS.exe"
 +
timeout /t 30 /nobreak
 +
GOTO CheckDCS
 +
 
 +
=== AutoExec.cfg ===
 
This file should go in the C:\Users\<user>\Saved Games\DCS[.openbeta]\Config directory. This is a template with comments:
 
This file should go in the C:\Users\<user>\Saved Games\DCS[.openbeta]\Config directory. This is a template with comments:
  

Revision as of 13:33, 13 September 2018

Listen Server

Dedicated Server

SimpleRadio

Installing

Check out the Simple Radio Standalone page for details of how to install it. Note that you don't need to run the autoinstall to run the server.

Configuration

Changing the ports: Open server.cfg and change the SERVER_PORT to the lower of the two ports to open. Two ports are open, and they're contiguous starting from the port set. So if you set port 2000, then ports 2000 and 2001 will need to be opened. See the Official Documentation for more info.

Scripts and Code

Auto Restart

Copy the following into a .bat file and use it to start DCS. Make sure to change DCS.exe location if it's different.

@echo off
:CheckDCS
echo "Checking for DCS running"
TASKLIST /FI "IMAGENAME eq DCS.exe" 2>NUL | find /I /N "DCS.exe">NUL
IF NOT %ERRORLEVEL%==0 GOTO StartDCS
echo "DCS Already running. Checking again in 30 seconds."
timeout /t 30 /nobreak > NUL
GOTO CheckDCS
:StartDCS
echo "DCS Not running, starting it up."
start "" "C:\Program Files\Eagle Dynamics\DCS World\bin\DCS.exe"
timeout /t 30 /nobreak
GOTO CheckDCS

AutoExec.cfg

This file should go in the C:\Users\<user>\Saved Games\DCS[.openbeta]\Config directory. This is a template with comments:

if not net then net = {} end -- prevent nil
net.download_speed = 1024*1024*256 -- Set download speed
net.upload_speed = 1024*1024*256 -- Set upload speed.
options.graphics.maxfps = 30 -- Max FPS, we don't need high fps so limit it.
options.graphics.render3D = false -- We don't need the graphics engine for a server.
options.graphics.ScreenshotQuality = 0 -- Don't need high quality on screenshots.
crash_report_mode = "silent" -- Capture report logs, but don't block the process from closing.
disable_write_track = true -- We don't need to store tracks on the server