BF2 Editor Tutorial

Good looking textures

Option 1 - If you're having a problem with black squares in your map after painting, here is what I've been doing in order to correct the problem.  Note the this does not always work correctly see option 2.

Option 2 - One of the first things I do when making a new map is delete all of the files in the "details and Color" folders. Then go back into the editor and paint my textures. This was the only way I could get the black squares to go away.
    Open the folders called Detail and Color located in My_Map level and delete ALL files (leave the folders).  I've found doing  this right after you create a new map level is best, other wise you will have to paint it twice. 

1. Bring up your textures and in the tweak bar set "LowDetailType" to 1 or 2

for all of your textures.

For horizontal planes set to "1"

For vertical planes set to "2"

Set the side tiling X=8 and Y=6 

2. After changing all textures in tweak box select each individual texture one at a time in the resource/texture

and hit "Set Low Detail Texture" then "Generate Low Detail map".

You should see the change instantly in the editor.

 

Custom Textures

Disclaimer.

        The information on this page is a conversation about custom texture while searching for a "how to" for the Dirka Dirkastan billboard.  "View billboard"  The information here was post by zuiquan1, [TUF]Catbox, debconf and [BF:A] Croupier on bfeditor.org


If its just the billboard texture then just keep the original name and add an extension like: billboard_dice_01_you where "you" is your 3 character suffix.

all you have to do then is creating the hierarchy inside your map folder like
yourmap/Objects/StaticObjects/../../billboard_dice01_you.dds

then change the suffix within the init.con to mach your suffix that's it for textures.

To get static's on the map you have to call them in the init.con too.
don't got those EF thingy installed atm but I think you simply have to call the absolute path of the file - don't know what file that was exactly will look for it.

think it was the mesh and the tweak

--------------------------------------------------------

you will need to create a custom folder hierarchy inside your map folder that matches the default bf2 one were your texture is located, for instance create an objects folder inside your main map folder, than create a StaticObjects folder inside that one, than go on from there, I'm sure someone can explain this more clearly because I'm not sure exactly were you should put your objects mesh

I would try Objects/staticobjetcs/yourobject/mesh, and for your texture- objetcs/staticObjects/textures/yourobjects texture

than you will need to create a custom texture suffix, for instance if you named your objects texture Building_1 you need to add something like _custom texture to the end of it so it reads building_1_customtexture, than open up your maps init.con and add your custom texture suffix between the quotes like so-

if v_arg1 == BF2Editor
LevelSettings.CustomTextureSuffix "custom_texture"
else
texturemanager.customTextureSuffix "customtexture"
endIf

Ok lets get started shall we.....

1. Navigate to Levels/your_custom_map or BF2 map if that's what your working on.

2. Open up the server.zip/Init.con

3. Add the green text to your run commands like so.

run ClientArchives.con

run Heightdata.con

LevelSettings.InitWorld

run Terrain.con BF2Editor

run StaticObjects.con BF2Editor

run Sounds.con

run Sky.con BF2Editor

run Editor/GamePlayObjects.con host

UndergrowthEditable.create

Undergrowth.load Levelsyour_map

run Overgrowth/Overgrowth.con

Overgrowth.editorEnable 1

run AmbientObjects.con BF2Editor


run Water.con

else

run ClientArchives.con

run Heightdata.con

run Terrain.con v_arg2

run Sky.con v_arg2

run CompiledRoads.con

run Sounds.con

run tmp.con v_arg1

Undergrowth.load Levelsyour_map

run Overgrowth/Overgrowth.con

run Overgrowth/OvergrowthCollision.con

run AmbientObjects.con

run Water.con


You should now see what we're getting at.

4. Go to EA GAMES/Battlefield 2/Mods/bf2 and copy the ClientArchives.con uncheck read only in the file properties and add it to your_maps/server.zip

5. Open the server.zip/ClientArchives.con that you just added and in notepad amend it to look like this.

fileManager.mountArchive Levels/your_map/Objects_client.zip Objects

fileManager.mountArchive Objects_client.zip Objects

fileManager.mountArchive Common_client.zip Common

fileManager.mountArchive Menu_client.zip Menu

fileManager.mountArchive Fonts_client.zip Fonts

fileManager.mountArchive Shaders_client.zip Shaders

6. You are now going to copy the entire BF2 Objects_client.zip from mods/BF2 into Levels/Your_Map (Don't worry we are going to be deleting everything except the folder structure and the texture/s that you are going to customize, stay with me on this)

7. Now depending on what you want to give a custom skin will determine which folder/s textures you keep in the Objects_client.zip for the purpose of this exercise I changed the US soldier skin, this will probably be the most popular thing to be customized anyway.

8. Delete everything in the .zip except soldiers/Us/Textures/us_3p_heavy_c and US_3p_Light_C (we will only be changing the 3rd person textures)

9. Open the textures in Photoshop and work your magic, save as DXT 1. Keep the same name but add a _BFA (underscore BFA is my custom texture suffix, you can add whatever you like as long as you have the _ ) So my texture name looks like this: us_3p_heavy_c_BFA

10. Open up Levels/your_map/Objects_client.zip delete the original BF2 textures and add your newly repainted and renamed US 3p textures.

Nearly done now folks.

11. Open up Levels/your_map/server.zip/Init.con and change the custom texture suffix, remember mine is BFA yours may be whatever you want. Mine looks like this:

if v_arg1 == BF2Editor

LevelSettings.CustomTextureSuffix "BFA"

else

texturemanager.customTextureSuffix "BFA"

endIf


Congratulations your done. Load up the map jump in a vehicle and change the camera angle so you can see your nice new 3p custom textures added to your map.

Note: You will need to uncheck the read only properties of the maps Init.con if working on a stock BF2 map. This will work best with bundledMesh's as they don't use the texture layers but should work with static's however will require more work on the textures unless you just want to change the detail, haven't tested it though and I don't know if the custom texture suffix will work with them, someone confirm please.

******************************************** END *******************************************


Well I don't see why it wouldn't work with objects, but getting them into the editor via the maps/Objects_client/server.zip could be a problem.

Also you can rename the Objects_client/server.zip to whaterver you want like Croupiers_Objects_client.zip and then run it like this:

fileManager.mountArchive Levels/your_map/Croupiers_Objects_client.zip Objects.

For adding custom objects I suppose you could add that line to the BF2 ClientArchives.con and maybe access your content with BF2's in the Editor. Plus you would need to add client and server archives.

Well if people are out there that say they have done this before, then why the heck aren't you sharing with the community, it's not like this is secret mod stuff as it really only pertains to custom mapping. Mods don't need to add this to maps. Everything in the mod is already customized. Also talking about it and actually doing it are two separate things.

--------------------

The key is the fileManager.MountArchive statement needs to be in a separate con file from the init.con. I had tried to put that statement in init.con but it failed and I dismissed it as impossible via this route (this appears to be the only exception, cause for the most part you can put any valid con code in any con file and as long as the con file is ran, it works. However, this is not the case with archive mounting).

Also note that name means nothing. All that matters is that all the code points to the right place, and that the filemanager statement is in a separate con from the init.con.

Also I noticed that you cannot override existing textures, you must create your own set.

---------------

Also I noticed that you cannot override existing textures, you must create your own set. That's why I added the texture suffix BFA.

------------------
I figured after I started playing with it. I also noticed that for some odd reason I got it work when I renamed the ClietnArchives.con to objects.con, but now I cannot get it to work. Does ClientArchives.con have to be the name of the con file which contains all the filemanager statements?

Also after looking at the textures for static's, I noticed that they all share a set of textures. Which means that since you cannot override textures you cannot create a suffix for static's. I really hope someone can prove me wrong on this one.

 

 

Prev