BSP is a compiled map file that Source Engine uses to run your map inside the game.
VMF is Valve Map Format file and it is the raw data of your map. VMF file is what you open, save and work on inside Hammer Source level editor.
All final, official maps inside CS:GO are BSP map files. In order to open them inside Hammer Source level editor, you have to decompile them and generate a .VMF file.
Decompiling is a process generating .VMF file from a compiled .BSP file.
Why would you want to decompile?
Each map contains valuable lessons, tips and techniques waiting for you to learn from.
You can reverse engineer how a map was created, how it was optimized and which techniques were used to generate a specific result.
For example, you can learn how such expansive skybox was created on de_nuke:
Or how cs_italy was optimized:
It is important to note:
"Decompiled levels mimic the original source, they are not exact reproductions. This makes them useful for learning, measurement, and inspection, but not direct recompilation. The original source is ideal for reproductions or modifications." - From Valve Wiki
Disclaimer Before Decompiling Any Map
Only decompile to learn and inspect these maps to improve your own work.
You should not copy, recompile and release decompiled maps.
"Releasing reproductions, modifications, or approximations of another's work without permission nor credit is frowned upon and may be considered as a copyright violation." - From Valve Wiki
There are many decompilers available:
- EntSpy (view/edit entities of a BSP without recompiling)
- BSPSource (open source map decompiler for Source engine maps, based on VMEX) - the one we are going to use
- VMEX (decompiler for Source engine maps)
- MapFool (helps porting HL1 maps to Source)
- xwad (command-line tool to convert texture formats)
- BSP2MAP (for HL1 engine)
- WinBSPC (for HL1 engine)
- BSP Viewer (for HL1 engine)
You can see a full list and download links on official Valve Wiki here.
We will cover BSPSource. It is what I personally use and it works with great with CS:GO maps.
Valve lists a few download links where to find BSPSource decompiler. You can find it here on this page.
I cannot attest to the download links and their sources. You take all responsibility of download from them.
Go ahead and download BSPSource decompiler.
Running BSPSource Decompiler
Extract BSPSource zip/rar folder and open one of the following files:
- Windows: open bspsrc.bat or bspsrc.jar
- Linux/MacOS: open bspsrc.sh or bspsrc.jar
Double-click on bspsrc.jar to open BSPSource GUI:
All you need now is click on "Add" and look for BSP file to decompile. But we are going to go through an extra step.
Getting Your BSP Map Files In Order
Following section is option but important.
I do not like decompiling original BSP map files located in the default installation folder for CS:GO:
So I copy the BSP map files I want to decompile from "C:\Program Files (x86)\Steam\SteamApps\common\Counter-Strike Global Offensive\csgo\maps". I chose to copy cs_militia:
Go to sdk content folder located in "C:\Program Files (x86)\Steam\SteamApps\common\Counter-Strike Global Offensive\sdk_content":
Create a new folder named "decompiledmaps":
You can name this folder anything you want.
Paste the copied .BSP map file into this new folder:
It is an extra safety step to avoid any issues that may come up from decompiling original .BSP files.
Reason we chose sdk_content folder will be apparent later. "C:\Program Files (x86)\Steam\SteamApps\common\Counter-Strike Global Offensive\sdk_content" directory is where Hammer Source level editor looks into to open .VMF files.
Under Files tab click on "Add":
Navigate to "C:\Program Files (x86)\Steam\SteamApps\common\Counter-Strike Global Offensive\sdk_content\decompiledmaps" and choose the copied BSP map file you want to decompile. Double click on the file or select multiple BSP files and click Open:
You will see the added BSP file/s. Now click on "Decompile":
BSPSource will now ask where you want to save your decompiled map into. I kept it to the same directory "decompiledmaps":
Decompiler will run and generate a VMF file:
Opening Decompiled Maps
Launch Hammer Source Level editor:
Go to File > Open:
Choose decompiled .VMF file inside "decompiledmaps" folder:
You now have a decompiled map opened inside the level editor that you can learn and study from:
Decompiling Maps That Contain Custom Props/Textures
Some maps may custom props and textures that were packed into the BSP file by the creators. These props and textures will not show up in the map after decompiling.
You will experience error_props and blank textures if you decompile a map with these custom assets:
You can still learn from these maps. Delete the error props to see the map better.