Battlefield 2 invades the high-tech frontlines of modern warfare. The game brings the intensity and excitement of Battlefield 1942 into the modern era with enhanced team play and the latest, most technologically advanced vehicles and weapons systems available to man.

Post tutorial Report RSS How to change the time of a destroyed vehicle

This is my way to change the time of a destroyed vehicle (any type of vehicle in-game)

Posted by on - Basic Server Side Coding

Yesterday, I had the idea of ​​making a way to change the time of a destroyed vehicle, be it a plane, helicopter, tank or APC. This day I improvised it, making it last for the entire game (apparently). Before making the configuration, keep this in mind:
It is not my fault that your vehicle that you loved has been damaged because of me, you have to make a backup copy of the vehicle you want to change.


  • Step 1: Choose one of the vehicles to which you would have to configure

It is necessary to take into account what the idea of ​​your vehicle is to change its configuration. In my case, I will choose the APC_BTR90 (Spetnaz Vehicle, MEC). If you want, you can change the code of XPak2Littlebird/MD520 or Usthe_UH60


  • Step 2: Locate where the vehicle is

To locate where the vehicle is, it is easy, go to the location of BF2, mods, DVLQ (my personal mod, you can choose BF2), Object Server, Vehicles and those you want to choose from, only Sea, Air and Land are available, if you have all 3 dlcs you may have Xpak Vehicles

  • Step 3: Change vehicle settings

To know what the vehicle is before configuring, you could search for it on Google, anyway, to change the configuration, you have to go to the vehicle you want to configure, which is set to .Tweak (it is the configuration of the handling, icon, and other things but), at the beginning when you see this code (it is almost at the end of that code):


ObjectTemplate.armor.wreckHitPoints 1000
ObjectTemplate.armor.timeToStayAsWreck 10


You have to change it to this code

ObjectTemplate.armor.wreckHitPoints 90000
ObjectTemplate.armor.timeToStayAsWreck 90000


  • Step 4: Test and Fun

This should be the end, the only thing you have to do is open the mod/game, and the map where this vehicle appears.


If you have problems contact me in PM, or by commenting ;)

Post comment Comments
Andrejjdikunv
Andrejjdikunv - - 268 comments

very nice))

Reply Good karma Bad karma+2 votes
Ryan_Production
Ryan_Production - - 421 comments

Wreck time also depends on the min/max spawn time value

Reply Good karma Bad karma+2 votes
harzoplay18
harzoplay18 - - 82 comments

Did you know that if you put -1 in "ObjectTemplate.armor.timeToStayAsWreck" the time will be infinite

Reply Good karma Bad karma+3 votes
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: