Console commands are commands that set functions or send commands to change options while during a game. To open the console hit Grave aka ”~”(key thats above Tab). This will will open or close the console, hitting Tab twice(2x) will bring up the main catagories. Each catagory has a sub-catagory of options. To access the sub catagory first type in the main command then hit Tab twice(2x) and it will print the sub catagory commands.
Below is a list of all known working commands. The practical functions of all the commands are not known as of yet, Some will be missing descriptions. As we discover the functions for each command descriptions will be added.
Below is an example.
Quits the game to desktop. ««Description
(This is an actual command)
Commands used by server administrators.
Lists the players connected to the server, showing their name, ID number and IP number.
Forces the server to end the round and start the next map in the map list.
Shows the map list ID number for the current map being played.
Shows the map list ID number for the next map to be played.
Restarts the current map.
admin.banPlayer [player ID number] [timeout]
Enter the player ID number you want to ban. Bans the player from the server by using their IP address. The timeout value controls the length of the ban e.g. perm for permanent ban, round to ban them for the rest of the round, and 180 is 180 seconds (3 minutes).
admin.banPlayerKey [player ID number] [timeout]
Enter the player ID you want to ban. Bans the player from the server by using their CD key hash.
admin.addAddressToBanList [IP address] [timeout]
Enter the IP number you want to ban.
admin.addKeyToBanList [CD key hash] [timeout]
Enter the CD key hash you want to ban.
admin.removeAddressFromBanList [IP address]
Enter the IP address to remove from the ban list.
admin.removeKeyFromBanList [CD key hash]
Enter the CD key hash you want to remove from the ban list.
Clears all ban lists.
Displays a list of the currently banned IP addresses.
Displays a list of the currently banned CD keys.
admin.kickPlayer [player ID number]
Enter the ID number of the player you want to kick.
Commands that control variables in the Controls.con file under your \Documents and Settings\[username]\My Documents\Battlefield 2 Demo\Profiles\[profile]\ directory.
controlMap.InvertMouse [0=no, 1=yes]
Set to 1 for inverted mouse, 0 for default mouse
Determines the sensitivity of the mouse
Deterimes the sensitivity of the keyboard
Commands that control the Battle Recorder.
Starts recording current gameplay and saves the file as demoname.bf2demo in your \Program Files\EA Games\Battlefield 2\mods\bf2\Demos directory
Stops current demo recording
Stops and closes down current demo run
Commands that control basic game functionality.
Says the specified text in global chat
game.sayTeam [number] [string]
Says the specified text in team chat
Caps the game's maximum framerate to specified number
game.allowToggleFullscreen [0=no, 1=yes]
If set to 1 allows toggling of fullscreen/windowed mode
Toggles between fullscreen and windowed mode
Toggles pausing the game.
Sets the profile to use, the first one being 0001, then 0002 etc.
Commands that adjust your current profile.
Shows/Sets the name for your current account
Shows/Sets the nickname for your current account
Shows/Sets the GameSpy login name for your account
localProfile.setEmail [email account]
Shows/Sets the email account for the current account
Shows/Sets the password for the current account
Shows/Sets the number of times the player has logged in with the current account
Shows/Sets the time the game has been played using the current account
localProfile.addDemoBookmark [ ]
Adds a bookmark to a Battlerecorder demo
Commands used by server admins to manage lists of maps.
Lists map ID numbers, map name, game mode and the number of players if specified.
mapList.configFile [new location for file]
Used to specify the location of the _mapList.con file. Default is \My Documents\Battlefield 2\ServerConfigs\
Makes the server reload _mapList.con
Saves the current map list on the server to the file _mapList.con
Shows the total number of maps in the current map list
Shows the map list ID number of the current map being played
Clears the current map list
mapList.remove [map ID number]
Removes the specified map from the map list
mapList.append [map name] [game mode] [number of players]
Add a new map to the end of the map list. You must specify the map name and game mode.
mapList.insert [map ID number] [map name] [game mode] [number of players]
Same as mapList.append command, but with this command you can specify at what map ID number to insert the new map into the list.
These Punk Buster commands can only be used while playing on a PB enabled server.
Captures and saves a screen shot based on the parameters found in the PB_SSOPTIONS setting listed below; described more fully in the Screen Capture Facility section
PB_Kick [slot #]
Requests that a specific player be removed from the game; this command is part of the PB Player Power facility
PB_Load [File Name]
Loads the specified PunkBuster config file which can contain commands and/or setting changes
Displays your PunkBuster GUID; The GUID is used by PunkBuster to identify players and it is based on the CDKey entered into the game
Requests that the connected PunkBuster Server display a list of players and their current status to the console
Requests that the connected PunkBuster Server display a list of players and their current PB Player Power status to the console
Sets and/or displays the parameters used for taking local PunkBuster Screenshots; used by the Screen Capture Facility
Displays the currently running version of the PunkBuster Client software
This command adds the PBWEB functionality directly into the PB Client - PBWEB should no longer be required to manually update PB Clients. PunkBuster will automatically issue this command when necessary to auto-update during gameplay before going into distress mode
Writes the current values of the PunkBuster settings to the local hard drive (creating or overwriting files called pbcl.cfg and pbcllog.cfg) in such a way that they will be loaded automatically the next time PunkBuster starts; if you make changes to your PunkBuster settings and you want the changes to be permanent, then enter this command after making the changes
Holds the name of a game script file that is to be executed each time a server is joined; This is useful if you need to reset game settings each time you join a server
PB_Lan [0=no, 1=yes]
Defaults to 0; when set to 1, PB will behave as though it has no Internet access
PB_LogAddr [Address / Internet Hostname]
Holds the address of the machine to which remote logging is sent (default is empty meaning the feature is not used)
PB_LogMD5Tool [0=no, 1=yes]
Setting defaults to 0; setting to 1 will cause PB to log all MD5Tool file check query replies sent to connected PB Servers during gameplay
PB_LogPort [Port #]
Holds the listen port of the machine to which remote logging is sent (default is 0 meaning the feature is not used)
Holds the password required to send logging output to a listening remote logging machine
PB_LogToFile [0=no, 1=yes]
When set to 1, PunkBuster will log activity to the pbcl.log file; the default is 0 which meansonly errors are logged
Holds the username required to send logging output to a listening remote logging machine
PB_MsgPrefix [New Prefix]
Holds the text that PunkBuster displays in front of every output line displayed; the default is “PunkBuster Client”.
PB_Security [0=no, 1=yes]
When set to 0, PunkBuster will accept all “update” files without verifying that they are authentic; the default is 1 which should not normally be changed except for LAN environments where there is no Internet Access and/or you fully trust the Servers you are connecting to
Holds the period of time (milliseconds) that PunkBuster “sleeps” between processing cycles; the default is 60; lower numbers will cause PunkBuster to process events more times each second which also has the effect of increasing the bandwidth used by PunkBuster; Players with a modem connection will probably want to set this as high as possible
PB_SsLog [0=no, 1=yes]
When set to 1 (which is the default), PunkBuster will create an entry in the pbsslog.htm log file every time a PunkBuster Server requests a screenshot to be taken and delivered; this log file is designed to be viewed with a web browser and contains information about the size of the image, when it was taken, and also a digital signature of the image itself
PB_SsSave [0=no, 1=yes]
When set to 1 (0 is the default), PunkBuster will save all Server-requested Screenshots to the local hard drive so that Players can see the actual screenshots that have been delivered to Game Servers that they were connected to; if this setting and the PB_SsLog setting are both set to 1, then the pbsslog.htm log file will automatically have links created for local viewing directly from the log file
PB_System [0=no, 1=yes]
PB can conflict with other software on some systems due to vigorous memory scanning; Changing this setting may reduce or eliminate conflicts if you have problems on your system; this setting can only be changed before connecting to a server by editing the pbsys.cfg file in your PB folder. This file is created the first time you run PB.
These commands used by server administrators to setup remote console access to the server, on the server create a new plain text document in \admin\ called default.cfg and enter the following text into the new file:
Save the file, and start the server.
rcon login [YourPassword]
Use this command to login to the server.
This command lists all the users connected to the server. Very similar to admin.listPlayers
rcon exec [command name]
Replace with a console command you would like to execute on the server. For example: rcon exec admin.kickPlayer 3
Commands that render graphicial displays.
renderer.drawHud [0=no, 1=yes]
Turns the Heads Up Display (HUD) on or off.
renderer.drawConsole [0=no, 1=yes]
Turns off access to the in-game console if set to 0.
renderer.drawFps [0=no, 1=yes]
Displays the current frames per second (FPS) / time in milliseconds between frames.
Commands that adjust range of variables. E.g. SettingsManager.boolSet GSUseObjectCache 1. The command used must match the type of variable (e.g. .boolset for Boolean variables, .IntSet for variables requiring integer input, etc.)
Commands used to adjust server variables in the Serversettings.con file under your \Documents and Settings\[username]\My Documents\Battlefield 2\Profiles\[profile]\ directory.
sv.allowNATNegotiation [0=no, 1=yes]
sv.timeBeforeRestarting [0=no, 1=yes]
sv.autoBalanceTeam [0=no, 1=yes]
sv.teamRatioPercent [0=no, 1=yes]
sv.autoRecord [0=no, 1=yes]
sv.useGlobalRank [0=no, 1=yes]
sv.useGlobalUnlocks [0=no, 1=yes]