Decompiling is the process of taking a compiled map file and generating a file that Hammer can open. Decompiled maps are not perfect recreations, because of format differences.[Clarify] This makes them useful for learning, measurement, and inspection, but not direct recompilation. The original source is ideal for reproductions or modifications.
Releasing reproductions, modifications, or approximations of another's work without permission nor credit may be considered rude to the author, is largely frowned upon, and is in fact copyright infringement, which may have legal consequences depending on the source of the map. There are methods of preventing maps from being fully decompiled (by obfuscating textures, entities, etc.), but these are rarely used because they can usually be worked around, and most people who decompile maps are doing so to learn from them rather than to steal.
- (used to view the entities and other lumps on a map, decompiling to vmap, and exporting to glTF)
- EntSpy (used to view and edit the entities of a BSP without recompiling)
- BSPSource (open source map decompiler for Source engine maps, based on VMEX)
- VMEX (decompiler for Source engine maps)
- MapFool (helps porting HL1 maps to Source)
- xwad (command-line tool to convert texture formats)
- BSP Viewer requires .NET Framework v1.1. (not recommended)
- Crafty requires .NET Framework v2.0[confirm] (not recommended)
- Half-Life Unified SDK Map Decompiler requires .NET Desktop Runtime 6[confirm]
- MBSPC (not recommended)
- BSP2MAP (not recommended)
- WinBSPC (not recommended)
- BSP Decompiler 005 (not recommended)
Most maps do not need to be extracted, as they are located in the file system rather than VPK. The map files are normally located in a maps folder, for example
common\Team Fortress 2\tf\maps\ holds all the official Team Fortress 2 maps.
Before you go
Before you take this jump to run off and decompile a map take a second or two to think, "What am I trying to learn/do?". Read the included TXT files, you may just find the creator's e-mail, and that could be more helpful than you imagine.
Some mappers will offer help and advice, they may even go so far as to provide examples of what you wanted to borrow from the map.
Porting newer maps to older Source games
Decompiled maps from Left 4 Dead 2, Portal 2, Counter-Strike: Global Offensive, and Alien Swarm will crash when loaded in the Hammer for Half-Life 2, Team Fortress 2, Counter-Strike: Source, Day of Defeat: Source and other games. Opening the map in Left 4 Dead Hammer and re-saving it will automatically convert it to be compatible.