Many of you may have heard of the mysterious engine tool “Foundry”. You’d see references to it in hammer and Faceposer, little things like “update in engine” with no clear explanation of what it is.
From what we determined, foundry was a tool that allowed you to edit your maps in hammer and it’d edit them inside the engine in real time. The only time we’d seen a DLL of it was in the 2007 engine tool load with the old SFM. We had foundry.dll yet it did nothing as we couldn’t load it. The VDC has a small amount of info from what people originally figured out.
Gentlemen, today I bring you a revelation. We’ve had foundry for a long time, sitting right under our noses. During one of my many sessions of dicking around with SFM , I discovered something. “hammer_dll.dll”, the DLL that hammer uses has a hidden secret to it. The DLL contains Foundry. It appears that it got merged into the hammer DLL at some point which would explain why “foundry.dll” hasn’t been seen since 2007.
Depending on the branch of the engine, you have to load this through various methods. Since Left4Dead2, there has been a console command “toolload” which you can use to load it. Put “hammer_dll.dll” into your bin/tools directory and then load it like that. You have to run the game with the -foundrymode launch parameter when using foundry or it’ll close on you. Older branches may have a txt document named either “enginetools.txt” or “sdkenginetools.txt” that you need to put the dll path into to load.
Now, Foundry doesn’t appear to work on most branches of the engine. I have tested it on both the Left 4 Dead 2 branch and the SFM branch. The L4D2 branch crashes when you load the map, but the SFM branch appears to load fine.
This is what my map originally looked like straight out of hammer.
Once I had that I compiled it with that single light and loaded foundry up.
After that I started adding entities inside of hammer and this is what happened.
So then I tried decals.
Some overlays and make a selection with the brush tool while I’m at it
And finally my masterpiece was done
Now I had only compiled my map a single time at this stage, the initial compile was just the basic box and a single light so I could see and SFM wouldn’t freak out for missing HDR. I had filled my map with random entities without a recompile, heresy!
It’d probably be extremely helpful for testing IO on say triggers. There’s a button to get the most recent entities from Hammer and then load from a quicksave right in foundry, so you could quicksave before the trigger, test your trigger, edit the IO, click that button and be able to test the new settings right away without needing a recompile.
Anyways I hope some of you mappers can find this useful. I’ll be experimenting with it more to see what else I can do with it, but I thought I’d make a post to tell you guys about it so you could start messing with it. There’s a lot to this and absolutely no documentation so it’s going to take some work to fully figure out
I will attempt to update this whenever someone confirms something.
Confirmed working engine branches:
Supposedly working engine branches:
Crashing engine branches
TBD engine branches:
-Dota 2 (No hammer?)
You MUST launch the game with the -foundrymode launch parameter when going into Foundry mode or else it will close on you the moment you try and load Foundry.
Foundry is not “foundry.dll” It is within “hammer_dll.dll”