AutoMaps are maps which automatically show the player where he is on the map by highlighting the current location blue on the map.
The DarkEngine does this by super-imposing small coloured pictures (called map rooms) onto the map.
Add the core texture family, load the ConVict script (and then gen script for Thief2), and create a Start Point in the existing air brush.
Check out the official 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'.
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.
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!
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 southa 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.
Done!
Now portalise, build room and pathfinding databases, and save the mission under a new filename.
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.
Copy the file page001.pcx from your thief folder into the miss20 folder.
Next, load the copied 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.
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 are 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.
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 Rooms>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.
Note:
Because Side Alcove is under Main Hall, it will automatically inherit the map-room number 2.
What we have at this stage is a mission with room brushes that are associated with map rooms,
but the DarkEngine 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 0 | y co-ordinate of map room 0 | width of map room 0 | height of map room 0 |
| x co-ordinate of map room 1 | y co-ordinate of map room 1 | width of map room 1 | height of map room 1 |
| etc ... | ... | ... | ... |
| x co-ordinate of map room | y co-ordinate of map room | width of map room | height of map room | |
| map room 0 (City Streets) | 50 | 190 | 420 | 150 |
| map room 1 (Entrance Area) | 190 | 140 | 140 | 65 |
| map room 2 (Main Hall) | 160 | 50 | 200 | 100 |
|
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 |
|
50 190 420 150
190 140 140 65 160 50 200 100 |
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 a DarkLoader 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