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:
- The server’s built-in default for a key.
- The config file.
- A preset (
--preset <name>,[server] presetorSP_PRESET) overgamemode,maps,capture_limit,aim_assist,fog_distance, bot difficulty and plugins. - An environment variable (
SP_*), where the table below shows one. - 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.
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
| Name | Type | Meaning |
|---|---|---|
--profile <10|075> | 10, 075 | Protocol 1.0 (default) or the classic 0.75 game. Also `SP_PROFILE`. |
--config <path> | path | The config file. Default `Resources/config.toml`, or `Resources/config-075.toml` with `--profile 075`. |
--root <dir> | path | The folder holding `Resources/`. Default: the current folder, `..` or `../..`. |
--data <dir> | path | Where the server writes: bans, keys, logs, plugin stores. Also `SP_DATA_DIR`. Default: the root, or `data-075/` in it with `--profile 075`. |
--check-config | flag | Validate the profile's config file and exit. |
--port <n> | int | The game's UDP port (overrides `[server] port`). |
--preset <name> | string | A `[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> | string | Play this map instead of the rotation (the folder name; aliases resolve). |
--maps-dir <dir> | path | A folder of maps searched before `Resources/maps/`. |
--classes <0|1> | 0, 1 | The zombie mode's classes off or on. |
--first-infected <n> | int or auto | The zombie mode's patient zeros a round (0 or `auto`: one per 6 players). |
--bots <n> | int | Start with n balanced bots. |
--team-bots <a> <b> | ints | Start with a bots on team 1 and b on team 2. |
--bots-test | flag | Start with exactly one strong enemy bot (a combat test). |
--listen, --server, --public | flags | Used 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> | string | A join code for a listen server's match. |
--help, -h | flag | The usage text. |
A walk through config.toml
The shipped config.toml is commented key by key. In short:
[server]: the name, the port, the mode, the maps. Changename,maps,max_playersif you add it.[teams]: names and colours.[passwords]: change all five.[maps]:download = truefetches missing maps from the maps repository.[master],[webrtc],[rcon]: the public list, browsers, the remote console.[plugins]: the plugin list and the opt-in dangerous calls.[presets.*]: ready bundles per mode.- 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"[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.
| Key | Default | Meaning | Profile |
|---|---|---|---|
namestring | "[NGS] ngCTF 24/7" (1.0); "[NGS] Classic CTF 0.75" (0.75) | The name on the server list. Env: SP_SERVER_NAME | both |
portint | 32887 (1.0); 32897 (0.75) | Port for the server to listen on | both |
max_playersint | 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 |
masterbool | false | Kept 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 |
gamemodeint 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 hill | both |
capture_limitint | 10 | Max flag captures | both |
aim_assistbool | true | Let 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_distanceint | 192 | How 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 |
mapsarray | a list: see the shipped file | Map 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 exactly | both |
map_rotation_modestring | "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/restart | both |
presetstring | none | Name of a [presets.<name>] table to apply (also --preset, SP_PRESET).Env: SP_PRESET | both |
periodic_delaysarray 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_messagesarray | a list: see the shipped file | Messages to send upon joining (“{game}” is the game’s name) | both |
periodic_messagesarray | a list: see the shipped file | Messages to send periodically | both |
[teams]
The two teams’ names and colours. Team 1 is the first, blue by default; team 2 is green.
| Key | Default | Meaning | Profile |
|---|---|---|---|
namestring | - | The team’s label. | both |
colorarray [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.
| Key | Default | Meaning | Profile |
|---|---|---|---|
managerstring | "changeme1" | Password of the manager role (highest: can /shutdown). | both |
adminstring | "changeme2" | Password of the admin role. | both |
moderatorstring | "changeme3" | Password of the moderator role (mod in plugins). | both |
guardstring | "changeme4" | Password of the guard role. | both |
trustedstring | "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.
| Key | Default | Meaning | Profile |
|---|---|---|---|
downloadbool | true | false: 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.
| Key | Default | Meaning | Profile |
|---|---|---|---|
enabledbool | true | Turns the jetpack off for the whole server. | both |
fuel_secondsnumber | 1.333 | the whole tank, the ignition bite included; thrust lasts 1.2 s after it | both |
regen_secondsnumber | 10.0 | seconds from empty to full, standing or airborne | both |
thrustnumber | 86.4 | upward acceleration, blocks/s^2 (gravity is 32) | both |
max_rise_speednumber | 28.0 | fastest climb, blocks/s | both |
air_controlnumber | 0.5 | horizontal acceleration while thrusting (walking is 1, airborne 0.1) | both |
glide_controlnumber | 0.2 | horizontal acceleration between pulses; the retail release keeps accelerating at 0.5 between pulses too, so set 0.5 here to match it | both |
ignition_cost_secondsnumber | 0.133 | the per-press bite, paid once when thrust starts | both |
refill_delay_secondsnumber | 2.0 | regen blocked this long after standing on a hit | both |
test_grant_on_spawnbool | false | TEST 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.
| Key | Default | Meaning | Profile |
|---|---|---|---|
kill_pointsint | 1 | What one event is worth, inherited by every perk that does not override it per enemy kill (weapon, headshot, spade, grenade) | both |
intel_pickup_pointsint | 1 | per enemy intel pickup | both |
intel_capture_pointsint | 3 | per intel capture at your own base | both |
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]):
| Key | Default | Meaning | Profile |
|---|---|---|---|
pointsint | 0 | free 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_pointsint | 3 (commented out in the shipped file) | Overrides the weight of an intel capture. | both |
enabledbool | true | false: 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.
| Key | Default | Meaning | Profile |
|---|---|---|---|
health- | per class | 1..1000. What the class effectively has; the wire stays 0..100 and every hit is scaled by 100 / health. | 1.0 |
speed- | per class | 0.3..3, times the usual ground speed. | 1.0 |
jump- | per class | 0.1..1.5, the jump’s upward speed (0.36 is the usual). | 1.0 |
weapon- | per class | rifle, smg, shotgun, rocket or revolver. | 1.0 |
blocks- | per class | 0..65535 blocks a life starts with. | 1.0 |
gear- | per class | grenades or drill: what the grenade slot holds. | 1.0 |
gear_count- | per class | 0..255 grenades or drill charges. | 1.0 |
jetpack- | per class | true: worn from every spawn. | 1.0 |
dig- | per class | 1: the spade’s usual dig; 3: a 3x3x3 cube (the Miner). | 1.0 |
perk- | per class | The streak perk: none, sentry, landmine, dynamite or mg. | 1.0 |
swing- | per class | 0.05..2 seconds between two spade swings. | 1.0 |
title- | per class | Its name on the class screen (31 bytes). | 1.0 |
blurb- | per class | Its line on the class screen (95 bytes). | 1.0 |
enabled- | per class | false: nobody may pick it (the last class enabled always stays on). | 1.0 |
secondary- | per class | A second gun swapped with the first: none or a weapon. | 1.0 |
block_damage- | per class | 0..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 class | true: every life starts with one charge of its perk. | 1.0 |
dig_delay- | per class | 0.2..3 seconds between two right-button digs. | 1.0 |
sprint- | per class | 0..3: its sprint speed, which replaces the walk speed on the ground (0 keeps the walk). | 1.0 |
water_friction- | per class | 1..30: the water drag. | 1.0 |
headshot- | per class | 0.1..4: what a shot to the head does to its bodies. | 1.0 |
melee- | per class | 0..500: the damage of its spade or pickaxe swing. | 1.0 |
fall_min- | per class | 0..63: the fall’s distance in blocks from which it hurts. | 1.0 |
fall_max- | per class | 0..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 class | 1..200: the damage at fall_max (100 kills). | 1.0 |
fall_water- | per class | 0..1: the share of the damage a landing in water takes. | 1.0 |
blocks_max- | per class | 0..65535: what the wallet holds (a restock fills to it). | 1.0 |
[net]
Lag compensation and the per-address connection guard.
| Key | Default | Meaning | Profile |
|---|---|---|---|
lag_compensationbool | true | Judge a hit against the body the shooter could see. Also SP_LAGCOMP=0.Env: SP_LAGCOMP (0) | both |
lag_compensation_max_msint | 250 | The target is rewound by its round trip, bounded by this plus the extra. Env: SP_LAGCOMP_MAX_MS | both |
lag_compensation_extra_msint | 50 | Added to the bound above. Env: SP_LAGCOMP_EXTRA_MS | both |
max_connections_per_ipint | 4 | One 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_secondsint | 10 | The 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.
| Key | Default | Meaning | Profile |
|---|---|---|---|
roundsint | 3 | round wins that take the match (1..255) Env: SP_ZOMBIE_ROUNDS | both |
countdownint | 10 | seconds to scatter before the outbreak Env: SP_ZOMBIE_COUNTDOWN | both |
round_secondsint | 120 | from the outbreak Env: SP_ZOMBIE_ROUND_SECONDS | both |
infection_bonusint | 15 | seconds more for every infection Env: SP_ZOMBIE_INFECTION_BONUS | both |
end_secondsint | 5 | intermission between rounds Env: SP_ZOMBIE_END_SECONDS | both |
first_infectedint | 0 | patient zeros; 0: one for every 6 players (at least 1); –first-infected wins Env: SP_ZOMBIE_FIRST_INFECTED | both |
minimum_playersint | 2 | below this a fight is aborted, not timed out Env: SP_ZOMBIE_MIN_PLAYERS | both |
zombie_respawn_secondsint | 3 | Seconds a zombie waits to respawn in the fight. | both |
radar_secondsint | 5 | between the last survivor’s danger pings Env: SP_ZOMBIE_RADAR | both |
claw_damageint | 50 | a claw hit; the victim’s health is scaled separately Env: SP_ZOMBIE_CLAW | both |
classesbool | false | the survivors pick a class (the class screen); the Env: SP_ZOMBIE_CLASSES | both |
nightbool | true | zombies 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_minnumber | 35.0 | survivors 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 survivor | both |
spawn_near_maxnumber | 50.0 | A 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.
| Key | Default | Meaning | Profile |
|---|---|---|---|
match_secondsint | 1200 | classic CTF Env: SP_MATCH_SECONDS | both |
[babel]
| Key | Default | Meaning | Profile |
|---|---|---|---|
match_secondsint | 1200 | See the section text. Env: SP_MATCH_SECONDS | both |
[ngctf]
Read by the 1.0 profile only.
| Key | Default | Meaning | Profile |
|---|---|---|---|
match_secondsint | 1200 | next gen CTF Env: SP_MATCH_SECONDS | 1.0 |
[tc]
Read by the 1.0 profile only.
| Key | Default | Meaning | Profile |
|---|---|---|---|
match_secondsint | 1200 | territory control Env: SP_MATCH_SECONDS | 1.0 |
[tdm]
Read by the 1.0 profile only.
| Key | Default | Meaning | Profile |
|---|---|---|---|
match_secondsint | 900 | team deathmatch Env: SP_MATCH_SECONDS | 1.0 |
[koth]
Read by the 1.0 profile only.
| Key | Default | Meaning | Profile |
|---|---|---|---|
match_secondsint | 900 | king 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.
| Key | Default | Meaning | Profile |
|---|---|---|---|
countdown_secondsint | 5 | behind the closed gates before a round (1..60) | 1.0 |
round_secondsint | 180 | a round’s time limit (10..3600); the side with more | 1.0 |
spawn_changeint | 0 | players 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_distanceint | 35 | 2 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 of | 1.0 |
team_color_secondsint | 5 | a 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.
| Key | Default | Meaning | Profile |
|---|---|---|---|
freeze_secondsint | 15 | Counter-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_secondsint | 115 | 1:55; unplanted when it runs out, the defenders win Env: SP_PTB_ROUND_SECONDS | 1.0 |
bomb_secondsint | 40 | the planted bomb’s fuse Env: SP_PTB_BOMB_SECONDS | 1.0 |
plant_secondsnumber | 3.2 | USE held, still, inside a site Env: SP_PTB_PLANT_SECONDS | 1.0 |
defuse_secondsint | 10 | USE 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_winint | 16 | rounds 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.
| Key | Default | Meaning | Profile |
|---|---|---|---|
afk_kick_secondsint | 600 (1.0); 300 (0.75) | Seconds without input before an AFK kick. Env: SP_AFK_KICK | both |
afk_warn_secondsint | 540 (1.0); 240 (0.75) | Seconds without input before the warning. Env: SP_AFK_WARN | both |
afk_spectator_kick_secondsint | 1800 | The AFK kick for a spectator. | both |
grief_warn_pointsint | 5 (1.0); 20 (0.75) | Grief points that earn a warning. | both |
grief_kick_pointsint | 10 (1.0); 40 (0.75) | Grief points that earn a kick. Env: SP_GRIEF_KICK | both |
grief_decay_secondsint | 60 | Seconds for one grief point to wear off. | both |
grief_team_damage_pointsint | 1 | Points for damaging a teammate. | both |
grief_team_kill_pointsint | 3 | Points for killing a teammate. | both |
escape_watchbool | true | Reveal 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_secondsint | 5 | Seconds above the sky before a player is revealed. | both |
escape_watch_embedded_secondsint | 3 | Seconds inside solid blocks before a player is revealed. | both |
escape_watch_entomb_secondsint | 5 | Seconds 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.
| Key | Default | Meaning | Profile |
|---|---|---|---|
enabledbool | true | Turns the counters off (SP_ANTICHEAT=0).Env: SP_ANTICHEAT (0) | both |
kick_on_protocol_violationbool | false | Kick on a hard protocol violation (NaN, infinity). | both |
log_interval_secondsint | 10 | Seconds 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.
| Key | Default | Meaning | Profile |
|---|---|---|---|
enabledbool | true | false: everyone spawns at the team’s spawn, as in plain CTF Env: SP_SQUADS (0) | both |
sizeint | 4 | players per squad (2..16) | both |
spawnbool | true | false: 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.
| Key | Default | Meaning | Profile |
|---|---|---|---|
lifetime_secondsint | 60 | Seconds 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.
| Key | Default | Meaning | Profile |
|---|---|---|---|
timestring | "12:00" | “hh:mm”, or day, night, dawn, dusk Env: SP_SKY_TIME | 1.0 |
rateint | 0 | minutes of the day a second (0: the time stands; 2: a day in 12 minutes) Env: SP_SKY_RATE | 1.0 |
weatherstring | "clear" | clear, rain, snow, fog or storm (rain with lightning) Env: SP_SKY_WEATHER | 1.0 |
intensityint | 60 | how much of it, 0..100 | 1.0 |
moonlightint | 25 | how much a night shows, 0 (only flashlights) ..100 | 1.0 |
[bots]
Server-side bots. All keys are optional.
| Key | Default | Meaning | Profile |
|---|---|---|---|
difficultystring | "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_bridgesbool | true | Bots 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_fortsbool | true | Bots 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_chanceint | 35 | Bots 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_chanceint | 70 | Percent chance a bot near an unfinished structure of its team helps build it. | 1.0 |
build_cooldownint | 60 | Seconds a bot fights after its share of building before it is asked again. | 1.0 |
heli_enabledbool | true | Bots 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_chanceint | 30 | Percent 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.
| Key | Default | Meaning | Profile |
|---|---|---|---|
enabledbool | false | WebRTC 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 |
portint | 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 |
stunstring | "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.
| Key | Default | Meaning | Profile |
|---|---|---|---|
enabledbool | true | List the server on our master. SP_MASTER=0 keeps a test run off it.Env: SP_MASTER (0) | both |
urlstring | "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 |
countrystring | "" | A country code shown in the list (BR), or empty. | both |
key_filestring | "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_tokensbool | true | Players 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.
| Key | Default | Meaning | Profile |
|---|---|---|---|
enabledbool | false | Turns the remote console on (it also needs a password). Env: SP_RCON_PASSWORD (turns it on) | both |
portint | 32890 (1.0); 32900 (0.75) | TCP port (32890; 32900 in the 0.75 config). Env: SP_RCON_PORT | both |
bindstring | "127.0.0.1" | Address to listen on. Keep 127.0.0.1.Env: SP_RCON_BIND | both |
passwordstring | "" | 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.
| Key | Default | Meaning | Profile |
|---|---|---|---|
loadarray | ["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_changebool | false | true 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_commandsarray | [] | 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.
| Key | Default | Meaning | Profile |
|---|---|---|---|
spawn_protection_secondsint | 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_velocitynumber | 0.36 | The 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_velocitynumber | 0.58 | The 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.
| Key | Default | Meaning | Profile |
|---|---|---|---|
enabledbool | true | false keeps only the event-log line.Env: SP_AUDIT | both |
filestring | "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).
| Key | Default | Meaning | Profile |
|---|---|---|---|
gamemodeint | 6 | The mode (a number, as in [server]). | both |
capture_limitint | 5 | The 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 |
mapsarray | ["Busan_Port", "Raindance"] | The rotation for this preset. | both |
bot_difficultystring | "normal" | easy, normal or hard.Env: SP_BOT_DIFFICULTY | both |
pluginsarray | [] | 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.
| Key | Default | Meaning | Profile |
|---|---|---|---|
damage_markersbool | true | Offer Damage Markers (0x20): a hit marker for the attacker only. | 0.75 |
teamplaybool | true | Offer Teamplay (0x30): pings and team ESP config. | 0.75 |
player_propertiesbool | true | Offer Player Properties (0x00). | 0.75 |
team_espbool | true | teammates through walls (the Config bit 1) | 0.75 |
pingsbool | true | pings allowed (the Config bit 2) | 0.75 |
compassbool | true | the compass bar (the Config bit 4) | 0.75 |
ping_lifetimenumber | 12.0 | Seconds a ping marker lives. | 0.75 |
flashlightbool | true | Flashlight (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_reachint | 60 | The beam’s reach in blocks. | 0.75 |
flashlight_coneint | 128 | The cone’s full angle in pi/256 (128 is 90 degrees). | 0.75 |
flashlight_colorarray | [255, 179, 128] | The beam colour as [r, g, b]. | 0.75 |
flashlight_flickerint | 0 | How often it drops out (flicker / 512 of the time; 0 steady). | 0.75 |
player_limitbool | true | Player Limit (0xC0): announced; this profile still holds 32 players | 0.75 |
message_typesbool | true | Message Types (0xC1): big, info, warning and error lines | 0.75 |
kick_reasonbool | true | Kick Reason (0xC2): the reason in words before a kick | 0.75 |
utf8_chatbool | true | chat in UTF-8 (a 0xFF first byte) to the clients that read it | 0.75 |
version_infobool | true | the version handshake and the extended Version Get | 0.75 |
daytimebool | true | Daytime 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 |
nightbool | false | Start 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.
| Key | Default | Meaning | Profile |
|---|---|---|---|
enabledbool | true | Announce to the public 0.75 master. SP_MASTER=0 turns it off. | both |
addressstring | "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].
| Key | Default | Meaning | Profile |
|---|---|---|---|
anticheat_protocol_violationbool | false | a packet outside the standard is logged, not a kick | both |
grief_warn_pointsint | 20 | [conduct] grief_warn_points in this profile. | both |
grief_kick_pointsint | 40 | [conduct] grief_kick_points in this profile. | both |
afk_kick_secondsint | 300 | [conduct] afk_kick_seconds in this profile. | both |
spawn_protection_secondsint | 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.
| Variable | Effect |
|---|---|
SP_AFK_KICK | Seconds before an AFK kick. |
SP_AFK_WARN | Seconds before the AFK warning. |
SP_AIM_ASSIST | Aim assist on or off. |
SP_ANTICHEAT | 0 turns the anti-cheat counters off. |
SP_AUDIT | 0 turns the audit file off. |
SP_BOTS_PLAY | 1 lets bots play with nobody in the match (tests, benchmarks). |
SP_BOT_ADS | 0 stops bots aiming down the sights (measurement). |
SP_BOT_BUILD_CHANCE | Percent chance a bot starts a structure. |
SP_BOT_BUILD_COOLDOWN | Seconds between a bot’s building shares. |
SP_BOT_COVER | 0 turns the planner’s cover preference off (measurement). |
SP_BOT_DIFFICULTY | easy, normal or hard. |
SP_BOT_FORTS | 0 turns the cooperative forts off. |
SP_BOT_HELI | Bots fly helicopters, on or off. |
SP_BOT_HELI_CHANCE | Percent chance a bot takes a helicopter. |
SP_BOT_HELI_TRACE | 1 traces a bot pilot (debugging). |
SP_BOT_HELP_CHANCE | Percent chance a bot helps a structure. |
SP_BOT_JET_OFF | Letters turning bot jetpack behaviours off (measurement). |
SP_BOT_POSTS | How the squads’ forward posts are manned: attack, second or off (measurement). |
SP_BOT_PROJECTS | 0 turns the shared bridges off. |
SP_BOT_SPACE | 0 turns the bots’ personal space off (measurement). |
SP_BOT_TUNNEL_FOLLOW | Measurement switch for the Miner bots’ tunnels. |
SP_CONNECT_TOKENS | 0, 1 or all (also local addresses). |
SP_CRATE_CHANCE | Chance of a supply crate on a kill (tests). |
SP_CRATE_CROWD | Players near a kill needed for a crate (tests). |
SP_DATA_DIR | Where the server writes (same as --data). |
SP_ESCAPE_WATCH | 0 turns the escape watch off. |
SP_EVENTLOG | 1 turns the EVT event log on (all: movement too). |
SP_EXIT_AFTER | Exits after this many game seconds (benchmarks). |
SP_EXIT_AT_MATCH_END | Exits when a match ends (tests). |
SP_FALL_DAMAGE_VELOCITY | The 1.0 landing speed that starts to hurt. |
SP_FAST | 1: the game’s clock is the tick count and the loop never sleeps (benchmarks). |
SP_FOG_DISTANCE | Fog distance in blocks (1.0). |
SP_GRIEF_KICK | Grief points that kick. |
SP_JETPACK_TEST | 1 grants the jetpack at every spawn (test only). |
SP_JOIN_CODE | A join code for a listen server’s match. |
SP_JUMP_VELOCITY | The 1.0 jump velocity. |
SP_LAGCOMP | 0 turns lag compensation off. |
SP_LAGCOMP_EXTRA_MS | Lag compensation’s extra. |
SP_LAGCOMP_MAX_MS | Lag compensation’s bound. |
SP_MAPS_URL | Points the map download at a copy of the maps repository (https, or http on 127.0.0.1). |
SP_MAP_DOWNLOAD | 0 or 1: the map download. |
SP_MASTER | 0 keeps the server off every master list (tests). |
SP_MASTER_KEY | Path of the identity key. |
SP_MASTER_URL | Replaces the master’s address and turns the listing on. |
SP_MATCH_SECONDS | Read by the server (see the source). |
SP_MAX_PER_IP | Connections an address may open in the window (0: off). |
SP_NGMAP_FAIL | 1 makes the ngmap encoding fail, to test the VXL transfer. |
SP_PERK_DYNAMITE | The dynamite perk’s threshold. |
SP_PERK_JETPACK | The jetpack perk’s threshold (0: granted at every spawn, for tests). |
SP_PERK_LANDMINE | The landmine perk’s threshold. |
SP_PERK_MG | The machine gun perk’s threshold. |
SP_PERK_SENTRY | The sentry perk’s threshold. |
SP_PLAY_SECONDS | Stops the bots after n seconds of play (tests). |
SP_PLUGINS | Comma-separated plugin names; replaces [plugins] load. |
SP_PLUGINS_DIR | Folder to load plugin scripts from, instead of Resources/plugins. |
SP_PLUGIN_ALLOW_MAP | 1 allows game.set_map, game.set_mode, game.next_map. |
SP_PLUGIN_COMMANDS | Comma-separated names game.run_command may run. |
SP_PRESET | A [presets.<name>] table (same as --preset). |
SP_PROFILE | Profile: 10 or 075 (same as --profile). |
SP_PTB_BOMB_SECONDS | Plant the Bomb: the fuse. |
SP_PTB_CT_SPLIT | Read by the server (see the source). |
SP_PTB_DEFUSE_SECONDS | Plant the Bomb: the defuse time. |
SP_PTB_FREEZE_SECONDS | Plant the Bomb: the freeze. |
SP_PTB_HALFTIME_ROUND | Plant the Bomb: the halftime round. |
SP_PTB_PLANT_SECONDS | Plant the Bomb: the plant time. |
SP_PTB_ROUNDS_TO_WIN | Plant the Bomb: rounds to win. |
SP_PTB_ROUND_SECONDS | Plant the Bomb: the round’s length. |
SP_PTB_TEST_CARRIER | Test: human makes the first human terrorist carry the bomb. |
SP_PTB_TEST_PLANT | Test: A or B plants at once. |
SP_RAND_SEED | Fixes the random seed (tests, benchmarks). |
SP_RCON_BIND | The remote console’s bind address. |
SP_RCON_PASSWORD | Turns the remote console on with this password. |
SP_RCON_PORT | The remote console’s TCP port. |
SP_SENTRY_LIFETIME | Seconds a sentry lasts (0: for ever). |
SP_SERVER_NAME | Overrides the server’s name. |
SP_SKY_RATE | Minutes of the day a second. |
SP_SKY_TIME | The sky’s start time (hh:mm, day, night…). |
SP_SKY_WEATHER | clear, rain, snow, fog or storm. |
SP_SOLID_PLAYERS | Read by the server (see the source). |
SP_SPAWN_PROTECT | Spawn protection in seconds. |
SP_SQUADS | 0 turns squads off. |
SP_SQUAD_SPAWN | 0 turns the respawn by a squadmate and the rally point off. |
SP_TIME_SCALE | Runs the game’s clock n times faster (tests only). |
SP_WEBRTC_ENABLED | Turns WebRTC on. |
SP_WEBRTC_PORT | The WebRTC UDP port. |
SP_WEBRTC_STUN | The STUN server (empty: none). |
SP_WEBRTC_TURN | TURN servers. |
SP_WEBRTC_TURNS | TURN servers over TLS. |
SP_WEBRTC_TURN_CREDENTIAL | The TURN credential. |
SP_WEBRTC_TURN_USERNAME | The TURN username. |
SP_ZOMBIE_CLASSES | Zombie mode: 1 lets survivors pick classes. |
SP_ZOMBIE_CLAW | Zombie claw damage. |
SP_ZOMBIE_COUNTDOWN | Zombie countdown seconds. |
SP_ZOMBIE_END_SECONDS | Zombie intermission seconds. |
SP_ZOMBIE_FIRST_INFECTED | Patient zeros a round. |
SP_ZOMBIE_INFECTION_BONUS | Seconds added per infection. |
SP_ZOMBIE_MIN_PLAYERS | Players needed for a fight. |
SP_ZOMBIE_NIGHT | 0 plays at the [sky] time. |
SP_ZOMBIE_RADAR | Seconds between the last survivor’s pings. |
SP_ZOMBIE_ROUNDS | Round wins that take the match. |
SP_ZOMBIE_ROUND_SECONDS | Seconds 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.