Battlefield 2142 Tweak Guide

[Page 8] Advanced Tweaking (Pt.2)



This section covers all the main Battlefield 2142 Console Commands and the known descriptions where possible. To access the BF2142 in-game console, press the '~' key (or the key above TAB) to open/close the console. To see the list of command categories, press the TAB key twice. To see particular sub-types, enter the start of the command press TAB twice. E.g. enter renderer, then press TAB twice to see all the renderer sub-class of commands. The following are working commands in BF2142 sorted by category:


Click to enlarge

Renderer Commands


renderer.drawHud [0,1] - Turns the Heads Up Display (HUD) on or off.

renderer.drawFps [0,1] - Displays the current frames per second (FPS) and the time in milliseconds between frames.


Game Commands


game.sayAll [string] - Says the specified text in global chat

game.sayTeam [number] [string] - Says the specified text in team chat

Game.crash - Crashes the game for test purposes

game.lockFps [framerate] - Caps the game's maximum framerate to specified number


Demo Commands


demo.recordDemo [demoname] - Starts recording current gameplay and saves the file as demoname.bf2142demo in your \Program Files\Electronic Arts\Battlefield 2142\mods\bf2142\Demosdirectory

demo.stopRecording - Stops current demo recording

demo.ShutdownDemo - Stops and closes down current demo run

demo.adjustDemoFov -


Localprofile Commands


localProfile.setName [name] - Shows/sets the Soldier name for your current account

localProfile.setGamespyNick [GameSpyNick] - Shows/sets the GameSpy login name for your account

localProfile.setEmail [email account] - Shows/sets the email account for the current account

localProfile.setEAOnlineMasterAccount [account name] - Shows/sets the main account login for BF2142

localProfile.setEAOnlineSubAccount [account name] - Shows/sets the main soldier login used for the main account

localProfile.setNumTimesLoggedIn [number] - Shows/sets the number of times the player has logged in with the current account

localProfile.setRank [0-?] - Current rank for the account

localProfile.setCareerPoints [0-?] - Current score for the account

localProfile.setLastBaseUpdate -

localProfile.setCurrentProfileLatestAwards -

localProfile.setCurrentProfileMuted -

localProfile.Save -

localProfile.addDemoBookmark [ ] - Adds a bookmark to a Battlerecorder demo

localProfile.setTotalPlayedTime [seconds] - Shows/sets the time the game has been played using the current account


Misc Commands


misc.getBuildNr - Reports the Build Number of the game.


Globalsettings Commands


globalSettings.setDefaultUser [number] - Sets the profile to use, first one being 0001, then 0002 etc.

globalSettings.setLastOnlineUser -

globalSettings.setEncryptedLogin -

globalSettings.setNamePrefix -


ReservedSlots Commands


reservedSlots.load -

reservedSlots.save -

reservedSlots.configFile -

reservedSlots.addNick -

reservedSlots.removeNick -

reservedSlots.clear -

reservedSlots.list -


Settingsmanager Commands


These commands set a 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.)


SettingsManager.stringSet -

SettingsManager.boolSet -

SettingsManager.IntSet -

SettingsManager.floatSet -

SettingsManager.u32Set -

SettingsManager.stringGet -

SettingsManager.boolGet -

SettingsManager.intGet -

SettingsManager.floatGet -

SettingsManager.U32Get -


Controlmap Commands


These settings should be used in the Controls.con file under your \Documents and Settings\[username]\My Documents\Battlefield 2142\Profiles\[profile]\ directory.


controlMap.create -

controlMap.setActive -

controlMap.addAxisToAxisMapping -

controlMap.addKeysToAxisMapping -

controlMap.addButtonToTriggerMapping -

controlMap.addKeyToTriggerMapping -

controlMap.setYawFactor -

controlMap.setPitchFactor -

controlMap.addAxisToTriggerMapping -

controlMap.InvertMouse [0,1] - Set to 1 for inverted mouse, 0 for default mouse

controlMap.mouseSensitivity [number] - Determines the sensitivity of the mouse

controlMap.keyboardSensitivity [number] - Deterimes the sensitivity of the keyboard


Maplist Commands


These commands are used to manage lists of maps by server administrators.


mapList.load - Makes the server reload the file _mapList.con

mapList.save - Saves the current map list on the server to the file _mapList.con

mapList.configFile [new location for file] - Used to specify the location of the _mapList.con file. Default is \My Documents\Battlefield 2142\ServerConfigs\

mapList.mapCount - Shows the total number of maps in the current map list

mapList.currentMap - Shows the map list ID number of the current map being played

mapList.clear - Clears the current map list

mapList.remove [map ID number] - Removes the specified map from the map list

mapList.list - Lists map ID numbers, map name, game mode and the number of players if specified.

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.


Admin Commands


These commands are only used by server administrators.


admin.runNextLevel - Forces the server to end the round and start the next map in the map list.

admin.currentLevel - Shows the map list ID number for the current map being played.

admin.nextLevel - Shows the map list ID number for the next map to be played.

admin.restartMap - 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.

admin.clearBanList - Clears all ban lists.

admin.listBannedAddresses - Displays a list of the currently banned IP addresses.

admin.listBannedKeys - 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.

admin.listPlayers - Lists the players connected to the server, showing their name, ID number and IP number.


Server Commands


Server commands are not covered here - they can be found in the ServerSettingsDesc.xls file in your \Program Files\Electronic Arts\Battlefield 2142\mods\bf2142\Settings\ directory.


Exit - Quits the game to desktop.



That covers the known working command list. Note that there are far fewer commands than in the Battlefield 2 Tweak Guide. Some of the BF2 commands no longer appear to work in BF2142, so they've been removed. Also keep in mind that you can apply some of these commands at startup by entering them in the General.con file - see the previous page for details. This list will of course be updated both when the final retail version of BF2142 comes out, and as I and others find more to add. If you have any more commands to add please Email Me and after testing them I will add them to this guide.



The next page concludes the guide with some neat tweaks you may find useful.