Creating zip Files For Custom Content

Information and tutorials related to modding BF2.
Post Reply
J.F.Leusch69
Retired PR Developer
Posts: 2988
Joined: 2008-04-23 16:37

Creating zip Files For Custom Content

Post by J.F.Leusch69 »

Creating zip files for custom content

This tutorial is about creating zip files for your map's custom content (like textures, statics, etc).

For this tutorial you will need the following:
  • A working map
  • Winrar/7zip or a simular programm to create zip files
  • Custom content

Step 1: Creating the zip files
'Go to your map's folder and create zip file there. to get the correct name you need to know which sort of content you want to add.


common_client.zip

This is use for custom loading music, custom detail terrain textures or custom sky textures. For detailed folder structur inside the zip file see the common_client.zip in your vBF2 installement (Battlefield2/mods/bf2).


objects_client.zip

This is for all sorts of custom objects like statics, weapons, vehicles, textures, etc. For detailed folder structur inside the zip file see the objects_client.zip in your vBF2 installement (Battlefield2/mods/bf2). You need to put here the different BF2 meshes .bundledmesh, .staticmesh, .skinnedmesh ,textures in .dds and sounds in .ogg or .wav.

For a basic static the structur inside the zip could be like this:
staticobjects/pr/russia/houses/ru_house_01/meshes/ru_house_01.staticmesh

For a custom texture it could look like this:
staticobjects/common/textures/common_ch_billb_c_CuStOmSuFFiX.dds
NOTE: It is not possible to load custom woodland textures on top of existing woodland textures!


objects_server.zip

This is for all sorts of custom objects like statics, weapons, vehicles, textures, etc. For detailed folder structur inside the zip file see the objects_server.zip in your vBF2 installement (Battlefield2/mods/bf2). You need to put here the BF2 .collisionmesh, .con, .tweak.

For a basic static the structur inside the zip could be like this:
staticobjects/pr/russia/houses/ru_house_01/meshes/ru_house_01.collisionmesh
staticobjects/pr/russia/houses/ru_house_01/ru_house_01.con
staticobjects/pr/russia/houses/ru_house_01/ru_house_01.tweak



Step 2: Creating the Client/ServerArchives.con
Simply download the attached Archives.zip. Inside it you will find 2 files (ClientArchives.con and ServerArchives.con).
Depending on the type of custom content (see above) you need just the ClientArchives.con (when only adding content clientside (common_client.zip and/or objects_client.zip)) or also the ServerArchives.con (when adding content serverside/complett new objects, because the than need collisionmeshes and tweaks and cons).
When you know what content you want to add, you can open the needed Client/ServerArchives.con and remove the unneeded lines and insert your map's name in place of YoUr_lEvEl.



Step 3: Adding Client/ServerArchives.con to your map
Now you got some zip's in your map folder along the default client.zip and server.zip which contain the map files.
to get your map to load the custom content zip's, all you need to do is put the needed Client/ServerArchives.con in the server.zip of your map.


done.
You do not have the required permissions to view the files attached to this post.
Last edited by J.F.Leusch69 on 2011-08-22 17:27, edited 2 times in total.
jax
Posts: 355
Joined: 2011-08-07 02:47

Re: [Tutorial] Creating zip files for custom content

Post by jax »

I do believe many thanks are in order, so many thanks :D

Off we fuck.
Wakain
Posts: 1159
Joined: 2009-11-23 21:58

Re: [Tutorial] Creating zip files for custom content

Post by Wakain »

Is anything in the above specific to pr? because I wanted to use customkits for bf2 vanilla's road to jalalabad and it didn't work
Rudd
Retired PR Developer
Posts: 21225
Joined: 2007-08-15 14:32

Re: [Tutorial] Creating zip files for custom content

Post by Rudd »

Wakain wrote:Is anything in the above specific to pr? because I wanted to use customkits for bf2 vanilla's road to jalalabad and it didn't work
no, this is how vbf2 does it also, though they try and keep everything inside their map zips if they can
Image
Wakain
Posts: 1159
Joined: 2009-11-23 21:58

Re: [Tutorial] Creating zip files for custom content

Post by Wakain »

[R-DEV]Rudd wrote:no, this is how vbf2 does it also, though they try and keep everything inside their map zips if they can
yeah, I've got some maps by Jones for reference and he appears to have switched his method from the OP's to having objects folders in server and client zips.

still struggling with this, having tried both methods by now, it seems the map rather loads vbf2 kits than my custom ones :p

I'm editing vbf2 mec kits to better fit a fictional siege of Deraa scenario, my edited Road to Jalalabad map is located in the xpack levels folder (so I have acces to the SF insurgents), which may perhaps be the reason for my problems.

as you can see, I'm practising my bf2 modding skills with vanilla, pr is still quite a bridge too far for me ;)
J.F.Leusch69
Retired PR Developer
Posts: 2988
Joined: 2008-04-23 16:37

Re: [Tutorial] Creating zip files for custom content

Post by J.F.Leusch69 »

it might be better to first test your custom skins in a vBF2 level to minimize the chance of a fault somewhere else causing a problem.

also are you sure you really packed the skins in the right format (.zip and not .rar) and the right location (for example Objects_client.zip\Kits\Mec\textures )?
you also should check if your customsuffix is right (for example mec_kits_c_SiegeOfDeraa.dds for the texture file and "SiegeOfDeraa" for the map's init.con file [bf2 is here not case sensitivity]).
CTRifle
Retired PR Developer
Posts: 1056
Joined: 2011-01-03 14:57

Re: [Tutorial] Creating zip files for custom content

Post by CTRifle »

For PR_edit, do new things/objects ect need to be packed into the zips or can they stay in just the folders? I thought you only had to pack for the final when you bring it back to the main PR
Image
Image
Amok@ndy
Retired PR Developer
Posts: 5144
Joined: 2008-11-27 22:13

Re: [Tutorial] Creating zip files for custom content

Post by Amok@ndy »

if you want to use objects ingame you need to pack the .zip only maps work unzipped
Image
CTRifle
Retired PR Developer
Posts: 1056
Joined: 2011-01-03 14:57

Re: [Tutorial] Creating zip files for custom content

Post by CTRifle »

Alright thanks!
Image
Image
CTRifle
Retired PR Developer
Posts: 1056
Joined: 2011-01-03 14:57

Re: [Tutorial] Creating zip files for custom content

Post by CTRifle »

Double post sorry :O

Another question, for custom .cons do I throw those in the .zips as well? Im trying to add a material to my map wondering how I would do that
Image
Image
Onil
Posts: 1232
Joined: 2007-08-19 09:50

Re: [Tutorial] Creating zip files for custom content

Post by Onil »

Loading the localization file from within the maps zip files is not possible, correct?
Image
eurekafag
Posts: 5
Joined: 2015-06-25 16:05

Re: Creating zip Files For Custom Content

Post by eurekafag »

i've created a custom static, placed in on a test_airfield map and zipped all needed files according to op, now I can easily load the map with my static on it, but if I give that map to other people they cannot load it, client or server doestn't matter
what could be wrong?
Amok@ndy
Retired PR Developer
Posts: 5144
Joined: 2008-11-27 22:13

Re: Creating zip Files For Custom Content

Post by Amok@ndy »

ask them to run in windowed mode so they get an error message.
Image
RestyBohol61
Posts: 8
Joined: 2013-07-19 13:15

Re: Creating zip Files For Custom Content

Post by RestyBohol61 »

When I created a common_client.zip in my custom map, does this work when I'm gonna use my own win.ogg(e.g; us_win.ogg, mec_win.ogg, etc) without using the existing or vanilla one. I want every faction has their own win.ogg...
Last edited by RestyBohol61 on 2018-10-30 18:30, edited 2 times in total.
User avatar
ALADE3N
PR:BF2 Developer
Posts: 574
Joined: 2016-02-13 17:34
Location: Philippines

Re: Creating zip Files For Custom Content

Post by ALADE3N »

RestyBohol61 wrote:When I created a common_client.zip in my custom map, does this work when I'm gonna use my own win.ogg(e.g; us_win.ogg, mec_win.ogg, etc) without using the existing or vanilla one. I want every faction has their own win.ogg...
custom loading and win/lose sounds seems to not work properly when packed as a custom content.
Image
mectus11
PR:BF2 Developer
Posts: 805
Joined: 2015-09-05 19:44

Re: Creating zip Files For Custom Content

Post by mectus11 »

I think you can test them out locally by making an offline account, just back up the original files and replace them with the ones that have the changes you made.
(Don't forget to back up your files before doing this)
Image
Image Image Image
lakinen
Posts: 215
Joined: 2016-12-03 15:24

Re: Creating zip Files For Custom Content

Post by lakinen »

mectus11 wrote:I think you can test them out locally by making an offline account, just back up the original files and replace them with the ones that have the changes you made.
(Don't forget to back up your files before doing this)
Do not forget this!

The solution is located in sound\gamesounds.con. for RestyBohol61
And it's related to faction,not map.


There's no real flame on your screen, it's just magic :razz:
greeting
Last edited by lakinen on 2018-10-31 14:53, edited 2 times in total.
RestyBohol61
Posts: 8
Joined: 2013-07-19 13:15

Re: Creating zip Files For Custom Content

Post by RestyBohol61 »

lakinen wrote:Do not forget this!

The solution is located in sound\gamesounds.con. for RestyBohol61
And it's related to faction,not map.


There's no real flame on your screen, it's just magic :razz:
greeting
I'll try that, thanks :-) ....
Post Reply

Return to “Modding Tutorials”