Greetings, everyone! Today I'm excited to post a simple setup and tutorial on how to use modern versions of Hammer (Such as the Slammin Source Tools version or Hammer++) for Megabuild!
Why can modern hammer not be used for the leak?
The reason why Modern hammer is incompatible is actually quite simple: Model versions. Since the leak uses v28-37 mdl files, modern hammer versions, which only support higher mdl versions like 48, will crash when attempting to load them. Everything else (textures, sounds, sound scripts, choreographed scenes, etc.) work just fine, as they're version agnostic (or in the case of vmf files, supported across all branches.)
What is the solution to this problem?
Nicknine's mdl converter, a command line program, can easily be used to batch convert every model from megabuild up onto a modern supported engine branch! Since this is the only set of files that need to be converted, all other asset directories can be referenced directly using Symbolic Links using
Link Shell Extension or any other program that allows for symbolic links.
What I have done
Last night, I ran through the entirety of a clean copy of Megabuild with Nicknine's converter, as well as a few extra models that I've uploaded over the past few years. I then set up a "mod" that can be placed in your Sourcemods directory for said models.
Here are the 7zip parts of that mod in question:
(1) (2)Here is the new permanent link:
https://drive.google.com/file/d/1lUXnRwbRuCF8INM7WT_icKsywaCiN0_5/view?usp=sharingInstructions
1.
Download both of the 2 7z parts listed above. Download the 7z file.
2.
Select both files and extract the "leakmodels" folder into your Steamapps/sourcemods folder using your extractor of choice. I recommend 7Zip but WinRar should also work. (Please don't comment asking how to do this, every time I split a 7zip into parts, people get confused. Just highlight both of them before right clicking!)
3. Using Link Shell Extension (or any other program that allows for the creation of symbolic links,) place symbolic links for the following directories from "megabuild/hl2" into "leakmodels":
materials
scenes
sound
(Alternative: If you really want to, you can copy these folders directly instead of using symbolic links. This is heavily discouraged but it is an available option.)
4. Open your Hammer of choice and create a new game setup for "leakmodels." Be sure to use the fgd files found in "leakmodels/fgds."
Additional Notes
1. If you want to patch over new materials or sounds but don't want to modify your copy of megabuild directly, I have included a "custom" folder which should work like any other custom folder from 2013 base.
2. The default "Run Map" options in Source 2013 are not compatible with leak compilers. If you want the "Run Maps" window to work, you will need to create a new configuration in the "Advanced" mode that removes the "-game" line. I do not know how leak vbsp, vvis, and vrad know which game version they're using, especially considering that the leak doesn't even use gameinfo.txt, but this seems to work for me.
3. This setup loads 2013 base shaders, meaning that missing or modified leak shaders will not appear. The proper solution to this would be to compile custom shaders for 2013 base, put them into the leakmodels mod, create a game_shaders_dx9 library for said mod, and then load the mod into hammer through a batch file (this last step would be unnecessary for H++ as far as I understand.) Anyway this is far beyond the scope of this project and would make things much more difficult for the end-user, so the better solution would be to find all of the vmt files in the leak that use incompatible or missing shaders from 2013 base, replace the shader lines with existing ones (like vertexlitgeneric or unlitgeneric, etc.) and add those modified vmt files to a mod in the custom folder. I have not done this myself yet because there aren't many existing materials that use removed shaders, but it's an option in the future.
Enjoy!