Workshop docsPublishing
Packing a VPK
Workshop items are VPK files, a single package holding all your content at the right paths. How to stage your files, pack them and test the result.
A VPK is a package of files, a bit like a zip file the game can read without unpacking. It keeps each file's folder path, so a VPK holding maps/ behaves exactly as if that file were in the game's maps folder. Players get everything in one download, and unsubscribing removes it all cleanly.
1. Stage your files
Make a working folder outside the game install, e.g. C:\bms-mods\. Inside it, make a folder named after your project. Its name becomes the VPK's name, so keep it lowercase with no spaces:
C:\bms-mods\ap_accesspoint\Copy in only the files players need, at the same paths they'd have in the game folder (see How the game finds your files):
ap_accesspoint/
├── campaigns/
│ └── ap_accesspoint.json
├── maps/
│ ├── ap_01_lobby.bsp
│ ├── ap_02_offices.bsp
│ ├── ap_03_vault.bsp
│ └── graphs/
│ ├── ap_01_lobby.ain
│ ├── ap_02_offices.ain
│ └── ap_03_vault.ain
├── materials/
│ └── ap_accesspoint/ (your custom textures)
├── models/
│ └── ap_accesspoint/ (your custom models)
├── sound/
│ └── ap_accesspoint/ (your custom sounds)
└── ui/
└── ap_accesspoint/
├── logo.png
├── chapter1.png
└── chapter2.pngLeave out your working files: .vmf and .vmx map sources, .log, .prt and .lin files from compiling, Photoshop or TGA texture sources, and model source files (.qc, .smd, .dmx). They add download size and do nothing in game. If you want to share your sources, publish them separately.
2. Pack it
The quickest way is to drag the project folder onto vpk.exe in Black Mesa's bin folder. It writes ap_accesspoint.vpk next to the folder.
You'll repack after every change, so a batch file saves time. Save this as C:\bms-mods\pack.bat, then double-click it whenever you need a fresh VPK:
@echo off
"C:\Program Files (x86)\Steam\steamapps\common\Black Mesa\bin\vpk.exe" "%~dp0ap_accesspoint"
pauseBig projects: multi-part VPKs
For a large mod, pack it in parts with -M (multi-chunk) and -c (the size of each part in MB):
"C:\Program Files (x86)\Steam\steamapps\common\Black Mesa\bin\vpk.exe" -M -c 200 "%~dp0ap_accesspoint"This creates an index file, ap_accesspoint_dir.vpk, plus numbered parts (ap_accesspoint_000.vpk, ap_accesspoint_001.vpk, …). They only work together: always keep and upload the whole set.
3. Make the upload folder
The publishing tool uploads a folder, not a single file. Make one that contains your VPK and nothing else:
C:\bms-mods\upload\ap_accesspoint\
└── ap_accesspoint.vpkCopy the VPK (or the whole multi-part set) here each time you rebuild it. Don't point the publishing tool at your staging folder of loose files.
4. Test the VPK, not your loose files
Before uploading, check that the VPK on its own has everything:
- Remove your loose test copies from the game folder: your maps from
bms/, and your materials, models, sounds and campaign file frommaps/ bms/. - Copy the VPK into
Black Mesa/. Create the folder if it doesn't exist.bms/ custom/ - Restart the game, then play it as a player would. The testing checklist covers what to look at.
Anything missing from the VPK shows up now as a purple-and-black checkerboard, an ERROR model, silence or a missing menu card, instead of after you've published. When you're done, take the VPK back out of custom/ so it doesn't clash with the Workshop copy later.
