Page 1 of 1
[Help] BF2 Modding
Posted: 2014-07-25 09:07
by StevePl4y5
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.
Re: [Help] BF2 Modding
Posted: 2014-07-25 09:37
by Mats391
Can you post a bit more information? E.g. the spawner code you modified when it is not working.
Re: [Help] BF2 Modding
Posted: 2014-07-25 10:21
by Moszeusz6Pl
Did you add that zips to serverarchive.con and clientarchive.con in map folder?
Re: [Help] BF2 Modding
Posted: 2014-07-25 10:36
by StevePl4y5
I've modified the GamePlayObjects.con of Dragon_Valley, gpm_coop,16.
These are the lines I changed:
rem [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
and
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
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?
"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.
Re: [Help] BF2 Modding
Posted: 2014-07-25 13:01
by Moszeusz6Pl
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.
Posted: 2014-07-25 13:22
by Mineral
Yeah. Its very likely that the booster packs(at least those vehicles) aren't in the core build. You'll need to load them in with the archives.con stuff
Sent from my XT1052 using Tapatalk
Re: [Help] BF2 Modding
Posted: 2014-07-25 15:35
by StevePl4y5
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.
Re: [Help] BF2 Modding
Posted: 2014-07-25 17:36
by Insanitypays
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.
This is an easy fix. There's a bf2 sp64 pack for armored fury. Look that up.
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
Posted: 2014-07-27 18:06
by Swishwash
What map editor do you use to edit maps because I really want to make my own map?
Re: [Help] BF2 Modding
Posted: 2014-07-27 18:31
by StevePl4y5
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.
Re: [Help] BF2 Modding
Posted: 2014-07-28 19:43
by UTurista
*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
Code: Select all
ObjectTemplate.setObjectTemplate <int> <string>
ObjectTemplate.team <int>
ObjectTemplate.teamOnVehicle <int>
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
Re: [Help] BF2 Modding
Posted: 2014-07-28 20:04
by Mats391
The thing is done in the ObjectSpawner with
Code: Select all
ObjectTemplate.setObjectTemplate <int> <string>
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
Code: Select all
ObjectTemplate.teamOnVehicle <int>
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
Code: Select all
ObjectTemplate.dontClearTeamOnExit <bool>
Else the vehicles will go back to neutral (team 0) when you leave them, just like in bf2.
Re: [Help] BF2 Modding
Posted: 2014-07-28 20:24
by UTurista
Thanks but then what's the purpose of the multiple settings?
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
This is from Bijar Canyons Infantry AAS
Re: [Help] BF2 Modding
Posted: 2014-07-29 06:26
by Amok@ndy
O_turista_portugues wrote:Thanks but then what's the purpose of the multiple settings?
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
This is from Bijar Canyons Infantry AAS
if team1 is in control of the flag "cpname_bijar_canyons_aas16_idfmain"
this will spawn:
Code: Select all
ObjectTemplate.setObjectTemplate 1 idf_the_uh60
if team2 is in control
this will spawn:
Code: Select all
ObjectTemplate.setObjectTemplate 2 idf_the_uh60
so you can spawn 2 different vehicles depending on how many flags the enemy has for example, you can then switch to a attack helo for example
Re: [Help] BF2 Modding
Posted: 2014-07-29 06:59
by AfterDune
That doesn't work very well if you also assign a team to it though.