Configuration

How the configuration works

The server reads one TOML file at start: Resources/config.toml (protocol 1.0) or Resources/config-075.toml (the 0.75 profile). --config <path> names another file. The file is read again at every map start for the parts that are map-scoped (the plugins, the classes), but most keys are read once: restart the server to apply a change.

The order of precedence, from the weakest:

  1. The server’s built-in default for a key.
  2. The config file.
  3. A preset (--preset <name>, [server] preset or SP_PRESET) over gamemode, maps, capture_limit, aim_assist, fog_distance, bot difficulty and plugins.
  4. An environment variable (SP_*), where the table below shows one.
  5. The command line (--port, --gamemode, --map, --bots…).

Every key the server reads is registered in ConfigKeys.c together with the profile that reads it. An unknown key, or a section of the other profile, is a warning at every start and in --check-config; the tables below are generated from that registry, so none is missing. In the tables, Profile says who reads the key (both, 1.0, 0.75) and Env names the environment variable that overrides it.

Tip Run ngspades-server --check-config after every edit. It parses the file, lists unknown keys and tells you which maps will be downloaded.

Command line options

NameTypeMeaning
--profile <10|075>10, 075Protocol 1.0 (default) or the classic 0.75 game. Also `SP_PROFILE`.
--config <path>pathThe config file. Default `Resources/config.toml`, or `Resources/config-075.toml` with `--profile 075`.
--root <dir>pathThe folder holding `Resources/`. Default: the current folder, `..` or `../..`.
--data <dir>pathWhere the server writes: bans, keys, logs, plugin stores. Also `SP_DATA_DIR`. Default: the root, or `data-075/` in it with `--profile 075`.
--check-configflagValidate the profile's config file and exit.
--port <n>intThe game's UDP port (overrides `[server] port`).
--preset <name>stringA `[presets.<name>]` table. Also `SP_PRESET`.
--gamemode <name>string`ctf`, `ngctf`, `babel`, `arena`, `zombie`, `creative` or the name of a Lua mode. On the 0.75 profile `ctf` or `babel`. Wins over `[server] gamemode` and a preset.
--map <Name>stringPlay this map instead of the rotation (the folder name; aliases resolve).
--maps-dir <dir>pathA folder of maps searched before `Resources/maps/`.
--classes <0|1>0, 1The zombie mode's classes off or on.
--first-infected <n>int or autoThe zombie mode's patient zeros a round (0 or `auto`: one per 6 players).
--bots <n>intStart with n balanced bots.
--team-bots <a> <b>intsStart with a bots on team 1 and b on team 2.
--bots-testflagStart with exactly one strong enemy bot (a combat test).
--listen, --server, --publicflagsUsed by ngspades-client when it starts a server for a player's own match (private; listed with `--public`). Not for dedicated servers.
--join-code <code>stringA join code for a listen server's match.
--help, -hflagThe usage text.

A walk through config.toml

The shipped config.toml is commented key by key. In short:

  1. [server]: the name, the port, the mode, the maps. Change name, maps, max_players if you add it.
  2. [teams]: names and colours.
  3. [passwords]: change all five.
  4. [maps]: download = true fetches missing maps from the maps repository.
  5. [master], [webrtc], [rcon]: the public list, browsers, the remote console.
  6. [plugins]: the plugin list and the opt-in dangerous calls.
  7. [presets.*]: ready bundles per mode.
  8. Everything else tunes a mode or a rule and has working defaults.

A minimal public 1.0 server:

[server]
name = "My ngspades server"
port = 32887
gamemode = 6                      # ngctf
maps = ["Busan_Port", "Raindance"]

[passwords]
manager   = "use-a-long-random-one-1"
admin     = "use-a-long-random-one-2"
moderator = "use-a-long-random-one-3"
guard     = "use-a-long-random-one-4"
trusted   = "use-a-long-random-one-5"

[master]
enabled = true                    # list it on the public list
url = "https://master.shootanddestroy.obex.pw"
country = "BR"
Note [server] gamemode is a number in the shipped file: 0 ctf (classic), 1 tc, 2 babel, 3 arena, 4 zombie, 6 ngctf, 7 creative, 8 tdm, 9 koth. --gamemode takes names.

Every section and key

The tables below list every key, its type, its default (what the shipped file shows), its meaning and its profile.

[server]

The server itself. Command line options (--port, --gamemode, --map, --preset) win over this section.

KeyDefaultMeaningProfile
name
string
"[NGS] ngCTF 24/7" (1.0); "[NGS] Classic CTF 0.75" (0.75)The name on the server list.
Env: SP_SERVER_NAME
both
port
int
32887 (1.0); 32897 (0.75)Port for the server to listen onboth
max_players
int
128 (1.0); 32 (0.75)Players at most. 1.0: up to 128 (the default); 0.75: up to 32, the wire’s limit. A smaller number is kept, a larger one is cut to the profile’s cap.both
master
bool
falseKept so old configs load. A 1.0 server does not announce on the 0.75 master list: with true it only logs a warning. The listing is [master] enabled (1.0) or [master075] (0.75 profile).both
gamemode
int or name
6 (1.0); 0 (0.75)Gamemode to use (–gamemode ctf|ngctf|babel|arena|zombie overrides it; the client’s Singleplayer passes its own choice, with –map) 0 = ctf, classic: the 0.75 rules (no perks, assists, spotting or squad spawn) 6 = ngctf, next gen: CTF with perks (jetpack, sentry, MG), kill assists, 3D spotting, respawn next to a squadmate and the rally point 1 = tc, territory control 2 = babel 3 = arena (rounds, no respawn: the map needs [arena] gates) 4 = zombie 7 = creative (building only) 8 = tdm, team deathmatch 9 = koth, king of the hillboth
capture_limit
int
10Max flag capturesboth
aim_assist
bool
trueLet gamepad players use aim assist (the crosshair slows down over an enemy and aiming pulls it a little toward one). Each player can still turn it off in their settings; false forbids it for everyone on this server.
Env: SP_AIM_ASSIST
1.0
fog_distance
int
192How far players are seen, in blocks (32 to 256; 128 is Ace of Spades 0.75′s): enemies are sent only within it (8 blocks more), every player’s game shows bodies up to it (fading out over the last 16) and the bots see as far. The terrain is the player’s own View distance setting, up to the whole map. 192 measured on Busan_Port with 127 bots: 12.6 KB/s to a client against 8.0 at 128.
Env: SP_FOG_DISTANCE
1.0
maps
array
a list: see the shipped fileMap rotation List the maps you want to use: those not in Resources/maps/ are downloaded at start-up ([maps] below) Each map must be in its own folder: Resources/maps/MapName/MapName.{vxl,toml} The folder name, .vxl filename, and .toml filename must match exactlyboth
map_rotation_mode
string
"toml"Rotation modes: “toml” - Rotate through maps in the order defined above (default) “alphabetic” - Rotate through maps alphabetically in order “random” - Randomly select a map on server start/restartboth
preset
string
noneName of a [presets.<name>] table to apply (also --preset, SP_PRESET).
Env: SP_PRESET
both
periodic_delays
array of 5 ints
[1, 5, 10, 30, 60]Minutes between the successive periodic_messages sent to a player: the first message after 1 minute, the next after 5, and so on. Five numbers.both
welcome_messages
array
a list: see the shipped fileMessages to send upon joining (“{game}” is the game’s name)both
periodic_messages
array
a list: see the shipped fileMessages to send periodicallyboth

[teams]

The two teams’ names and colours. Team 1 is the first, blue by default; team 2 is green.

KeyDefaultMeaningProfile
name
string
-The team’s label.both
color
array [r, g, b]
-The team’s colour as [r, g, b], 0 to 255.both

The two teams are written inline: team1 = { name = "Blue Team", color = [62, 153, 234] }, and team2 likewise.

[passwords]

The five staff roles, from the highest. A player types /login <role> <password>. The server warns at every start while a password is still changeme... the install script refuses such passwords.

KeyDefaultMeaningProfile
manager
string
"changeme1"Password of the manager role (highest: can /shutdown).both
admin
string
"changeme2"Password of the admin role.both
moderator
string
"changeme3"Password of the moderator role (mod in plugins).both
guard
string
"changeme4"Password of the guard role.both
trusted
string
"changeme5"Password of the trusted role (lowest).both

[maps]

Where missing maps come from. A map named in the rotation that is not in Resources/maps/ (nor in --maps-dir) is downloaded at start-up from github.com/ngspades/maps (https only, checked, then kept). /map <Name> of a map not installed downloads it in the background.

KeyDefaultMeaningProfile
download
bool
truefalse: only the maps already on disk play. SP_MAP_DOWNLOAD=0|1 wins.
Env: SP_MAP_DOWNLOAD
both

[jetpack]

The jetpack’s physics (the retail release’s jump pack). Nobody has it by default: the perk system, a class or a plugin grants it. All keys are optional.

Read by the 1.0 profile only.

KeyDefaultMeaningProfile
enabled
bool
trueTurns the jetpack off for the whole server.both
fuel_seconds
number
1.333the whole tank, the ignition bite included; thrust lasts 1.2 s after itboth
regen_seconds
number
10.0seconds from empty to full, standing or airborneboth
thrust
number
86.4upward acceleration, blocks/s^2 (gravity is 32)both
max_rise_speed
number
28.0fastest climb, blocks/sboth
air_control
number
0.5horizontal acceleration while thrusting (walking is 1, airborne 0.1)both
glide_control
number
0.2horizontal acceleration between pulses; the retail release keeps accelerating at 0.5 between pulses too, so set 0.5 here to match itboth
ignition_cost_seconds
number
0.133the per-press bite, paid once when thrust startsboth
refill_delay_seconds
number
2.0regen blocked this long after standing on a hitboth
test_grant_on_spawn
bool
falseTEST ONLY: grant the jetpack to every human on every spawn (also SP_JETPACK_TEST=1).both

[perks]

The streak perks: what an event is worth for every perk (the three *_points weights), then one table per perk that may override them. jetpack_points and sentry_points are the old flat way to set a threshold and are still read when [perks.<name>].points is absent.

Read by the 1.0 profile only.

KeyDefaultMeaningProfile
kill_points
int
1What one event is worth, inherited by every perk that does not override it per enemy kill (weapon, headshot, spade, grenade)both
intel_pickup_points
int
1per enemy intel pickupboth
intel_capture_points
int
3per intel capture at your own baseboth
jetpack_points
-
-Old flat threshold for the jetpack perk (points to earn it).both
sentry_points
-
-Old flat threshold for the sentry perk.both

Per perk ([perks.jetpack], [perks.sentry], [perks.mg], [perks.landmine], [perks.dynamite]):

KeyDefaultMeaningProfile
points
int
0free on every spawn, like the Rocketeer’s (ngctf)both
kill_points
-
1 # optional: overrides the [perks] weight above (commented out in the shipped file)Overrides the [perks] weight of a kill for this perk.both
intel_pickup_points
-
0 # 0 = this event earns nothing for this perk (commented out in the shipped file)Overrides the weight of an intel pickup (0: that event earns nothing for this perk).both
intel_capture_points
int
3 (commented out in the shipped file)Overrides the weight of an intel capture.both
enabled
bool
truefalse: the perk is never earned.both
reset_on_death
-
true # false: progress survives death (once per round) (commented out in the shipped file)false: progress and an unused charge survive death (a sentry not yet placed always keeps its charge).both
activation
-
-No longer used: perks are worn or placed without a button. Setting it logs a warning.both

[classes]

Read by the 1.0 profile only.

One table per class: [classes.commando], [classes.rocketeer], [classes.marksman], [classes.miner]. Every key is optional; a key outside its range is refused with a warning.

KeyDefaultMeaningProfile
health
-
per class1..1000. What the class effectively has; the wire stays 0..100 and every hit is scaled by 100 / health.1.0
speed
-
per class0.3..3, times the usual ground speed.1.0
jump
-
per class0.1..1.5, the jump’s upward speed (0.36 is the usual).1.0
weapon
-
per classrifle, smg, shotgun, rocket or revolver.1.0
blocks
-
per class0..65535 blocks a life starts with.1.0
gear
-
per classgrenades or drill: what the grenade slot holds.1.0
gear_count
-
per class0..255 grenades or drill charges.1.0
jetpack
-
per classtrue: worn from every spawn.1.0
dig
-
per class1: the spade’s usual dig; 3: a 3x3x3 cube (the Miner).1.0
perk
-
per classThe streak perk: none, sentry, landmine, dynamite or mg.1.0
swing
-
per class0.05..2 seconds between two spade swings.1.0
title
-
per classIts name on the class screen (31 bytes).1.0
blurb
-
per classIts line on the class screen (95 bytes).1.0
enabled
-
per classfalse: nobody may pick it (the last class enabled always stays on).1.0
secondary
-
per classA second gun swapped with the first: none or a weapon.1.0
block_damage
-
per class0..100: what a pellet does to a block of 100 (0: the gun’s own: rifle 50, SMG 34, shotgun 20).1.0
spawn_perk
-
per classtrue: every life starts with one charge of its perk.1.0
dig_delay
-
per class0.2..3 seconds between two right-button digs.1.0
sprint
-
per class0..3: its sprint speed, which replaces the walk speed on the ground (0 keeps the walk).1.0
water_friction
-
per class1..30: the water drag.1.0
headshot
-
per class0.1..4: what a shot to the head does to its bodies.1.0
melee
-
per class0..500: the damage of its spade or pickaxe swing.1.0
fall_min
-
per class0..63: the fall’s distance in blocks from which it hurts.1.0
fall_max
-
per class0..63: the distance at which fall_dmg is reached (equal to fall_min: all of it from fall_min on).1.0
fall_dmg
-
per class1..200: the damage at fall_max (100 kills).1.0
fall_water
-
per class0..1: the share of the damage a landing in water takes.1.0
blocks_max
-
per class0..65535: what the wallet holds (a restock fills to it).1.0

[net]

Lag compensation and the per-address connection guard.

KeyDefaultMeaningProfile
lag_compensation
bool
trueJudge a hit against the body the shooter could see. Also SP_LAGCOMP=0.
Env: SP_LAGCOMP (0)
both
lag_compensation_max_ms
int
250The target is rewound by its round trip, bounded by this plus the extra.
Env: SP_LAGCOMP_MAX_MS
both
lag_compensation_extra_ms
int
50Added to the bound above.
Env: SP_LAGCOMP_EXTRA_MS
both
max_connections_per_ip
int
4One address may open this many connections in the window; 0 turns the guard off. Also SP_MAX_PER_IP. Keep it at 4 or more for a household or a LAN party behind one NAT.
Env: SP_MAX_PER_IP
both
connection_window_seconds
int
10The window max_connections_per_ip counts in.both

[zombie]

The zombie mode. All keys are optional; the defaults are the shipped mode.

Read by the 1.0 profile only.

KeyDefaultMeaningProfile
rounds
int
3round wins that take the match (1..255)
Env: SP_ZOMBIE_ROUNDS
both
countdown
int
10seconds to scatter before the outbreak
Env: SP_ZOMBIE_COUNTDOWN
both
round_seconds
int
120from the outbreak
Env: SP_ZOMBIE_ROUND_SECONDS
both
infection_bonus
int
15seconds more for every infection
Env: SP_ZOMBIE_INFECTION_BONUS
both
end_seconds
int
5intermission between rounds
Env: SP_ZOMBIE_END_SECONDS
both
first_infected
int
0patient zeros; 0: one for every 6 players (at least 1); –first-infected wins
Env: SP_ZOMBIE_FIRST_INFECTED
both
minimum_players
int
2below this a fight is aborted, not timed out
Env: SP_ZOMBIE_MIN_PLAYERS
both
zombie_respawn_seconds
int
3Seconds a zombie waits to respawn in the fight.both
radar_seconds
int
5between the last survivor’s danger pings
Env: SP_ZOMBIE_RADAR
both
claw_damage
int
50a claw hit; the victim’s health is scaled separately
Env: SP_ZOMBIE_CLAW
both
classes
bool
falsethe survivors pick a class (the class screen); the
Env: SP_ZOMBIE_CLASSES
both
night
bool
truezombies stay zombies. Also –classes 0|1 and the console’s /classes on|off the match plays at midnight, the clock stopped: the
Env: SP_ZOMBIE_NIGHT
1.0
spawn_near_min
number
35.0survivors hunt with their flashlights (the bots light theirs) and the zombies see by night vision. false plays at the server’s [sky] time; an admin’s /sky lasts until the next map start a zombie’s respawn, from a living survivorboth
spawn_near_max
number
50.0A zombie respawns between spawn_near_min and this many blocks from a living survivor.both

[ctf]

The time limit of the point-scored modes: match_seconds in the mode’s own section (30..86400). When it runs out the match ends by the score (a tie is a draw), and the clients hear the closing music in the last 5 seconds. A match never runs for ever; arena, ptb and zombie play rounds (their own round_seconds), creative has no end. /extend adds time.

KeyDefaultMeaningProfile
match_seconds
int
1200classic CTF
Env: SP_MATCH_SECONDS
both

[babel]

KeyDefaultMeaningProfile
match_seconds
int
1200See the section text.
Env: SP_MATCH_SECONDS
both

[ngctf]

Read by the 1.0 profile only.

KeyDefaultMeaningProfile
match_seconds
int
1200next gen CTF
Env: SP_MATCH_SECONDS
1.0

[tc]

Read by the 1.0 profile only.

KeyDefaultMeaningProfile
match_seconds
int
1200territory control
Env: SP_MATCH_SECONDS
1.0

[tdm]

Read by the 1.0 profile only.

KeyDefaultMeaningProfile
match_seconds
int
900team deathmatch
Env: SP_MATCH_SECONDS
1.0

[koth]

Read by the 1.0 profile only.

KeyDefaultMeaningProfile
match_seconds
int
900king of the hill
Env: SP_MATCH_SECONDS
1.0

[arena]

Arena rounds (no respawns, Counter-Strike maps). A map’s own [arena] table and its .txt narrow these down for that map.

Read by the 1.0 profile only.

KeyDefaultMeaningProfile
countdown_seconds
int
5behind the closed gates before a round (1..60)1.0
round_seconds
int
180a round’s time limit (10..3600); the side with more1.0
spawn_change
int
0players left wins when it runs out, a draw when equal 0 keep the sides, 1 swap them on the last round,1.0
max_spawn_distance
int
352 swap every round, 3 rotate the spawn points every round, 4 rotate to one drawn at every round in the countdown, farther than this from a spawn of1.0
team_color_seconds
int
5a player’s side and it is put back on one the winner’s colour in the fog after a round (0 off)1.0

[ptb]

Plant the Bomb rounds (--gamemode ptb). The map’s [ptb] table wins over these.

Read by the 1.0 profile only.

KeyDefaultMeaningProfile
freeze_seconds
int
15Counter-Strike: Global Offensive’s competitive rules (MR15, 5 v 5: a team holds 5 people at most, bots included) behind the closed gates before a round (1..60)
Env: SP_PTB_FREEZE_SECONDS
1.0
round_seconds
int
1151:55; unplanted when it runs out, the defenders win
Env: SP_PTB_ROUND_SECONDS
1.0
bomb_seconds
int
40the planted bomb’s fuse
Env: SP_PTB_BOMB_SECONDS
1.0
plant_seconds
number
3.2USE held, still, inside a site
Env: SP_PTB_PLANT_SECONDS
1.0
defuse_seconds
int
10USE held by the bomb (CS:GO: 10 s, 5 s with a kit: we have no kits)
Env: SP_PTB_DEFUSE_SECONDS
1.0
rounds_to_win
int
16rounds that win the match (1..30); 15-15 after round 30 is a draw
Env: SP_PTB_ROUNDS_TO_WIN
1.0
halftime_round
-
15 # the sides swap after this round (0 never); (commented out in the shipped file)The sides swap after this round (0: never); without it rounds_to_win - 1.
Env: SP_PTB_HALFTIME_ROUND
1.0

[conduct]

AFK kicks and team-grief accounting. Staff and a listen server’s own player are exempt.

KeyDefaultMeaningProfile
afk_kick_seconds
int
600 (1.0); 300 (0.75)Seconds without input before an AFK kick.
Env: SP_AFK_KICK
both
afk_warn_seconds
int
540 (1.0); 240 (0.75)Seconds without input before the warning.
Env: SP_AFK_WARN
both
afk_spectator_kick_seconds
int
1800The AFK kick for a spectator.both
grief_warn_points
int
5 (1.0); 20 (0.75)Grief points that earn a warning.both
grief_kick_points
int
10 (1.0); 40 (0.75)Grief points that earn a kick.
Env: SP_GRIEF_KICK
both
grief_decay_seconds
int
60Seconds for one grief point to wear off.both
grief_team_damage_points
int
1Points for damaging a teammate.both
grief_team_kill_points
int
3Points for killing a teammate.both
escape_watch
bool
trueReveal a player who leaves the map, sinks below it, flies above the sky, is inside solid blocks, or seals itself in a small air pocket. The sealed test only marks objective players (zombie survivors, intel carriers).
Env: SP_ESCAPE_WATCH
both
escape_watch_sky_seconds
int
5Seconds above the sky before a player is revealed.both
escape_watch_embedded_seconds
int
3Seconds inside solid blocks before a player is revealed.both
escape_watch_entomb_seconds
int
5Seconds sealed in a small air pocket before an objective player is revealed.both

[anticheat]

Anti-cheat accounting: a counter per player and check, a rate-limited log line, no ban. Hard protocol violations can kick when asked to.

KeyDefaultMeaningProfile
enabled
bool
trueTurns the counters off (SP_ANTICHEAT=0).
Env: SP_ANTICHEAT (0)
both
kick_on_protocol_violation
bool
falseKick on a hard protocol violation (NaN, infinity).both
log_interval_seconds
int
10Seconds between the rate-limited log lines.both

[squads]

Squads: groups of players inside a team. A respawn lands next to a living squadmate who is not in a fight.

Read by the 1.0 profile only.

KeyDefaultMeaningProfile
enabled
bool
truefalse: everyone spawns at the team’s spawn, as in plain CTF
Env: SP_SQUADS (0)
both
size
int
4players per squad (2..16)both
spawn
bool
truefalse: no respawn by a squadmate nor rally point in any mode
Env: SP_SQUAD_SPAWN
both

[sentry]

The sentry perk.

Read by the 1.0 profile only.

KeyDefaultMeaningProfile
lifetime_seconds
int
60Seconds an untouched sentry lasts before wearing out and exploding. 0 = it lasts forever (only gunfire destroys it). Also SP_SENTRY_LIFETIME.
Env: SP_SENTRY_LIFETIME
both

[sky]

The time of day and the weather (protocol 1.0). Admins change it with /sky, plugins with game.set_sky.

Read by the 1.0 profile only.

KeyDefaultMeaningProfile
time
string
"12:00"“hh:mm”, or day, night, dawn, dusk
Env: SP_SKY_TIME
1.0
rate
int
0minutes of the day a second (0: the time stands; 2: a day in 12 minutes)
Env: SP_SKY_RATE
1.0
weather
string
"clear"clear, rain, snow, fog or storm (rain with lightning)
Env: SP_SKY_WEATHER
1.0
intensity
int
60how much of it, 0..1001.0
moonlight
int
25how much a night shows, 0 (only flashlights) ..1001.0

[bots]

Server-side bots. All keys are optional.

KeyDefaultMeaningProfile
difficulty
string
"normal"“easy”, “normal” or “hard”. It sets the range each bot’s skill is rolled in and how much its aim wobbles: easy - rookies, barely hit beyond 10 blocks normal - poor shots: ~55% of hits at 10 blocks, ~25% at 20 hard - good players, still no aimbots The host can change it during a match from the Bots menu (ESC). Also SP_BOT_DIFFICULTY.
Env: SP_BOT_DIFFICULTY
both
cooperative_bridges
bool
trueBots share short bridge projects: a builder and a nearby partner reserve alternating cells, and the partner crosses once the span is solid. Set false to keep the old one-bot bridges. Also SP_BOT_PROJECTS=0.
Env: SP_BOT_PROJECTS (0)
both
cooperative_forts
bool
trueBots raise fortifications together where the mode asks for them (the CTF’s bases and lanes, king of the hill’s hill, territory control’s territories): a battlemented ring, a roofed bunker, a short tower, a tall watchtower on high ground that sees the objective and a two floor barricade, up to four builders a structure. Set false to keep every bot on its own walls. Also SP_BOT_FORTS=0.
Env: SP_BOT_FORTS (0)
both
build_chance
int
35Bots do not build all the time: asked to start a structure, a bot builds on a build_chance roll (percent); one that does not, and any bot near an unfinished structure of its team, helps on a help_chance roll (the same roll mans a finished watchtower’s top or barricade’s deck for 45 s). After its share (24 cells at most) or its watch a bot fights build_cooldown seconds before it is asked again. Also SP_BOT_BUILD_CHANCE, SP_BOT_HELP_CHANCE and SP_BOT_BUILD_COOLDOWN.1.0
help_chance
int
70Percent chance a bot near an unfinished structure of its team helps build it.1.0
build_cooldown
int
60Seconds a bot fights after its share of building before it is asked again.1.0
heli_enabled
bool
trueBots fly helicopters (protocol 1.0, the 1024 maps that have them): an attacker near its team’s free helicopter, with its goal far away, takes it on a heli_chance roll (percent; one roll a helicopter a minute), says so, flies to the goal, lands and gets out. A human waiting in a passenger seat always gets a pilot. Set heli_enabled false to keep bots on foot. Also SP_BOT_HELI and SP_BOT_HELI_CHANCE.
Env: SP_BOT_HELI
1.0
heli_chance
int
30Percent chance (one roll a helicopter a minute) that a bot takes a free helicopter.1.0

[webrtc]

Browsers (and join codes) over WebRTC, on one UDP port shared by every peer.

KeyDefaultMeaningProfile
enabled
bool
falseWebRTC is the browser transport: a match hosted from the game with “Friends join by code” turns it on by itself, and its friends (and browsers) join through the master’s signalling. A dedicated server that wants browser players sets true (SP_WEBRTC_ENABLED); a server that leaves it off takes only native clients.
Env: SP_WEBRTC_ENABLED
both
port
int
32888 (1.0); 32898 (0.75) (commented out in the shipped file)The UDP port of every browser peer. Default: the game’s port + 1 (commented out in the shipped file).
Env: SP_WEBRTC_PORT
both
stun
string
"stun:stun.l.google.com:19302"port = 32888
Env: SP_WEBRTC_STUN
both
turn
-
-List of TURN server URLs (turn:), for players behind strict NATs.
Env: SP_WEBRTC_TURN
both
turns
-
-List of TURN servers over TLS (turns:).
Env: SP_WEBRTC_TURNS
both
turn_username
-
-The TURN username.
Env: SP_WEBRTC_TURN_USERNAME
both
turn_credential
-
-The TURN credential.
Env: SP_WEBRTC_TURN_CREDENTIAL
both

[master]

The server’s listing on our master server, and the signalling browsers use.

KeyDefaultMeaningProfile
enabled
bool
trueList the server on our master. SP_MASTER=0 keeps a test run off it.
Env: SP_MASTER (0)
both
url
string
"https://master.shootanddestroy.obex.pw"The master’s address (empty: not listed and no browser can find the server). SP_MASTER_URL replaces it and turns it on.
Env: SP_MASTER_URL
both
country
string
""A country code shown in the list (BR), or empty.both
key_file
string
"master.key"The server’s identity key on the list, made at the first start in the data folder. Back it up and keep it secret.
Env: SP_MASTER_KEY
both
connect_tokens
bool
truePlayers joining from the internet over UDP need a token from the master (one per join). SP_CONNECT_TOKENS=0|1|all.
Env: SP_CONNECT_TOKENS
1.0

[rcon]

The remote console over TCP, off until a password of 16 characters or more is set. Never open its port to the internet.

KeyDefaultMeaningProfile
enabled
bool
falseTurns the remote console on (it also needs a password).
Env: SP_RCON_PASSWORD (turns it on)
both
port
int
32890 (1.0); 32900 (0.75)TCP port (32890; 32900 in the 0.75 config).
Env: SP_RCON_PORT
both
bind
string
"127.0.0.1"Address to listen on. Keep 127.0.0.1.
Env: SP_RCON_BIND
both
password
string
""16 characters or more, or the console stays off with a warning.
Env: SP_RCON_PASSWORD
both

[plugins]

Lua plugins. load lists the ones to run, [plugins.<name>] is each plugin’s own config table; the server itself reads allow_hosts and profiles there.

KeyDefaultMeaningProfile
load
array
["server_tools"] (1.0); [] (0.75)The plugins to run, in order, by file name without .lua. A preset may carry its own plugins list. SP_PLUGINS=a,b replaces the list.
Env: SP_PLUGINS
both
allow_map_change
bool
falsetrue lets plugins call game.set_map, game.set_mode and game.next_map. SP_PLUGIN_ALLOW_MAP=1 wins.
Env: SP_PLUGIN_ALLOW_MAP
both
allow_commands
array
[]Console command names (no slash) that game.run_command may run. Never shutdown, login, logout.
Env: SP_PLUGIN_COMMANDS
both

[gameplay]

Spawn protection and the 1.0 physics.

KeyDefaultMeaningProfile
spawn_protection_seconds
int
2 (1.0); 0 (0.75)Seconds after a spawn in which enemy fire is refused (0 turns it off). SP_SPAWN_PROTECT.
Env: SP_SPAWN_PROTECT
both
jump_velocity
number
0.36The physics (protocol 1.0 only; the 0.75 profile keeps 0.75′s): the jump’s upward velocity and the landing speed falls start to hurt from. Every 1.0 client plays by them (the world parameters player-jump-vel and fall-damage-vel). A class’s own jump ([classes.<name>] jump) wins.
Env: SP_JUMP_VELOCITY
1.0
fall_damage_velocity
number
0.58The landing speed from which a fall starts to hurt (1.0 only).
Env: SP_FALL_DAMAGE_VELOCITY
1.0

[audit]

The admin audit: every command, host command and remote console line is appended to a file.

KeyDefaultMeaningProfile
enabled
bool
truefalse keeps only the event-log line.
Env: SP_AUDIT
both
file
string
"logs/admin.log"The audit file, in the data folder.both

[presets]

A preset is a table [presets.<name>], picked with --preset <name>, [server] preset or SP_PRESET. The shipped files define ngctf, zombie, tdm, arena, babel and koth (1.0) and ctf and babel (0.75).

KeyDefaultMeaningProfile
gamemode
int
6The mode (a number, as in [server]).both
capture_limit
int
5The match’s limit for this preset.both
aim_assist
-
-Overrides [server] aim_assist.
Env: SP_AIM_ASSIST
1.0
fog_distance
-
-Overrides [server] fog_distance.
Env: SP_FOG_DISTANCE
1.0
maps
array
["Busan_Port", "Raindance"]The rotation for this preset.both
bot_difficulty
string
"normal"easy, normal or hard.
Env: SP_BOT_DIFFICULTY
both
plugins
array
[]The plugins this preset loads instead of [plugins] load.
Env: SP_PLUGINS
both

[ext075]

The 0.75 protocol extensions the server offers (ZeroSpades’ and the aosprotocol specification’s), each only to clients that agree.

Read by the 0.75 profile only.

KeyDefaultMeaningProfile
damage_markers
bool
trueOffer Damage Markers (0x20): a hit marker for the attacker only.0.75
teamplay
bool
trueOffer Teamplay (0x30): pings and team ESP config.0.75
player_properties
bool
trueOffer Player Properties (0x00).0.75
team_esp
bool
trueteammates through walls (the Config bit 1)0.75
pings
bool
truepings allowed (the Config bit 2)0.75
compass
bool
truethe compass bar (the Config bit 4)0.75
ping_lifetime
number
12.0Seconds a ping marker lives.0.75
flashlight
bool
trueFlashlight (0x32): a player’s light, switched on request (a plugin’s on_flashlight may refuse it) and drawn by every client that agreed. The beam every player carries: reach in blocks, the cone’s full angle in pi/256 (128 is 90 degrees), its colour, and how often it drops out (flicker / 512 of the time, 0 steady).0.75
flashlight_reach
int
60The beam’s reach in blocks.0.75
flashlight_cone
int
128The cone’s full angle in pi/256 (128 is 90 degrees).0.75
flashlight_color
array
[255, 179, 128]The beam colour as [r, g, b].0.75
flashlight_flicker
int
0How often it drops out (flicker / 512 of the time; 0 steady).0.75
player_limit
bool
truePlayer Limit (0xC0): announced; this profile still holds 32 players0.75
message_types
bool
trueMessage Types (0xC1): big, info, warning and error lines0.75
kick_reason
bool
trueKick Reason (0xC2): the reason in words before a kick0.75
utf8_chat
bool
truechat in UTF-8 (a 0xFF first byte) to the clients that read it0.75
version_info
bool
truethe version handshake and the extended Version Get0.75
daytime
bool
trueDaytime and Weather (0x33): the time of day. By night the clients that agreed draw the world black, lit only by the flashlights (turn those on above). night = true starts the server at night; /night on|off changes it.0.75
night
bool
falseStart the server at night (/night on|off changes it).0.75

[master075]

The public 0.75 master list the vanilla clients read.

Read by the 0.75 profile only.

KeyDefaultMeaningProfile
enabled
bool
trueAnnounce to the public 0.75 master. SP_MASTER=0 turns it off.both
address
string
"67.205.183.163:32886"The 0.75 master’s ip:port.both

[profile]

[profile.075] holds the tolerant rules a classic player expects; the 0.75 profile applies them over [conduct], [anticheat] and [gameplay].

KeyDefaultMeaningProfile
anticheat_protocol_violation
bool
falsea packet outside the standard is logged, not a kickboth
grief_warn_points
int
20[conduct] grief_warn_points in this profile.both
grief_kick_points
int
40[conduct] grief_kick_points in this profile.both
afk_kick_seconds
int
300[conduct] afk_kick_seconds in this profile.both
spawn_protection_seconds
int
0[gameplay] spawn_protection_seconds in this profile.both

Environment variables

Every SP_* variable the server reads. The ones tied to a config key are also shown in that key’s row above. Variables for tests and benchmarks are marked as such; none is needed on a normal server.

VariableEffect
SP_AFK_KICKSeconds before an AFK kick.
SP_AFK_WARNSeconds before the AFK warning.
SP_AIM_ASSISTAim assist on or off.
SP_ANTICHEAT0 turns the anti-cheat counters off.
SP_AUDIT0 turns the audit file off.
SP_BOTS_PLAY1 lets bots play with nobody in the match (tests, benchmarks).
SP_BOT_ADS0 stops bots aiming down the sights (measurement).
SP_BOT_BUILD_CHANCEPercent chance a bot starts a structure.
SP_BOT_BUILD_COOLDOWNSeconds between a bot’s building shares.
SP_BOT_COVER0 turns the planner’s cover preference off (measurement).
SP_BOT_DIFFICULTYeasy, normal or hard.
SP_BOT_FORTS0 turns the cooperative forts off.
SP_BOT_HELIBots fly helicopters, on or off.
SP_BOT_HELI_CHANCEPercent chance a bot takes a helicopter.
SP_BOT_HELI_TRACE1 traces a bot pilot (debugging).
SP_BOT_HELP_CHANCEPercent chance a bot helps a structure.
SP_BOT_JET_OFFLetters turning bot jetpack behaviours off (measurement).
SP_BOT_POSTSHow the squads’ forward posts are manned: attack, second or off (measurement).
SP_BOT_PROJECTS0 turns the shared bridges off.
SP_BOT_SPACE0 turns the bots’ personal space off (measurement).
SP_BOT_TUNNEL_FOLLOWMeasurement switch for the Miner bots’ tunnels.
SP_CONNECT_TOKENS0, 1 or all (also local addresses).
SP_CRATE_CHANCEChance of a supply crate on a kill (tests).
SP_CRATE_CROWDPlayers near a kill needed for a crate (tests).
SP_DATA_DIRWhere the server writes (same as --data).
SP_ESCAPE_WATCH0 turns the escape watch off.
SP_EVENTLOG1 turns the EVT event log on (all: movement too).
SP_EXIT_AFTERExits after this many game seconds (benchmarks).
SP_EXIT_AT_MATCH_ENDExits when a match ends (tests).
SP_FALL_DAMAGE_VELOCITYThe 1.0 landing speed that starts to hurt.
SP_FAST1: the game’s clock is the tick count and the loop never sleeps (benchmarks).
SP_FOG_DISTANCEFog distance in blocks (1.0).
SP_GRIEF_KICKGrief points that kick.
SP_JETPACK_TEST1 grants the jetpack at every spawn (test only).
SP_JOIN_CODEA join code for a listen server’s match.
SP_JUMP_VELOCITYThe 1.0 jump velocity.
SP_LAGCOMP0 turns lag compensation off.
SP_LAGCOMP_EXTRA_MSLag compensation’s extra.
SP_LAGCOMP_MAX_MSLag compensation’s bound.
SP_MAPS_URLPoints the map download at a copy of the maps repository (https, or http on 127.0.0.1).
SP_MAP_DOWNLOAD0 or 1: the map download.
SP_MASTER0 keeps the server off every master list (tests).
SP_MASTER_KEYPath of the identity key.
SP_MASTER_URLReplaces the master’s address and turns the listing on.
SP_MATCH_SECONDSRead by the server (see the source).
SP_MAX_PER_IPConnections an address may open in the window (0: off).
SP_NGMAP_FAIL1 makes the ngmap encoding fail, to test the VXL transfer.
SP_PERK_DYNAMITEThe dynamite perk’s threshold.
SP_PERK_JETPACKThe jetpack perk’s threshold (0: granted at every spawn, for tests).
SP_PERK_LANDMINEThe landmine perk’s threshold.
SP_PERK_MGThe machine gun perk’s threshold.
SP_PERK_SENTRYThe sentry perk’s threshold.
SP_PLAY_SECONDSStops the bots after n seconds of play (tests).
SP_PLUGINSComma-separated plugin names; replaces [plugins] load.
SP_PLUGINS_DIRFolder to load plugin scripts from, instead of Resources/plugins.
SP_PLUGIN_ALLOW_MAP1 allows game.set_map, game.set_mode, game.next_map.
SP_PLUGIN_COMMANDSComma-separated names game.run_command may run.
SP_PRESETA [presets.<name>] table (same as --preset).
SP_PROFILEProfile: 10 or 075 (same as --profile).
SP_PTB_BOMB_SECONDSPlant the Bomb: the fuse.
SP_PTB_CT_SPLITRead by the server (see the source).
SP_PTB_DEFUSE_SECONDSPlant the Bomb: the defuse time.
SP_PTB_FREEZE_SECONDSPlant the Bomb: the freeze.
SP_PTB_HALFTIME_ROUNDPlant the Bomb: the halftime round.
SP_PTB_PLANT_SECONDSPlant the Bomb: the plant time.
SP_PTB_ROUNDS_TO_WINPlant the Bomb: rounds to win.
SP_PTB_ROUND_SECONDSPlant the Bomb: the round’s length.
SP_PTB_TEST_CARRIERTest: human makes the first human terrorist carry the bomb.
SP_PTB_TEST_PLANTTest: A or B plants at once.
SP_RAND_SEEDFixes the random seed (tests, benchmarks).
SP_RCON_BINDThe remote console’s bind address.
SP_RCON_PASSWORDTurns the remote console on with this password.
SP_RCON_PORTThe remote console’s TCP port.
SP_SENTRY_LIFETIMESeconds a sentry lasts (0: for ever).
SP_SERVER_NAMEOverrides the server’s name.
SP_SKY_RATEMinutes of the day a second.
SP_SKY_TIMEThe sky’s start time (hh:mm, day, night…).
SP_SKY_WEATHERclear, rain, snow, fog or storm.
SP_SOLID_PLAYERSRead by the server (see the source).
SP_SPAWN_PROTECTSpawn protection in seconds.
SP_SQUADS0 turns squads off.
SP_SQUAD_SPAWN0 turns the respawn by a squadmate and the rally point off.
SP_TIME_SCALERuns the game’s clock n times faster (tests only).
SP_WEBRTC_ENABLEDTurns WebRTC on.
SP_WEBRTC_PORTThe WebRTC UDP port.
SP_WEBRTC_STUNThe STUN server (empty: none).
SP_WEBRTC_TURNTURN servers.
SP_WEBRTC_TURNSTURN servers over TLS.
SP_WEBRTC_TURN_CREDENTIALThe TURN credential.
SP_WEBRTC_TURN_USERNAMEThe TURN username.
SP_ZOMBIE_CLASSESZombie mode: 1 lets survivors pick classes.
SP_ZOMBIE_CLAWZombie claw damage.
SP_ZOMBIE_COUNTDOWNZombie countdown seconds.
SP_ZOMBIE_END_SECONDSZombie intermission seconds.
SP_ZOMBIE_FIRST_INFECTEDPatient zeros a round.
SP_ZOMBIE_INFECTION_BONUSSeconds added per infection.
SP_ZOMBIE_MIN_PLAYERSPlayers needed for a fight.
SP_ZOMBIE_NIGHT0 plays at the [sky] time.
SP_ZOMBIE_RADARSeconds between the last survivor’s pings.
SP_ZOMBIE_ROUNDSRound wins that take the match.
SP_ZOMBIE_ROUND_SECONDSSeconds of a round.

The 0.75 profile’s config

config-075.toml is a copy of config.toml with these differences: its own port (32897) and WebRTC port (32898), the classic CTF rotation (2Fort_CTF, Raindance, Busan_Port), tolerant rules in [profile.075] (grief kicks at 20/40 points, AFK kick at 300 s, no spawn protection, a packet outside the standard is logged, not a kick), the public 0.75 master ([master075]), the ZeroSpades extensions ([ext075]), and none of the 1.0 inventions (no [jetpack], [perks], [classes], [sentry], [squads], [zombie]; a section of that kind in this file is warned about as a key the profile does not read). Its presets are ctf and babel. Its rcon port is 32900.

Details of what the profile speaks and leaves out are in docs/plan-075-server.md.