For the purposes of this tutorial and for future modification of BF2 you will need a archive editing tool such as WinZip or WinRar. Personally, I prefer WinRar as it is faster in the decompile and compile process and supports a great deal more file types. You may also want to back up your game files in the event that you would like to play on a ranked server.
Finding the files Open your BF2 location (where BF2.exe is). Now open up the 'mods' folder and 'bf2' or 'xpack' whichever one you want to modify. Inside either folder you will find Objectsclient.zip and Objectsserver.zip. The one you want to change is Objects_server.zip. Attempting to edit the client zip will crash your bf2 (unless adding singleplayer content - meshes, textures, sounds etc.).
Installing new weapons For this tutorial, I am going to use noobkiller12's M82 mod(Google it). Inside this weapon mod you will find both objectsclient and objectsserver zips. Decompress both of them and put the files somewhere you will remember but make sure you separate them into separate folders. Do not merge the contents of these two zips as BF2 will double load and crash. Now take the files in the objectclient and copy them. Open the objectsclient.zip in your 'bf2' folder. Paste the files into the zip. It will automatically compress and archive them. Do likewise with the objects_server zip.
Editing the kits Inside your Objectsserver.zip. Open 'kits' and select the army you want to modify. Extract the .con of the class you want to edit (Open up the .con file with notepad). For this tutorial, I am going to open up US and USSniper.con (with notepad). Inside the .con file you will find a whole jumble of code. DON’T PANIC! Scroll down until you see ‘ObjectTemplate.addTemplate’ at the start of every line. Find the weapon you want to change (in this case USRIFM24) and paste in the weapon you want instead (USSNIM82A1). Note: You cannot have two weapons with the same ItemIndex in the same kit or BF2 will crash (See below for full section). Remember that every time you want to add an extra item, you have to create a new line with ‘ObjectTemplate.addTemplate’ at the start or the weapon won’t load and BF2 will crash. So if I want to give my sniper some shock paddles, I will add underneath all the other weapons: ‘ObjectTemplate.addTemplate defibrillator’.
Weapon modification (Difficulty warning) Now inside the Objectsserver.zip open up ‘Weapons’ then ‘Handheld’ and the weapon you want to mod. In this case I am going to open up ‘USSNIM82A1’. Inside the folder you will find a .tweak file (ussni_m82a1.tweak). Extract it and open with notepad.
Modifying weapon damage To modify weapon damage, search for ‘damage’ the first entry should be ‘ObjectTemplate.minDamage’. For the M82 it will be set at 0.2. For max superduper power set it to 1000 and underneath it, set ‘ObjectTemplate.damage’ to 1900. Save it and put it back into the archive. With this coding, the M82 will down a helicopter in 3 shots, a light vehicle in 1, a jet in 1, a man in 1 and a tank in about 10 or so.
Installing several primary weapons To make a weapon usable with another weapon of the same slot, open up the .tweak (ussnim82a1.tweak). Find ‘ItemIndex’. If it is a primary weapon, it should be set to 3. I am going to set the m82 to 4. ‘ItemIndex 4’ is the grenade slot so if you put this into a primary rifle and enter it into a kit, you will have to delete your grenade (USHGRM67) or Anti-tank rocket. Now go and change the kit. For my sniper kit, I have replaced ‘ushgrm67’ with ‘ussnim82a1’. IMPORTANT You have to make sure that no ItemIndexes in ANY kits overlap or BF2 will crash when starting a server.
Reducing bullet spread Open the .tweak and find ‘deviation’ you should find ‘ObjectTemplate.deviation’ at the start of every line. For my m82 to be super accurate, I am going to change
ObjectTemplate.deviation.minDev 5 ObjectTemplate.deviation.devModStand 2 ObjectTemplate.deviation.devModCrouch 1.5 ObjectTemplate.deviation.devModLie 0.8 ObjectTemplate.deviation.devModZoom 0.01
ObjectTemplate.deviation.minDev 0 ObjectTemplate.deviation.devModStand 0 ObjectTemplate.deviation.devModCrouch 0 ObjectTemplate.deviation.devModLie 0 ObjectTemplate.deviation.devModZoom 0
My M82 will have perfect accuracy now.
Making the M82 stay in zoom after every shot For my fellows that have downloaded noobkiller12's M82 mod, you will find that the M82 has a very annoying habit of zooming out after every shot even though it is semi-auto. In the .tweak file, search zoom and find ‘ObjectTemplate.zoom.zoomOutAfterFire’. It should be set on 1. Change it to 0. The habit has been corrected =D.
Making sure it doesn't crash If you want to modify Special Forces, the stuff is located in 'xpack', not 'bf2'. When modify SF keep in mind that you can only mod the kits. If you want an extra weapon, put it in your ‘bf2’ archives. SF will automatically load all content from the bf2 archives and so will double load and crash if a skin is present in both archives. REMEMBER: xpack/objects_server.zip ONLY KIT MODIFICATIONS Just wanted to rub it in.