Skip to content

Server Commands ​

The dedicated server (npm run net:server -- ...) accepts admin commands at runtime via its TTY.

Gameplay Cvars ​

Server-side tunables (defaults shown). Movement cvars live in src/engine/movement/MovementVars.ts.

Fall damage ​

CvarDefaultEffect
sv_falldamage1Master toggle (0 = off)
sv_falldamage_min256Drop (map units) where damage starts
sv_falldamage_full384Drop where the ramp reaches 100 / crush point (all armor + 1 HP)
sv_falldamage_fatal512Drop that is instantly fatal (self-frag)
sv_falldamage_crouchsoften64Effective drop reduction when landing crouched

A server-console [FallDamage] line logs the raw vs effective drop and the band on every landing — handy for tuning.

Teleporters ​

Exit-velocity policy is a movement config value (deterministic; deliberately not a live cvar, so demo re-simulation stays exact). The default redirects the player's full 3D momentum along the exit yaw (Warsow); an alternate mode uses a fixed Q3 exit speed. See MovementConfig.teleportSpeedMode / teleportExitSpeed.

Dedicated Server Console ​

The dedicated server reads commands from its terminal (stdin). In this version there are only three:

CommandEffect
spawn_bots <N> (alias bots)Spawn N bot entities (1–32; default 3) at spawn points
statusPrint the map and tick rate
helpList the commands

Anything else prints Unknown command. There is no kick, restart, endmatch or map-rotation command; matches are started and ended through the lobby, or by restarting the process. A lobby-spawned server also receives one internal command from the lobby, used to seat a player who drops into a running match. It isn't meant to be typed by hand.

Bots spawned this way are not the Bot Intelligence Server's bots. For bots that behave like players and have difficulty tiers, run npm run bot:server, or add bots from a lobby room.

Server Launch Options ​

bash
npm run net:server -- --map wdm2 --gametype duel --port 7777
FlagDefaultNotes
--mapwdm7Map name (must exist in public/data/)
--gametype, -gDeathmatchRelease modes: Deathmatch (ffa), Duel (1v1), Amphi, SnD (bomb, searchanddestroy). Unknown values fall back to Deathmatch
--port7777WebSocket port
--name, --hostnameSHAG Server v2Server name
--max, --maxclients16Max clients
--tickrate125Simulation rate in Hz
--snapshotrate60Snapshot rate in Hz
--game./gameGame data path
--cert, --key./certs/localhost*.pemTLS certificate and key (or SHAG_GAME_CERT_PATH / SHAG_GAME_KEY_PATH)
--shutdownoffExit when all clients disconnect
--single-matchoffOne match per server: the post-game is final, players return to the lobby, bots are released and the process exits. This is how the lobby runs matches

Match pacing overrides ​

Three environment variables, read once at boot, change a gametype's limits. They are useful for short test matches and apply to every gametype (see Deathmatch):

VariableMeaning
SHAG_TIMELIMITBare number = minutes; 90s for seconds
SHAG_SCORELIMITFrag or round limit
SHAG_WARMUPBare number = seconds; 2m for minutes
SHAG_DEBUGExtra diagnostics, as a comma-separated list of topics or all. Off by default; see below

Server diagnostics ​

The server console prints lifecycle events (joins, match start and end, demos saved) and problems. Anything that would print per tick, per hit or per message is off unless you ask for it:

bash
SHAG_DEBUG=phys,kb npm run server
TopicPrints
physOne line per player per second from the movement code
kbKnockback applied, and the position after that tick
falldamageEvery landing, with the drop and its damage band
inputA sample of the input buttons every 200 commands
perfSnapshot encode cost every 100 ticks
dischargeA shot fired into water

Game Console Commands ​

Registered by this game at boot (console/commands/), used from the in-game console (press ` the backquote key):

CommandWhat it does
connect <url> / disconnectJoin or leave a game server; see Connecting
demo, demolist, demoplayLoad, list and play demos; see Demos
loadout <primary> <secondary>Pick your Search & Destroy or Amphi kit for the next round
water [sample|splash|ripple|render]Inspect liquid state at the camera and the player
netsim <test|spawn|tick|state|input>Network simulation testing
pickup_auditAudit client/server pickup active-set reconciliation
camera_auditReport what owns the camera and what is rolling the view

The engine adds its own (map, bind, and others); see the engine's command reference.

Built on the SHAG Engine.