Model Browser unuseable when mapping with Hammer Editor for a mod

Hello everyone,

I’ve picked up my Portal mod again, after quite a break, and quickly found myself confronted with the problems that caused me to quit last time. Some I managed to solve, but what’s keeping me from working right now is that I can’t use the Model Browser without crashing Hammer.

The situation is as follows: I created a mod for Portal 1. Since - as far as I know - the Source SDK is broken since long ago, I went by creating a folder in the sourcemods directory and creating a gameinfo.txt there. Then, I added a new Game Configuration to the Hammer Editor found in Portal’s bin folder, where I set all paths accordingly - game directory to my mod’s folder, bin directory to Portal’s bin folder, build programs in Portal’s bin folder. I referenced base.fgd, portal.fgd and halflife2.fgd there as well, the last because Portal is built heavily on top of Half-Life² and still contains all the entities and content from HL2.

It worked rather well, until today. Earlier, I ran into a problem where my maps wouldn’t update ingame after compiling, I fixed this by setting the paths to the build programs once more (same as before), and for whatever reason, I could compile afterwards by using the default compile settings. This messed with the Model Browser however - how, I do not know - which now crashes upon using it.

To be precise, I open it, and immediately freezes. I can do nothing but closing the model browser window with the big red X button, which causes Hammer to become unusable as well (see the picture below). Starting Hammer from the SDK fails because Hammer “failed to load the default scheme”, and validating all local files didn’t change a thing either. I ran into this problem two years ago already, but I have no idea how I solved it last time. Interesting enough, entering the models path into the “world model” field of any prop works, displaying the proper model without crashing, but using the Model Browser fails.

I sincerely hope somebody can help me with this, as it’s rendering me unable to use Hammer for now.

Greetings,

HashtagMC

P.S: The hammer.vdf file in Portal\bin stores the term last searched for with the Model Browser, I tried changing it to a Portal mode, but to no avail, when I start Hammer, it still has the previous value in the Model Browser’s filter field and thus crashes.

In hamer options general untick use VGUI model browser then load up a portal model that way then put it in the level save close hammer then open hammer and tick use VGUI model brser again it should correct it self

That fixed the problem as in “I can use Portal models again”, but using HL2 models still crashes. I know it can work, I’ve used HL2 models before, any idea how to get that working again?

Thanks for getting it fixed so far tho.

looking at the portal vpk and the hl2 vp there are differences in the models files the portals model has 5 files and the hl2 has 6 files this difference could be the issue or maybe after some update the hl2 models are a different version,

EDIT
i spoke with some one on the SMC discord channel and they said try rebuilding the hl2 models using crowbar https://developer.valvesoftware.com/wiki/Crowbar just incase there is a version difference

The weird thing is, it worked until, like, today, and there was no update or anything. I faced that exact problem two years ago, and how likely is it that the same problem occurs twice, especially since Steam didn’t download any update that could break it?

I think the problem occured first today when I switched from using a custom compile setting to the default compile setting.

hmm that is stramge, can you post the text in the gameconfig.txt for your hammer set up

Sure, can do.

I use the “ratman” setup for my mod and “Portal” for Portal. Don’t use the Half-Life 2 one, I tried that years ago to get the HL2 entities working for Portal, without success if I recall correctly.



"INDX("
{
	"Games"
	{
		"Half-Life 2"
		{
			"GameDir"		"G:\SteamLibrary\steamapps\common\Portal\portal"
			"Hammer"
			{
				"GameData0"		"G:\SteamLibrary\steamapps\common\Portal\bin\halflife2.fgd"
				"GameData1"		"G:\SteamLibrary\steamapps\common\Portal\bin\portal.fgd"
				"TextureFormat"		"5"
				"MapFormat"		"4"
				"DefaultTextureScale"		"0.250000"
				"DefaultLightmapScale"		"16"
				"GameExe"		"G:\SteamLibrary\steamapps\common\Portal\hl2.exe"
				"DefaultSolidEntity"		"func_detail"
				"DefaultPointEntity"		"info_player_start"
				"BSP"		"G:\SteamLibrary\steamapps\common\Portal\bin\vbsp.exe"
				"Vis"		"G:\SteamLibrary\steamapps\common\Portal\bin\vvis.exe"
				"Light"		"G:\SteamLibrary\steamapps\common\Portal\bin\vrad.exe"
				"GameExeDir"		"G:\SteamLibrary\steamapps\common\Portal"
				"MapDir"		"G:\SteamLibrary\steamapps\common\Portal\portal\maps"
				"BSPDir"		"G:\SteamLibrary\steamapps\common\Portal\hl2\maps"
				"CordonTexture"		"tools	oolsskybox"
				"MaterialExcludeCount"		"0"
			}
		}
		"Portal"
		{
			"GameDir"		"G:\SteamLibrary\steamapps\common\Portal\portal"
			"Hammer"
			{
				"GameData0"		"G:\SteamLibrary\steamapps\common\Portal\bin\halflife2.fgd"
				"GameData1"		"G:\SteamLibrary\steamapps\common\Portal\bin\portal.fgd"
				"TextureFormat"		"5"
				"MapFormat"		"4"
				"DefaultTextureScale"		"0.250000"
				"DefaultLightmapScale"		"16"
				"GameExe"		"G:\SteamLibrary\steamapps\common\Portal\hl2.exe"
				"DefaultSolidEntity"		"func_detail"
				"DefaultPointEntity"		"info_player_start"
				"BSP"		"G:\SteamLibrary\steamapps\common\Portal\bin\vbsp.exe"
				"Vis"		"G:\SteamLibrary\steamapps\common\Portal\bin\vvis.exe"
				"Light"		"G:\SteamLibrary\steamapps\common\Portal\bin\vrad.exe"
				"GameExeDir"		"G:\SteamLibrary\steamapps\common\Portal"
				"MapDir"		"G:\SteamLibrary\steamapps\common\Portal\sourcesdk_content\portal\mapsrc"
				"BSPDir"		"G:\SteamLibrary\steamapps\common\Portal\portal\maps"
				"CordonTexture"		"tools	oolsskybox"
				"MaterialExcludeCount"		"0"
			}
		}
		"ratman"
		{
			"GameDir"		"C:\Program Files (x86)\Steam\SteamApps\sourcemods\ratmanstories"
			"Hammer"
			{
				"GameData0"		"G:\SteamLibrary\steamapps\common\Portal\bin\base.fgd"
				"GameData1"		"G:\SteamLibrary\steamapps\common\Portal\bin\halflife2.fgd"
				"GameData2"		"G:\SteamLibrary\steamapps\common\Portal\bin\portal.fgd"
				"TextureFormat"		"5"
				"MapFormat"		"4"
				"DefaultTextureScale"		"0.250000"
				"DefaultLightmapScale"		"16"
				"GameExe"		"G:\SteamLibrary\steamapps\common\Portal\hl2.exe"
				"DefaultSolidEntity"		"func_detail"
				"DefaultPointEntity"		"info_player_start"
				"BSP"		"G:\SteamLibrary\steamapps\common\Portal\bin\vbsp.exe"
				"Vis"		"G:\SteamLibrary\steamapps\common\Portal\bin\vvis.exe"
				"Light"		"G:\SteamLibrary\steamapps\common\Portal\bin\vrad.exe"
				"GameExeDir"		"G:\SteamLibrary\steamapps\common\Portal"
				"MapDir"		"C:\Program Files (x86)\Steam\SteamApps\sourcemods\ratmanstories\maps"
				"BSPDir"		"C:\Program Files (x86)\Steam\steamapps\sourcemods\ratmanstories\maps"
				"CordonTexture"		"tools	oolsskybox"
				"MaterialExcludeCount"		"0"
			}
		}
	}
	"SDKVersion"		"5"
}


you might be getting access violation issues because your mod and steam setup are on two different Drives

I’ve moved all my Steam games to my second drive due to lack of space (primary one is only 230 GB and always full), but Steam won’t accept sourcemods anywhere but in its own install directory. I’d have to move the Steam installation itself to move the sourcemods folder, and I’ve no idea whether I couldn’t mess up big time in the process. Can I mess up if I uninstall Steam and re-install it on my second drive?

don’t uninstall just install steam on the 2nd drive copy the steamapps folder to that install then run the install and verify the game cache files or select install game and steamwill checkfor installed files then download if it needs to then every thing should be ok then

Everything (steamapps and so on) is on the second drive already, just the client itself and its steamapps/sourcemods directory is still on C:\

ok install client on the other drive then copy sourcemods into steamapps on G:

I have no idea why, but moving my Steam install (and thus, sourcemods folder) to the same drive as my SteamLibrary (with Portal and Half-Life² in it) solved the problem with the model viewer. I can place HL2 entities and view HL2 models without problems.

[editline]30th July 2017[/editline]

Compiling maps works too, the changes appear after reloading the map with no issues.

Thanks a lot for your help!