Battlefield 2142 Tweak Guide
[Page 7] Advanced Tweaking
Config Files
Aside from the in-game settings, Battlefield 2142 has a range of config (.con) files spread throughout its directories. These files can be edited using any text editor like Windows Notepad or Wordpad. Of course before editing any .con file, first make sure you make a backup copy of it.
However unfortunately editing most of these .con files can prove completely pointless as the changes seem to have no impact in BF2142, or they are designed to control certain gameplay parameters such as world physics and should not be altered. The main configuration files which control your Soldier's settings can be found under your \Documents and Settings\[username]\My Documents\Battlefield 2142\Profiles\ directory, with the settings for each soldier (profile) listed under a numbered directory (e.g. \0001 for the first soldier, \0002 for the next one, etc.).
In general I don't recommend editing these .con files as it seems that any changes either have no impact, or can cause problems. Most of the settings in these .con files can be changed using the in-game settings, which is where you should alter them. Below I try to cover the few useful things you can do with the .con files, though none of them could be considered major tweaks - it looks like EA Games is purposely reducing the 'tweakability' of the Battlefield series, perhaps to enforce greater standardization.
Video.con
All of the settings in this file can be adjusted from within the in-game Video settings. Note that setting the first 8 variables to 4 - supposedly 'Ultra High Quality' - seems to make no practical difference. Note further than trying to set a custom resolution in Video.con doesn't appear to work, so use the method outlined on the last page of this guide instead.
Profile.con
This file contains details of your online account including the Soldier name (LocalProfile.setName), and the EA Account it's attached to (EAOnliineMasterAccount). However the password for this account is not saved here, it's in your Global.con file found in the \Profile directory above here, and is encrypted so it can't be read. You shouldn't try changing these details here as doing so will have no impact on your online account, except maybe cause problems logging on or with Punkbuster. If you want to change your online account name, email, or both, do so using the in-game Login/Account screen.
General.con
GeneralSettings.addServerHistory
This settings show you the last servers you have successfully connected to, and is the same list as that shown in your History tab under the Multiplay>Online in-game area. This list is handy because it provides the server names as well as the IP Number and Port Number. You can also remove any of these entries if you don't want to see them again in the History tab. See the Multiplay section of the In-Game Settings section for more details.
Note that there are a range of other interesting commands here such as GeneralSettings.setColorBlindFriendly and GeneralSettings.setLCDDisplayModes, however these don't appear to have any impact on the game.
Interestingly, you can add console commands to General.con, and they will be implemented at startup for BF2142. So for example if you want the FPS counter to appear whenever you launch BF2142 and join a game, add the renderer.drawFps 1 command at the bottom of General.con. The list of console commands is on the next page.
Controls.con
This file contains all of the control mappings for actions in the game. The file structure is quite complex, and I don't have the ability to document it at length here. Previously a very helpful user had documented the BF2 Control.con structure here. Hopefully if someone can do something similar for BF2142, I can link to it again for all to share. For the most part you shouldn't need to mess with Control.con unless you can't get a binding to work in the In-game settings.
As you can see, there's not much in the way of productive changes you can make in the .con files for BF2142 - at least none that I've discovered yet. As I mentioned, most of the settings in the .con files can be (and should be) changed using the in-game settings, and many of the settings in the numerous .con files spread throughout the game directories do not have any impact on the game - they seem to be legacy settings from previous Battlefield games or gameplay/game world parameters which should not be changed.
Usersettings.con
This file is found under your \Program Files\Electronic Arts\Battlefield 2142\mods\bf2142\Settings directory. There are two particular settings of interest here which are reported to help reduce the inaccurate feel /hit detection of weapons fire in BF2142:
SettingsManager.floatSet GSDefaultLatencyCompensation 0.100000
This setting controls latency (or 'lag') compensation, which involves the game attempting to offset the delay between information being sent from your machine to the server and back again (as measured in milliseconds by your Ping). In games without client-side latency compensation, you have to lead your target by a certain amount, since whenever you fire a weapon your bullets will actually register in the game world with a delay equal to your Ping. In BF2142, whenever you fire a weapon, whatever appears in your crosshairs at that particular moment is registered as being hit, regardless of where they actually are at that point in time. This removes the need to predict where your target will be based on ping delay, and makes the game feel more responsive. However it can also introduce quirks like ducking behind a wall and still being hit.
In any case, this setting controls the default latency compensation applied, and the normal value is 0.100000 = 100ms. Some people claim that by adjusting this value to match your average ping in the servers you play, it can improve hit detection. For example, if you typically have a 50ms Ping, setting this to 0.050000 should improve the feeling of accuracy in the game. To be honest having experimented with this setting in isolation I didn't notice much difference either way. I believe the latency compensation is actually dynamic, only starting at the default value given in this setting, and adjusting to match your average ping over time. However even if it isn't, in general you can try to match your Ping with this setting to see the results. Note that lowering this setting well below or above your average Ping will only add to lag and may decrease your accuracy at best, so stick with keeping it equal to the Ping you get on most servers.
SettingsManager.U32Set GSInterpolationTime 100
Interpolation is a technique used to increase the smoothness of an online game. Basically interpolation is the prediction of where a particular moving object or character is currently located in the game world, based on data received on where they were and where they are. For example if an enemy soldier is running across the screen, interpolation allows their movement to appear fluid, calculating their predicted movement across the screen even though your computer is receiving only periodic updates of where they actually are. So instead of seeing a person jerkily warping from point to point, you see smooth animated motion all the way along. This especially helps to keep things smooth if/when packets are momentarily lost between the server and you; the game knows where the player currently is, where they were a moment ago, and calculates and displays the movements in between.
By default, Battlefield 2142 appears to have a 100 millisecond buffer for interpolation. The problem with this is that while making things appear smoother, it also means that when firing upon a fast-moving object you may miss where they actually are as you're effectively facing an additional 100ms delay. At least that's the theory, and in general in my experimentation I found slightly improved hit detection results (and no noticeable increase in jerkiness) by using a lower value of 50 or even 30 for this setting. Note however that this variable should not be set too low (and certainly not a value of 0) as it will result in increased warping/jerky movements, and if you generally have a ping higher than 100 you shouldn't lower this setting. For those who do try this, also remember that the improvement from lowering this setting is not dramatic, since we're talking a difference of say 50ms (1/20th of a second). However particularly in situations where your opponent(s) are moving fast and/or erratically your accuracy should be noticeably improved.
It is important to understand that the generally inaccurate feel of most weapons in BF2142 is intentional, as realism has been sacrificed for the sake of gameplay. Techniques to steady your aim such as going prone and using short bursts can help improve hit rates. Furthermore it appears that much of the time the lack of hit registration is due to lost packets. I've noticed the Battlefield series suffers quite a bit from packet loss, often manifesting as serious warping or jerkiness, getting caught against walls or other barriers, and incidents where you can appear to be firing at an unmoving target at point blank range and still somehow miss with most bullets; information is being lost to/from the server.
The key thing to note about both settings above is that unfortunately neither I nor anyone else knows for sure what the real story is - only EA/DICE know the truth about how their netcode works, and they've stated nothing to clarify these settings. What I've written above is based on my own experimentation, understanding and research about these settings. For the most part I haven't found any problems with PunkBuster by using the recommended settings above, though some servers may be very strict and not allow these values to be changed. If altering these values seems to make things worse for you, or you experience more jerkiness, lag or disconnections, reset them to the defaults shown above and leave them be.
Command Line
There are a range of commands which can be activated via the Battlefield 2142 command line. To use these commands, go to your main Battlefield 2142 launch icon, right-click on it and select Properties. Then in the Target box, after the "C:\Program Files\Electronic Arts\Battlefield 2142\BF2142.exe" +menu 1 +fullscreen 1 text, insert a blank space, then use any of the commands below. Each command must have a single blank space between it and the next command.
For example, to set a custom resolution for BF2142, change your command line to look similar to this:
"C:\Program Files\Electronic Arts\Battlefield 2142\BF2142.exe" +menu 1 +fullscreen 1 +szx 1280 +szy 1024
Note the addition of the +szx and +szy commands which respectively set the width and height of the custom resolution to be used. Substitute other values for other resolutions (e.g. +szx 1900 +szy 1200).
The following are the known command line commands for BF2142:
+dedicated - Start in dedicated server mode
+multi - Allow starting multiple BF2142 instances
+joinServer - Join a server by IP address or hostname
+playerName - Set the player name
+password - Set the server password when joining a server
+config - Sets path to the ServerSettings.con file to use
+maplist - Sets the path to the MapList.con file to use
+lowPriority - Run the game with slightly lower priority
+loadLevel - Set the level to load
+wx - Position game window on the screen at certain x-position
+wy - Position game window on the screen at certain y-position
+szx - Set resolution width
+szy - Set resolution height
+fullscreen - Start game in full screen mode
+nosound - Start game without sound
+demo - Sets the con-file with demo options
+maxPlayers - Sets max players
+gameMode - Sets the game mode
+modPath - Sets the mod path (default /mods/bf2142)
+help - (or +?) Displays these commands
+ranked - Allows GamSpy snapshot sending
+overlayPath - Start game with a custom path for config files
+port - Specifies the network port to be used
+pbPath - Set the path to use for PunkBuster on multi-instance configs
+eaAccountName - Auto-login with the specified EA Account Name
+eaAccountPassword - Password to the specified EA Account Name
+soldierName - Auto-login to a soldier in the specified EA Account Name
+hostServer -
+ai -
+provider -
+region -
+type -
Note: You must use the correct case for these commands to work. For example the +eaaccountname command only works if used thusly: +eaAccountName - note the capitalized A and N.
Make sure to check the last page of this guide for details of the most common useful commands and their usage, namely setting a custom resolution and automatically logging into your soldier upon startup. Note that this list will be revised so please Email Me if you have any additions or changes to the list above.
The next page concludes the Advanced Tweaks with a list of known Console Commands.