BF2/BF2142 Kits tutorials

Modifying Kits in BF2 (and BF2142)


List below are the the battlefield 2 weapons, that you can use in your kit. 

VERY IMPORTANT: DO NOT EDIT BF2 FILES IN BF2/XPACK MODS FOLDIERS OR GAME DOESNT'T WORK ANYMORE. EDIT ONLY CUSTOM MODS LIKE aix, SP64, or others. Better would be make your own mod easily with BF2 editor.

Open: Bf2/ mods/ your mod/ objects_server/ kits/ your kit (FOR EXAMPLE US_SNIPER)

BF2142: Kits are in the objects\kits_server.zip file. BF2 and BF2142 handle kits in very similar ways. BF2 players use the highest level unlocked weapon, but in BF2142 players can select which main weapon to use (in item index 3). BF2142 has kits and weapons in seperate zip files while BF2 has kits and weapons in the object_server.zip file. BF2 uses 7 kits while, BF2142 only used 4 kits. The kits are numbered starting at 0.


Use notepad or wordpad to edit kits.

Notes: You can't add more then 9 weapons for one kit. EVERY WEAPON MUST HAVE DIFERENT ITEM INDEX OR YOUR GAME MUST CRASH. For example: Knife- intem indiex 1, pistol- item index 2, assault rifle- item index 3....

all weapons must be different slot or item index in the kit, e.g. in kit it is will not work to have two rifles in item index 3 slot. 
The weapon's slot in the kit is also the number you press on the keyboard to select it 

If you add a weapon to the Assault Class without a Grenade Launcher, make sure you replace the Grenade Launcher line with "USHGR_M67" these are Grenades.

Notes: You can only have 1 weapon with the same item index in a kit at a time. All Primary weapons are index 3, Grenade/Rocket Launchers and Grenades are 4.

To change Indexes, go to the weapons folder (in the extracted objects_server file) then open the folder for the weapon you want to modify and open the .tweak file and locate the following line...

ObjectTemplate.itemIndex

If mod still crashes after edit and you don't know reason, run BF2 or BF2142 mod in windowed mode.
Right click on scortcut and you will see something like this:

E:\Battlefield2\BF2.exe +menu 1 +fullscreen 1

set to: 

E:\Battlefield2\BF2.exe +menu 1 +fullscreen 0

Then you will get error massage and will know why mod crash. 

Set 0 to 1 if you want fullscreen back. 

=====================================================

Here is standard weapon placement in kits:

Index - Item



1 - Knife
2 - Pistols
3 - Primary Weapons
4 - Grenade/Rocket Launchers, Grenades, Smoke Grenades
5 - Claymore, C4, Med Kit, Ammo Kit, Mines
6 - Wrench, Defibrillator
9 - Parachute


For BF2 here are the standard weapons available:

Knife

1 - KNI_KNIFE

Pistols

2 - rupis_baghira
2 - rupis_baghira_silencer
2 - chpis_qsz92
2 - chpis_qsz92_silencer
2 - USPIS_92FS
2 - uspis_92fs_silencer

Assault Weapons

3 - CHRIF_Type85
3 - chrif_type95
3 - RURIF_AK47
3 - RURIF_AK101
3 - rurrif_ak74u
3 - USRIF_G3A3
3 - usrif_g36c
3 - sarif_g36k
3 - USRIF_M4
3 - usrif_m16a2
3 - usrif_sa80
3 - RURIF_Bizon
3 - USRIF_MP5_A3
3 - sasrif_mp7
3 - usrif_fnscarl
3 - usrif_fnscarh
3 - eurif_HK53A3
3 - eurif_famas
3 - eurif_fnp90

Machineguns

3 - rulmg_rpk74
3 - RULMG_PKM
3 - USLMG_M249SAW
3 - chlmg_type95
3 - eurif_hk21

Sniper Rifles

3 - USSNI_M82A1
3 - rurif_dragunov
3 - USSNI_M95_Barret
3 - chsni_type88
3 - gbrif_I96a1
3 - usrif_m24

Shotguns

3 - chsht_protecta (DAO-12)
3 - USSHT_Jackhammer
3 - usrif_remington11-87
3 - RUSHT_Saiga12
3 - chsht_norinco982
3 - gbrif_benelli_m4

Assault grenade launcers

3 - RURIF_GP25 - Weapon
4 - RURGL_GP25 - Grenade Extension
3 - RURIF_GP30 - Weapon
4 - RURGL_GP30 - Grenade Extension
3 - USRIF_M203 - Weapon
4 - USRGL_M203 - Grenade Extension
3 - sasrif_fn2000
4 - sasgr_fn2000

Grenade

4 - ushgr_m67 - Grenade

Rocket launcers

4 - CHAT_ERYX
4 - USATP_predator
4 - insgr_rpg

Other kits:

5 - ammokit
6 - defibrillator
5 - medikit
6 - Wrench
5 - nshgr_flashbang
5 - at_mine
5 - usmin_claymore
N/A - c4_detonator
5 - c4_explosives
4 - hgr_smoke
6 - SIMRAD
6- nshgr_ grapplinghook
6- nsrif_crossbow
6- sasrif_teargas
9 - ParachuteLauncher


There's example weapons are added into the kit (Notice that order is not important here, as the item index in the weapon code determines the weapon slot):

rem -------------------------------------
ObjectTemplate.addTemplate USRIF_M203
ObjectTemplate.addTemplate USRGL_M203
ObjectTemplate.addTemplate USPIS_92FS
ObjectTemplate.addTemplate hgr_smoke
ObjectTemplate.addTemplate kni_knife
ObjectTemplate.addTemplate UnlockUSAssault
ObjectTemplate.addTemplate UnlockUSAssault2
ObjectTemplate.addTemplate ParachuteLauncher
rem -------------------------------------

For the Assault Class that uses Assault Rifles with Grenade Launchers, It's set up like this

ObjectTemplate.addTemplate USRIF_M203 <-------Assault Rifle w/Launcher
ObjectTemplate.addTemplate USRGL_M203 <-------Grenade Launcher

If you add a weapon to the Assault Class without a Grenade Launcher, make sure you replace the Grenade Launcher line with "USHGR_M67" these are Grenades.

The C4 Detonator does not use a weapon index. The Mines are hard coded for Engineers. They cannot be used by any other class and cannot be swapped out from the Engineer kit. 

If it's SP/CO-Op mod then the Unlock weapons are not needed since unlocks don't work in SP/coop

These Lines needed only for multiplayer mods if it has unlocks:

ObjectTemplate.addTemplate UnlockUSAssault
ObjectTemplate.addTemplate UnlockUSAssault2 

So, each Unlock weapon will have code similar to:

ObjectTemplate.create ItemContainer UnlockUSAssault
ObjectTemplate.addTemplate usrif_G3A3
ObjectTemplate.replaceItem usrif_m203
Objecttemplate.addTemplate ushgr_m67
ObjectTemplate.replaceItem usrgl_m203
ObjectTemplate.unlockLevel 1 

ObjectTemplate.create ItemContainer UnlockUSAssault2
ObjectTemplate.addTemplate sasrif_fn2000
ObjectTemplate.replaceItem usrif_m203
ObjectTemplate.replaceItem usrif_G3A3
Objecttemplate.addTemplate sasgr_fn2000
ObjectTemplate.replaceItem usrgl_m203
ObjectTemplate.replaceItem ushgr_m67
ObjectTemplate.addTemplate nshgr_flashbang
Objecttemplate.replaceItem ushgr_smoke
ObjectTemplate.unlockLevel 2

What this does is to define a Unlock container. 
The addTemplate line states the new weapon to add. 
The relaceitem line under it states the weapon to replace in the kit.
The UnLockLevel line states the unlock level.
Note that each higher level unlock that replaces the same weapon slot, needs to list all the previous weapons in the slot from the earlier unlock containers.

If you want to create a singleplayer/coop mod that allows unlocked weapons to be used, just get rid of the unlock code from the kit and add the weapons directly into the weapon list for the kit like this:

ObjectTemplate.addTemplate sasrif_fn2000
ObjectTemplate.addTemplate sasgr_fn2000
ObjectTemplate.addTemplate USPIS_92FS
ObjectTemplate.addTemplate nshgr_flashbang
ObjectTemplate.addTemplate kni_knife
ObjectTemplate.addTemplate ParachuteLauncher


Note: You can not modify the existing BF2/BF2142 unlocks. The game is hard coded to not allow it. If you want to change the unlocks,then you have to create brand new unlocks and delete the old ones.



So, if you want to change a kit, you can take an existing kit and just change the kit name.

Then, to get it in the map, change the map's init.con file to replace it with the existing kit. The map's init con kits are listed like this:

gameLogic.setKit 1 0 "CH_Specops" "ch_light_soldier"
gameLogic.setKit 2 0 "US_Specops" "us_light_soldier"

gameLogic.setKit 1 1 "CH_Sniper" "ch_light_soldier"
gameLogic.setKit 2 1 "US_Sniper" "us_light_soldier"

gameLogic.setKit 1 2 "CH_Assault" "ch_heavy_soldier"
gameLogic.setKit 2 2 "US_Assault" "us_heavy_soldier"

gameLogic.setKit 1 3 "CH_Support" "ch_heavy_soldier"
gameLogic.setKit 2 3 "US_Support" "us_heavy_soldier"

gameLogic.setKit 1 4 "CH_Engineer" "ch_light_soldier"
gameLogic.setKit 2 4 "US_Engineer" "us_light_soldier"

gameLogic.setKit 1 5 "CH_Medic" "ch_light_soldier"
gameLogic.setKit 2 5 "US_Medic" "us_light_soldier"

gameLogic.setKit 1 6 "CH_AT" "ch_heavy_soldier"
gameLogic.setKit 2 6 "US_AT" "us_heavy_soldier"

The settings after gameLogic.setKit:
First number is the team (1 or 2)
Second number is the kit number (0 - 6 for BF2/ 0- 3 for BF2142) with 0 being the first kit
Third setting is the kit name in quotes. 
Fourth setting is the Soldier body in quotes.


So, if you created a modifed US_Asssault kit and called it US_Assault_new then to add it the map make this change:

gameLogic.setKit 2 2 "US_Assault_new" "us_heavy_soldier"

While we are on the subject of modifying kits, if you only wanted snipers on a map that could be done by duplicating the sniper kit to all slots like so:

gameLogic.setKit 1 0 "CH_Sniper" "ch_light_soldier"
gameLogic.setKit 2 0 "US_Sniper" "us_light_soldier"

gameLogic.setKit 1 1 "CH_Sniper" "ch_light_soldier"
gameLogic.setKit 2 1 "US_Sniper" "us_light_soldier"

gameLogic.setKit 1 2 "CH_Sniper" "ch_light_soldier"
gameLogic.setKit 2 2 "US_Sniper" "us_light_soldier"

gameLogic.setKit 1 3 "CH_Sniper" "ch_light_soldier"
gameLogic.setKit 2 3 "US_Sniper" "us_light_soldier"

gameLogic.setKit 1 4 "CH_Sniper" "ch_light_soldier"
gameLogic.setKit 2 4 "US_Sniper" "us_light_soldier"

gameLogic.setKit 1 5 "CH_Sniper" "ch_light_soldier"
gameLogic.setKit 2 5 "US_Sniper" "us_light_soldier"

gameLogic.setKit 1 6 "CH_Sniper" "ch_light_soldier"
gameLogic.setKit 2 6 "US_Sniper" "us_light_soldier"

Now, lets say you only wanted 4 kits, then you blank out the last two kits, by using empty quotes for the kit and Soldier settings:

gameLogic.setKit 1 0 "CH_Sniper" "ch_light_soldier"
gameLogic.setKit 2 0 "US_Sniper" "us_light_soldier"

gameLogic.setKit 1 1 "CH_Sniper" "ch_light_soldier"
gameLogic.setKit 2 1 "US_Sniper" "us_light_soldier"

gameLogic.setKit 1 2 "CH_Sniper" "ch_light_soldier"
gameLogic.setKit 2 2 "US_Sniper" "us_light_soldier"

gameLogic.setKit 1 3 "CH_Sniper" "ch_light_soldier"
gameLogic.setKit 2 3 "US_Sniper" "us_light_soldier"

gameLogic.setKit 1 4 "CH_Sniper" "ch_light_soldier"
gameLogic.setKit 2 4 "US_Sniper" "us_light_soldier"

gameLogic.setKit 1 5 "" ""
gameLogic.setKit 2 5 "" ""

gameLogic.setKit 1 6 "" ""
gameLogic.setKit 2 6 "" ""

For singleplayer and coop, BF2 and BF2142 must have a working kit in the third slot, which us numbered as kit 2 because the kits numbers start with 0.

Which is why it's recommended to duplicate kits to all slots 

I hope this helps.

For reference:

CODE
Battlefield 2/Euro Forces Weapons
===================================

Assult Rifles



M16A2 usrif_m16a2
M16A2 (M203) USRIF_M203
AK-47 RURIF_AK47
AK-47 (GP25) RURIF_GP25
AK-101 RURIF_AK101
AK-101 (GP30) RURIF_GP30
G3A3 USRIF_G3A3
FN F2000 (GL1) sasrif_fn2000
L85A1 usrif_sa80
L85A2 (AG36) gbrif_sa80a2_l85
H&K G36-E sasrif_g36e
FAMAS eurif_famas

Assult Rifle Grenade Launchers



M203 USRGL_M203
GP25 RURGL_GP25
GP30 RURGL_GP30
GL1 sasgr_fn2000
AG36 gbgr_sa80a2_l85

Carbines



M4 USRIF_M4
AK-74U rurrif_ak74u
QBZ-97 chrif_type95
G36C usrif_g36c
SCAR-L usrif_fnscarl
HK53A3 eurif_hk53a3

Light Machine Guns



M249 SAW USLMG_M249SAW
RPK-74 rulmg_rpk74
PKM RULMG_PKM
HK21 eurif_hk21
MG36 sasrif_mg36

Sniper Rifles



M24 USRIF_M24
Type 88 chsni_type88
SVD - Dragunov rurif_Dragunov
M95 ussni_m95_barret
L96A1 gbrif_l96a1

Sub-Machine Guns



MP5 USRIF_MP5_A3
Type 85 CHRIF_Type85
PP-19 RURIF_Bizon
P90 eurif_fnp90
MP7 sasrif_mp7

Shotguns



M11-87 usrif_remington11-87
NOR982 chsht_norinco982
Saiga 12K RUSHT_saiga12
DAO-12 chsht_protecta
MK3A1 (Jackhammer) USSHT_Jackhammer
Benelli M4 gbrif_benelli_m4

Pistols



MR-444 rupis_baghira
MR-444 (silencer) rupis_baghira_silencer
QSZ-92 chpis_qsz92
QSZ-92 (silencer) chpis_qsz92_silencer
Beretta 92FS USPIS_92FS
Beretta 92FS (silencer) uspis_92fs_silencer

Rocket Launchers



Eryx CHAT_ERYX
SRAW USATP_predator

Other Items



Knife KNI_KNIFE
Ammo Kit ammokit
Med Kit medikit
Defibrillator defibrillator
Repair Wrench Wrench
Mines at_mine
Claymore usmin_claymore
Hand Grenade ushgr_m67
C4 c4_explosives
C4 Detonator c4_detonator
Smoke Grenade hgr_smoke

Parachute ParachuteLauncher

Community content is available under CC-BY-SA unless otherwise noted.