Garry's Mod

Garry's Mod

64 ratings
Mounting Game Content in Hammer Without Moving Any Files
By ⛧Hellspawn⛧
An easy and clean way to mount content from other games in Garry's Mod's Hammer editor. No need to extract or move any files.
3
   
Award
Favorite
Favorited
Unfavorite
Introduction
The method described in this guide will make all of the content of the games that you wish to mount available in hammer, including entities.
This guide assumes that you have already configured Hammer Editor for Garry's Mod. If you haven't, you can configure it under "Tools" > "Options..."
It is important that you use the hammer.exe in your Garry's Mod directory:
<steam directory>/steamapps/common/GarrysMod/bin/hammer.exe
I recommend creating a shortcut to this exe on your desktop and using that instead of starting Source SDK everytime you want to work on a map.
Adding the Game's FGD in Hammer's Options
Open hammer and navigate to "Tools" > "Options...". In the window that opens, add the data files of the games that you wish to mount.
The FGD of a source game is usually located here:
<steam directory>/steamapps/common/<game>/bin/<game>.fgd
If you can't find the FGD, it might be on the Valve Developer Community.
Editing mount.cfg
Navigate to Garry's Mod's config directory.
<steam directory>/steamapps/common/GarrysMod/garrysmod/cfg

Open the file named "mount.cfg". It should look like this:
// // Use this file to mount additional paths to the filesystem // DO NOT add a slash to the end of the filename // "mountcfg" { // "cstrike" "C:\steamcmd\steamapps\common\Counter-Strike Source Dedicated Server\cstrike" // "tf" "C:\mytf2server\tf" }
This file is used to mount content on a dedicated server, but it works for our purpose as well. For more info, check out its wiki page[wiki.facepunch.com].

Now just add the games you want to mount and save it.
// // Use this file to mount additional paths to the filesystem // DO NOT add a slash to the end of the filename // "mountcfg" { "cstrike" "C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Source\cstrike" }
Checking if it worked
Restart hammer and check the "Messages" window at the bottom. Look for the games you've mounted.
If you can't find them, make sure that:
  1. You entered the correct path in your mount.cfg file
  2. You used backslashes (\) in the game path
  3. You haven't forgotten any quotes (") or brackets ({ and })
Once you find the games in the messages, they are mounted and you can start using their assets in your maps!
50 Comments
TheBadgerBrah Mar 30 @ 6:57am 
Will this work for Hammer++ ? (going to try now)
KrematoriyDagestan. Mar 27 @ 3:56am 
My God, thank you so much! You saved me like no one has saved me before!
dsaS May 28, 2023 @ 9:45am 
professional schizophrenic May 23, 2023 @ 8:42pm 
how do i mount left 4 dead 2
Toastinator May 17, 2023 @ 10:50am 
@LuigiNess I think your reference paths are too specific for this to work. Instead of:


"cstrike" "C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Source\cstrike\cstrike_pak.vpk"
"portal" "C:\Program Files (x86)\Steam\steamapps\common\Portal\bin\portal"
"halflifesource" "C:\Program Files (x86)\Steam\steamapps\common\Half-Life 2\hl1\halflifesource"

Go for:

"cstrike" "C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Source"
"portal" "C:\Program Files (x86)\Steam\steamapps\common\Portal"
"halflife2" "C:\Program Files (x86)\Steam\steamapps\common\Half-Life 2"

Simply navigate to the directory in the common folder per game of interest. That should normally do it.
LugiNess Apr 9, 2023 @ 2:47pm 
I won't get an answer.
I will get an answer.
I won't get an answer
LugiNess Apr 9, 2023 @ 2:44pm 
doesn't work
"mountcfg"
{
"cstrike" "C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Source\cstrike\cstrike_pak.vpk"
"portal" "C:\Program Files (x86)\Steam\steamapps\common\Portal\bin\portal"
"halflifesource" "C:\Program Files (x86)\Steam\steamapps\common\Half-Life 2\hl1\halflifesource"
}
and ive fiddled w/ the cstrike file for awhile now. it still doesn't work. there also is no file "cstrike_pak.vpk"
⛧Hellspawn⛧  [author] Mar 22, 2023 @ 3:46am 
there's a space missing between program files and (x86)
surety87 Mar 18, 2023 @ 8:20am 
i'm trying to mount hl2 so i did this but it's not working. what should i do?:steamsad:

//
// Use this file to mount additional paths to the filesystem
// The folder you provide must contain either one or more *_dir.vpk files or the usual models/materials/etc folders
// Lines starting with // are comments and are ignored by the game
// This file will also affect Hammer Editor (hammer.exe)
//

// DO NOT add a slash to the end of the filename
// DO NOT start lines with // in between { and }, the 2 lines there are commented out examples and will be ignored by the game

"mountcfg"
{
"hl2" "c:\program files(x86)\steam\steamapps\common\half-life 2\hl2"
}
Steve Admin Feb 4, 2023 @ 1:08pm 
I followed your advice, the fgd wasnt there. I then made my own using .txt, but that didn't work either. What do I do?