[Help] BF2 Modding
-
StevePl4y5
- Posts: 385
- Joined: 2014-02-02 14:33
[Help] BF2 Modding
So, I'm trying to learn how to mod BF2, I already know a few basics and stuff, but clearly not enough. I'm creating this thread with a specific question, but I'll surely have a ton of other questions in the future, so I'll just use this thread to ask more questions later.
But right now, I have this. Yesterday, I felt like customizing my vBF2 a little bit, changed a few weapons on kits, changed a few map assets. And then I came across something I couldn't fix. I tried to replace the attack choppers on Dragon Valley with the scout helicopteres from Armored Fury (aka, booster pack 2) which files are located in "Booster Client" and "Booster Server", but when I loaded the map, the helipads were empty. I changed the file again and replaced the scout choppers with vBF2 trans choppers to make sure I was placing stuff in the right place, and it worked fine.
Tried to google it, found nothing. So, I now come to you guys. Hopefully you can help me.
But right now, I have this. Yesterday, I felt like customizing my vBF2 a little bit, changed a few weapons on kits, changed a few map assets. And then I came across something I couldn't fix. I tried to replace the attack choppers on Dragon Valley with the scout helicopteres from Armored Fury (aka, booster pack 2) which files are located in "Booster Client" and "Booster Server", but when I loaded the map, the helipads were empty. I changed the file again and replaced the scout choppers with vBF2 trans choppers to make sure I was placing stuff in the right place, and it worked fine.
Tried to google it, found nothing. So, I now come to you guys. Hopefully you can help me.
- Mats391
- PR:BF2 Lead Developer
- Posts: 7643
- Joined: 2010-08-06 18:06
Re: [Help] BF2 Modding
Can you post a bit more information? E.g. the spawner code you modified when it is not working.
-
Moszeusz6Pl
- Retired PR Developer
- Posts: 939
- Joined: 2010-06-24 13:41
Re: [Help] BF2 Modding
Did you add that zips to serverarchive.con and clientarchive.con in map folder?

-
StevePl4y5
- Posts: 385
- Joined: 2014-02-02 14:33
Re: [Help] BF2 Modding
I've modified the GamePlayObjects.con of Dragon_Valley, gpm_coop,16.
These are the lines I changed:
"Booster_client.zip" and "Booster_server.zip" are already added by default on "serverarchive.con" and "clientarchive.con" in the bf2 folder. I'm not sure what you mean with map folder, I can't find those files in there.
These are the lines I changed:
andrem [ObjectSpawnerTemplate: CPNAME_DV_SP16_refinery_AttakHeli]
ObjectTemplate.create ObjectSpawner CPNAME_DV_SP16_refinery_AttakHeli
ObjectTemplate.activeSafe ObjectSpawner CPNAME_DV_SP16_refinery_AttakHeli
ObjectTemplate.modifiedByUser dgo
ObjectTemplate.isNotSaveable 1
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.setObjectTemplate 1 che_wz11
All I changed were the "ObjectTemplate.setObjectTemplate" lines. Like I said, I then replaced "che_wz11" with "chthe_z8" and "she_littlebird" with "usthe_uh60", to see if it would work, and it did. So I'm guessing the problem is in the Booster pack files?rem [ObjectSpawnerTemplate: CPNAME_DV_SP16_woodyard_AttakHeli]
ObjectTemplate.create ObjectSpawner CPNAME_DV_SP16_woodyard_AttakHeli
ObjectTemplate.activeSafe ObjectSpawner CPNAME_DV_SP16_woodyard_AttakHeli
ObjectTemplate.modifiedByUser dgo
ObjectTemplate.isNotSaveable 1
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.setObjectTemplate 2 she_littlebird
"Booster_client.zip" and "Booster_server.zip" are already added by default on "serverarchive.con" and "clientarchive.con" in the bf2 folder. I'm not sure what you mean with map folder, I can't find those files in there.
-
Moszeusz6Pl
- Retired PR Developer
- Posts: 939
- Joined: 2010-06-24 13:41
Re: [Help] BF2 Modding
I though there was added to "serverarchive.con" and "clientarchive.con" in level folder, as minimods works. If it's in main one, it should work. Does any other object from booster work? You could try runing BF in debug mode, to see if you could get any error message about it.

-
StevePl4y5
- Posts: 385
- Joined: 2014-02-02 14:33
Re: [Help] BF2 Modding
Ok. So I tried to swap one of the Abrams in Op Road Rage (which is a Armored Fury map) with the Littlebird, and guess what. It spawned, AI got in it and everything, but when I tried to get in:

EDIT:
Turns out, if there are no bots inside of the vehicle, I can use it. Still doesn't work on vBF2 maps tho.

EDIT:
Turns out, if there are no bots inside of the vehicle, I can use it. Still doesn't work on vBF2 maps tho.
Last edited by StevePl4y5 on 2014-07-25 15:55, edited 2 times in total.
-
Insanitypays
- PR:BF2 Developer
- Posts: 753
- Joined: 2009-06-13 09:23
Re: [Help] BF2 Modding
This is an easy fix. There's a bf2 sp64 pack for armored fury. Look that up.StevePl4y5 wrote:Turns out, if there are no bots inside of the vehicle, I can use it. Still doesn't work on vBF2 maps tho.
It has updated ai files allowing bots to use all of the armored fury vehicles.
You just need to take the littlebird files from their zip and copy paste them over your own. That should work.
I don't remember for sure if they provide separate zips containing assets or if those are included in the map files... I'm sure you'll figure that out
-
StevePl4y5
- Posts: 385
- Joined: 2014-02-02 14:33
Re: [Help] BF2 Modding
Thanks you a bunch Insanity, after some google searching I managed to find the BF2ALL64 mod, everything works great now.
Swishwash, we're not talking about making maps here, just changing the assets that spawn at already defined points in a map, which you can do with notepad. Map making is a whole other subject, but it should be fairly easy to find information on that, I'm sure there's a full blown thread about it in this section of the forums. I believe you need BF2 Editor.
Swishwash, we're not talking about making maps here, just changing the assets that spawn at already defined points in a map, which you can do with notepad. Map making is a whole other subject, but it should be fairly easy to find information on that, I'm sure there's a full blown thread about it in this section of the forums. I believe you need BF2 Editor.
-
UTurista
- PR:BF2 Developer
- Posts: 985
- Joined: 2011-06-14 14:13
Re: [Help] BF2 Modding
*A bit of thread hijack*
Can someone explains what makes a vehicle having a side? For example why is the challenger on the British side?
I've found 3 attributes
I've been using the first argument of .setObjectTemplate to determinate the side but in some levels, for example Bijar Canyons_CQ_16, every spawner has this attribute set twice with value 1 and 2 and rarely the spawners have the other two attributes.
If someone could explaining I would appreciate
Can someone explains what makes a vehicle having a side? For example why is the challenger on the British side?
I've found 3 attributes
Code: Select all
ObjectTemplate.setObjectTemplate <int> <string>
ObjectTemplate.team <int>
ObjectTemplate.teamOnVehicle <int>If someone could explaining I would appreciate

Dont question the wikipedia! Just because it reports different things on different languages does not make it unreliable source!
- Mats391
- PR:BF2 Lead Developer
- Posts: 7643
- Joined: 2010-08-06 18:06
Re: [Help] BF2 Modding
The thing is done in the ObjectSpawner with
This defines what should spawn when the flag that this spawner belongs to it capped by a certain team. The integers are 0, 1 and 2. 0 is neutral, 1 opfor and 2 blufor. <string> is the template name of the vehicle to spawn
I think the int is rather a boolean. Iirc that defines if the object should spawn belonging to the team or as neutral.
This is an alternative way to define which team the spawner belongs to w/o need of flags. The team numbers are same as above. You can also use
when you create the actual spawner object.
In the vehicle you then should have
Else the vehicles will go back to neutral (team 0) when you leave them, just like in bf2.
Code: Select all
ObjectTemplate.setObjectTemplate <int> <string>Code: Select all
ObjectTemplate.teamOnVehicle <int>Code: Select all
ObjectTemplate.team <int>Code: Select all
Object.team <int>In the vehicle you then should have
Code: Select all
ObjectTemplate.dontClearTeamOnExit <bool>-
UTurista
- PR:BF2 Developer
- Posts: 985
- Joined: 2011-06-14 14:13
Re: [Help] BF2 Modding
Thanks but then what's the purpose of the multiple settings?
This is from Bijar Canyons Infantry AAS
Code: Select all
ObjectTemplate.create ObjectSpawner cpname_bijar_canyons_aas16_idfmain_idf_transheli1
...
ObjectTemplate.setObjectTemplate 1 idf_the_uh60
ObjectTemplate.setObjectTemplate 2 idf_the_uh60
...
ObjectTemplate.team 2
ObjectTemplate.teamOnVehicle 1
Dont question the wikipedia! Just because it reports different things on different languages does not make it unreliable source!
-
Amok@ndy
- Retired PR Developer
- Posts: 5144
- Joined: 2008-11-27 22:13
Re: [Help] BF2 Modding
if team1 is in control of the flag "cpname_bijar_canyons_aas16_idfmain"O_turista_portugues wrote:Thanks but then what's the purpose of the multiple settings?
This is from Bijar Canyons Infantry AASCode: Select all
ObjectTemplate.create ObjectSpawner cpname_bijar_canyons_aas16_idfmain_idf_transheli1 ... ObjectTemplate.setObjectTemplate 1 idf_the_uh60 ObjectTemplate.setObjectTemplate 2 idf_the_uh60 ... ObjectTemplate.team 2 ObjectTemplate.teamOnVehicle 1
this will spawn:
Code: Select all
ObjectTemplate.setObjectTemplate 1 idf_the_uh60this will spawn:
Code: Select all
ObjectTemplate.setObjectTemplate 2 idf_the_uh60
-
AfterDune
- Retired PR Developer
- Posts: 17094
- Joined: 2007-02-08 07:19


