Results 1 to 1 of 1

Thread: A beginners guide to mapping: Part 1

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    g0d! Contributing Member siosios's Avatar
    Join Date
    Oct 2006
    Location
    In a cardboard box
    Age
    51
    HlStats

    HLStatsX Ranking for STEAM_0:1:13488560
    Posts
    13.568
    Blog Entries
    12
    Rep Power
    10

    Default A beginners guide to mapping: Part 1

    A beginners guide to CS 1.6 mapping

    Part 1: The basics

    So I’m now going to try to teach you how to make your first map. There are already some tutorials out there, but for those who can’t find it or don’t understand it: here’s mine. Good luck on your first map!



    Stuff you need to have
    Valve Hammer Editor
    First, you will need to download Valve Hammer Editor. You can do that here:
    http://games.softpedia.com/get/Tools/Valve-Hammer-Editor.shtml

    ZHLT, Zoner’s Half-Life Tools
    Next I think it’s smart to download some proper compile tools right away. Compile tools are the programs that actually build your map. The standard tools are kind of outdated, so it’s better to use ZHLT (Zoner’s Half-Life Tools). You can download them here:
    http://zhlt.info/download-zhlt.html
    or if that link is broken, here:
    Half-Life 2 Tool or Utility ZHLT 3.4 Final Download File on FileFront

    [color=#ffd800]Counter-Strike 1.6 fgd
    The newest version of the Counter-Strike fgd. You can download it here:
    [color=#ffd800]http://www.slackiller.com/tommy14/CSfgd.htm
    If you are using Hammer Editor 3.5 (I hope you can remember which version you just downloaded ), click the link that says "You can download the complete 1.6 FGD file right here".

    The original Half-Life textures
    You will need these textures to make a beautiful map. You can download them at
    http://www.cstrike-planet.com/wads/320

    I will explain later in this tutorial how you can use all of this, don’t worry about that now.
    Note: If any of the links is not working, try searching Google.



    Starting with Hammer

    Configuring Hammer Editor
    To begin, we will have to configure Valve Hammer Editor. After you have installed it, open up Hammer, click ‘Tools’ in the upper left corner of your screen, and then ‘Options…’.
    In the window that pops up, go to the ‘Game Configurations’ tab.


    The “Game Configurations” tab
    We will have to fill in a lot of stuff, so let’s start with “Configuration:”.
    Click on the ‘Edit’ button. In the window that pops up, click ‘Add’. You will have to fill in a name now. I chose for “CS”, but you can call it anything you want actually. Now click ‘Close’ to close this window.

    For the next step, we will need the fgd file we downloaded before. Open the file with the .fgd in it. At the moment of writing this tutorial it’s a zip file with three different folders in it. Extract all three maps to a place on your computer (I recommend a place where it’s easy to find). I put them in "…\Valve Hammer Editor\fgd".

    Now, let’s go back to Hammer. At “Game Data Files”, click ‘Add’. Now select the “counter-strike-SP.fgd” file, that was in the "fgds" folder you have just copied to somewhere on your computer, and press ‘open’ (or just double click it).

    “Texture Format” should automatically be set to WAD3 / TFC, and “Map Type” to HalfLife / TFC.

    Set “Default PointEntity Class” to “light”, and “Default SolidEntity Class” to “func_wall”.

    Now you will have to fill in some things.
    In the field of “Game Executable Directory”, fill in the folder in which your hl.exe file is located. For me, that’s “…\Program Files\Steam\steamapps\...\counter-strike”.
    In the field of “Mod Directory”, fill in the folder of the mod you will be making maps for. For us, that would be Counter-Strike, and my folder for that is “…\Program Files\Steam\steamapps\...\counter-strike\cstrike”.
    In the next field, “Game Directory”, fill in the same as in the last field: “…\Program Files\Steam\steamapps\...\counter-strike\cstrike”.
    In the next field, “RMF Directory”, you should fill in the folder in which your unfinished maps will be saved. For me, that’s “…\Documents and Settings\...\My Documents\CS\maps”.


    The “Build Programs” tab
    “Game Executable”. This should be hl.exe, the file that starts the game. I’ve filled in this: “…\Program Files\Steam\steamapps\...\counter-strike\hl.exe”.

    For the next tab, we will need the ZHLT (Zoner’s Half-Life Tools) files. Open the file you’ve downloaded. At the moment of writing this tutorial, this is a zip file, with inside it a bunch of files. Select all these files, and extract (copy) them to a folder in which you will be able to easily find them back. I copy them to “…\Program Files\Valve Hammer Editor\zhlt\” (I had to create the folder called “zhlt” for that).

    Back to Hammer. In the field “CSG Executable” we have to fill in the path to the ZHLT csg executable (hlcsg.exe). For me, that’s “…\Program Files\Valve Hammer Editor\zhlt\hlcsg.exe”.
    This is what we will also need to fill in in the next couple of fields:
    “BSP executable”: “…\Program Files\Valve Hammer Editor\zhlt\hlbsp.exe”,
    “VIS executable”: “…\Program Files\Valve Hammer Editor\zhlt\hlvis.exe” and
    “RAD executable”: “…\Program Files\Valve Hammer Editor\zhlt\hlrad.exe”.

    Finally, at “Place compiled maps in this folder before running the game:”, we have to fill in the.. folder to put the maps in before running the game! Exactly!
    All Counter-Strike maps can be found in the “…\Program Files\Steam\steamapps\...\counter-strike\cstrike\maps” folder, so that is exactly what I’m filling in in this field.


    The Textures tab
    We will now need the Half-Life textures we’ve downloaded before (halflife.wad). At the time of writing this tutorial, it’s a zip file. Open the file, and extract (copy) the halflife.wad file to a place you will be able to easily find it back. Mine’s in the “…\Program Files\Valve Hammer Editor” folder.

    Back to Hammer. Press the button ‘Add WAD’. Select the “halflife.wad” file you’ve just copied to somewhere on your computer, and then press ‘open’. For me, that’s “…\Program Files\Valve Hammer Editor\halflife.wad”.

    We’re done here! Press the ‘Ok’ button at the bottom of the window.

    Now, click ‘File’ at the top of your screen, and then click ‘New’. If you see something like this




    you’ve done well so far.



    Creating your (first) map
    Note: You can hover your mouse over a button and hold it over one for a couple of seconds to see a description of what it does. This is also shown on the second screenshot in this tutorial.

    To start with, we will set the upper left window (your camera) so, that you can view the map you’re working on. To do this, right-click on ‘Camera’ in the upper left corner of the upper left window, and then click ‘3D textured’.

    Next, we will set the amount units that every block in your grid represents. (Note that a common wall in Counter-Strike most of the times is 16 units thick). First, notice that in the bottom right corner of your screen it says “Snap: On Grid: 64”. This means that every block in your grid is 64 units wide and high. If you create a wall now, it will be at least 64 units thick. We don’t want that! Press the “[“ button twice. Notice that “Snap: On Grid:” is now 16, and that more blocks have appeared in your grid.


    A basic room
    We will now create a basic room.
    Click on the ‘Block Tool’ in the bar in the left of your screen (it’s the gray cube). Move your mouse to the upper right window, and draw a block. Mine looks like this:




    Now, press [enter] to create the block. If you hover your mouse over the upper left window you can move the camera around with the [w] [a] [s] [d] keys and your [arrow] keys. You should now have something like this:




    This floor is pretty thick, so we will scale it down to 16 units. To do this, first select the ‘Selection Tool’ in the bar on the left of your screen (the red arrow), then select your block in either the upper right, bottom left, or bottom right window, and scale it down to 16 units (1 block in your grid). Mine now looks like this:




    Continue with this and create walls and a roof. They should all be 16 units thick (1 block in your grid), and the walls should be 96 units (6 blocks in your grid) high or more (a player is +- 5-6 blocks of 16 units high).

    Hint: If you select a block you’ve already created using the ‘Selection Tool’ (use the ‘Block Tool’ to create blocks, and the ‘Selection Tool’ to select them), and then press the ‘Block Tool’, the block you have selected with the Selection Tool will be marked, so that you will be able to spot it easier.
    Hint 2: When you’re using the Selection Tool, you can select a block, hold shift, and then drag the block somewhere else. This will copy your block to that location, so that you have two exactly the same blocks. I use this technique very often, so that I don’t have to create new blocks all the time with the Block Tool, but so that I immediately have a new block ready and only have to adjust the sizes and the position of that block.

    My map so far looks like this:





    Texturing
    It’s time to add some good looks to your map. Those walls don’t exist of purple stuff, they’re made of brick. Therefore we will attach some textures to them.

    To do this, select the walls you want to attach the texture to, in this case that’s all the walls.

    Hint: To select a whole area at once, draw a box around the area you want to select with your Selection Tool, and then press [enter].

    After that, press the ‘Toggle texture application’ tool in the bar on the left side of your screen (the cube with the red, blue and green colors) to toggle texturing on.

    In the window that pops up, press ‘Browse’, and type “C1A1C_W2” in the search bar at the bottom of that window. Select one of the two textures you now see (it doesn’t matter which), by double clicking it. After that, click ‘Apply’ in the texture window. Notice that your walls now really look like brick walls. To toggle texturing off, press the ‘Toggle texture application’ tool button in the bar on the left side of your screen again.

    Hint: Finding proper textures is not as hard as it may seem. If you search for things like “wall” or “water”, you will most of the times find the textures you are looking for. To get a better overview on all textures, you can also enlarge the window that pops up when you press ‘Browse’ in the texturing window to full screen, and then set “Size” in the bottom left corner of your screen to “64x64”.
    Hint 2: To apply a texture to a single side of a block, do not select a block before you toggle texturing on. You can now select a texture by pressing ‘Browse’ in the texturing window, and then right click on any side of a block to apply the texture to that surface.

    Your map should now look like this (top left part of the screenshot):





    Adding details
    Now that we have a textured map, it’s time to add a player spawn and a light.


    First, we will add the player spawn. To do this, select the ‘Entity Tool’ (gray peon) in the bar on the left of your screen. Now, in the center right of your screen, a menu has appeared, with two options: “Categories” and “Objects”. Categories can only be set to “Entities”. In the other menu (Objects), select “info_player_start”. This is a counter-terrorist spawn. For a terrorist spawn, select “info_player_deathmatch”.

    In the upper right window, click in the center of the room. A green square will appear with two lines through it. From your top view, the player spawn is in the center of the room. Now look at the bottom right window, the side view. There you can see that if you would now press enter, your spawn would appear underground. That’s not what we want! so drag the square to the center of the room. After that, press [enter].

    Hint: To be able to be more precisely, you can decrease the “Snap: On Grid” value by pressing the “[“ key or increase it by pressing the “]” key.
    Hint 2: After you have selected an entity to create in the drop down menu, you can also left click anywhere on the map from your camera view (top left window) to create the entity, and move it with the Selection Tool after (in the other three windows).
    Note: It may be that your player spawn actually looks like a green box like on my screenshot. In that case you didn't extract the folders from the FGD-zipfile as you should have, but it's no big deal. You can either continue working like this, or try re-extracting the three folders from the FGD-zipfle, removing your current FGD from your "Configurations" tab, and reselecting it from the folders you just re-extracted. If you do everything alright, you should see player models instead of green boxes.

    What I did (upper right part of the screenshot):




    We now have a player spawn, but the map would be completely dark if you would compile it. Therefore we are going to add a light to the map. Select the Entity Tool again, and in the drop down menu on the center right part of your screen select “Light” (where we have first selected “info_player_start”).

    In the same way as you created the player spawn, add a light to one of the upper corners of the room. Select the light entity in either your camera-view window or one of the other three windows. Then, right click it and press ‘properties’. In the window that pops up, you can select which entity you want the selected entity to be (in case you want to change that, for example you want to change a light entity to a player spawn, you can do that here). Besides that, there’s something more important here. You can set the properties of your entity. This is a light entity, so we are able to set things like the brightness and color of the light.

    That’s what we’re going to do now. In the “attributes” list, select brightness. The default value here is 255 255 255 200. The “255 255 255” part defines the color of the light, the “200” is the brightness. You can set the brightness anywhere from 15-200, where 200 is very bright and 15 is very, very dark. Let’s set this light to 100 brightness.

    Hint: To change the color of the light, press ‘pick color’, pick a color and press ‘ok’.

    View this screenshot (bottom left part of the screenshot):




    If your map looks like the one on the screenshot.. That’s it! We’re done! Good job!



    Compiling your map
    Press ‘File’ in the upper left corner of your screen, and then press ‘Run’. Set “Run CSG” to “Normal”, “Run BSP” to “Normal”, “Run VIS” to “Normal”, and, finally, set “Run RAD” to “Normal.

    If you don’t want Hammer to automatically run the map you’ve created, you can select “Don’t run the game”.
    If you want hammer to only compile visible objects, select “Save visible objects only”. I haven’t explained that in this tutorial though, so don’t select it.
    If you are a more experienced user, you can use the Expert mode. We’re not going to do that now though.

    If everything has been set, press 'ok'. The compile window will pop up, as your map is now being compiled.

    View the screenshot (bottom right part of the screenshot):




    Hint: To test maps, you can first run them without lighting. This will greatly reduce the compile time of your map. Do not compile your map without light though when you’re compiling the final version, for your map will look bad and it will probably have some fps-drop areas.

    When the compiling is done (the text "copy to clipboard" will appear in the bottom of the compile window), start up Counter-Strike if it's not already automatically starting up, and start a new game with your map. I hope liked and understood this tutorial.



    If you liked this tutorial or have any questions or suggestions, please leave a comment. Good luck with your maps in the future!

    - Minitauros

    P.S. These were really only the very basics. I would like to suggest that you read the second part of this series of two tutorials aswell. It can be found here.
    P.S.S. If you have any problems compiling your map, you can either ask in the comments below, or you can post your compile log plus your question on the forum. People on the forum mostly know more about this than I do, but I will try to answer your question if you give enough details about it .
    Last edited by siosios; 03-14-2009 at 06:35 PM.
    ------------------------------------------------

    |W0rd|SexualTurtletara420ת/ύ: Hey there daddy..

    ------------------------------------------------
    \\\ ///
    ( @ @ )
    .....o00o.(_).o00o.....


    ------------------------------------------

Thread Information

Users Browsing this Thread

There are currently 3 users browsing this thread. (0 members and 3 guests)

Similar Threads

  1. FPS Guide (New Stuff)
    By siosios in forum Server Tech Talk
    Replies: 0
    Last Post: 12-08-2008, 06:25 PM
  2. Replies: 0
    Last Post: 12-08-2008, 06:16 PM
  3. Noob guide to netgraph / ping
    By siosios in forum Server Tech Talk
    Replies: 0
    Last Post: 12-08-2008, 06:15 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •