User Tools

Site Tools


AutoMap Tutorial

:T1: :T2:

Originally written by: Zaccheus (1969 - 2011)
The instructions in the section “Create the bin file” will certainly work, but it’s much easier to use LGSs own tools “cutout.exe” and “makerect.exe”.
The NewDark patch allows .png files to be used. My own program ”AutomapPNG” (included in various DromEd toolkit packages) can be used to process those images and generate the .bin files.

Create default mission

The first thing to do is to create a default mission:

Add the core texture family [or core_1 for Thief 2, but any set of textures will do], load the ConVict script (and then gen script for Thief2), and create a Start Point in the existing air brush.
Check out any basic DromEd Tutorial if you are unsure how to do this.

Now we set the mission number. This will tell the DarkEngine where to find our AutoMap files.
From the menu, select Editors → Mission Parameters and click on Dark Mission Description.
Click Ok, then next to Mission Number type 20 and next to Mission Pathname type miss20, then click Ok.

We must also specify that there will be one map page, so in the command box, enter the following:
quest_create_mis map_min_page, 1
quest_create_mis map_max_page, 1

Portalise, build room and pathfinding databases, then save the mission as miss20.mis.

Plan the mission’s layout

Before we proceed any further, we should think about the basic layout of our mission.
Let’s have a small street area leading to a house, where the house contains an entrance area and a main hall with two alcoves.

Make the hierachy of room brush types

Each area which will be highlighted on the map must have it’s own room brush type.
In the main menu, go to Edit → Object Hierachy and select Rooms from the drop-down-box.
This will give you a tree-view of all the existing room brush types. Currently there is only one: Default.
Let’s make some more!

Click on Add and name the new type ZeroZeroZero. Then click Ok.
We will use this to room brush the default air brush which is at location (0,0,0), because we do not want to use it in our mission.
Next, add another room brush type under Default called City Streets.
Then, add another room brush type under Default called House.
Under House add the following room brush types:
Entrance Area and Main Hall
Then, under Main Hall, add a room brush type called Side Alcove.

Congratulations, we now have all the room brush types we will need for our mission!

Create the air brushes & room brush the mission

We are now ready to create the terrain for our mission.

The City Streets

Lets start with the city streets. Away from location (0,0,0), create a square air brush with a height of 20 units.
North of this, create a rectangular air brush which touches the square air brush to the south and extends to the east and west.
We now have a T shaped area. For the ‘top’ of these brushes select the sky texture, and for the walls choose a stone texture.
The floor should be coble stones or something similar.
Also, don’t forget to add a few light sources.
Portalise, build room and pathfinding databases and save your mission under a new filename.

Then go back to Edit → Object Hierachy and select rooms from the drop-down-box.
In the room brush type hierachy, click on City Streets so that it is highlighted, and click on Create.
Now click on the square air brush we just created so that it is highlighted, and put a room brush around it by holding down the SHIFT key and pressing the INSERT key.
You will notice that the room brush we have just created is identified as being a City Streets room brush.
Now click on the rectangular air brush we just created so that it is highlighted, and put a room brush around that one, too.
This will also be a City Streets room brush.

The Entrance Area

To the north of the city streets, use air brushes to create a small door way (about 7 units high) which connects the city streets to an entrance area (about 14 units high).
At the north end of the entrance area, create another doorway (which will lead to the main hall).
Go to the room brush type hierachy again, highlight Entrance Area room brush type, and click Create.
Using SHIFT-INSERT, room brush the doorways and the entrance area.

The Main Hall

Finally, to the north of the entrance area, use a rectangular air brush to create the main hall, and create two small alcoves, one to the east and one to the west wall of the main hall.
Room brush the main hall using the Main Hall room brush type and room brush the alcoves using the Side Alcove room brush type.


Now portalise, build room and pathfinding databases, and save the mission under a new filename.

Draw the map

It’s time to draw the map! First of all, create a new folder in your Thief folder, called intrface, and inside it create a folder called miss20.
Use one of Vigil’s blank map templates and place it into the miss20 folder.
Next, load the file into PaintShop Pro (or a similar drawing program) and draw a map of your mission.
You can draw anything you like, as long as the player can see that the city streets lead to a house which has an entrance area and a main hall with two alcoves.
Save the image.

Note the files are in .pcx format, but .gif can also be used, and it has better support from other graphics programs.

Now we need to cut out the map rooms, which we will use to highlight the players location.
In PaintShpo Pro’s tool bar, click on the Selection tool, and on your map place the selection box around the City Streets part of your map.
Keep a note of the co-ordinates of the top-left corner of the selection box, as well as the width and height of the selection box. We will need this later*.
Now copy and paste, which will give you a new image which is just the City Streets area. This is our first map room. Do the same for the Entrance Area and the Main Hall (including the alcoves).

Next, save the City Streets map room as p001r000.pcx in intrface\miss20\. Then also save the Entrance Area map room (as p001r001.pcx), and the Main Hall map room (as p001r002.pcx)
Note that in the file name, p stands for page and starts at 1, while r stands for room and starts at 0.

All we need to do now is to colour in the relevant areas on the map room.
Thief 1: For this tutorial, I suggest you just use the ‘spray can’ to cover the area with blue dots.
In a real mission, you would want to do something a bit more sophisticated (using PaintShop Pro’s layers, for instance).
Thief 2: Using the bright green colour (first index in the palette), cover the parts of the room maps which should not be highlighted when visiting that location.

* only if you’ll be manually creating the .bin files

Bind the map rooms to the room brush types

We will now tell DromEd which map room corresponds to which room brush type.

In the room brush type hierachy, click on City Streets so that it is highlighted, and click on Edit.
This will bring up a dialogue box with all kinds of details about this room brush type.

Now click Add and select Room - > Automap.
For Page, type in 1, and for Area, type in 0.
Then click Ok, and then Done.

Do the same for Entrance Area and Main Hall, entering 1 and 2 for the Area, respectively.

Because Side Alcove is under Main Hall, it will automatically inherit the map-room number 2.

Create the bin file

What we have at this stage is a mission with room brushes that are associated with map rooms, but the Dark Engine does not know where on the main map to place the map rooms.
For this reason, every map page has a .bin file associated with it, which contains the following information:

x co-ordinate of map room 0y co-ordinate of map room 0width of map room 0height of map room 0
x co-ordinate of map room 1y co-ordinate of map room 1width of map room 1height of map room 1

These values are stored in binary format (unsigned 16bit - little endian ‘intel’ format) in a .bin file.

You can either create the bin file by hand (using a hex editor), or you can download my “text to bin” convertor.

Whichever method you use, you should still have the following information from the previous step:

  • The co-ordinates of each map room on the main map.
  • The Width & height of each map room.
x co-ordinate of map roomy co-ordinate of map roomwidth of map roomheight of map room
map room 0 (City Streets)50190420150
map room 1 (Entrance Area)19014014065
map room 2 (Main Hall)16050200100

Using a hex-editor

If you want to use a hex-editor such as Hex Workshop, convert your numbers to hexadecimal and enter them as 16bit values (little endian ‘intel’ format).

Using the given example numbers, the final bin file should look exactly like this:

00000000: 32 00 BE 00 A4 01 96 00
00000008: BE 00 8C 00 8C 00 41 00
00000010: A0 00 32 00 C8 00 64 00

Save the file as P001ra.bin in intrface/miss20/.

Using TxtToBin.exe

Download TxtToBin.exe v1.1 (you can get it from here).

Now, the first thing to do is to create a text file which contains the coordinates and dimensions of each map room. Run notepad, and type in the numbers in the given order separated by space characters:

50   190   420   150
190   140   140   65
160   50   200   100

Save this file as P001ra.txt in intrface/miss20/.

Then Drag&Drop it onto TxtToBin.exe, which will generate the corresponding P001ra.bin file.


You should now be able to load your mission in DromEd, and wander around your mission and see your position highlighted on the map.

If you are making an AngelLoader ready zip file, be sure to include the following files:

  • intrface/miss20/Page001.pcx
  • intrface/miss20/P001r000.pcx
  • intrface/miss20/P001r001.pcx
  • intrface/miss20/P001r002.pcx
  • intrface/miss20/P001ra.bin
dromed/automapsz.txt · Last modified: 2022/08/27 22:59 by r_soul