Title:
vbct.exe
Subject: Valve Map Batch Compile Tool for Source Mapping
Author: Kevin Ottalini (qUiCkSiLvEr) 
Website: http://qsextreme.com/vbct
Category: Game Level Compiler Manager
Keywords: Valve, Steam, SDK, Source, Games, Map, Level, Mapping, Batch, Compile, VMF, BSP

You can download the latest version of this tool (v 1.0u BETA9, 22Jun2014) from here: vbct_10ubeta.zip
Put the tool in a folder by itself and make a shortcut on your desktop for easy use.

NOTE: This is a BETA release that addresses the new Valve changes.  Previous versions of VBCT are most likely non-functional right now.
This version has a great many changes in it and now supports virtually all Valve MODs. 

Because it is a BETA please don't hesitate to report problems that you might encounter.
I'll be updating this version several times over the next few weeks.

 

Summary:
   
Map levels for Valve Source games can easily be compiled from within Hammer which is good for small maps with fast compile times.

For longer compile times though and for very large maps that take a lot of memory (especially on computers without a lot of memory) compiles are best done in "batch mode" without Hammer loaded.

This tool is a front end for doing map compiles without Hammer, about as simple and efficient as it can be.

This tool is fully functional for all EP1 and Orangebox Source games and Custom Mods based on the EP1 and OrangeBox engines.

NOTE: VBCT now supports L4D, L4D2, Portal, Portal2, Alien Swarm, CSGO, SDK 2013 SP & MP and the other Valve SDKs.

There is a very simple tutorial for VBCT HERE.

VBCT does "Virtual Batch Compiles", that is it doesn't really create a batch file and let it run but rather launches and manages each task individually and captures all the output from it so errors can be detected and log files saved and parsed.

VBCT requires that that Steam and the Source SDK be installed (and run) and that the game you want to compile for has been installed and run at least once.

This tool works under Windows XP 32/64, Server 2003, Server 2008, Vista 32/64, Win7 32/64, Win8x64 Operating Systems.

Screenshots

Main Panel and Side Summary Panel:

Custom Background Images can be loaded to the main Panel,
Traditional style white text on black background is an option as well:

Advanced Option Panels:

VBSP and Bottom Panel:

VVIS:

VRAD:

Advanced VMPI Panel:


Known problems:

Black 2D Windows in Hammer:
    Several MODs such as CS:GO, Alien Swarm, and Portal2 will show black 2D windows in Hammer, this is some bug in the SDK for these MODs that is having problems with the map VMF name being passed on the command line.  Closing the map (but not Hammer) and immediately reopening the map will fix things.  I've sent the info on to Valve but don't have a lot of hope they will fix it anytime soon.

Steam Content on Multiple Disk Partitions:
   If you have games installed on partitions other then the default Steam executable path VBCT will not be able to find this content until a workaround is implemented.  One easy solution however is to drag & drop your GameConfig.txt file onto the VBCT top panel.  VBCT will read the GameConfig.txt and implement those pathways regardless of what disk it's installed on.  You can then click the "SAVE CFG" button and the next time you start up VBCT it will automatically reload your SDK settings.

Fistful of Frags:
     This Mod should be fully functional now.

Vista:
   
Vista pathway problems should be fixed now.

Canceling Compiles:
   
Canceling a group compile works but very occasionally may cause VBCT (or Steam actually) to have problems with maps that are still in the queue.
Additional work is being done to make this feature more robust.

VMPI:
    VMPI is not working at all right now.
  I'll take a look eventually and see if I can get things going again.

Updated:
Custom Mods that use custom vbsp, vvis and vrad modules:
    VBCT version 1.0k and later now supports custom compile modules (vbsp, vvis and vrad) if they are so specified in the SDK GameConfig.txt file.

SOURCE SDK:
   
The old SourceSDK Launcher still works but will be removed soon by Valve.  VBCT will no longer launch this tool.
Instead, VBCT now can launch the individual SDK if one was provided for a MOD and VCBT can also launch tools like HLMV and FacePoser directly for the specified MOD.  I'll be adding in other tools as I have time.

VMFII Instance Isertion Tool:
    VBCT has been fully  tested with this 3rd party tool to support MODs that don't normally allow instances.  MODS like Alien Swarm and Portal2 have the ability to store portions of VMF files in different files which can make working on a small part easier and prevent unintended modification of finished map sections.  This can be especially beneficial when several mappers work on one map at the same time.

Here are instructions:
VMFII works with VBCT, it takes a little trick.
 
Typically VMFII runs by inserting an instance into a tmp vmf, the extra step is you have to rename the tmp file back to the original map name before compiling which is a bit awkward.

What I did was change how VMFII runs (in the batch file) such that it eliminates the need for a cleanup phase altogether. What I did was initially copy the working vmf to a temp file, then let vmfii chew on the temp file and then output the final vmf with the right name (merged with instances). This allows VMFII to run smoothly with VBCT and no extra steps.

The main thing to remember is that VBCT outputs the file name as a batch file argument (%1) not in token form like hammer.

I made up a couple of batch files that you add into the VBCT pre and post-compile and they will run everything include make a backup of your working VMF so you can always restore your latest version. Uncheck the "include -game" checkbox in the panel for both pre & post.

instancetest.bat is the pre-compile batchfile and instancetest_post.bat does the rename of the .sav back to the .vmf and gets rid of the temp file. They will automatically use whatever mapfile name you are working on in VBCT.

The only gotcha is that if the compile fails for some reason the post-compile batch file won't be executed. If that happens you'll have to rename the .sav file back to .vmf by hand or use a batch file to do it.

The setup is pretty straightforward, you can edit the batch files and see what I did - most of the crap in the pre-compile batchfile is just so I can generate a julian date+time hash for the backup file (it never hurts to have backups!).

You'll need to change the instancetest.bat file, it's currently configured to use a couple of custom portal fgd files which you probably don't need ... just delete the "--fgd" all the way to the end of the line and save the batch file.

I used the current portal to do my instance test compiles, I included those instance test vmfs so if you have problems you can use those and I'll be able to see what you're doing.
 

I also did a very slight recompile of the latest version of VMFII just to add help, you can use either version - I included the slightly updated vmfii.exe file in the zip but it's really the same as the distrib except I put in help if the argument are bad or you run VMFII with no arguments at all (shows folks how to use the tool):
 
VMFII arguments:

vmfii infile outfile --fgd file.fgd, file.fgd, ...
vmfii infile --cleanup

-h or --help
-d or --fgd
-c or --cleanup

The original instance_box.vmf file had a problem (at least with the current version of portal tools) so I got rid of the complex solid and just made a block.

Look over what I did here and feel free to ask questions.

You can dl the zip from here:
http://qsextreme.com/vbct/instances.zip

 


VBCT Usage:
    1. Install the Game MOD you want to map for.
    2. Install the
SDK for that MOD.
    3. Run the Game first, that will install all the files and set up the gameinfo.txt file.
    4. Run the SDK Launcher for the MOD if there is one, VBCT will do this if for you.
    5. Run Hammer (VBCT has a button to do this for you).  This will create the GameConfig.txt file for your MOD.
        NOTE: Hammer may dump in a bunch of games into the GameConfig.txt file but only the selected MOD will be good.
                  Best practice is to delete all sections but the one specific to your MOD.

    6. Click on the game select button ([...]) in VBCT (or exit and restart VBCT) and it will show you all the MODs that are ready to go.
        Right-Click on the game select button ([...] and you can then select your MOD.
        If you click on the "Save CFG" button, your mod and any map you select will aways be restored when you launch VBCT.

        You should be able to run Hammer at this point and to create and edit maps.

    7. Run VBCT, select the map vmf file you wish to compile and then select fast, full or final depending on the quality you wish.
        you can right-click on the buttons for more information about what is different for each compile type.

    8. If you want more information about editing and compiling maps, click on the help button and then click on "Overview" for a
        somewhat simplistic flow diagram with links to additional information.
    


VBCT Change History:

Version Date Comment
1.0uBETA9 22Jun2014 A couple of small fixes to suppress diagnostic messages.
1.0uBETA8 21Jun2014 Support for MOD Fistful of Frags should be fully functional now.  Added automatic setting of the VProject for a MOD when it is selected.  Fixed some minor problems with using custom compile modules, these should all work now as long as they are properly defined in the GameConfig.txt file.  VBCT has been fully tested with the VMFII instance insertion tool, please see instructions above.
1.0uBETA7 08Jun2014 Added support for the free MOD Fistful of Frags but the SDK doesn't appear to be 100% yet as content from vpks are not being read.
1.0uBETA5 27Oct2013 Added submenu support for CSS (too support Gary's Mod users).  Continue testing!
1.0uBETA4 21Aug2013 Removed all reliance on old registry & environment settings.  Added SDK 2013 Single & Multiplayer support.  Continue testing!
1.0uBETA3 14July2013 A lot of little fixes to get things working better, VBCT will now show all games that have SDK files installed and allow selecting and running hammer and the game.  Hammer will create GameConfig.txt files for all Mods except L4D where it just crashes if there isn't a file so VBCT can now create GameConfig.txt files for all root MODs.  I'm still working on getting this feature working for variants like ep1 and ep2 as well as custom mods.  Additional testing is going on.
1.0uBETA2 09July2013 Improved registry and environment reads, error information is controller by a "verbose" checkbox to keep the console spam down, improved game lookup procedure.
current bug list: restore of sub-games on startup fails but can easily be set again for now.
Additional testing going on to identify lurking bugs.
1.0uBETA 06July2013 whew, long time between updates, my apologies.  Many. many changes to VBCT so it will work with the new Steam game and sdk configuration under the "Common" folder.  The biggest change is that VBCT now should support all Valve Source Game Mods.  I'm still implementing custom MOD support so if you need support for you custom MOD please shoot me an email and let me know.
1.0t 10Oct2011 Updated VBCT to track with the new SDK update, IE: some mods were moved to the "source2009" folder and there is a new Source MP selection for "Orangebox" Multiplayer games.  The Launch Hammer button was also updated and now works properly.  A minor update to the GameConfig.txt parser that allows custom compile module executables to be run (untested option though so user beware).  One last set of changes is there are now SDK Launch options in [...] for Portal2, Left4Dead and Left4Dead2 - VBCT won't directly compile for these mods yet but these are placeholders for this eventual capability.
1.0s 31Mar2011 Fixed a lurking limits bug that was causing a parse error for the gameinfo.txt file for some custom mods.
1.0r 30Jan2011 Changed vrad parameter -extrasky to allow values up to 256 (thanks for the feedback mookie).  Added a feature to save and restore the GameConfig.txt file - this is a prototype function that doesn't track which engine the file came from, expect an update in the near future to include this information. Updated some broken links to developer information. Added a note about problems with doing a compile with HDR and LDR checked at the same time (right-click on the lighting option groupbox). Added a link in the compile summary area to open the compile history file (csv) in the VBCT folder, best if you have excel installed and associated but notepad will also work in a pinch.
1.0q 16Dec2010 Added a check to see if the VMF is in the sourcesdk folder and warn the user that the map probably won't compile there (Steam protects those folders).
1.0p 11Dec2010 Minor fix to make the GameConfig.txt and GameInfo.txt parser more robust.
1.0o 01Dec2010 unreleased internal version
1.0n 07Oct2010 Updated pre and post compile selections to include .bat files as well as .exe and .cmd
1.0M4
Beta
01Aug2010 Minor fix for precompile checks that let a vis compile go through without a bsp present.
1.0M3
Beta
20June2010
internal test release only
 
1.0M2
Beta
22June2010 It's taken quite a while to get this update out, this version is released as a beta as I'm in the middle of implementing support for L4D and L4D2 which should be in the next release.
 
I believe I've found a cause for the various path problems in Vista and Win7 so VBCT will now track the SDK selections better.

Some of the other things in this version:
Fix for the new Valve source2006, source2007 and source2009 selection menu,
Pre-Compile tool support (lets you run an exe or batch file before starting a compile)
Post-Compile tool support (lets you run an exe or batch file after finishing a compile)
Custom Game launch options
This version should work properly on XP, Vista and Win7 machines, 32bit and 64bit.
 
1.0L
Beta
09Feb2009
15Jan2009
This beta implements a small update to the SDK and gamepath registry update that might help some Vista users that are still having problems getting their paths set.
--> An additional update was made so VBCT will launch properly through Hammer.

Please download from the link to the left.

1.0k 15Dec2008 VBCT now will execute custom compile modules (TheShip for example) if they are so defined in the GameConfig.cfg file.
Improvements in group compile and HDR/LDR switch state implemented
(Thanks for the great testing Sortie!)
Fixed:  loading the custom map profile when a vmf is drag/dropped onto the panel or icon.
1.0j 02Nov2008 unreleased beta working on custom compile modules
1.0i 23Oct2008 Minor update to make the initial screen on load preserve any error messages.
Improved scan of gameinfo.txt and gameconfig.txt files for custom mods.

NOTE: Custom mods must use the exact same game name in their gameinfo.txt as in the entry in the gameconfig.txt files.

1.0h 22Oct2008 Added checkbox to autolaunch game on successful compile.
Added Option to set the console to traditional white text on black background. 
Updated some of the color schemes to work better with both light and dark consoles.
Fixed some small path problems with unusual custom mods.
... minor update to remove bogus hung task check
1.0g 21Oct2008 VBCT will now completely update the environment strings when you change games.  If the SDKLauncher is running when you change games then vbct will restart the SDKLauncher so it is updated with the game you selected.

You can still manually set a different game in the SDKLauncher if you want to edit a map for a different mod then you are compiling for.

1.0f 19Oct2008 Fixed some additional ripple effects of the previous two updates, game launch was getting messed up for some mods.  Things should all be working now.
1.0e 19Oct2008 Fixed a bug caused by the fact that some of the game names in the gameinfo.txt file is different from that listed in the SDK gameconfig.txt file which was causing a path problem.
1.0d 18Oct2008 updated group compiles to autoload map-specific settings (if enabled).

added the -game parameter in the compile strings so the modules will be less dependent on the environment settings (vista fixup).
Updated the label for the panel customization in advanced options

VBCT will now let the user browse for the sourcedsk path if one isn't found on startup (vista fixup).

VBCT can now select games directly without needing to use the SDKLauncher to select the engine and gametype.

1.0c 15Oct2008 Added Group compile feature (compile a list of map files) 
- see the help button for more information

VBCT now opens the default maps folder as defined in the GameConfig.txt file.

1.0b 14Oct2008 Enabled Visual Styles to work under XP and Vista
1.0a 11Oct2008 Improved the startup error detection and made the error strings more informative.

Still working on the keep-alive for the vmpi workers (75% done now).

1.0 10Oct2008 First Public Release!

Still working on the keep-alive for the vmpi workers (75% done now).

0.9s 09Oct2008 Beta updated - you can now drag/drop map files onto the open form as well as the icon.  Found a copy/paste bug causing all compiles to be "normal" (since 09q).

Still working on the keep-alive for the vmpi workers (50% done now).

0.9r 08Oct2008 Beta updated - Added code to support custom mods, tested black mesa and the ship ok, will continue to test this as there are lots of things that can go wrong.

Still working on the keep-alive for the vmpi workers.

0.9q 05Oct2008 Beta updated - compiled under VS2008 now, performs a little better, added solid color background picker and text color picker and save/load default profile will save/restore all color schemes. Some additional fixups and error detections added, vvis and vrad crashes are now detected and hung tasks are automatically killed.

Still working on the keep-alive for the vmpi workers.

0.9p 03Oct2008 Beta updated - custom background images can now be loaded & removed from the main panel just to jazz things up a bit (thanks for the suggestion Valar!)

If you load your image and then save the default profile it will autoload the image as well.

0.9o 01Oct2008 Beta updated - New tab version of the Advanced Options panel.
All context sensitive help now implemented on all panels (whew).
0.9N 29Sep2008 Beta updated, fixed a problem where -both was not being set if both HDR and LDR were selected.  
Fixed the profiles so they save and restore HDR / LDR settings and so they test VMPI to not enable VRAD if OB/EP2.
Fixed daytime rollover problem in the summary.
Added an immediate cancel if fatal compile errors occur (leak, maxbrushes, others tbd).
Additional help added, much more to come.
0.9M 27Sep2008 Beta updated, advanced vmpi panel finished, vmpi worker launch buttons added, vmpi log file problem solved, several minor fixes and updates as well as some prep work for the gameconfig scan.
0.9L 21Sep2008 Beta updated - default and map custom profiles are now all working (check advanced options).  Both have auto load capability too.

A couple of small bugs were fixed including a silly one where vis would run if you selected only vrad to run. I also added a quick show/hide button for the advanced option strings and a clear all advanced option strings option in the Advanced menu.

Minor stealth update, I fixed the cause of several conditions that threw exceptions if there were files missing. - had to add a few more and some additional catches.

... ok well when vvis or vrad run into a bad bsp or prt file they lock onto the log file for a really long time and that causes vbct to get an exception when it tries to read the log file to see what's going on.  I'll obviously need something special to get control over this (tba).  Looks like I got most of these, further testing will tell!

The next thing to get done is activating the advanced vmpi options panel.

0.9k 19Sep2008 Beta updated - fixed all the times shown so they don't display down to the nanosecond.  Added a timer (async mode) that highlights the compile phase we're in.  Various cosmetic updates to the compile summary as well as a quick open/close feature to the compile summary sidepanel.

vbsp, vrad and vvis are also all now run in "below normal" priority which made the whole system much happier (reduced the desktop flickering). These can all be forced to run at low priority as well by switches in the advanced options panel.

slight update, I was able to improve the character I/O, it's about 2x faster now.
And another, I was able to use doublebuffering to remove the panel flickering.

0.9J 18Sep2008 Beta updated - general cleanup, reorganized the compile buttons and added a cancel compile button (async compiles only), started adding the help system (just points here for now) and added credit page. Cleaned up some duplicate output in async mode (async report is still very minimal), getting there though.

NOTE: Canceling a compile may result in an exception being thrown, I'm working on cleaning those up.

0.9i 17Sep2008 Beta updated - new async compiles supported with byte by byte updates 
-
->  accurate progress monitoring
--> little or no freezeup while compiles are running
there is a checkbox that lets you compile the old way too for comparison
MRUList is improved, now just the file name (cleaner to look at)
new right-click option to view a nice compile summary
new right-click option to view the final compile strings
Compiles using MPI now log to the report window (text logs are still not created)
.... whew ...
0.9h 16Sep2008 Beta updated (removed silent compile option for now)

Minor problem with the -hdr checkbox it wasn't doing ldr also so that was a stealth fix here (same version 0.9h, just get the new zip)

I just found a nicely written async class that will hopefully fix the vbct app freezing during compiles, wish me luck!
--> woohoo, I just verified that the class works perfectly, implementing it now

0.9g 15Sep2008 Beta updated - added compile summary sidepanel and added hooks for history
also added launch game button that will autoload with the map you compiled

Added simple MRU to the open file button - right click to access it.
Added csv history file logging of compiles.

0.9f 15Sep2008 Beta updated - added legend to advanced compile options page
fixed a number of little problems and added some additional error checking
0.9e 14Sep2008 Beta updated - all advanced compile options working now including EP2/OB specific.
note: additional testing is required on all the new switches (to see if they work in a compile or not)
VMPI advanced options are still tba.
mru hooks are in but not operational yet.
0.9d 12Sep2008 Beta updated - Advanced compile options working except for lightsfile, advanced options are preserved during any given session (eventually will be saved in a file).
vmpi advanced panel is installed but not yet functional.
A single (normal) log file is preserved after compiles are finished.
0.9c 11Sep2008 Beta updated - added Advanced compile options and window logging
the advanced compile numeric and file options are not working yet (just the check boxes)
0.9b 10Sep2008 Beta updated
0.9a 06Sep2008 Beta

pending to-do list:

Note: This program requires Microsoft Dot Net 1.0, 1.1 or 2.0 to be installed on your system (see bottom of page for more info).

Requirements:
This app requires MS.Net 1.0/1/1 or 2.0 installed (it's written in C#).

Kevin Ottalini (qUiCkSiLvEr)
http://qsextreme.com/vbct


If this tool does not run on your system, or if you get an error like this:

It means that you don't have the Dot Net 1.1 or Dot Net 2.0 framework installed on your system.  This should be a part 
of all XP systems these days and is part of your Microsoft Window Update.  If you are unable to find it there,
you can download and install the updates separately:

Microsoft .NET Framework Version 1.1 Redistributable Package
Microsoft .NET Framework 1.1 Service Pack 1
 
Microsoft .NET Framework Version 2.0 Redistributable Package (x86)

Be sure to run Windows update after installing these as there are probably additional security updates.

I highly recommend installing 1.1 only and then windows update it until all patches and service packs are installed, then install 2.0 and do the same thing.  Trying to install both at the same time can cause update failure and heartache.


You might also be interested in another of my little applications: QS_Toolkit