Administrators
Administration is relatively straight forward. This section will walk you through installation and configuration.
Installation
DCT is distributed as a standard DCS module. You can download the latest release zip file and copy the DCT
folder contained in the zip file to your DCS saved games directory and place in;
<dcs-saved-games>/Mods/tech
If the path does not exist just create it. If installed properly DCT will be displayed as a module in the game’s module manager.
DCS Server Modification
DCT requires the DCS mission scripting environment to be modified, the file needing to be changed can be found at $DCS_ROOT\\Scripts\\MissionScripting.lua.
Comment out the removal of lfs and io and the setting of ‘require’ to nil.
Configuration
Configuration is also relatively straight forward. DCT comes with a limited amount of server side configuration, these configuration options are described and listed below.
File Location
DCT stores its server side configuration in a standard lua file located in:
<dcs-saved-games>/Config/dct.cfg
The configuration file’s syntax is the same as other DCS configuration files the game uses so it should be familiar to an experienced DCS server administrator.
A change to the configuration file will require the mission be restarted before the settings take effect.
Note: if you have multiple dedicated server saved game folders (referred to a “write directory” in the DCS dedicated server documentation) you will need a dct.cfg in each instance.
Example Configuration File
The below is a valid example of the dct.cfg
configuration file. Where text in <>
represent a variable instead of a constant.
debug = false
profile = false
--statepath = "<dcs-saved-games>/<theater-name>_<sortie-name>.state"
--theaterpath = "<dcs-temp-directory>/DCT/theaters/theater"
schedfreq = 2
tgtfps = 75
percentTimeAllowed = .3
period = -1
logger = {}
whitelists = {}
statServerHostname = "localhost"
statServerPort = 8095
dctid = "changeme"
Options
All DCT server configuration can be accessed via LUA’s global table at:
_G.dct.settings.server.<config-item>
Where <config-item>
is the name of the configuration option below.
debug
- value: boolean (true/false)
Globally enable debug logging and debugging checks.
profile
- value: boolean (true/false)
Globally enable profiling. Can cause performance issues.
statepath
Defines where the statefile for the campaign will be stored.
- value: string
- default path:
<dcs-saved-games>/<name-of-theater>_<name-of-mission>.state
Where <name-of-theater>
is the name of the map the .miz mission file was built for and <name-of-mission>
is the “sortie” name given to the mission when building the mission in the mission editor.
Note: An adminstrator likely does not need to modify this from the default.
theaterpath
- value: string
- default path:
<dcs-saved-games>/DCT/theaters/<theater-name>_<sortie-name>
Defines where the “theater definition” exists. See Campaign Designer documentation for what a “theater definition” is.
Note: A campaign designer likely will want to define this while building their campaign.
schedfreq
- value: number in hertz
- default: 2 hertz
DCT has a central command scheduler on which everything is driven. A higher number will mean both AI and player UI will be more responsive but at the cost of lower server performance.
Note: the default is likely a reasonable value.
tgtfps
- value: number in frames-per-second
- default: 75 fps
DCT has a central command scheduler on which everything is driven. This scheduler implements a clamped game loop which will prevent additional commands from executing once DCT’s calculated quanta has been reached. This allows the server to “catch-up”. A lower value will effectively allocate more time for DCT to run at the expense of stealing server cycles for things like networking.
Note: Caution sould be taken when changing this value.
percentTimeAllowed
- value: decimal from 0.0 to 1.0
- default: .3
Used in calculation of the quanta. Specifies the percent of time in a given frame DCT is allowed to run.
example:
percentTimeAllowed = .3
tgtfps = 75
quanta = (1/75)*.3 = 0.004 or 4 milliseconds
This means per-frame DCT is only allowed 4ms of execution time.
logger.<subsystem>
Defines the logging level for various subsystems in the framework. The logging levels are:
(0) error
(1) warn
(2) info
(4) debug
The default level is the “warn” level.
<subsystem>
can be one of the following:
Theater
Command
Goal
Commander
Asset
AssetManager
Observable
Region
UI
period
- value: time in seconds, -1 disables restart
- default: -1
The amount of time, in seconds, the server will be run before being restarted by the dct-hooks script. This allows a server to periodically restart its mission, this does not reset the saved state of the mission.
whitelists
- value: a two level table specifying whitelists for special role slots
- default: empty table
An allow list can be defined for each special role slot allowing a server administrator to restrict the usage of these slots to specific people.
A example of how to define a whitelist:
whitelist = {
["admin"] = {
"ucid-1",
"ucid-2",
},
["observer"] = {
"ucid-3",
"ucid-4",
},
}
Role specific slot types:
- admin
- forward_observer
- instructor
- artillery_commander
- observer
If a UCID is a member of the “admin” role type these players can join any slot on the server, assuming they have the DCS paid for content.
statServerHostname
- value: string, DNS server name or IPv4 address
- default: localhost
This address is used to send UDP data about the mission and its status to a UDP server, generally a discord bot.
statServerPort
- value: number, UDP port number
- default: localhost
The port number on which a UDP server is listening to receive server data.
dctid
- value: string
- default: changeme
This is the ID by which this DCS server will be identified in UDP export messages. This is used to differentiate different servers that use the same UDP server to centralize the data.
showerrors
- value: boolean (true/false)
- default: false
Shows DCT script errors in a modal message box. Meant for development use only, as the game will be unresponsive until the message box is closed.
emptyslottimeout
- value: time in seconds
- default: 0
Sets how long an empty player slot can be before its mission is automatically aborted. A value of 0 means missions will only be aborted when the mission itself times out, while a positive value makes empty slots time out faster.
Note that because the AssetManager runs every 2 minutes, the actual timeout value can only have a granularity of 2 minutes.