Hi all,
I have had a few people approach me with problems when they are decompiling a map.
There are multitudes of methods available when it comes to locking a map file, but the most effective way is to use the Obfuscator process.
If you have ever decompiled a map and tried to open it in hammer, only to get the following error: E:\Steam\steamapps\USERNAME\Sourcesdk_content\cstr ike\mapsrc\MAPNAME.vmf, line 00000: unexpected end of file - it is possible that the map has been obfuscated.
What tools do we need for this?
We will only need 2 tools to fix this problem.
Cracked VMEX: We will use this to decompile the map, bypassing any protections on it (besides the obfuscator).
Download: http://www.tophattwaffle.com/downloads/vmex/
Notepad++: We will use this to open up the vmf file and adjust its code to fix the problem.
Download: http://notepad-plus-plus.org/
Ok I have the tools, what now?
We will need to open up the folder containing the cracked vmex. In there you will see 4-5 files: vmex.bat, vmex.jar, vmex2.bat and some other random shit.
Move the map you wish to decompile into this folder and double click on the vmex.jar file.
This screen will appear:
Leave all of the settings as is and click browse, and select your map file.
Click decompile and wait for up to 30 seconds.
In the folder containing the vmex files, there should also be a file with the same name as your map, with an _d at the end. This is our vmf (valve map file).
Copy the file to your clipboard.
Open hammer and browse for maps.
Paste your map file in this folder and open it.
Hammer will attempt to open the file, if it is successful then you don't need this tutorial and you can stop now. If it is not successful, it will post you an error similar to the one mentioned at the beginning of this tutorial. It will also give you a line number (take note of it).
Right click on the vmf file and open it with notepad++
On the left hand side, you will see line numbers - scroll down until you see the line number mentioned in the error in hammer. It is normally at the very bottom.
This last part will be different with every map, but the idea is simple and I will explain it with my example.
When i decompiled jb_battleforce_jail_v3 it came up with and error on line 327264:
TO fix it, I had to remove the final command lines (lines 327264 - 327267). You will also need to make sure the command lines above it are opened/closed correctly with parenthesis.
Here is my fixed version:
Once you have edited the map correctly, save it and attempt to open it in hammer again.
It should work.
If you are missing textures for the map, I will be writing up a tutorial on how to extract textures from a map file to your computer.
Hope this helps!