Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Battlefield - Console Commands

  • 06-04-2003 5:21pm
    #1
    Registered Users, Registered Users 2 Posts: 14,761 ✭✭✭✭


    Here is your complete list of console commands for Battlefield. Click on "`" to bring down the console.

    Console
    Console.showfps 1/0 (When enabled shows your current Frames Per Second (FPS) in the top left corner of the screen)
    Console.showstats 1/0 (When enabled shows a range of system performance information)

    Game
    game.sayTeam (Team chat)
    game.sayAll (Global chat)
    game.listPlayers (Lists players and their id numbers)
    game.listMaps (Lists the maps and number assignments in server rotation)
    game.voteMap # (Votes to change the map to the number specified)
    game.TKPunish (Punish a TK - works only in Forgive Mode)
    game.TKForgive (Forgive a TK - works only in Punish Mode)
    game.addPlayerToBuddyList [ID] (Add a user to the buddy list)
    game.removePlayerFromBuddyList [ID] (Removes a user from the buddy list)
    game.buddyList (Prints a list of your current buddies)
    game.voteKickPlayer [ID] (Calls a vote to kick a player. To vote enter this command with the same number)
    game.voteKickTeamPlayer [ID] (Same as above but only teammates are allowed to vote)
    game.changePlayerName [Name] (Renames your player in-game)
    game.dumpNetworkDebugStats 1/0
    game.debugCallBackDisabled 1/0 (Allows use of callbacks to get game info)
    game.useHUD 1/0 (Toggles the the Head Up Display (HUD))
    game.setShadows 1/0 (Toggles shadows on/off)
    game.setEnvironmentMapping 1/0 (Toggles Environment Mapping on/off)
    game.setToolTip 1/0 (Toggles tool tips on/off)
    game.setRadioToolTip 1/0 (Toggles Radio button text on/off)
    game.setCrossHairColor # # # (Adjusts crosshair color based on Red Green & Blue values entered)
    game.setStaticMiniMap 1/0 (When set to 0 the minimap rotates as you rotate )
    game.setMiniMapTransparency # (The higher the number the more transparent)
    game.RadioToolTipColor # # # (Adjusts the color of the Radio button text (if on))
    game.getIp (Displays IP in the message window)
    game.getLevelName (Displays the name of the level)
    game.enableFreeCamera 1/0 (Enable/disable the ability to look around while waiting to spawn)
    game.killPlayer [ID] (Kills player with the id number - Admin only)
    game.disconnect (Disconnects from the server)
    game.suicide (Kills your character)
    game.setCommonMouseSensitivity # (Sets Common mouse sensitivity)

    Air Controls
    game.setAirKeyboardSensitivity # (Sets keyboard sensitivity when flying planes)
    game.setAirMouseSensitivity # (Sets mouse sensitivity when flying planes)
    game.setAirMouseInvert 1/0 (1 for inverted, 0 for default (non-inverted) when flying planes)

    Infantry Controls
    game.setInfMouseSensitivity # (Sets mouse sensitivity as a soldier)
    game.setInfMouseInvert 1/0 (1 for inverted, 0 for default (non-inverted) when a soldier)

    Vehicle Controls
    game.setLandSeaKeyboardSensitivity # (Sets keyboard sensitivity when using a vehicle)
    game.setLandSeaMouseSensitivity # (Sets mouse sensitivity when using a vehicle)
    game.setLandSeaMouseInvert 1/0 (1 for inverted, 0 for default (non-inverted) when using a vehicle)

    The Following Game Settings are explained in the In-Game Settings section above and perform the same function. Note they cannot be changed in-game in the console. You can edit/insert these settings in the relevant .con files.

    game.setConnection 1-4 (Sets the type of connection)
    game.setDisableSound 1/0 (Toggles sound on/off)
    game.setChannels # (Sets number of sound channels)
    game.setMasterVolume # (Sets master volume level)
    game.setMenuMusicVolume # (Sets menu volume level)
    game.setMusicOnOff 1/0 (Toggles music on/off)
    game.setLocalizedDialog 0 (Toggles localized dialog on/off)
    game.setQuality # (Sets sound quality)
    game.setSoundDetail
    game.setHardware #
    game.setGameDisplayMode [Width] [Height] [Color Depth] [Refresh Rate] (e.g. 1280 960 32 85 = 1280x960, 32-bit color @ 85Hz )
    game.setDetailTexture #
    game.setGraphicsQuality #
    game.setLightmaps 1/0
    game.setRenderWhenSpawnMenu 1
    game.setMenuViewdistance #
    game.setEffectsQuality #
    game.setPerformance #

    Chat
    chat.setChatMessageSize # (No. of lines for chat messages display)
    chat.seGameInfoMessageSize # (No. of lines for game info display)
    chat.setKillMessageSize # (No. of lines for kills info display)
    chat.setChatHistory # (Sets the no of lines for all 3 message displays at once)
    chat.chatInfo (Returns status on how many lines each message window in using)
    chat.OldChatListStyle 1/0 (If set to 1, the old v1.2 message window model is used)
    chat.OldChatListHistory # (No. of rows used if the old message window model is used)
    chat.ignoreRadioText 1/0 (If 1, No radio text is printed)
    chat.ignoreRadioAudio 1/0 (If 1, No radio sounds are played)
    chat.setIgnoreRadioAudioAndText 1/0 (If 1, both radio sounds and radio text is supressed)
    chat.getIgnoreRadioAudioAndText (Prints status for these settings)
    chat.addToIgnoreList [ID] (Ignores a specific user's chatting)
    chat.removeFromIgnoreList [ID] (Stop ignoring a specific user's chatting)
    chat.ignoreList (Returns the list of ignored players)

    Renderer
    renderer.allowAllRefreshRates 1/0 (Similar to setting in Videodefault.con – see above)
    renderer.extrapolateFrame 1/0
    renderer.mipMapBias # (Determines how clear the textures appear. The lower the value, the sharper the textures ranging from -8 to 14.)
    renderer.setVSyncEnabled 1/0 1/0 (Enables/Disables Vertical Sync. Both boolean values must match for this setting to work, e.g. 0 0 (off) or 1 1 (on))
    renderer.getVSyncEnabled (Displays whether Vsync is enabled (1) or disabled (0))
    renderer.lockfps # (Attempts to keep FPS at number entered)
    renderer.vertexFogEnable 1/0
    renderer.wireframe 1/0
    renderer.forceSWSkinning 1/0

    Sound
    The Following settings can't be changed in-game. You can edit/insert these settings in the Sound.con file.

    Sound.setDopplerFactor 1/0 (Turns on/off 3D Audio effects)
    Sound.setRolloffFactor 1/0 (As above)
    Sound.setDistanceFactor 1/0 (As above)
    Sound.setPitchChangeRate #
    Sound.showSoundInfo 1/0 (Toggles information display about the sound performance)
    Sound.drawSoundObjects 1/0 (As above)

    Admin
    Note: If logged in as a remote admin, to run the following commands you need to use the admin.execremotecommand "command" console function to execute each command successfully.

    admin.getRemoteConsoleEnabled (Displays whether remote console is enabled)
    admin.enableRemoteConsole [username] [password] # (Enables remote access to a BF1942 Server)
    admin.disableRemoteConsole (Disables remote access to a BF1942 Server)
    admin.enableRemoteAdmin [password] (Allows a Remote Admin to log into a server)
    admin.disableRemoteAdmin (Disables a Remote Admin logging into a server)
    admin.execremotecommand "command" (Executes a command (such as those listed here) from remote Admin)
    admin.maxAllowedConnectionType [type] (Sets the highest connection type (1-4) allowed to join the server)
    admin.voteMapMajority # (Percentage of voters required to change a Map (0 – 1.0))
    admin.voteKickPlayerMajority (As above for Votekicks)
    admin.voteKickTeamPlayerMajority (As above for Team Votekicks)
    admin.enableMapVote 1/0 (Enables/Disables Map voting)
    admin.enableKickPlayerVote 1/0 (As above for Votekicks)
    admin.enableKickTeamPlayerVote 1/0 (As above for Team Votekicks)
    admin.votingTime # (Number of seconds during which players can vote)
    admin.kickPlayer [ID] (Admin version of Votekick player)
    admin.banPlayer [ID] (Admin permanent Votekick (ban) of player)
    admin.changeMap [map name] (Admin changes map to name specified)
    admin.addAddressToBanList [IP] (Adds a player's IP address to banned list)
    admin.removeAddressFromBanList [IP] (Removes a player's IP address from banned list)
    admin.listBannedAdresses (Lists all banned IPs)
    admin.clearBanList (Clears all banned ips)
    admin.banTime # (Length of time a banned player cannot join server)
    admin.tagPlayer [ID]
    admin.bandWidthChokeLimit #
    admin.allownosecam 1/0 (Allows player to turn off HUD while flying)
    admin.externalviews 1/0 (Allows/disallows external camera view and nose cam)
    admin.togglegamepause (Enables/Disables pausing)
    admin.setTicketRatio #
    admin.autoBalanceTeam 1/0 (Enables/Disables Auto team-balancing when teams are uneven)
    admin.delayBeforeStartingGame # (Time delay before a game starts)
    admin.roundDelayBeforeStartingGame # (Time delay before a new round starts)
    admin.soldierFFRatio # (The ratio of damage (e.g. 0.5=50%) done by Friendly Fire)
    admin.vehicleFFratio # (As above for vehicle FF)
    admin.soldierFFRatioOnSplash # (As above for weapon splash damage)
    admin.vehcileFFRatioOnSplash #(As above for vehicle FF splash damage)
    admin.kickBack # (How far player is kicked back when hit)
    admin.kickBackOnSplash #(As above for splash damage)
    admin.timeLimit # (Time limit for match)
    admin.scoreLimit # (Score limit for match)
    admin.restartMap (Restarts current map)
    admin.setNextLevel [map] (Sets the next map to load after current map ends)
    admin.timeBeforeRestartMap # (How much time until the map restarts)
    admin.SetNrOfRounds # (Sets the number of rounds)
    admin.timeToNextWave #
    admin.spawnWaveTime #
    admin.spawnDelayPenaltyForTK # (The number of extra spawn waves applied)
    admin.banPlayerOnTKKick 1/0 (When set to 1, players are also banned when kicked for TK)
    admin.nrOrTKToKick # (The number of punished TK's before being kicked)
    admin.tkPunishMode 1/0 (0: Punish Mode - Players are punished by default, until the victim forgives the TK, 1: Forgive Mode - Players are forgiven by default, until the victim punishes the TK)



Comments

  • Closed Accounts Posts: 9 sReq | DH6


    nice work!

    thx for da commands, good work!
    saved me some time searching on the web for some commands....

    ;)


  • Closed Accounts Posts: 833 ✭✭✭Stormfox1020


    LOL u can kill anyone on ur server SWEET!!!! They be like wtf and ur jus laughin ur head off.


  • Registered Users, Registered Users 2 Posts: 255 ✭✭Meadows


    that there was good huntin

    cheers


  • Registered Users, Registered Users 2 Posts: 255 ✭✭Meadows


    i agree with chancer
    truely happyness is everywhere


  • Registered Users, Registered Users 2 Posts: 1,823 ✭✭✭Horsefumbler


    How do you play this game in something higher than 60hz???
    game.setGameDisplayMode [Width] [Height] [Color Depth] [Refresh Rate]
    I tried putting 100 in hear for res 800*600*32 and it just resorted back to 60hz. My monitor can do 800*600@100 hz so whats the problem? can the game only do max 85 or something?


  • Advertisement
  • Moderators, Recreation & Hobbies Moderators Posts: 10,912 Mod ✭✭✭✭Ponster


    > can the game only do max 85 or something?

    Maybe I think HL2 was fixed at 75.


  • Registered Users, Registered Users 2 Posts: 2,997 ✭✭✭jaggeh


    Battlefield 2

    Console Commands

    To open the BF2 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 the renderer sub-class of commands.

    The list below is the full list of console commands, however many commands don't have descriptions. We shall be adding more descriptions as they are discovered.

    Renderer Commands

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

    renderer.drawConsole [0,1] - Turns off access to the in-game console if set to 0.

    renderer.drawFps [0,1] - Displays the current and average frames per second (FPS) in the top left corner.

    Game Commands

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

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

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

    game.allowToggleFullscreen [0,1] - If set to 1 allows toggling of fullscreen/windowed mode

    game.toggleFullscreen - Toggles between fullscreen and windowed mode

    Demo Commands

    demo.recordDemo [demoname] - Starts recording current gameplay and saves the file as demoname.bf2demo in your \Program Files\EA Games\Battlefield 2 Demo\mods\bf2\Demos directory

    demo.stopRecording - Stops current demo recording

    demo.ShutdownDemo -

    Localprofile Commands

    localProfile.setName [name] - Sets the name for your current account

    localProfile.setNick [nick] - Sets the nickname for your current account

    localProfile.setGamespyNick [GameSpyNick] - Sets the GameSpy login name for your account

    localProfile.setEmail [email account] - Sets the email account for the current account

    localProfile.setPassword [password] - Sets the password for the current account

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

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

    localProfile.save -

    localProfile.addDemoBookmark [ ] -

    Globalsettings Commands

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

    Sv Commands

    These commands are used to adjust server settings, particularly in the Serversettings.con file under your \Documents and Settings\[username]\My Documents\Battlefield 2 Demo\Profiles\[profile]\ directory.

    sv.allowNATNegotiation [0,1] -

    sv.interface -

    sv.timeBeforeRestarting [0,1] -

    sv.autoBalanceTeam [0,1] -

    sv.teamRatioPercent [0,1] -

    sv.autoRecord [0,1] -

    sv.demoIndexURL [address] -

    sv.demoDownloadURL [address] -

    sv.autoDemoHook -

    sv.demoQuality -

    sv.adminScript -

    sv.sponsorText -

    sv.sponsorLogoURL [address] -

    sv.communityLogoURL [address] -

    sv.radioSpamInterval -

    sv.radioMaxSpamFlagCount -

    sv.radioBlockedDurationTime [seconds] -

    sv.useGlobalRank [0,1] -

    sv.useGlobalUnlocks [0,1] -

    Gamelogic Commands

    gameLogic.togglePause - Toggles pausing the game.

    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.foatGet -

    SettingsManager.U32Get -

    Inputdevices Commands

    InputDevices.setInvertAxis -

    InputDevices.setAxisScale -

    Controlmap Commands

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

    controlMap.deleteControlMap -

    controlMap.dump -

    controlMap.setButtonRiseTime -

    controlMap.SetButtonFallTime -

    controlMap.SetDoubleTapTime -

    controlMap.addAxisToAxisMapping [string] -

    controlMap.addButtonsToAxisMapping [string] -

    controlMap.addKeyAndButtonToAxisMapping [string] -

    controlMap.addKeysToAxisMapping [string] -

    controlMap.addButtonToTriggerMapping [string] -

    controlMap.AddKeyToTriggerMapping [string] -

    controlMap.setAxisScale -

    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.list - 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 Demo\ServerConfigs\

    mapList.load - Makes the server reload _mapList.con

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

    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.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 used by server administrators.

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

    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.

    Remote Console

    These commands are used by server administrators.

    To setup remote console access to the server, onthe server create a new plain text document in \admin\ called default.cfg and enter the following text into the new file:

    port=4711

    password=YourPassword

    Save the file, and start the server. Now you can access the server remotely by using the following commands from a client:

    rcon login [YourPassword] - Use this command to login to the server.

    rcon users - 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

    Exit - Quits the game to desktop.[/email]


  • Closed Accounts Posts: 49 CyberMan


    nice work keep it up :)


Advertisement