Console
From SRB2 Wiki
SRB2's console allows the user to control many of the game's options and to perform certain actions. Sometimes the same effects can be achieved using the menus, but the console is the only way of utilizing many features.
The console is accessed by pressing the key defined in the controls, which by default is ~ (tilde) on US keyboards and ` (backquote) on UK keyboards. This displays a prompt at which the user is expected to enter a command. To close the console, press the same key that was used to open it.
Some console commands and variables have options for the second player in splitscreen mode. Those will be shown with a forward slash. For instance, with "CHASECAM/CHASECAM2 <booleans>", CHASECAM toggles the first player's camera, and CHASECAM2 toggles the second player's camera.
Pressing the tab key when a command or var name is partly entered will auto-complete the command, pressing the tab key again will go to the next one.
Syntax
SRB2's console can be hard to figure out for new users, so here is a small guide on how to use it.
Special Characters
Semicolon (;)
This character will separate commands.
For example, COLOR PURPLE; SKIN KNUCKLES will set your color to purple, then change your skin to Knuckles.
Quote (")
When a single string parameter contains a space, it must be enclosed in double quotes; hence BIND 1 "SAY HI" will work, but BIND 1 SAY HI will not.
Single string parameters containing certain characters must also be enclosed in double quotes if other characters are to be typed after them.
Here is a list of those characters (characters separated by spaces):
{ } ( ) ' :
An example of a case where this would be necessary is if one wanted to in the console connect to a server using a specific (non-default) port.
Using CONNECT "192.168.1.5:5028" would work, but CONNECT 192.168.1.5:5028 would not work.
Script files
Main article: Script
A script file is a file that can be used to input things into the console without having to type them every time. You can make one by creating a new text file and inputting commands in it.
Commands always be written in lowercase (except for button names like KEY93), and they can be separated either by lines or by semicolons.
Example of tunebinds.txt:
bind 1 "tunes 45" bind 2 "tunes 29" bind 3 "tunes 93" bind 4 "tunes 102"
To use a script file, just type EXEC <script filename> in the console.
For the above example, typing EXEC TUNEBINDS.TXT would work.
autoexec.cfg
Main article: Script > autoexec.cfg
autoexec.cfg is a special type of script file that will allow you to run a series of commands on startup. It goes in the same directory as where config.cfg exists, but it is not there by default: you have to create it. This can allow for a default name, color, and skin for netgames, as well as other things such as BINDs and ALIASes.
adedserv.cfg
adedserv.cfg is a script file ran when starting a dedicated server.
Like autoexec.cfg, it runs commands such as BIND and ALIAS.
Commands
ADDFILE <filename>
Adds a WAD, SOC or other file to the game.
The file's name must have its extension. For instance: ADDFILE TEST.WAD; ADDFILE JUMP.SOC.
After this command is input, the game immediately gets modified. Note that a WAD with a space in its file name can either be added with quotes, like ADDFILE "TEST SPACE.WAD", or be entered using DOS naming format.
ALIAS
Creates an alias to execute multiple console commands. For instance, ALIAS SONIC "SKIN SONIC; COLOR BLUE" would make the console command SONIC turn you into a blue Sonic. Useful for scripting, as well as making autoexec.cfg files.
BAN <playername/node>
Kicks and bans a player. Once a player is banned, they can no longer join the server unless CLEARBANS is used. (Server or Game Admin only)
BIND <key> <command>
Makes a keystroke perform a console command. For instance, BIND \ SCREENSHOT would take a screenshot every time you press the \ key on the keyboard.
CHANGECONFIG <filename>
Saves the current config and loads another.
CECHO <message>
Displays <message> in the center of the screen. Backslashes indicate line breaks.
CLEARBANS
Clears all bans. Users that were banned will be able to join again.
CLEARSCORES
Resets each player's score to 0. This even works in single-player games.
CLS
Clears the console buffer.
CONNECT <ip>
Connects to the specified IP address. If no IP is specified, it will search on the LAN for a game. Note that to connect on a specific port, one must use this format: CONNECT "<ip>:<port>".
DEVMODE
Toggles development mode on/off.
DISPLAYPLAYER
Shows the number of the current player being displayed.
ECHO <message>
Echoes whatever you type in the console. Useful for scripting.
EXEC <filename>
Executes a script file.
EXITGAME
Exits the current game.
EXITLEVEL
Exits the current level.
GAMETYPE
Shows the current game type as one of the following numbers:
| Number | Game type |
|---|---|
| 0 | Single Player / Co-op |
| 1 | Match / Team Match |
| 2 | Race / Time-only Race |
| 3 | Tag |
| 4 | Capture the Flag |
GETPLAYERNUM
Lists all of the players in the game, their number in the array, and their node numbers.
GOD
Enables/disables Sissy Mode, which makes the player pretty much totally invincible to everything, even bottomless pits and crushers. Activates the cheat protection. Enemies that try to hurt the player will instead go right through the player. A countdown will still begin if you're underwater, but you don't die when it ends. Disabled in Multiplayer.
GR_STATS
Shows OpenGL statistics.
HELP <command>
If used without an argument, will list all commands. If provided with the name of a command, more detailed help for that command will be provided, if available.
ISGAMEMODIFIED
Returns TRUE if the game is modified or if the cheat protection has been activated.
JUMPTOAXIS <axis number>
Teleports NiGHTS Super Sonic to the specified Axis. DEVMODE must be enabled. Note that using this command can cause SIGSEGVs.
KICK <playername/node>
Kicks a player out of a netgame. (Server or Game Admin only)
LISTSERV
Retrieves and displays a list of hosted games from the Master Server.
LISTWAD
Displays a list of WADs used in a netgame.
LOAD <slot>
Loads a saved game.
LOADCONFIG <filename>
Loads a new config without saving.
LOGIN <password>
Attempts to login as a netgame administrator. The password is set by the host.
MAP MAP<value>
Changes the level. For instance, to warp to Greenflower Zone Act 1, type MAP MAP01. To know which map number a level is, get a WAD editor, look in MAINCFG, find the map name, and look at its corresponding level number. If the level number (xx) is 99 or less, the map is MAPxx. If the level is greater than 100, consult the List of Extended Map Numbers.
Alternatively, for official SRB2 maps, consult the list of levels.
The MAP command takes three (or four, if DEVMODE is enabled) optional parameters:
-GAMETYPE
Specifies the game mode to use with the new map, e.g., MAP MAP01 -GAMETYPE TAG.
-SKILL
Specifies the difficulty level of the game, 1 = easy; 2 = normal; 3 = hard; 4 = very hard; 5 = ultimate, e.g., MAP MAP01 -SKILL 1.
-FORCE
Forces the game to warp to the map, even if it does not support the current gametype, e.g. MAP MAP01 -FORCE when not in Single-player or Co-op mode.
-NORESETPLAYERS
Makes the game warp to the map without resetting player data like lives, score, etc.; as if the player had advanced to the map normally. This only works if DEVMODE is enabled.
MEMFREE
Displays memory usage statistics.
MOTD <message>
Sets a 'Message of the day' that is displayed in the center of the screen of the player when he joins a server. The 'Message of the day' is displayed like in CECHO command. Backslashes indicate line breaks. (Server or Game Admin only)
NOCLIP
Increases gravity and turns off clipping. This allows the player to go through the thok barrier as well as immediately move on top of raised ground no matter how high the sector is. Also, Things cannot be collected. Activates the cheat protection. This is disabled in Multiplayer.
NODES
Lists all of the players in the game and their player numbers.
ORDERPIZZA
A command that simply prints a line of text to the console saying "<name> has ordered a pizza." However, it will not work unless you give it an address, a topping, and a size.
Usage:
ORDERPIZZA -SIZE <anything you want> -ADDRESS <anything you want> -TOPPING <anything you want>
Note: Keying ORDERPIZZA 1 2 3 4 5 or ORDERPIZZA 1 2 3 4 5 6 in the console will have the same effect because none of the parameters mean anything. Only the number of parameters is checked.
PAUSE
Pauses the game. Reuse it to unpause. (It also works if you press the Pause/Break button on your keyboard)
PLAYDEMO <filename>
Plays back a recorded demo.
PLAYINTRO
Plays the opening intro. Due to a bug with this command, the music that was playing when you use this command will momentarily keep playing.
PING
Sends a command that tells you a user's PING. This command does not work properly in v1.09.4.
QUIT
Exits the game immediately, skipping all menus and displays.
RESETCAMERA
Does the exact same thing as if you had pressed the "reset camera" key.
RESETEMERALDS
Sets your emerald count back to 0.
RTELEPORT -x <X distance> -y <Y distance> -z <Z distance>
Teleports you relative to your current location. DEVMODE must be enabled.
SAVE <slot> <description>
Saves your game.
SAVECONFIG <filename>
Saves the current configuration.
SAY <message>
Sends a message to everyone.
SAYTEAM <message>
Sends a message to your team. Only works if the gametype is Team Match or CTF.
SAYTO <playername/node> <message>
Sends a message to a specific player. If the player has parentheses in his/her name, the player name must be enclosed in quotes.
SCREENSHOT
Takes a screenshot of the display. Note that if you don't bind this, it will show the console in the screenshot.
SETCONTROL/SETCONTROL2
Manually changes the controls of 1P and 2P. See config.cfg for an example.
SHOWMAP
Shows what map you're currently on.
STARTMOVIE
Tells the game to take a screenshot every frame, making there be 35 screenshots every second.
STOPDEMO
Stops the currently running demo.
STOPMOVIE
Tells the game to stop the function of STARTMOVIE. Tells the filename of the last screenshot as well.
TELEPORT -x <X location> -y <Y location> -z <Z location>
Teleports you directly to the coordinates you specified. DEVMODE must be enabled.
TOGGLE <command>
Allows you to toggle certain console commands on and off. TOGGLE COLOR allows you to cycle through colors. TOGGLE SKIN currently doesn't work.
TIMEDEMO
Plays back a demo at the highest possible speed. Useful for benchmarking.
TUNES <slot>
Changes the song that's playing until the level ends, changes, or your character dies.
VERIFY <playername/node>
Gives a player administrative privileges in a netgame.
VERSION
Tells you the version of SRB2 you are using.
WAIT <tics>
Waits a certain number of game tics before executing the next command. Useful for scripting.
WRITETHINGS
Use this after using OBJECTPLACE mode to place new objects. This will save the objects to NEWTHINGS.lmp in your SRB2 folder. Then, using XWE or a similar lump editor, you may rename NEWTHINGS.lmp to THINGS.lmp, and replace the existing THINGS lump for the level whose objects you have modified. Remember, you can't edit srb2.srb, so to create new things for an official level, you'll have to copy the map and its nodes to a new WAD, then replace the THINGS lump.
Variables
Variables are unlike commands in that instead of directly performing the action, you change the variable, which in turn would make a difference in the game. The command starts the line, then a value follows to set it. A value can either be boolean, an integer, a decimal number, or something completely different, depending on what the command calls for. Note that some of these commands have equivalents in the game's "Options" menu.
A boolean variable is one which can either be on or off. For instance, CHASECAM ON turns on the camera, and CHASECAM OFF turns it off. You can also use 1 instead of ON, and 0 instead of OFF. Some boolean variables still use YES and NO, so try that if it doesn't work.
An integer is a number with nothing after the decimal point.
A decimal number is a number that may or may not have something after the decimal point. It should be noted that the GRAVITY variable is the only one that uses this.
Console variables marked like this CONSVAR/CONSVAR2 are used for split-screen, e.g., CAM_DIST/CAM2_DIST. CAM_DIST is for the camera distance of player 1. CAM2_DIST is for the camera distance of player 2.
1UP <availability>
Sets the availability of Extra Life Monitors will be in Race mode. (Server or Game Admin only)
ADVANCEMAP <integer>
Sets whether or not to advance to the next map in the cycle when a round finishes in any mode except Co-op or Single Player. 0 = Off (repeats the same map), 1 = Next Map in Cycle, 2 = Random Map.
ALLOWAUTOAIM <boolean>
Allows players to use autoaim. (Server or Game Admin only)
ALLOWEXITLEVEL <boolean>
Allows players to exit the level. (Server or Game Admin only)
ALLOWJOIN <boolean>
Allows other players to join a netgame. (Server or Game Admin only)
ALLOWMLOOK <boolean>
Allow players to mouselook in a netgame. (Server or Game Admin only)
ALLOWTEAMCHANGE <boolean>
Allows players to change teams in Capture the Flag. (Server or Game Admin only)
ALWAYSMLOOK <boolean>
If enabled, forces mouselook to be enabled without pressing the associated key.
ANALOG/ANALOG2 <boolean>
Allows you to turn Analog Control on or off. Disabled in netgames.
BOMBSHIELD <availability>
Sets the availability of Armageddon Shields in a game. (Server or Game Admin only)
CAM_DIST/CAM2_DIST <integer>
Changes the distance of the camera. You cannot use a negative value to zoom in. Default is 128 for normal mode; 320 when playing as NiGHTS Super Sonic.
CAM_HEIGHT/CAM2_HEIGHT <integer>
Changes the height of the camera.
CAM_ROTATE/CAM2_ROTATE <integer>
Changes the angle of the camera's rotation.
CAM_ROTSPEED/CAM2_ROTSPEED <integer>
Changes the rotation speed of the camera.
CAM_SPEED/CAM2_SPEED <integer>
Changes the speed of the camera.
CAM_STILL/CAM2_STILL <boolean>
Forces the camera angle to freeze in place.
CECHODURATION <integer>
Sets the amount of time a CECHO message will remain on the screen. To make it stay on infinitely, use -1.
CECHOFLAGS <integer>
If set to 1048576, the CECHO message color is Yellow. If set to 4194304, the CECHO message is Translucent. For Normal CECHO set CECHOFLAGS to 0. Certain values are invalid and will cause a SIGSEGV.
CHANGETEAM/CHANGETEAM2 <red/blue>
Changes the current CTF team you are on. Options are RED and BLUE.
CHASECAM/CHASECAM2 <boolean>
Turns the camera on and off.
COLOR/COLOR2 <colors>
Changes your player's color. Only works in multiplayer, while standing still.
CON_BACKCOLOR <color>
Changes the color of the console. Colors include red, orange, blue, gray, green, and white.
CON_BACKPIC <translucent/picture>
Whether to use console background picture (CONSBACK), or translucent mode
CON_HEIGHT <integer>
Changes the height of the console. The value used is a percentage of the screen.
CON_HUDTIME <integer>
Sets the display time in the console.
CON_SPEED <integer>
Changes the rate that the console moves at when being opened or closed.
COUNTDOWNTIME <integer>
Sets the countdown time in a game. (Server or Game Admin only)
EGGMANTV <availability>
Sets the availability of Eggman Monitors in a game. (Server or Game Admin only)
FLAGTIME <value>
Sets how long a flag will stay in place. (Server or Game Admin only)
FORCESKIN <boolean>
Forces all players in the game to use the character that the server is using. (Server or Game Admin only)
FIRESHIELD <availability>
Sets the availability of Inferno Shields in a netgame. (Server or Game Admin only)
GAMMA <integer>
Changes the gamma level.
GRAVITY <number>
Changes the gravity. (Single Player/Server or Game Admin only)
GR_FOV <number>
Messes with the field of view. Disabled in multiplayer. Only works in OpenGL.
GR_MD2 <boolean>
When this variable is set to TRUE or 1, it will load up any MD2 models available. Buggy in 1.09.2, but fixed in 1.09.3. This variable is not saved when you quit; to set it as a "default", use autoexec.cfg. Only works in OpenGL.
GR_FILTERMODE <number>
Will change the mode used for filtering textures. This variable is not saved when you quit, to set it as a "default", use autoexec.cfg. Only works in OpenGL.
INTERNETSERVER <boolean>
Enables or disables advertising of the game on the Master Server.
INTTIME <integer>
Changes the intermission time between multiplayer levels. (Server or Game Admin only)
INVINCIBILITY <availability>
Sets the availability of Invincibility Monitors in a game. (Server or Game Admin only)
JUMPSHIELD <availability>
Sets the availability of Whirlwind Shields in a game. (Server or Game Admin only)
KILLINGDEAD <boolean>
If enabled, hitting an enemy or popping a monitor causes damage to yourself 75% of the time. This simulates a glitch from the original Sonic Robo Blast.
LIGHTDASH <boolean>
Allows light dash in a netgame. (Server or Game Admin only)
MAXPLAYERS <number>
Sets the maximum number of players allowed to join a netgame. (Server or Game Admin only)
MAXSEND <number>
Sets the maximum filesize (in KB) a loaded WAD or file can be for a player to download it. Players downloading large WADs from the server will cause visible and sometimes disrupting lag in the netgame.
MLOOKSENS <integer>
Alters the sensitivity of mouse movement to look up and down.
MOUSESENS <integer>
Alters the sensitivity of mouse movement to turn left and right.
MUSICVOLUME <integer>
Changes the music volume.
MUTE <boolean>
Allows/disallows chat in a netgame. Server or Game Admin only.
NAME/NAME2 <name>
Changes your nickname for multiplayer. It may not start with a numeral.
NETSTAT <boolean>
Shows network statistics. Can be used in Single-Player. GAMEMISS estimates the amount of lag a map has. With one person, it only estimates framerate lag for that specific computer.
NUMLAPS <integer>
Sets the number of laps on a Circuit mode track.
NODOWNLOADING <boolean>
Allows/disallows WAD downloading in a netgame.
NOCLIP <boolean>
Allows the player to walk through walls, you can't collect rings when it's on.
OBJECTPLACE <boolean>
Turns object placement mode on or off. It is recommended that it is not enabled and disabled often in one session of SRB2.
PASSWORD <value>
Changes the server password to the given value. Game Server only.
PAUSEPERMISSION <boolean>
If set to 1, all clients can pause a netgame; otherwise, only the server can pause the game.
PLAYDEMOSPEED <integer>
Changes the speed at which a demo is played back.
POINTLIMIT <integer>
Sets a score limit for multiplayer levels. The command POINTLIMIT -1 disables the score limit if enabled. (Server or Game Admin only)
PRECIPDIST <integer>
Sets from how far away precipitation is visible.
PRECACHESOUND <boolean>
Tells the game to precache sound or not before playing.
RACETYPE <type>
Sets the type of Race mode in a netgame. FULL designates a full Race, whereas TIME_ONLY designates a time-only Race. (Server or Game Admin only)
RANDOMTV <boolean>
Makes all monitors random monitors in race mode.
REALNAMES <boolean>
Shows the real names of Sonic Team Junior's staff in the credits, instead of their online aliases.
RESETMUSIC <boolean>
Resets the in-game music.
RESPAWNITEMTIME <integer>
Sets how long, in seconds, an item will respawn in Match, CTF, or Race mode. If set to 0, the item will respawn on the next tic.
RINGSHIELD <availability>
Sets the availability of Attraction Shields in a game. (Server or Game Admin only)
RINGSLINGER <boolean>
Allows the player to throw rings at a enemy. (Single Player/Server or Game Admin only)
SERVERCHANGETEAM <playername> <red/blue>
Changes the current CTF team any player is on. (Server or Game Admin Only)
SERVERNAME <name>
Changes the default name of a server to be hosted. The server name can not be changed in the middle of a game.
SHOWMESSAGES <boolean>
Suppresses or enables some screen messages.
SILVERRING <availability>
Sets the availability of 25 Ring Boxes in a game. (Server or Game Admin only)
SKIN/SKIN2 <name>
Changes your player's character. Only works in multiplayer, while standing still.
SKIPMAPCHECK <boolean>
If enabled, the game will not check to see if a map supports the current gametype before warping to it.
SKYNUM <integer>
Changes the sky. Can only be used when DEVMODE is on.
SND_CHANNELS <integer>
Sets the number of sound channels.
SONICCD <boolean>
Creates GFZ flowers where enemies have been destroyed, Sonic CD style.
SOUNDVOLUME <integer>
Changes the sound volume.
SPLITSCREEN <boolean>
Toggles 1P/2P mode.
STARTLIVES <integer>
Sets how many lives you want. (Single Player/Server or Game Admin only)
STARTRINGS <integer>
Sets how many rings you want. (Single Player/Server or Game Admin only)
STEREOREVERSE <boolean>
Toggles reverse stereo mode.
SUPERRING <availability>
Sets the availability of 10 Ring Boxes in a game. (Server or Game Admin only)
SUPERSNEAKERS <availability>
Sets the availability of Super Sneakers Monitors in a game. (Server or Game Admin only)
SURROUND <boolean>
Toggles DirectSound3D acceleration.
TAILSPICKUP <boolean>
Allows flying characters to pick up another character. If it is off, players become solid and can stand on top of one another to form a ladder.
Note: In SRB2JTE you can carry any number of players.
TEAMDAMAGE <boolean>
Enables or disables friendly fire among teammates.
TEAMPLAY <boolean>
Enables or disables teams on game modes that normally do not use teams.
TELEPORTERS <availability>
Sets the availability of Teleport Monitors in a game. (Server or Game Admin only)
TIMEATTACKED <boolean>
Toggles the ability to Link Rings for non-NiGHTS maps. Rings will be attracted to you like a magnet as well.
TIMELIMIT <integer>
Sets a time limit, in minutes, for multiplayer levels. The command TIMELIMIT 0 will disable the time limit. (Server or Game Admin only)
TIMETIC <boolean>
Makes the in-game timer count the number of tics (frames) instead of the number of seconds.
TRANSLUCENCY <boolean>
Turns sprite translucency on or off.
VID_WAIT <boolean>
Enables/Disables V-Sync.
VID_TICRATE <boolean>
Shows game speed stats on a graph.
VIEWHEIGHT <value>
Changes the vertical offset of viewing. Ranges from 15 to 56.
VIEWSIZE <value>
Changes how much of the screen is used for showing the game. Using a VIEWSIZE other than the default (11) will either remove the HUD or shrink the screen to be surrounded by a border. Deprecated in ShufflarB2 and replaced by REMOVEHUD.
WATERSHIELD <availability>
Sets the availability of Liquid Shields in a game. (Server or Game Admin only)

