# Robo Violence 2: console commands

Source: `game/src/Console.cpp` (`Console::sendCommand`) and `game/src/GameVar.cpp` (variables), main at `40ea5ad` (v0.0.2), 2026-10-29.

## How the console works

- Open and close with the tilde / grave key (`~` / `` ` ``). Works in the menu, in game and in the map editor.
- `F1` shows the events log, `F2` shows the chat log. `Page Up/Down` scrolls, `Up/Down` walks the command history.
- While typing `set <prefix>`, matching variables are listed. `Tab` completes and cycles through them.
- Commands are case sensitive (`blueTeamScore` must be typed exactly). An unknown word prints `Unkown command`.
- Anything with `pass` in its name is never echoed: `admin` and `set *pass*` show `***` in the log.
- Builds: **client** = the normal game (`bv2`), it also runs a listen server when you host. **dedicated** = headless server (`bv2dedicated`). Some commands exist in only one of them; see the "Where" column.

### Who counts as admin

A command in part B runs only where a server object exists:

1. In the console of the machine that hosts the game (listen server via `host`, or the dedicated server console / launch script).
2. Remotely, from a client: log in with `admin <user> <password>` (server has `zsv_adminUser` + `zsv_adminPass` set, password at least 32 characters, see ADR 0038), then prefix every command with `- ` (dash, space). The server runs it and logs `Executing command from <name>, IP: <ip>`. Example: `- kickid 3`.

Without admin rights, `- <command>` replies `You need to be admin for this command`. Part B commands typed without `- ` on a plain client do nothing.

---

## A) User commands

| Name | Example | Description |
|---|---|---|
| `help` / `?` | `?` | Prints a short (incomplete) list of command names. |
| `connect` | `connect 203.0.113.10 3334 secret` | Joins a server. Port defaults to 3333 if omitted or 0. Optional third argument is the server password. Client only. |
| `disconnect` | `disconnect` | Leaves the current game (or stops your listen server / editor) and returns to the menu. |
| `quit` | `quit` | Closes the application immediately. |
| `sayall` | `sayall gg everyone` | Sends a chat message to all players. |
| `sayteam` | `sayteam push blue flag` | Sends a chat message to your team only. Client only. |
| `vote` | `vote changemap CTF-Placeholder` | Starts a vote on a server command. Works only if the server allows voting (`sv_enableVote`) and the admin made that command votable with `voteon`. Max 79 characters. Votable `set` lines are written as `vote set sv_gameType 1`. |
| `maplist` | `maplist` | Asks the server for its map rotation and prints it. |
| `maplistall` | `maplistall` | Asks the server for every map it has installed. |
| `playerlist` | `playerlist` | Lists players with their slot IDs (your own line is highlighted). On a client no IPs are shown. |
| `savemap` | `savemap mycopy` | Saves the map you downloaded from the current server to `main/maps/<name>.bvm`. No name: uses the map's own name. Refuses if the file exists. Client only, while in a game. |
| `savemapforce` | `savemapforce mycopy.bvm` | Same as `savemap`, but overwrites an existing file. |
| `host` | `host CTF-Placeholder` | Starts a listen server on the given map and joins it. You are then server for part B commands. Client only. |
| `edit` | `edit mymap 64 64` | Opens the map editor. Existing map: name only. New map: name, width, height. Client only. |
| `admin` | `admin myUser myPassword` | Logs in as remote admin on the server you are connected to (sends proofs, not the password). Needed before `- <command>`. Says `You are already server` if you host. |
| `remoteAdmin` | `remoteAdmin 203.0.113.10 3333` | Legacy. Now only joins the server like `connect` without a password; use `connect` then `admin`. |
| `set` | `set cl_playerName Piotr` | Changes a client variable (`cl_*`, `r_*`, `s_*`, `k_*`, `c_*`). See table A2. `sv_*` variables are refused on a plain client (`This command is reserved to the server`). |
| `screenshot` | `screenshot arena_01` | Saves the next frame as `<user dir>/screenshots/<name>.bmp`. Name: letters, digits, `-`, `_`. Used by the screenshot tests. Client only. |
| `menutab` | `menutab browser` | Opens a main menu tab: `news`, `profile`, `browser`, `host`, `editor`, `options`, `credits`. Used by tests. Client only. |
| `scoreboard` | `scoreboard 1` | `1` holds the scoreboard open and hides the in-game menu, `0` releases it. Used by tests. Client only. |
| `refreshgames` | `refreshgames` | Refreshes the server list from the master server (same as the browser refresh button). Client only. |
| `rebuildmap` | `rebuildmap` | Rebuilds the current map's geometry on your client. Also prints `Unkown command` afterwards (harmless bug). Client only. |
| `restart` | `restart` | Destroys and recreates the whole game scene (disconnects, back to the intro/menu). |
| `status` | `status 2` | Debug builds only. Sets the online status icon (0 to 3). |

### A2) Client variables (`set <name> <value>`)

`set <name>` with no value is invalid; the value list appears while you type. Key variables take a key name (`A`, `Space`, `Mouse1`, `Joy1`...).

| Name | Example | Description |
|---|---|---|
| `cl_playerName` | `set cl_playerName Piotr` | Your player name (default `Unnamed Babo`). |
| `cl_skin` | `set cl_skin skin10` | Player skin. |
| `cl_redDecal` / `cl_greenDecal` / `cl_blueDecal` | `set cl_redDecal 1 0 0` | Skin decal colours (RGB, 0 to 1). |
| `cl_primaryWeapon` | `set cl_primaryWeapon 2` | Spawn weapon: 0 SMG, 1 Shotgun, 2 Sniper, 3 DMG, 4 Chaingun, 5 Bazooka, 6 Photon, 7 Flamethrower. |
| `cl_secondaryWeapon` | `set cl_secondaryWeapon 1` | Secondary: 0 Knives, 1 Nuclear, 2 Shield, 3 Minibot. |
| `cl_masterServers` | `set cl_masterServers none` | Master server list `host:port,host:port`, or `none` to turn the server list off. Default `master.roboviolence.com:10207`. |
| `cl_lastUsedIP` / `cl_port` / `cl_password` | `set cl_port 3334` | Last server address, port and password used by the Join dialog. |
| `cl_mapAuthorName` | `set cl_mapAuthorName Piotr` | Author name stored in maps you save in the editor (max 24 chars). |
| `cl_teamIndicatorType` | `set cl_teamIndicatorType 1` | Team marking: 0 colourize, 1 halos, 2 team halos only. |
| `cl_glowSize` | `set cl_glowSize 0.3` | Halo size, 0.25 to 0.5. |
| `cl_preciseCursor` | `set cl_preciseCursor false` | Precise crosshair cursor. |
| `cl_cubicMotion` | `set cl_cubicMotion true` | Smooth (cubic) interpolation of other players' movement. |
| `cl_enableVSync` | `set cl_enableVSync false` | Vertical sync. |
| `cl_enableXBox360Controller` | `set cl_enableXBox360Controller true` | Gamepad support. |
| `cl_grassTextureForAllMaps` | `set cl_grassTextureForAllMaps true` | Force the grass ground texture on every map. |
| `cl_affinityMode` | `set cl_affinityMode 1` | CPU affinity: 0 default, 1 partial bias, 2 full bias. |
| `cl_qMsg01` ... `cl_qMsg10` | `set cl_qMsg01 "Need backup!"` | Quick chat messages, sent with keys `k_qMsg01`...`k_qMsg10`. |
| `cl_accountURL` / `cl_accountUsername` / `cl_accountPassword` | `set cl_accountURL ""` | Account server settings. Accounts are hidden in this release (ADR 0038); leave empty. |
| `r_fullScreen` | `set r_fullScreen false` | Fullscreen or window (applies after restart). |
| `r_resolution` | `set r_resolution 1920 1080` | Screen resolution. |
| `r_widescreen` | `set r_widescreen 2` | Widescreen view: 0 off (4:3), 1 stretch, 2 bars. |
| `r_bitdepth` / `r_refreshRate` | `set r_refreshRate 60` | Colour depth (16/32) and refresh rate (-1 = desktop default). |
| `r_shadowQuality` | `set r_shadowQuality 1` | 0 none, 1 hard, 2 soft. |
| `r_playerShadow` / `r_projectileShadow` | `set r_playerShadow false` | Shadows under players / projectiles. |
| `r_weatherEffects` | `set r_weatherEffects true` | Rain/snow/lava effects (reloads weather immediately in game). |
| `r_reflection` | `set r_reflection true` | Water reflections. |
| `r_particleLighting` / `r_particleSort` / `r_reducedParticles` | `set r_reducedParticles true` | Particle quality options. |
| `r_terrainSplater` / `r_showGroundMark` / `r_showCasing` | `set r_showCasing false` | Terrain blending, blood/scorch marks, ejected shell casings. |
| `r_highDetailMenu` / `r_animatedMenu` | `set r_animatedMenu true` | Menu background detail and animation. |
| `r_showStats` | `set r_showStats true` | Shows FPS/render stats. |
| `r_showLatency` | `set r_showLatency true` | Shows ping numbers. |
| `r_simpleText` | `set r_simpleText true` | Plain text rendering. |
| `r_maxNameLenOverBabo` | `set r_maxNameLenOverBabo 12` | Cuts names above players to N chars (0 = no limit). |
| `r_chatTextSize` / `r_eventTextSize` / `r_showEventText` | `set r_chatTextSize 22` | Chat and kill-feed text size, hide event text. |
| `s_masterVolume` | `set s_masterVolume 0.5` | Master volume 0 to 1. |
| `s_inGameMusic` | `set s_inGameMusic false` | Music in game. |
| `s_mixRate` / `s_maxSoftwareChannels` | `set s_mixRate 44100` | Audio mix rate (22050/44100) and channel count. |
| `k_moveUp` `k_moveDown` `k_moveLeft` `k_moveRight` | `set k_moveUp W` | Movement keys. |
| `k_shoot` `k_melee` `k_throwGrenade` `k_throwMolotov` `k_pickUp` | `set k_shoot Mouse1` | Combat keys. |
| `k_chatAll` `k_chatTeam` `k_showScore` `k_stats` `k_menuAccess` `k_screenShot` | `set k_chatTeam Y` | Chat, scoreboard, stats, menu, screenshot keys. |
| `k_qMsg01` ... `k_qMsg10` | `set k_qMsg01 F5` | Quick message keys. |
| `c_huge` | `set c_huge true` | Taller console. |
| `c_debug` / `c_netlog` | `set c_netlog true` | Debug output; `c_netlog` logs join/handshake traffic (env `BV2_NETLOG=1` forces it). |
| `d_showPath` / `d_showNodes` | `set d_showNodes true` | Debug: draw bot path-finding nodes/paths. |
| `languageFile` | `set languageFile ""` | Language file override. |

---

## B) Admin commands

Run in the host or dedicated server console, or remotely as `- <command>` after `admin`. "Where": **both** = listen server and dedicated server; **dedicated** = only in `bv2dedicated` (remotely reachable with `- ` when the server is dedicated, like prod).

| Name | Where | Example | Description |
|---|---|---|---|
| `-` | client | `- changemap CTF-Placeholder` | Sends the rest of the line to the server console. Needs `admin` login first. |
| `dedicate` | both | `dedicate CTF-Placeholder` | Starts a server without a local player on the map. If the server already runs, changes map instead. |
| `execute` | both | `execute CTF` | Runs launch script `content/LaunchScript/<name>.cfg` line by line until `endscript`. Clears votable commands first. `^1`..`^9` = colour codes, `//` = comment. |
| `info` | both | `info` | Prints game type, port and server name. |
| `changemap` | both | `changemap TDM-Placeholder` | Switches to a map now. No name: next map in the rotation. |
| `addmap` | both | `addmap CTF-Placeholder` | Adds an installed map to the rotation (warns if the file is missing). |
| `removemap` | both | `removemap TDM-Placeholder` | Removes a map from the rotation (not the current one). |
| `maplist` / `maplistall` | both | `maplistall` | On the server: prints the rotation / all installed maps. |
| `playerlist` | both | `playerlist` | On the server: `[slot] name - IP:x.x.x.x`. Use the slot number with `*id` commands. |
| `sayall` | both | `sayall Server restarts in 5 min` | On a dedicated server: message to all players from the server. |
| `sayid` | dedicated | `sayid 3 please stop camping` | Private message from `Server` to one player slot. |
| `kick` | both | `kick Unnamed Babo` | Kicks every player with that name (colour codes ignored). |
| `kickid` | both | `kickid 3` | Kicks the player in slot 3. |
| `ban` | both | `ban Cheater` | Bans by name (stores name + IP) and drops the player. Ban lasts `sv_banDays`. |
| `banid` | both | `banid 3` | Bans the player in slot 3. |
| `banip` | both | `banip 203.0.113.7` | Adds a ban for an IP (name `MANUAL-IP-BAN`), nobody is dropped. |
| `banlist` | both | `banlist` | Lists bans with their index: `[00] name - IP`. |
| `unban` | both | `unban 0` | Removes ban number N from `banlist`. |
| `move` | both | `move 1 Piotr` | Puts the named player on a team: -1 spectator, 0 blue, 1 red. |
| `moveid` | both | `moveid 0 3` | Same by slot: `moveid <team> <slot>`. Slot -1 moves everyone. Drops carried flags. |
| `allwatch` | both | `allwatch` | Moves every player to spectators. |
| `nuke` | both | `nuke Piotr` | Kills the named player with a nuke. |
| `nukeid` | both | `nukeid 3` | Nukes slot 3; `-1` nukes everyone. |
| `nukeall` | both | `nukeall` | Nukes all players. |
| `voteon` | both | `voteon changemap` | Lets players vote on this command (`vote ...`). For variables use the variable name: `voteon sv_gameType`. |
| `novote` | both | `novote` | Removes all votable commands. |
| `approveall` | both | `approveall 1` | Match mode: allow everyone to join team N (1 red, 0 blue), or both teams if no argument. |
| `approveplayer` | both | `approveplayer 1234 0` | Allows account user ID 1234 to join team 0. |
| `rejectplayer` | both | `rejectplayer 1234` | Removes user ID from approved lists (optionally only one team: `rejectplayer 1234 1`). |
| `rejectallplayers` | both | `rejectallplayers` | Clears all approvals and sends everyone to spectators. |
| `listapprovedplayers` | both | `listapprovedplayers` | Prints approved user IDs per team. |
| `addreporturl` | both | `addreporturl https://example.org/upload` | Adds a URL that match reports are uploaded to (`sv_report`). |
| `removereporturl` | both | `removereporturl 0` | Removes report URL number N. |
| `removeallreporturls` | both | `removeallreporturls` | Clears all report URLs. |
| `listreporturls` | both | `listreporturls` | Lists report URLs with their numbers. |
| `cachelist` | both | `cachelist 203.0` | Lists the last 50 players seen by this server (`[id] nick - IP`), optional filter on nick or IP. |
| `cacheban` | both | `cacheban <masterBanPass> 12 30` | Asks the master server to ban cached player 12 for 30 days (0 = forever). Signed with the master ban password (`BV2_MASTER_BAN_PASS`). Not echoed. |
| `cachebanned` | both | `cachebanned bob` | Lists master-server bans, optional nick filter. |
| `cacheunban` | both | `cacheunban <masterBanPass> 12` | Removes master ban ID 12. Not echoed. |
| `cachelistremote` | both | `cachelistremote 203.0.113.10 3333 bob` | Gets the player cache of another server through the master. |
| `cachebanremote` | both | `cachebanremote <masterBanPass> 4 0` | Master-bans entry 4 from the last `cachelistremote`. Also prints `Unkown command` (harmless bug). |
| `playerinfo` | dedicated | `playerinfo 3` | Weapon, secondary, team and position of slot 3. |
| `playersinfo` | dedicated | `playersinfo` | Same for all players. |
| `forceplayerspawn` | dedicated | `forceplayerspawn 3 10.5 20 2 1` | Respawns slot 3 at x y, optional primary and secondary weapon IDs. |
| `blueTeamScore` / `redTeamScore` | dedicated | `blueTeamScore 3` | CTF: credits a capture to that team and slot 3. |
| `blueFlagReturn` / `redFlagReturn` | dedicated | `redFlagReturn 3` | CTF: returns the flag, credited to slot 3. |
| `mapinfos` | dedicated | `mapinfos` | Current map name, size and DM spawn points. |
| `listbluespawns` / `listredspawns` | dedicated | `listbluespawns` | Team spawn point coordinates. |
| `restart` | both | `- restart` | Recreates the scene: on a server this shuts the game down. Avoid remotely on prod. |
| `quit` | both | `- quit` | Exits the process. Remotely this stops the server process (a Docker `restart: unless-stopped` policy brings it back). |

### B2) Server variables (`set sv_... <value>`)

Only on a server (or remote admin `- set ...`). Changes are pushed to clients. Launch scripts in `content/LaunchScript/` show typical values.

| Name | Example | Description |
|---|---|---|
| `sv_gameName` | `set sv_gameName "RV2 CTF"` | Server name in the browser. |
| `sv_gameType` | `set sv_gameType 2` | 0 Deathmatch, 1 Team DM, 2 CTF, 3 Champion. |
| `sv_subGameType` | `set sv_subGameType 1` | 0 normal, 1 Instagib, 2 random weapon. |
| `sv_serverType` | `set sv_serverType 1` | 0 normal, 1 Pro ruleset (pro weapon table). |
| `sv_spawnType` | `set sv_spawnType 1` | 0 normal, 1 ladder. |
| `sv_port` | `set sv_port 3334` | Game port (set before `dedicate`). |
| `sv_publicAddress` | `set sv_publicAddress 203.0.113.10` | IPv4 announced to the master. Empty: the address the master sees. |
| `sv_gamePublic` | `set sv_gamePublic false` | List on the master server. |
| `sv_password` | `set sv_password secret` | Join password, max 15 chars (truncated). Never echoed. |
| `sv_maxPlayer` | `set sv_maxPlayer 10` | Slots, 1 to 32. |
| `sv_maxPlayerInGame` | `set sv_maxPlayerInGame 8` | Max players on teams, rest must spectate (0 = no limit). |
| `sv_maxPing` | `set sv_maxPing 250` | Ping limit, 0 to 1000. |
| `sv_maxUploadRate` | `set sv_maxUploadRate 16` | Upload limit in KB/s (0 = unlimited). |
| `sv_minSendInterval` | `set sv_minSendInterval 2` | Minimum frames between position updates, 0 to 5. |
| `sv_gameTimeLimit` | `set sv_gameTimeLimit 900` | Match length in seconds (0 = unlimited); applies to the running game. |
| `sv_roundTimeLimit` | `set sv_roundTimeLimit 360` | Round length in seconds. |
| `sv_scoreLimit` / `sv_winLimit` | `set sv_winLimit 5` | Frag limit / round-win (caps) limit, 0 = unlimited. |
| `sv_timeToSpawn` | `set sv_timeToSpawn 3` | Respawn delay, 0 to 60 s. |
| `sv_forceRespawn` | `set sv_forceRespawn true` | Respawn automatically. |
| `sv_spawnImmunityTime` | `set sv_spawnImmunityTime 1.5` | Spawn protection, 0 to 3 s. |
| `sv_bombTime` | `set sv_bombTime 60` | Bomb timer (min 10). |
| `sv_friendlyFire` / `sv_reflectedDamage` | `set sv_friendlyFire true` | Team damage / reflect team damage to the shooter. |
| `sv_topView` | `set sv_topView false` | Strict top-down camera. |
| `sv_autoBalance` / `sv_autoBalanceTime` | `set sv_autoBalanceTime 2` | Team auto-balance and its delay (1 to 15). |
| `sv_enableVote` | `set sv_enableVote true` | Allow votes at all (also need `voteon`). |
| `sv_autoSpectateWhenIdle` / `sv_autoSpectateIdleMaxTime` | `set sv_autoSpectateIdleMaxTime 120` | Move idle players to spectators after N s (min 60). |
| `sv_sendJoinMessage` / `sv_joinMessage` | `set sv_joinMessage "Welcome!"` | Message shown to joining players. |
| `sv_showKills` / `sv_showEnemyTag` | `set sv_showEnemyTag true` | Log kills in the server console / show enemy names. |
| `sv_enableSMG` `sv_enableShotgun` `sv_enableSniper` `sv_enableDualMachineGun` `sv_enableChainGun` `sv_enableBazooka` `sv_enablePhotonRifle` `sv_enableFlameThrower` | `set sv_enableSniper false` | Allow each primary weapon. |
| `sv_enableSecondary` `sv_enableKnives` `sv_enableNuclear` `sv_enableShield` `sv_enableMinibot` `sv_enableMolotov` | `set sv_enableNuclear false` | Allow secondaries / molotov. |
| `sv_enableShotgunReload` / `sv_zookaRemoteDet` / `sv_explodingFT` / `sv_slideOnIce` | `set sv_slideOnIce true` | Weapon/physics rules. |
| `sv_smgDamage` `sv_dmgDamage` `sv_cgDamage` `sv_sniperDamage` `sv_shottyDamage` `sv_zookaDamage` `sv_ftDamage` | `set sv_sniperDamage 0.25` | Weapon damage (x100 = HP). |
| `sv_shottyRange` `sv_shottyDropRadius` `sv_ftMinRange` `sv_ftMaxRange` `sv_ftExpirationTimer` `sv_zookaRadius` | `set sv_zookaRadius 3` | Weapon ranges and radii. |
| `sv_nukeRadius` `sv_nukeTimer` `sv_nukeReload` | `set sv_nukeReload 20` | Nuke radius, fuse, reload. |
| `sv_photonType` `sv_photonDamageCoefficient` `sv_photonVerticalShift` `sv_photonHorizontalShift` `sv_photonDistMult` | `set sv_photonType 0` | Photon rifle damage curve (0 constant, 1 to 3 distance formulas). |
| `sv_minTilesPerBabo` / `sv_maxTilesPerBabo` | `set sv_maxTilesPerBabo 0` | Rotation skips maps whose area per player is outside this range (max 0 = no limit). |
| `sv_banDays` | `set sv_banDays 30` | Ban length in days, 0 forever (default 365). |
| `sv_validateWeapons` | `set sv_validateWeapons true` | Server checks fire rates. |
| `sv_antiCheat` / `sv_antiCheatWarn` / `sv_antiCheatKick` | `set sv_antiCheat 2` | 0 off, 1 log, 2 enforce; warn and kick score thresholds. |
| `sv_speedHackKick` | `set sv_speedHackKick 3` | Consecutive speed/frame-rate violations before kick. |
| `sv_beGoodServer` | `set sv_beGoodServer false` | `false` kicks non-snipers whose camera is zoomed out (cheat check). |
| `sv_report` / `sv_matchcode` / `sv_matchmode` | `set sv_report true` | Write a match report at round end and upload it to the report URLs. |
| `zsv_adminUser` / `zsv_adminPass` | `set zsv_adminUser admin` | Remote admin login. Password needs at least 32 chars; set via `bv2.cfg` or `BV2_ADMIN_PASS`, not in launch scripts. |
| `zsv_adminApiPort` / `zsv_adminApiBind` / `zsv_adminApiProxy` | `set zsv_adminApiPort 8081` | Admin HTTP API (behind the TLS proxy), 0 = off. |

`sv_baboStats` exists but nothing reads it.
