Basic Classic Map

From Empires Wiki
Jump to: navigation, search
Empires Mapping Documentation
Mapping Overiew | Hammer Configuration | Entity Index | Basic Mapping | Setup Resources | Tutorials | Useful FGD Modifications | Bots and NPCs | Dimensions



Overview

Please ensure that you have properly configured Hammer for Empires before proceeding.

This guide is for showing you how to set up the Classic style map seen in most Empires maps. I made it because when I wanted to find out how to make one, I found all of the required information I needed was in several different Wiki documents, and it wasn't comprehensive or straightforward or well signposted. This tutorial is written with beginners in mind (including beginners to the Hammer editor), so if what is being talked about is too simple... skip it!

Classic Map Checklist

To get a Classic map in Empires to function on a basic level (i.e., not necessarily look pretty, but work nonetheless), you will need the following:

Entities

  • emp_imp_commander

A Commander vehicle for the Brenodi Empire

  • emp_nf_commander

A Commander vehicle for the Northern Faction

  • emp_building_imp_barracks

A starting spawn for the Brenodi Empire

  • emp_building_nf_barracks

A starting spawn for the Northern Faction

  • 2 x emp_res_node

The location where a Refinery can be dropped to give resources to either team (recommended)

  • 2 x emp_resource_point_prop

The physical representation of the resource node (recommended)

  • emp_info_params

The game settings for your map

  • emp_info_map_overview

The fixed camera location that gives you your first view of the map when it finishes loading

  • info_node

Even if you leave it blank, this hardcodes the AI node graph into your map. Without one, there can be delays connecting to a server with your map.

Resource Files

  • emp_<yourmapname>.vtf

An image file of the map overview.

  • emp_<yourmapname>.vmt

A text file that tells the game about the above file

  • emp_<yourmapname>.txt

A script file that contains a few pieces of important information about your map.


First steps in Hammer

1. To start with, load up the Source SDK (under "Tools" in Steam) and open the Hammer editor. This is the software used to create maps for any Source-powered game or mod.

Once you have loaded up Hammer, your screen should look like this:

step 1


2. Create a new map by going File -> New. The screen should now look like this:

step 2


Make a brush with the block tool

3. Now select the block tool on the left hand side.

step 3


4. Move your mouse to the top right viewport (overhead view) and use the mouse wheel to zoom in and out. To move the view, hold the space bar and drag with the left mouse button. When you are satisfied that you can navigate in this view, drag out a square using the left mouse button with the block tool selected. Make it around 4096 by 4096 units. You will see a white outline where the block will be created. Press return on your keyboard to place the block.

step 4


5. After you have done this, the box should appear in the 3D view (top left viewport).

step 5


Moving around in the 3D view

6. The next thing to do is to get used to moving around in the 3D view, there are two equally useful methods for doing this.

i) With the camera tool selected, click and hold the left mouse button in the 3D view. This rotates your view on the spot. The right mouse button moves your view left, right, up and down (relative to where you are looking). Holding both mouse buttons at once zooms the view in and out.

ii) Alternatively, you can move about freely without having to use the camera tool (i.e. when you want to use another tool and still move the camera to help you see what you're doing). All you have to do is move your mouse over the 3D viewport after which you will be able to use a number of keys to move the camera.

  • Zoom in and out with the W and S keys
  • Strafe left and right with the A and D keys
  • Direct the camera up, down, left and right with the arrow keys

Once you are comfortable with moving around, move on to step 6.5.


6.1. At this stage, your newly placed block will look something like this. This is the default white texture, your block may be appear different to the picture, but it doesn't matter because we are about to choose and apply a different texture.

step 6.5


Applying Textures

6.2. This makes it hard to see what you're doing, and doesn't look all that good either, so we are going to put a different texture on it. Half-Life 2 comes with many different textures, most of which can be used for this kind of object. In this case, we're going to make the visible surface look like grass. To find your texture, select browse at the right hand side.

step 6.6


6.3. Now type in the filter "grass".

step 6.7


6.4. Select the specific texture that you want by double clicking it. You will then be brought back to the editing screen, where you should now select your block and click the apply texture button.

step 6.8

Tip Tip: Any non visible faces of the block should be textured in nodraw. This is a special texture that means these faces will not be drawn in the map and therefore are not taking up any memory unneccessarily. It is an essential technique for optimising your maps (especially in a mod with such open spaces such as Empires), so whether you are new to Hammer or not, get into the habit of culling all your backfaces with nodraw and your maps will be less laggy. You can find the 'nodraw' texture by searching for 'nodraw' just like you did with the grass texture.


Adding a Skybox

13. The next thing to now do is to make the skybox. For this tutorial we are going to be using a 2D skybox, as this is much simpler than a 3D one. Effectively all we are going to do is use the block tool to make a box around the map, and use the skybox texture on the inner surfaces to turn it into sky. Here is Supaste's method, which starts making a skybox from the edge of our map in the top view.


step 13

Tip Tip: The player will only be able to see the inner sides of the skybox brush, so don't forget to texture the outside faces in in nodraw and not skybox or any other texture.


14. Now you have one side of your skybox (untextured) but it is not the right height so you need to go into a different 2D view and begin resizing it. I would say that about 1087 units high would be enough, but keep in mind that the commander can only move inside this box. If it's too short, his view of the battle will be severely limited. Also remember that when making these bits it sometimes helps you later on to have blocks meet at corners rather then edges (as shown in bottem right 2D view).

step 14


15. I think its a good time to tell you how to copy a block as this comes in useful when doing lots of brushwork. To copy a block, all you have to do is select it and drag it with your mouse in a 2D view whilst holding the shift key. Try doing this with the block we made in step 13. Also you can delete blocks you have made by selecting them and pressing the 'delete key'

step 15


16. Now do the same with the other two sides.

step 16


17. Now we need to add a ceiling, start by dragging a box in the top 2D view the same size and shape as the floor then bring it up to meet the corners of the side of your map.

step 17


18. You will want to texture the ceiling and the walls, texture them as skyboxes this is done in the same way as how we textured the floor only you use the skybox texture search 'skybox' or 'tools' to find it.

step 18

Placing the required entities

7. Now we are going to place some entities. These are what really make the map function. Some examples would be the barracks and the command vehicles. To begin, click the entity tool (the one that looks like a lightbulb).

step 7


Barracks

8. You will notice that when you do this, at the right hand side of the screen, two previously greyed out dropdown boxes will now become available. The top one is used to decide what you are placing (in this case, leave it on "Entities") and the bottom box chooses what you are placing out of that category. The other options relate to prefabs, and are not relevant to this tutorial. We will be using the bottom box to select the Brenodi barracks entity. This is named emp_building_imp_barracks.

step 8


9. The easiest way to place entities in the map is via the 3D view. Clicking anywhere on your ground, a barracks should appear. Chances are, it hasn't been placed exactly how you want it (it is probably too high) so this means we will have to use the 2D views to position it how we want it.

step 9


10. To move a object in the 2D view simply select it (by clicking on it in the 3D view), and drag it around. Notice it will snap to the grid. In order to change the grid size, use the '[' and ']' keys. This works exactly the same in all of the 2D views.


11. Once you have positioned the Brenodi barracks where you want it, do the same with the NF one (emp_building_nf_barracks)...

step 11


Command Vehicles

12. Now we need to add the command vehicles (emp_imp_commander) and (emp_nf_commander). This works exactly the same as the barracks, but leave them ever so slightly above the ground so that when the game starts they drop to the floor rather than being stuck in the ground. The Brenodi CV's front wheels will look all screwed up; dont worry, this will correct itself in-game.

step 12


Resource Nodes

Also required are at least 2 resource nodes so both teams are capable of accruing resources at the same time. I would recommend reading Supaste's Resource Nodes guide for this, as res nodes are a two-step process (you need the invisible entity that allows a Refinery to be built at a location, and you need the visible marker to tell players and Commanders where the nodes actually are).


Map Parameters

19. Next we need to add emp_info_params this a entity that tells hammer how many resources each team starts with, how many reinforcements each team has and various other things. When you place it it should appear as a red cube when selected and a purple cube when not selected. To edit the propities of it double click it in the 3D view. (Dont forget if you want to play this map set the resources quite high as resource nodes are not in this tutorial)

step 19


Creating a fixed Overview camera

20. Lastly we need to add a emp_info_map_overview entity which defines the view you get of the map when you firt join and are setting up your class and waiting for the Commander vote to end. Go through the same steps as before for creating this entity.

step 20


Compile your Map

You need to compile your map to turn it from a source file used for editing into a map file that can be played as a level in a game. Go to File -> Runmap and hit ok to compile! If you have any errors, ask in the Empires Mapping Forums (registration required).


Map Resources

This section contains the info I had trouble finding when I came to map for Empires. Basically, without a set of additional resource files for your map, it won't run properly (you won't even be able to spawn!).

Here is a list of those files with a rundown of what they actually do:

  • emp_<yourmapname>.vtf

An image file of the map overview. If you don't want to make one of these yet because your map is in the preliminary stages, you should be able to copy one from another map to use temporarily (just remember to rename it to match your map name!).

  • emp_<yourmapname>.vmt

A text file that tells the game what kind of image type the above is (i.e. it tells the game that it's a map overview and not some other kind of special texture).

  • emp_<yourmapname>.txt

A script file that contains a few pieces of important information about your map. First off it translates movements in XY axes of the game world to movements on the map. If the numbers are off then spawn points, vehicles and buildings won't appear in the correct locations on the map.

If you want to create your own minimap now there is a good guide on the Empires forums.

Note Note: All your files must be named the same as your map. So if your map is emp_testmap.bsp, your resource files should be emp_testmap.vtf, emp_testmap.vmt and emp_testmap.txt. The files must also be placed in the correct folders (see Setting Up Map Resources).
Tip Tip: I would recommend immediately saving each session's work as emp_<yourmapname>_<version number> each time you open up Hammer so you can fall back to previous versions if you need to. Then, whenever you compile a version, jump into the Empires/maps folder, delete emp_<yourmapname> and rename emp_<yourmapname>_<version number> to emp_<yourmapname>. Your newly compiled version will now match the resource files and you can boot the map in Empires to check it out!


quick and dirty temp links:

Basic Mapping (steps 3 & 4)

Conclusion and Credits

That should be it!

If you have any questions, do not hesitate to ask in the Empires Mapping Forums (registration required)


Tutorial adapted from Supaste's Basic Conquest Map guide (please see that guide for its credits list). The images contained here were created for the aforementioned guide. Some minor alterations to wording and presentation have been made according to my taste, as well as some corrections and additional tips and sections.

Links and References

How to setup the Hammer level editor so that you can make and compile maps ready to run them in Empires.

Home of the Empires Mapping Community . Ask questions, share advice and present your work to your peers for constructive criticism.

Guide to creating res nodes, by Supaste.

An in-depth guide to how to create and edit your resource files, by Kylegar et al.

Full guide to creating clean and accurate minimaps, by Jcw87.