|
Modding Tutorials Information and tutorials related to modding BF2. |
|
Thread Tools | Display Modes |
2010-07-13, 12:37 | #1 | ||||||||||
Retired PR Developer
|
Recreating Map's Editor Files
In this tutorial I'll show you how to (re)create the editor files for a map, in cases where there's no way to gain access to the original ones or if you had them, but lost them.
If you don't know what "editor files" are; these are the files located inside your map's Editor folder, putting it simply. From here they can be edited via BFEditor and saved in an uncompressed format, from where later on you'll compile the compressed files when you save. In case your files get corrupted, you can resave from here where you'll always have working files. Not all files edited with BFEditor (and indirectly, by you) are located here, like Staticobjects.con, Sky.con... those are in the main folder, can be read and do not need to be recreated in anyway, and some files are saved from bfeditor's rawdata folder, like lowdetail textures and undergrowth. You'll need:
Preparations I'm going to pick Gulf of Oman from Battlefield 2 for this tutorial. You can pick any map or mod, process is the same. To be on the safe side I'm going to create a temporary mod for this tutorial and copy the map to there, so I can still play BF2. If you're already using a copy of your mod intended for editing, then you can skip this and do it there. Now before we begin, install the PS action SalvageColorDetail to Adobe\Adobe Photoshop CS3\Presets\Actions. Extract your map's client and server .zips. Before you continue, go into the above directory, right-click on your maps' folder and untick 'Read only', in case the map's files have this enabled, in my case they do since DiCE made everything read only in their maps. Go back to your map folder and create a new folder called Editor (Caps doesn't matter). We're all set to begin. Salvaging the ground textures We'll start with probably the most important aspect of editor files, the ground textures. Color, detail and lowdetail maps are already here, but they aren't in proper format and/or size to be edited. Copy your colormaps, detailmaps and lowdetailmaps folders in your map directory to your Editor folder. Open up Photoshop CS3. We'll begin with the colormaps. These do not need to be resized, only resaved. Select all the files inside the folder and drag&drop them into Photoshop. Give it a few moments for all the files to be loaded. On the bottom right of your PS interface there should be an Actions tab, where you might already see your SalvageColorDetail action set. If you do not see this tab, press F9. Now go to File>Automate>Batch, and select the SalvageColorDetail action set and under actions, saveColor, leave the source at Opened Files. and let it rip. If you observe the Actions tab, you'll see Photoshop working on your opened files, which will get duplicated only inside Photoshop, don't worry it doesn't double the actual files. Quote:
We continue with detail and lowdetailmaps. Both of these need to be resized and resaved to same size and format and as you guessed by now, the action set does the dirty work here. Again, drag&drop files from both lowdetail and detailmaps folders into Photoshop, go to File>Automate>Batch. Using the same SalvageColorDetail set, this time change the action from saveColor to ResizeSave_DetailLowdetail and let it rip, then once done, close Photoshop. You now have ground textures you can work with. Setting up Ground Properties Load up your mod and map in BFEditor. You now have nicely looking textures on your map, but you're missing the lowdetail texture and detail textures. Actually, you're only missing the latter, the lowdetail texture is already here, just needs to be regenerated. Quote:
Quote:
Quote:
In my case the texture is detail_rock04_dark. Select a material, in my case the appropriate one would be 'rock'. Look around your map to find where the texture is used, though first layers are always sloped areas. Now generate lowdetailmaps. Since the texture is already here, as said, simply select a type (1 or 2) and click on generate LowDetailMaps. Quote:
Save your map. You now have working ground textures with detail and lowdetail textures. From here you can freely edit the terrain and paint new areas. Setting up Lightmap settings In case you want to relightmap the map, you'll need to start off with some lightmap settings. You can tweak these later, but first lets get them set up. Quote:
In the Tweak bar, right-click on LightmapsSettings(Objectmode) and click Save Object mode then click the Switch to Terrain mode and save the terrain mode. Now to fix the sky settings. Go again to Light>Preset, but scroll down below the lightmap settings and select your map's name, this will reset back to your map's sky settings. Quote:
Setting up your GamePlayObjects Still in the editor, switch to levelEditor (if you aren't already there) and under Layers in the rightside tab, start creating new layers for gamemodes and sizes. Quote:
Quote:
Go to your map's Editor folder and open the GPO.con. Its currently empty with some default lines, which you'll delete. Keep the file open and go to the main folder>Gamemodes, then to each separate gamemode and size; let's start with gpm_cq and 64. Open that GPO and scroll down to the bottom, where you should see what layer the combat zone and everything else is on. My intended layer for gpm_cq is layer 2, so in this case no need to change this, however you will most likely need to change the layer, so here's how to do it. Press Ctrl+H to open Find&Replace function and under Find write the layer that's currently used in the file ie. 'layer 4', note the spacing. Under Replace with write the layer you want it to be on ie. 'layer 2' then Replace All and give it a few moments to replace all the strings. Now press Ctrl+A to select everything and paste it into your empty Editor GPO. No need to save the file you just edited. Repeat the above for all other GPOs, once done close and save the Editor GPO. You now have all the existing GPOs in one place to edit. Quote:
This is optional, if you plan to renavmesh the map or mess with control point placement or naming or you combined the SP/Coop GPOs etc. I'd advise not to do this and set up new Strategic Areas, otherwise your editor will crash while loading your map due an illegal CP error. If you still want to do it, it's very simple. Go to a SP gamemode directory (SP1, SP2, SP3 or gpm_coop) and game size, next to the GPO should be an AI folder. Copy that and paste it into the Editor folder, then open it and inside it open the Strategic Areas file and change the layer with Find&Replace to match your SP GPO layer. If you have several SAs, copy paste them into the Editor one, same as with the GPO basically. Note about Roads You can't recreate roads, since you need the spline.con data which you can't get from anywhere in the map's files, the roads are saved as compiled meshes. However, the roads are baked onto the colormap which should give you an excellent guideline to lay down new ones from scratch. This is pretty much it, post any questions you might have below. As trivia, the Photoshop action sets are very easy to create, I actually pondered including how to do those into this tutorial, but rather kept it game related and avoid extra confusion. Here's the link to the PS tutorial on action sets. Photoshop CS3 batch automate function, resizing images using automate function in photoshop cs3 | ||||||||||
|
|||||||||||
Last edited by [R-DEV]Outlawz7; 2017-05-31 at 08:05..
|
2010-07-13, 13:02 | #2 |
Join Date: Nov 2007
Posts: 4,067
Vietnam
Location: Quang Tri Province
|
Re: [Tutorial]Recreating Map's Editor Files
You're not just a pretty face are you?
Very well written tut mate. |
[R-Div]Robbi "There's nothing more skanky than eating out of a tub of hummus with a screwdriver."
[R-DEV]Matrox "CHINAAAAAAA!!!" |
|
2010-11-24, 22:50 | #8 |
Join Date: Aug 2009
Posts: 24
United Kingdom
Location: Lincolinshire, United Kingdom
|
Re: [Tutorial]Recreating Map's Editor Files
Would any one be able to provide a link to the SalvageColorDetail.atn as it is no longer avaliable on file front.
thanx TA |
2011-04-10, 22:57 | #10 |
Join Date: Jan 2008
Posts: 7
|
Re: [Tutorial]Recreating Map's Editor Files
Would any one be able to provide a link to the SalvageColorDetail.atn as it is no longer avaliable on file front. thanks.
|
Tags |
editor, files, map, recreating, tutorialrecreating |
|
|