Kit and Weapon Modding: Playing In-game

IMPORTANT

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 Objects_client.zip and Objects_server.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. Inside this weapon mod you will find both objects_client and objects_server 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 object_client and copy them. Open the objects_client.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 Objects_server.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 US_Sniper.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 USRIF_M24) and paste in the weapon you want instead (USSNI_M82A1). 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 Objects_server.zip open up ‘Weapons’ then ‘Handheld’ and the weapon you want to mod. In this case I am going to open up ‘USSNI_M82A1’. 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 (ussni_m82a1.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 (USHGR_M67) or Anti-tank rocket. Now go and change the kit. For my sniper kit, I have replaced ‘ushgr_m67’ with ‘ussni_m82a1’. 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
to
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.

Well, THAT’S ALL FOLKS!For the moment

NOTE: SCREENSHOT(S) UPDATED. YOU MAY NOTICE THAT I HAVE 2 SNIPERS IN MY KIT.

Second tutorial can be found here

Oh noes! You're not a Member!

Want access to cool stuff? As a member you can:

  • Post. Give the submitter your thoughts on this Tutorial.
  • Say Thanks. Show your appreciation by sending the submitter points.
  • Stamp Posts. Let other posters know what you think of their posts.
  • Rate. Give this Tutorial a rating out of 10.
  • Flag. Alert moderators and warn members of a problem with this Tutorial.
  • Vote. Vote the submitter for the Monthly Awards.
  • Subscribe. Get notified when this submitter submits again.

Interested? Register or Login

Comments

  • .Shinoda avatar
    Availability
    Offline
    Points Level
    Drudge Points Level icon
    Drudge
    2,233 points
    Exemplary Feedback Level
    Helper Exemplary Feedback Level icon
    Helper
    5 EF's
    Account Age Level
    Elder Age Level icon
    Elder
    6 years old
    Clearance Level
    Member Clearance Level icon
    Member
    • Report icon
    4 years ago:
    Yes it is possible to change the scope on the sniper rifle. Do I know how? Not really. I've tried and stuffed it up multiple times.
    Dulce et decorum est pro patri avatar
    User Title
    Dulce et decorum est pro patri
  • s1eeper2014 avatar
    Availability
    Offline
    Account Age Level
    Veteran Age Level icon
    Veteran
    4 years old
    Clearance Level
    Member Clearance Level icon
    Member
    • Report icon
    4 years ago:

    hey man! thanks alot for this tutorial. i learned alot and thanks for the rifle you made. it's great.i even changed the bullet detonation to a tanks objectdetonation.. but, i got one question though, is it possible for me to change the scope for my sniper rifle. just can't find it in the script... thanks man!!!

    Bananite
  • judah996 avatar
    Availability
    Offline
    Account Age Level
    Veteran Age Level icon
    Veteran
    5 years old
    Clearance Level
    Member Clearance Level icon
    Member
    • Report icon
    5 years ago:

    Aww it did not work well i will just try again !!!

    Bananite
  • zulcurlos avatar
    Availability
    Offline
    Account Age Level
    Veteran Age Level icon
    Veteran
    5 years old
    Clearance Level
    Member Clearance Level icon
    Member
    • Report icon
    5 years ago:

    Pros: Extremely useful to use. Took me a while figure out where the kits and factions folder was on the last one i read. But this is just superb Cons: Last parts. a little bit of trouble.

    Bananite
  • orunes avatar
    Availability
    Offline
    Account Age Level
    Veteran Age Level icon
    Veteran
    5 years old
    Clearance Level
    Member Clearance Level icon
    Member
    • Report icon
    5 years ago:

    I don´t know why but when I edit my kits this isen´t working... Can you explain me why?

    Bananite
  • .Shinoda avatar
    Availability
    Offline
    Points Level
    Drudge Points Level icon
    Drudge
    2,233 points
    Exemplary Feedback Level
    Helper Exemplary Feedback Level icon
    Helper
    5 EF's
    Account Age Level
    Elder Age Level icon
    Elder
    6 years old
    Clearance Level
    Member Clearance Level icon
    Member
    • Report icon
    6 years ago:
    Posted by PaliPanda Thanks 4 this Tut! I only have a question: Iwould linke to change settings for the BF 64Mod but not 4 the regular game. But in my Objects_server.zip is only the at_mine... can I simply copy'n'paste the other weapons and the units in the objects_server.zip?

    No this means that the BF64 mod is dependent on the main BF2 mod so adding files to the 64 archive will double load and crash the program.

    Dulce et decorum est pro patri avatar
    User Title
    Dulce et decorum est pro patri
  • PaliPanda avatar
    Availability
    Offline
    Account Age Level
    Veteran Age Level icon
    Veteran
    6 years old
    Clearance Level
    Member Clearance Level icon
    Member
    • Report icon
    6 years ago:

    Thanks 4 this Tut! I only have a question: Iwould linke to change settings for the BF 64Mod but not 4 the regular game. But in my Objects_server.zip is only the at_mine... can I simply copy'n'paste the other weapons and the units in the objects_server.zip?

    Bananite
  • .Shinoda avatar
    Availability
    Offline
    Points Level
    Drudge Points Level icon
    Drudge
    2,233 points
    Exemplary Feedback Level
    Helper Exemplary Feedback Level icon
    Helper
    5 EF's
    Account Age Level
    Elder Age Level icon
    Elder
    6 years old
    Clearance Level
    Member Clearance Level icon
    Member
    • Report icon
    6 years ago:
    Posted by DutchMango Does the thing with the damage work for multiplayer

    Read the tutorial please. No it doesn't

    Dulce et decorum est pro patri avatar
    User Title
    Dulce et decorum est pro patri
  • DutchMango avatar
    Availability
    Offline
    Account Age Level
    Veteran Age Level icon
    Veteran
    6 years old
    Clearance Level
    Member Clearance Level icon
    Member
    • Report icon
    6 years ago:

    Does the thing with the damage work for multiplayer

    Bananite
  • donttalktome avatar
    Availability
    Offline
    Points Level
    Beggar Points Level icon
    Beggar
    5 points
    Account Age Level
    Veteran Age Level icon
    Veteran
    6 years old
    Clearance Level
    Member Clearance Level icon
    Member
    • Report icon
    6 years ago:

    Oh great...thanks anyway.Too bad i cant have like 50 guns on a guy. Uh and how do i change a vehicle gun projectile?

    Why are you looking at my post

Credits

Key Authors
.Shinoda
Unknown

Submitter

.Shinoda avatar
Availability
Offline
Points Level
Drudge Points Level icon
Drudge
2,233 points
Exemplary Feedback Level
Helper Exemplary Feedback Level icon
Helper
5 EF's
Account Age Level
Elder Age Level icon
Elder
6 years old
Clearance Level
Member Clearance Level icon
Member

.Shinoda
(Creator/Co-creator)

Rating

Expert
9.5/10
Based off 6 rating(s)

Details

Genre
Coding/Scripting
Difficulty Level
Intermediate

Stats

Post Count
38
ViewCount
58,639
Date Added
6 years ago
Date Modified
5 years ago

Share

Code to use:

More embeddable images

Bookmark and Share