Porting old Half Life 1 maps

A different perspective

Porting a HL1 map to Source... with accuracy is what this is. If you have tried to port HL1 to Source before you will know why this technique was developed. You may have used VMEX to decompile a source bsp and then open in hammer. Well you can't do that for the HL1 maps, not the same, read this, then you will understand why you need to rethink how you port from HL1 to Source.

Description: Using various tools we will make a special VMF file that contains no old structure but does contain entities from the old map. The entities positions will be used as guides for setting up a series of images and correctly scale them.

The set of images will act as a 2D plan view of the old maps structure.

The images will be placed on brushes, or large 8 unit thick blocks (the big white image in the picture below), in hammer as a multi layered "plan view" to get all the shapes of structures in the old map... within one unit on the X Y plane and as close as possible on the Z plane.

We will use around 12 images or so spaced 64 units apart, starting at the bottom and continuing until we reach the top of the maps structures.

We will also use Hammers Visgroups to turn these on and off for clarity while editing.


Using this method still requires you to decompile or copy parts of the old map.

A map is a 3D space, X, Y and Z. We want to know basic measurements in that 3D space, to do that we can use some old forgotten programs and a couple of current ones.

BSP_tools made by Botman has a tool that will return some very large and accurate images of the structure. Walls, ground contours are fine lines and if this tool is used correctly you will be able to slice the map and have a 2D image just like a CT scan, (Computed Tomography).

Below is a reduced image from the HL1 map dod_mainz, BSP_slicer made this as a 3140 x 2312 .BMP file

















The image is a slice of the BSP, in this case a thick slice from the top to the bottom.lots of lines there, it gets clearer don't worry, that messy image is only one of 12 we will use.

The structures in the map dod_mainz are to scale and you can use this to setup a plan view. Combine this with the other images sliced from -190 (bottom of this map dod_mainz) and 600 (the top of this map, the highest structure found) and you will have some very easy block work to do, this is the main thrust of this technique it takes all the guesswork and saves you time.

Below is a thinner, clearer slice through the map around the half way mark. As you can see some of the structure is omitted, the slice will only copy what is within that height. That makes it very easy to build on when all the structure below and above it... is not there to get in the way.












Method to obtain images using Win XP and BSP_tools

Install some files first
Download this support package and read the README.txt. It instructs you how to place the folders under your C drive. C:\BSP_tools

Doing it this way will match what I have below... keep it simple and do what it says!

Problems you will have if you did it wrong...

You may experience some problems with a .cfg file if you do not have the old Half Life installed, typically C:\SIERRA\Half-Life. You will see an error...


************ ERROR ************

Half-Life directory C:\SIERRA\Half-Life doen't exist

Please edit the .cfg file to match your installation


What this tool is looking for and did not find is the liblist.gam file in C:\SIERRA\Half-Life.

Fear not, if you downloaded the support files and read the readme, did what it said to do, you will not get that error...you are OK to move on.

If not, better read the README.txt in the "BSP_tools support files" folder.


Another thing to consider if you missed it in the readme....

You do not need to edit the BSP_slicer.cfg, BSP_tool.cfg and BSP_view.cfg ... that is if you placed everything in the "C" drive, if you use another drive letter... adjust the folders and BSP_slicer.cfg, BSP_tool.cfg and BSP_view.cfg to the correct addresses.


Let's get those images, note this is for Win XP...
1. Start button
2. Click Run
3. Type "cmd" and press Enter.
4. Change the directory to the location of the BSP tools folder, you can cut and paste this line in the box...
cd C:\BSP_tools

...place that in and press enter

5. Place your .BSP file in the C:\BSP_tools folder.

6. To run BSP_slicer and create your first bmp image, in this case I am slicing a map called dod_mainz...
bsp_slicer -c -s2 C:\BSP_tools\dod_mainz.bsp

...place that in and press enter

7. The program will tell you it has made a file, a 3140 x 2312 (or there about) .BMP file that has all the structures outlines and at 1/7 the scale...


8. Check the BSP Tools folder for an image named "dod_mainz.bmp".

We will need it to initially set up the map but we need to make many more to get the individual slices of the Z plane (up and down) 64 units apart.

That was easy, next we want to start slicing more images 64 units thick with the intent of placing them in Hammer 64 units apart.


9. You need to explore the old map in Nems Crafty or Nems BSP Viewer. What we need here is the "Z" coordinates of the bottom of the map where structures start and the very top around where they stop.

Look at the image in step 10 below, open the map with Crafty, fly around and find the lowest point, you have the coordinates on the top left screen, and height "Z" is the last one.

Once you have that, write it down, then proceed to the top, write that down too.

These will be used to place in the command and get just the images you need. If you want you can move down more and up a bit more if you think you are not low or high enough.

For dod_mainz I found the creek bed near the axis first flag to be the lowest at "-190" and the highest to be around "600".

Note ... not "190" include the "-" in this value... "-190" or you will miss some structure!


10. So for dod_mainz slices at 64 units apart, bsp_slicer will give me 12 images, 3140 x 2312 .BMP files, from the bottom to the top of the map.

Adjust the "-m" values in the command below to the ones you wrote down, these are where to begin at the bottom of the map m-190 and end the slicing m600 at the top...

BSP_slicer -m-190 -m600 -s2 dod_mainz.bsp

...place that in and press enter

The other value is "-s2" it controls the scale factor, note I did not include the value "-t64" as leaving it out defaults to the same value anyway. If you need to know more, read the BSP_slicer_ReadMe.txt in C:\BSP_tools. Here is how that should look.....


You should now have some images of the map sliced at 64 units apart in the C:\BSP_tools folder.

11. Delete any blank images and keep the ones with lines, there could be quite a few if you estimated badly in step 9, for dod_mainz I kept 11 out of the 12. You need to make VTF and VMT image files of these to use in Hammer.

I use Paint.NET for this task with Nems plugin . You can use Photoshop or whatever you usually use, I found Paint.NET fine for this task.

12. Open up those .bmp's in your graphics editor, re-size the image to 1024 x 1024.

Save as a VTF file and give them a name, say the lowest is "dod_mainz_0" for the bottom layer and work your way up.

13. Make your matching VMT file and place it in the materials folder, (I use dod\materials\maps\map name) the inside of the VMT looks like this....

 "$baseTexture" "maps/dod_mainz/dod_mainz_0"


14. Remember that first file you made with all the structure lines in it? Make sure you also make a VTF and VMF for this too, call it "dod_mainz_all_layers" or whatever. We will need that first when in hammer.

15. Place the files in the correct folder of your game directory. You are done with making the images.


Method to make a VMF file with the entities

The next part is getting the old entities in a VMF file, this will help set up the images to scale in the 3D space...X, Y and Z.

This can be easy, just download Nems Crafty and export/save the file as a VMF. It gives you a file that only contains entities...just what we want. The VMF will have spawn points, you know what side you are on, it also has the dod_control_point entities, (the flags) these are very important as they help you line up the large images in the X and Y planes.

There are more too, light entities such as light_spot and light, tell you where ceilings are, fire, sounds and sprites, along with models help to fill in the exact positions of the old entities. Some will have an "obsolete" icon, keep them, right click and see what it is, it could be the center of a car model, the origin center, which could be handy later on.


It can be easy and then again quite advanced, it depends on the map.I have 4 methods below, I have never failed to get a VMF out of a .bsp, at least one of these will work, it depends on how much structure you require.

The Crafty Method: Just open the BSP with Crafty, select "File" and "Export", drop down the "Save as Type" select VMF, give it a name... and you have the file, open in hammer and see if you get enough structure to define a layout. These will only be very basic, lights, flags in dod and so on. You need to match the items in the vmf to the images you made in the next step. If it has not got a lot of items you may have to read on and see if you can get some more.

There are three more ways to get items. The one you may want to try after using Crafty is another of Nem's tools and Crafty. The older BSPViewer can export a .map file, then by using Crafty again we can actually gain some structure from the old .bsp file, works better than a decompliler in some cases!

Recomended. The BSPViewer and Crafty .bsp to .map then to .vmf Method:

1. Open the .bsp file, go to "File" and Export select "MAP File", un-tick "Bevel Brushes" and "Use Null textures" OK and give it a name, save as a .map.

2. Now open that saved file with Crafty, select "File" and "Export", drop down the "Save as Type" select VMF, give it a name.

Open the VMF with Hammer, it may give an error about could not load some solids, just continue without them, (press "Yes") it will look nuts, all orange and heaps of 1 unit walls.

If you now go to the "VisGroups" and un-tick World Geometry what you may end up with are some structures like trees, tables, chairs, arches without a heap of walls in the way. These are Brush entities, and will be very handy later on to position your images. Even that may be enough without the images.

Just a note, some maps do not respond to the above two methods, Hammer may not open the map. If you find the above methods did not work, try this.

The quick and nasty decompilers Method: This often fails. Decompile the map with BSPTwoMAP, WinBSPc or debsp, (look in the support package for this tut) if you do get a .MAP file, you can then open it with QuArK or use Crafty to get a VMF.

The QuArK Method: This editor will allow you to delete the Map Structure and keep the entities, and then you save the .map file.

Actually this does a good job. It has a strange effect when doing this as it may copy some old brush work around the models in a world geometry shape.


Things like a stove, a car, a light, a door, a doorway, a sheet of breakable glass, an old HL1 Tree that looks like a 3D "X" shape. These give you much more detail to work with.

Up to you, QuArK is a little difficult to install and setting up with HL1 mapping, decompiling an old map on the other hand is hit and miss, some versions of the decompile programs work and some don't. WinBSPc version 1.4 may not work...then WinBSPc version 1.2 will. Then you try another .BSP file and the opposite happens. Try and get QuArK installed, it may save you more time than you realize.

It is a matter of just trying all the decompile programs and their versions and see what you get, then open in QuArK and do this...


Delete the "Map Structure" (right click as above and delete) and save the file (as a .MAP again). You may have some very handy shapes that Crafty did not give you. Using QuArK is my preferred method, but setting it up is another thing to do that you may not need.

Next is Hammer and putting those two elements together in the 3D space.


Assembly of the entities and the plan view images


1. Open Hammer, make a no draw brush... huge, to cover the map, place the top surface on the bottom of the lowest entity.Then move it down 64 Units.

Now make a no draw brush, small 32 x 32 and place these on the bottom of other entities such as flags for dod, extend these down so they touch the surface of the first slice. What this will do is help you line up the image to the scale of the map.
Now you can apply the image you made with all of the structure lines on the image to the huge flat brush top surface, click fit in the Texture Application.

2. Move the brush around and get the x and y axis on the lowest entities; manipulate the image size to line up the others on the X and Y planes.
Important... Every time you move it... even one unit you must click fit again!

I found doing this on one axis only and then the other, clicking fit in the Texture Application as you go very easy. It is very important you get this first layer correct as the images are all the same and if you get the scale correct you just have make sure they are positioned the same above it when you look in the top view (x y) in hammer.

3. If the map is like dod_mainz and all the flag entities are very close and almost in-line on one axis, then look around for another entity, in dod_mainz I used a fan in axis spawn and a spotlight in allies spawn for the final alignment.


4. If your map has height different levels like dod_mainz has, (up and down like a yo-yo!) copy the same huge slab you made and move it up 64 UNITS and continue doing this until all your images are on the brushes. Make sure the first one is in the right place and others are 64 units apart and you now have a fairly accurate set of 2D plan views.

So to recap, we made a 2D plan that has all the structure in and placed it way down low, lower than your first slice, then we copied that and made a set of 2D plans 64 units apart, with the 2nd bottom plan view at the same height as the lowest coordinates you found in Crafty.


5. Assign these different levels and structures to a separate Visgroup... to turn these on and off.

NEVER, EVER re-size or move these levels again! Be careful!

Now you will have "slices" of the heights and a fairly accurate plan view of your map.
If you need any more coordinates, say a top corner of a building, no problem, open crafty, go to the spot, "Edit", "Copy Camera Angles" then put it in Hammer Via "View" "Go to Coordinates" paste in the coordinates (get rid of the comers) and make a block, or pre-make a small block and copy, then when at the coordinates...paste.















After that, just use the old map and do it by eye, open it as a game in windowed mode or use crafty while using your images as a plan view, adjusting, lots of adjusting, you will be surprised how close you can get and how quick the framework of the map goes up.



You would have found the VMF and the images in the download. Have a play around with it to see how this method may or may not benefit your project... it certainly was for me.

But what of dod_mainz, who will remake it? The tutorial map is the basic old shape and that's as far as I go for now. Maybe you would like to remake it?

Let me know and I will move on to other maps... quite a long list, plenty to do.

UPDATE: A mapper has asked to remake dod_mainz will update with the mappers name soon.

Update number 3

Well looks like I had to do it myself see my downloads section and see the result, proves this works!

Don't forget to search out the author before you go too far, they are very hard to find!


Enter Amount

dodbits.com Copyright © 2011. All Rights Reserved.