Basic Classic Map: Difference between revisions
m (→Map Resources) |
(added a bit of clarification on resource files) |
||
Line 202: | Line 202: | ||
== Map Resources == | == 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. | 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. | |||
'''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. | |||
You can find a list of those folder locations and a more in-depth explanation here: [[Setting Up Map Resources]]. If you want to create your own minimap now there is a good guide on the Empires forums: http://forums.empiresmod.com/showthread.php?t=4200 | |||
{{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 folder}} | |||
{{Tip|I would recommend immediately saving each session's work as emp_<yourmapname>_<new 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>_<new version number> to emp_<yourmapname>.}} | |||
quick and dirty temp links: | quick and dirty temp links: | ||
[[Basic Mapping]] (steps 3 & 4) | [[Basic Mapping]] (steps 3 & 4) |
Revision as of 03:45, 13 January 2009
Home > Basic Classic Map
(Please ensure that you have completed the Configuring Hammer for Empires guide before continuing).
Introduction
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!
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:
2. Create a new map by going File -> New. The screen should now look like this:
Make a brush with the block tool
3. Now select the block tool on the left hand side.
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.
5. After you have done this, the box should appear in the 3D view (top left viewport).
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.
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.
6.3. Now type in the filter "grass".
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.
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.
Tip: The player will not be able to see the sides without the skybox texture, so don't forget to texture them in nodraw! |
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).
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'
16. Now do the same with the other two sides.
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.
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.
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).
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.
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.
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)...
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.
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)
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.
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. 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.
You can find a list of those folder locations and a more in-depth explanation here: Setting Up Map Resources. If you want to create your own minimap now there is a good guide on the Empires forums: http://forums.empiresmod.com/showthread.php?t=4200
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 http://forums.empiresmod.com/[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.