PDA

View Full Version : [how-to] Properly create your map.iwd file



IzNoGoD
17th September 2016, 00:09
Hey all

Another tutorial: how to pack your map from scratch including making a loadingscreen.

To start off: make sure "hide known file extensions" is turned OFF in your file explorer options (google is your friend)

I'm going to assume all you have is a .map in radiant.

In this example i'll be using mp_matmata as an example, because everyone has that .map file.


Step 0: create a working directory. I created mine as mp_matmata on my desktop. In this directory you'll want to create maps/mp/, images/, materials/ and mp/ at the very least. More might be required (in case of soundaliases/sounds) though.

1210

Step 1: You'll want to compile your map, with the cod2 compile tools. These are located at cod2/bin/cod2compiletools.exe

You'll most likely want to compile with no or fast lights for your initial test. Your final compile should be done with fast lights at the very least, and preferably extra lights. (note: extra lights takes extra long)
1211

After compiling, youll find your output files in cod2/main/maps/mp, or, if your mapname did not start with mp_, youll find it in cod2/main/maps. Copy both the .d3dbsp and .d3dprt files to your working directory/maps/mp.

1212

If you dont have a .d3dprt, you might want to check your .map. Most likely you forgot to add a skybox, or the one you got is leaking. You can continue without a .d3dprt, but expect some fps impact from it being missing.

Even if your output file was in cod2/main/maps, you still have to copy it to workingdir/maps/mp, else it wont start in multiplayer.



Now it is time to create a loading screen. I'm using xnconvert to make my life easier and so should you.

Your loading screen should have the aspect ratio of the majority of your target audience. Nowadays that means you should stick to 16:9 aspect ratio, or 1920x1080 pixels.

Load up the loading screen you want in xnconvert like so:

1213

And set some actions to be applied on the action tab. Youll want to resize your image to 1024x1024 without keeping the aspect ratio. Will look like this:

1215

The output tab should be set like this, most notably the output format is changed to .dds:

1214

Youll end up with your loadingscreen as a dds file, which you should copy to cod2/texture_source and rename to loadscreen_yourmapnamehere.dds:

1216

Now fire up asset manager in cod2/bin/asset_manager.exe, scroll down to materials, click "new entry", then put loadscreen_yourmmapnamehere as the name:

1217

You'll want to change the material type to "2d", the surface type to "<none>" and the color map to your loadscreen.dds file, like so:

1218

Go to file->save as, create a proper name (i saved it in cod2/texture_source as loadscreen_mp_matmata.gdt), then click PC Convert->Current asset only. After doing this, you should have a few new files in your cod2 directory: cod2/images and cod2/materials. Copy your loadscreen_mapname.iwi from cod2/images to yourworkingdir/images/ and your loadscreen_mapname from cod2/materials to yourworkingdir/materials/


Now create a new file in yourworkingdir/maps/mp as mapname.csv, and put the following text in it:


levelBriefing,loadscreen_mapname
1219

Now go to your working directory, select all folders and create a new zip file out of them with your favorite archiving tool. When using winrar, make sure to NOT select .rar as your compression method.

Afterwards, rename the .zip file to .iwd, like so:

1220

You can double-check that you used the correct compression method by opening your .iwd file in notepad++: If you used the correct one, the file starts with "PK":

1221

After this is done, you can copy your newly created iwd file to cod2/main and test if your map works by starting cod2 and typing /map mapnamehere. If you run into ANY errors, please first make sure that your main is clean of any custom files (except your own mapname.iwd file)