Discussion in 'Resources & Tutorials' started by ahd, Aug 11, 2018.

Tutorial Introduction to CS map-making #01 - Setting-up Hammer

  1. ahd

    ahd CS Administrator CS Administrator Map Developer Donator

    Joined:
    Oct 20, 2016
    Messages:
    153
    Likes Received:
    93
    Note: a Steam account is required for you to follow these steps. It's not necessary to own Counter-Strike in it, but you still need an account in order to download the required software. You will also need to have Counter-Strike installed (be it Steam or non-Steam) for the files required by the software. Please download Steam from here (it's Free, if you're wondering): https://store.steampowered.com/about/

    Next Tutorial (Tool Textures and Entity list) >>


    As part of my upcoming retirement from making maps for UGC, I'd like to leave a few threads about the basics of 'Hammer' in case someone would like to create their own maps, and even become a map-maker for this community.
    That being said, let's begin configuring Hammer.

    STEP 1: Downloading and Launching Hammer
    "Hammer" is the tool/application used to make maps for Valve games. You can get this tool by accessing the "Tools" category in Steam's Library and downloading "Half-Life SDK".
    Additionally, you can submit this URL into your web browser, and allowing Steam to ask for confirmation to begin downloading:
    steam://run/254430

    Once it's done downloading, you can start up Hammer through Steam, or by executing "hammer.exe" that is located inside
    "C:\Program Files (x86)\Steam\steamapps\common\Half-Life SDK\Hammer Editor\"
    (for better accessibility, create a shortcut either on your Desktop or the Start Menu/Screen)

    A first-time launch will greet you with a window warning about 'no game configurations available';
    [​IMG]
    We'll have to configure everything ourselves. To do so, click on 'No' to skip the "new-user's guide". Doing so will open a new window, which contains Hammer's configurations.

    STEP 2: Setting-up Hammer
    For the configurations that we have to start with, head to the "Game Configurations" tab;
    [​IMG]

    STEP 2.1: Specifying games and directories
    Since the GoldSrc engine is used by more games other than 'Half-Life', different game functions may exist, so if we were making maps for another game while using the configurations for 'Half-Life', we would either not be able to use certain functions, or the file directories wouldn't be the proper. In our case, we're going to make maps for 'Counter-Strike', which means that we'll have to configure Hammer to use settings for this game.
    As seen in the picture above, we have a variety of empty fields in the "Game Configurations" tab;
    • In "Configuration", click on the 'Edit' button, then on 'Add', and then type-in 'Counter-Strike'. Once specified, click on 'OK' and then on 'Close'.
      [​IMG]
      [​IMG]
    • Right below we have "Game Data files" - this requires a ".FGD" file that contains "all" the functions that can be used in our map. There's a semi-official file in our "cstrike" folder (named "halflife-cs") that we can use in Hammer, but it doesn't include many of the useful entities that we may end up needing to use. I edited that file to add said features, as well as kind of 'completing' some existing ones for more user-choice.
      Please download it into your "cstrike" folder, then locate "fgd_cs.fgd" by clicking on Hammer's 'Add' button.
      https://drive.google.com/open?id=1fa8tpslPLYB1RYq7pVUjdozMtapwoSe7
      [​IMG]
    • In "Default PointEntity class", select "info_null" from the dropdown list - this is done to avoid future problems when switching between entities.
    • In "Default SolidEntity class", select "func_escapezone" from the dropdown list - this is done to avoid future problems when switching between entities.
    • In "Game Executable", click on the 'Browse' button and locate the main folder of the game, which contains other folders such as "cstrike", "valve", among others. Click on this 'main folder' just once, without opening it, and click on 'OK' to use it as the directory.
      (for Steam players, the directory is "C:\Program Files (x86)\Steam\steamapps\common\Half-Life")
    • In "Mod Executable", click on the 'Browse' button and locate the "cstrike" folder.
      (for Steam players, the directory is "C:\Program Files (x86)\Steam\steamapps\common\Half-Life\cstrike")
    • In "Game Directory", click on the 'Browse' button and locate the "valve" folder.
      (for Steam players, the directory is "C:\Program Files (x86)\Steam\steamapps\common\Half-Life\valve")
    • Leave the "RMF Directory" field blank, as is.
      [​IMG]

    STEP 2.2: Setting-up the 'compilers'
    Creating a playable map is pretty much like cooking edible food in real life - you must get everything prepared for it to be cooked.
    In Hammer's case, to create playable maps we first have to compose/design our map, save it as a "project file", and then 'compile' that file for it to be playable in the game. The process of compiling is possible thanks to a few applications that have different roles.
    Although Hammer already comes with its own compilers, these are very outdated and lack special features that we may end up needing, such as better lighting, smaller file sizes, and/or even embedding custom textures into the map so that additional downloads won't be necessary for players. That's why we'll be relying on "VZHLT", a pack of outstanding, third-party compilers capable of the previously-mentioned features and much more.
    Download VZHLT from here: https://forums.svencoop.com/attachment.php?attachmentid=16257&d=1439879328

    What to extract:
    Open the .ZIP file after downloading it, then access the "tools" folder that is located inside, and extract "hlbsp.exe", "hlcsg.exe", "hlrad.exe" & "hlvis.exe" into
    "C:\Program Files (x86)\Steam\steamapps\common\Half-Life SDK\Hammer Editor\tools\VZHLT\" (the "VZHLT" folder doesn't exist by default, so you'll need to create it)
    • If you have a 64-bit operating system, only extract those applications that end with "_x64" in their names.

    Now, after completing the extraction, head to Hammer's "Build Programs" tab in the configurations window;
    • In "Configuration", 'Counter-Strike' should be automatically selected (because we configured it earlier).
    • In "Game executable", click on 'Browse', locate the game's main folder and select "hl.exe" in it.
      (for Steam players, the directory is "C:\Program Files (x86)\Steam\steamapps\common\Half-Life\hl.exe")
    • In "CSG executable", click on 'Browse', locate the folder you extracted the previous compilers in, and select "hlcsg.exe" or "hlcsg_x64.exe"
      (default directory: "C:\Program Files (x86)\Steam\steamapps\common\Half-Life SDK\Hammer Editor\tools\VZHLT\hlcsg_x64.exe")
    • In "BSP executable", click on 'Browse', locate the folder you extracted the previous compilers in, and select "hlbsp.exe" or "hlbsp_x64.exe"
      (default directory: "C:\Program Files (x86)\Steam\steamapps\common\Half-Life SDK\Hammer Editor\tools\VZHLT\hlbsp_x64.exe")
    • In "VIS executable", click on 'Browse', locate the folder you extracted the previous compilers in, and select "hlvis.exe" or "hlvis_x64.exe"
      (default directory: "C:\Program Files (x86)\Steam\steamapps\common\Half-Life SDK\Hammer Editor\tools\VZHLT\hlvis_x64.exe")
    • In "RAD executable", click on 'Browse', locate the folder you extracted the previous compilers in, and select "hlrad.exe" or "hlrad_x64.exe"
      (default directory: "C:\Program Files (x86)\Steam\steamapps\common\Half-Life SDK\Hammer Editor\tools\VZHLT\hlrad_x64.exe")
    • In "Place compiled maps here", click on 'Browse', locate your "cstrike" folder, and do a single click on the "maps" folder to select it as the directory where the playable version of your map will be copied in.
      (for Steam players, the directory is "C:\Program Files (x86)\Steam\steamapps\common\Half-Life\cstrike\maps")
      [​IMG]

    STEP 2.3: Assigning the textures to use
    This is probably the 'dumbest' part of GoldSrc's Hammer because, unlike Source Engine's Hammer, this one only allows a certain amount of different texture compilations, which I personally call "texture packs", rather than letting the user choose between all the textures used by both 'Half-Life' and 'Counter-Strike'. These "texture packs" are those bunch of ".wad" files you can find inside your "cstrike" folder.
    For example, each map uses a "unique" set of textures. In the case of "Dust" and "Dust2" maps, a file named "cs_dust.wad" is the one used by both of them, because this file contains most (if not all) of the textures you see in these maps. The exact same case goes for other maps such as Cobblestone, Aztec, Airstrip, etc.
    One can, however, assign various WADs to combine textures from different maps into just one. Keep in mind, though, that you must not select all the WAD files, as some of them aren't meant to be used as texture packs, nor is Hammer capable of reading/using a big amount of them. The 'best' amount of assigned WADs is usually between 2 and 6, so try sticking around that quantity.

    To assign Hammer texture packs, head to the "Textures" tab in the configurations window. It should be blank by default, but if you see something like "textures.wad" in the list, remove it by selecting everything in that list and click on the 'Remove' button.
    To add a WAD file, click on the 'Add WAD' button, locate Counter-Strike's main folder, open the "valve" folder and select "halflife.wad" - this is an essential texture pack because it contains often-required textures to keep going.
    To add more WADs, click on 'Add WAD' again, locate Counter-Strike's main folder, open the "cstrike" folder and multi-select files like "chateau.wad", "cs_dust.wad", "cstrike.wad" & "de_aztec.wad", then click on 'Open' to list them all in.
    [​IMG]
    [​IMG]

    Click on 'OK' and restart Hammer to apply the changes.


    Having completed all that, you've successfully set-up Hammer and are now ready to start creating maps. Please check the 'next tutorial' here!
     
    • Like Like x 7
    • Informative Informative x 1
    • Useful Useful x 1
    Last edited: Aug 27, 2018
  2. *UnstoppablE* Dzair

    *UnstoppablE* Dzair Member

    Joined:
    Jul 10, 2017
    Messages:
    132
    Likes Received:
    50
    Wow bro sincerly very nice job and thnx for these tuto
    Now i have a big pic of how to make a map
    Still waiting for the next tuto patiently:D
     
  3. Rebornz Kid

    Rebornz Kid New Member

    Joined:
    Feb 3, 2018
    Messages:
    3
    Likes Received:
    1
    very good
     
  4. Jakky

    Jakky TurėkBėda* CS Administrator

    Joined:
    May 16, 2018
    Messages:
    161
    Likes Received:
    152
    Thanks alot, I do everything you typed.
     
    • Dumb Dumb x 1
  5. ahd

    ahd CS Administrator CS Administrator Map Developer Donator

    Joined:
    Oct 20, 2016
    Messages:
    153
    Likes Received:
    93
    I've rewritten the tutorial from ground. Enjoy its new, more-graphical walkthrough experience!
     
    • Like Like x 1

This site is owned and third-party cookies. If you continue with us we understand that you accept the use of cookies.