VMEX (valve Map Extractor) is a .bsp to .vmf map decompiler for Half-Life 2 games (HL2, HL2DM, and CS:S).

It requires the Java Runtime Environment 5.0 (aka 1.5.0) which can be downloaded from this page:
http://java.sun.com/j2se/1.5.0/download.jsp
By following the "Download JRE" link.

It is a command-line program. To use, invoke it with:

vmex <mapname.bsp>

or alternately:

java -jar vmex.jar <mapname.bsp>

(For windows 95 and 98, use the command: vmex2 <mapname.bsp> )

Update v0.75a 19 Jan 2005

Added a temporary workaround for a bug that occurs if the user's locale uses comma-separated decimals.
This means that no decompiled maps will load in Hammer correctly.
The vmex.bat and vmex2.bat batch file now contain a switch to set Java to English when running vmex.
To do it manually, run vmex using the command:

java -Duser.language=en -jar vmex.jar <mapname.bsp>

There'll be a proper fix in the next version of vmex.

Update v0.75 18 Jan 2005

Added a -m<mode> switch to control the decompilation mode
 -m0  decompiles the map by original faces (as in previous versions).
This produces the smallest files, but there are sometimes missing faces that leave gaps.
 -m1 decompiles via split faces. This produces a large numbers of brushes and large files
(approx 60% - 80% bigger than -m0). However, (almost) all faces are present.
 -m2 (default) decompiles via original faces, unless it detects a missing one, in which case
it writes the corresponding split faces. This makes the vmf file somewhat bigger, while preventing
the gaps which occur in -m0 mode. -m2 mode is slower than the other two modes.

There is also now a -v switch which turns off a new vertex-checking method. This method prevents
most of the invalid solid and out-of-memory errors on loading the map in Hammer (not all, however).
If -v is set, the (slightly faster) method used in previous versions is used instead.

Update v0.72 16 Jan 2005

Fixed a bug with envmapped texture names that caused problems with the d2_coast_* maps.

Update v0.71 16 Jan 2005

Tiny bug fix update.

Update v0.7 16 Jan 2005

VMEX can now output env_cubemap entities
There are now a number of options that can be set on the command line, using:
vmex [options] <mapname.bsp>

  -d<value>	The thickness of the brushes created (default 1.0)
  -t<mode>	The texure output on the front face of a brush:
			-t0	white			-t2	orange grid
			-t1	black			-t3	the original face texture (default)
  -s<mode>	The texure output on the back faces of a brush:
			-t0	white		-t2	toolsinvisible (default)
			-t1	black		-t3	same as front face
  -r<value>	The precision (number of decimal places) to write floating-point values
  -o		Don't fixup origins of brush models
  -p		Don't output prop_statics
  -x		Don't fix texture names that refer to envmaps
  -c<value>	Env_cubemap output options
			-c0	no cubemaps		-c1	output cubemap location only
			-c<count>	write list of up to <count> sides tied to cubemap (default 8)

			
Update v0.6 14 Jan 2005

VMEX now supports decompilation of prop_statics


Initial release v0.5 13 Jan 2005



VMEX v0.75a 19 Jan 2005  rof@mailinator.com