Custom Content Without Contamination

While creating a level for almost any game, you are most likely going to use some custom content. The issue is that for Hammer and the game to read this content it must be placed inside of the game’s folder. This can lead to you have content others don’t have, or you contaminating your “pure” game files. In Counter-Strike: Global Offensive having different files from the server will result in a kick from the server and temporary ban. We want the best of both worlds – we want Hammer to see the content, and we want to play online. Follow this guide to set up Content Without Contamination. This was written with Counter-Strike: Global Offensive in mind, but this does apply to all games that use custom content.

Team collaboration is also very important. It is typical to have 2 or more people working on the same level. Everyone having access to the same content is required. All members must mount the same content. If you’re working on a single player game, or a mod that will ship VPKs this is not useful to you. This is only useful if you’re required to pack custom content into your BSP before shipping it.

In this guide we’ll cover the system and practices I use to develop levels with my custom content. This includes:

  • Organizing your content correctly.
  • Mounting external content in Hammer.
  • Automatically packing your level with all your custom content.
  • Creating a project specific compile configuration.

Sounds exciting? Because it is! Let’s get started.

    • Move all your custom content into a dedicated “Project” folder somewhere on your computer. I suggest NOT keeping your level in sdk_content\maps. I HIGHLY SUGGEST keeping your project folder inside of a cloud storage folder such as: Dropbox, Google Drive, OneDrive, or any other popular provider. 
    • Here is an example for one of my projects. I use this structure for every project I start.
      • Dropbox
        • Level Design
          • Portal 2
          • Garry’s Mod
          •  CSGO
            • Facade
            • Osaka
            •  Silo
              • Concepts (Concept content is stored in this folder)
                • Doors
                • Halls
                • Stairs
                • Rooms
                • Controls
                • Misc
              • Raw Content (Raw, uncompiled content is store here)
                • Maps (VMFs, VMX, PRT, LOG, Ect..)
                • Materials (PSDs, PNGs, JPEGs used in material creation)
                • Models (3Ds Max, Maya, QCs, along with any other model related files)
                • Resource (Any resource files, E.G. your level’s mini-map)
                • Sounds (Any RAW sound files that are being edited)
                • Scripts (Scripts, Nut files, various manifest files)
              • Content (All sub-folders store their respective content to be used inside the game. Normally they would be copied into your games folders, possibly overwriting game critical data.)
                • Maps
                • Materials
                • Models
                • Resource
                • Scripts
                • Sounds
    • (Optional) I suggest that you then scrub your game install folder then verify your game’s cache. This is to ensure that you’ve returned your game back to its full default content.
    • Browse to your game’s exe folder. In my case this is: C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive
    • Find and open gameinfo.txt then scroll to the bottom and locate the SearchPaths section.
    • Add a new line under the CSGO search path. The line should read:
      Game [full path to content folder]
    • Once all the paths are added, save and close gameinfo.txt.
    • Restart Hammer and CSGO, and you’re done! 

Now Hammer will show all this content, and so will the game! Since all this content is mounted with a lower priority than CSGO, you won’t have any pure sever issues. You will see need to pack your level before giving it out to people or uploading to the workshop. For this I suggest CompilePal as it will detect these added mount paths in gameinfo.txt and pack the content stored in them. When you want to stop mounting this content, just add // infront of the line to comment them out.

One thing to note: sometimes when CSGO updates, or when you verify game cache, the gameinfo.txt file is reset to the defaults. This will erase your mount paths. However it is painless to re-add them. I’ve only had this happen maybe twice a year, so no biggie.

Thanks for reading!
Happy Mapping!