The year is 2142 and the dawn of a new ice age has thrown the world into a panic. The soil not covered by ice can only feed a fraction of the Earth's population. The maths is simple and brutal: some will live, most will die. In Battlefield 2142, players choose to fight for one of two military superpowers - the European Union or the newly formed Pan Asian Coalition - in an epic battle for survival.

Post tutorial Report content RSS feed How to customize a vehicle and a kit

Please, this is WAY to hard to summarize, just read the content.

Posted by on - Intermediate Server Side Coding

This is basically the same as the weapon tutorial , only instead of going to, u want to go to (note that bp1, in any of the folder names, includes all of the objects that are included in the Northern Strike booster pack).

In, u will find the folders for all vehicles, including pods, parachutes, and turrets (manned turrets, not sentries). as_ folders are PAC (meaning assault) and eu_/us_ folders are EU (developers made EU US by mistake, or to make things easier, idk). common holds the pods, antennas, horns, animations, etc...basically all of the "common" things between vehicles. I will be using my modded NEKOMATA for this tutorial:

rem ---BeginComp:Armor ---
~~~rem ---EndComp ---

For all health chars, this includes water damage, upside down damage, and wreckage health etc....

rem ---BeginComp:Radio ---
ObjectTemplate.createComponent Radio
ObjectTemplate.Radio.spottedMessage "tank_spotted"=MUST BE PERFECT, OTHERWISE IT WILL CRASH
rem ---EndComp ---

For what message to use when someone "spots" a tank. go into the strings file (located in the localizations folder, on the same level as the objects folder. oh and u need microsoft excel) to see what things u can change it to.

---BeginComp:SingleFireComp ---

When looking in the fire chars. search for things like exitlocation and FOV to find other random things, experiment (make either a backup, or note what u changed when u edit these as you may f*ck up and make the game crash) and find other ways to alter the battlefield.

Now, for coding a kit, go into, choose the faction you want to edit (yes you can give the EU a different kit layout than the PAC). I will be using my modded PAC support kit for this tutorial.

ObjectTemplate.dogTagRewardTemplate knife_unlock
ObjectTemplate.dogTagExchangeTemplate knife
rem -------------------------------------
ObjectTemplate.addTemplate Knife
ObjectTemplate.addTemplate as_handgun
ObjectTemplate.addTemplate as_mg
ObjectTemplate.addTemplate unl_hub_ammo
ObjectTemplate.addTemplate item_dummy
ObjectTemplate.addTemplate ParachuteLauncher
ObjectTemplate.addTemplate UnlockPac_SupportHeavy0
ObjectTemplate.addTemplate UnlockPac_SupportEngineer0
ObjectTemplate.addTemplate UnlockPac_SupportPlayer0
ObjectTemplate.addTemplate UnlockPac_SupportSquadLeader0
ObjectTemplate.addTemplate UnlockPac_SupportHeavy1
ObjectTemplate.addTemplate UnlockPac_SupportEngineer1
ObjectTemplate.addTemplate UnlockPac_SupportPlayer1
ObjectTemplate.addTemplate UnlockPac_SupportSquadLeader1
ObjectTemplate.addTemplate UnlockPac_SupportHeavy2
ObjectTemplate.addTemplate UnlockPac_SupportEngineer2
ObjectTemplate.addTemplate UnlockPac_SupportPlayer2
ObjectTemplate.addTemplate UnlockPac_SupportSquadLeader2
ObjectTemplate.addTemplate UnlockPac_SupportHeavy3
ObjectTemplate.addTemplate UnlockPac_SupportEngineer3
ObjectTemplate.addTemplate UnlockPac_SupportPlayer3
ObjectTemplate.addTemplate UnlockPac_SupportSquadLeader3
ObjectTemplate.addTemplate UnlockPac_SupportHeavy4
ObjectTemplate.addTemplate UnlockPac_SupportEngineer4
ObjectTemplate.addTemplate UnlockPac_SupportPlayer4
ObjectTemplate.addTemplate UnlockPac_SupportPlayer5
ObjectTemplate.addTemplate UnlockPac_SupportDogTagReplacement
rem -------------------------------------

To find all the different things the kit starts with. if u look near the top u will see knife, as_handgun, as_mg, and unl_hub_ammo, these are; knife, PAC pistol, Shuko, and ammo hub. the top two lines are about the knife, i never messed with those.

ObjectTemplate.create ItemContainer UnlockPac_SupportHeavy0
ObjectTemplate.addTemplate Unl_Mine_AntiPersonnel
ObjectTemplate.unlockLevel 0

ObjectTemplate.create ItemContainer UnlockPac_SupportEngineer0
ObjectTemplate.addTemplate Bp1_sonar
ObjectTemplate.unlockLevel 0
ObjectTemplate.unlockBranch UB_Second

ObjectTemplate.create ItemContainer UnlockPac_SupportHeavy1
ObjectTemplate.addTemplate Hud_As_Support
rem ---BeginComp:Ability ---
ObjectTemplate.createComponent Ability
ObjectTemplate.ability.networkableHudShowCloaked 1
rem ---EndComp ---
ObjectTemplate.unlockLevel 1

ObjectTemplate.create ItemContainer UnlockPac_SupportEngineer1
ObjectTemplate.addTemplate unl_ammo_upgrade
rem ---BeginComp:Ability ---
ObjectTemplate.createComponent Ability
ObjectTemplate.ability.IncreasedRepairAbility 1.15
rem ---EndComp ---
ObjectTemplate.unlockLevel 1
ObjectTemplate.unlockBranch UB_Second

ObjectTemplate.create ItemContainer UnlockPac_SupportHeavy2
ObjectTemplate.addTemplate Unl_Deployer_Sentrygun
ObjectTemplate.unlockLevel 2

ObjectTemplate.create ItemContainer UnlockPac_SupportEngineer2
ObjectTemplate.addTemplate Bp1_Expl_Shotgun
ObjectTemplate.unlockLevel 2
ObjectTemplate.unlockBranch UB_Second

ObjectTemplate.create ItemContainer UnlockPac_SupportHeavy3
ObjectTemplate.addTemplate unl_hmg
ObjectTemplate.replaceItem as_mg
ObjectTemplate.unlockLevel 3

ObjectTemplate.create ItemContainer UnlockPac_SupportEngineer3
ObjectTemplate.addTemplate unl_shotgun
ObjectTemplate.replaceItem as_mg
ObjectTemplate.unlockLevel 3
ObjectTemplate.unlockBranch UB_Second

To find the unlocks. UB_Second means the right column of unlocks, and unlock level means, well, what level it is at in that specific tier. You can mess with the abilities (level 1, not 0, 1) to alter the upgrades.

If you have any questions, and you probably will, message me, plz dont put anything in these comments. Anyway, meet you on the Battlefield!

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Battlefield 2142
Windows, Mac
Electronic Arts
Refractor 2
Send Message
Release date
Game watch
Start tracking
Related Games
Battlefield 2142
Battlefield 2142 First Person Shooter
Related Engines
Refractor 2
Refractor 2 Commercial
Related Groups
DICE Developer & Publisher
Electronic Arts
Electronic Arts Developer & Publisher