Xwad: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
A copy of this program can be found in the bin folder of the sourcesdk.  This tool can convert [[WAD]], [[Wikipedia:Windows bitmap|BMP]], and [[SPR]] files to [[VTF]] and accompanied [[VMT]] files.
A copy of this program can be found in the bin folder of the sourcesdk.  This tool can convert [[WAD]], [[Wikipedia:Windows bitmap|BMP]], and [[SPR]] files to [[TGA]], [[VTF]], and accompanied [[VMT]] files.


Help from xwad run without any parameters:
Help from xwad run without any parameters:
        [-AutoDir]
[-AutoDir]
                Automatically detects -basedir and -wadfile or -bmpfile based
Automatically detects -basedir and -wadfile or -bmpfile based
                on the last parameter (it must be a WAD file or a BMP file.
on the last parameter (it must be a WAD file or a BMP file.
        [-decal]
[-decal]
                Creates VMTs for decals and creates VMTs for model decals.
Creates VMTs for decals and creates VMTs for model decals.
        [-onlytex <tex name>]
[-onlytex <tex name>]
        [-shader <shader name>]
[-shader <shader name>]
                Specify the shader to use in the VMT file (default
Specify the shader to use in the VMT file (default
                is LightmappedGeneric.
is LightmappedGeneric.
        [-vtex]
[-vtex]
                If -vtex is specified, then it calls vtex on each newly-created
If -vtex is specified, then it calls vtex on each newly-created
                .TGA file.
.TGA file.
        [-vmtparam <ParamName> <ParamValue>]
[-vmtparam <ParamName> <ParamValue>]
                if -vtex was specified, passes the parameters to that process.
if -vtex was specified, passes the parameters to that process.
                Used to add parameters to the generated .vmt file
Used to add parameters to the generated .vmt file
        -BaseDir <basedir>
-BaseDir <basedir>
        -game <basedir>
-game <basedir>
                Specifies where the root mod directory is.
Specifies where the root mod directory is.
        -WadFile <wildcard>
-WadFile <wildcard>
                -wadfile will make (power-of-2) TGAs, VTFs, and VMTs for each
-wadfile will make (power-of-2) TGAs, VTFs, and VMTs for each
                texture in the WAD. It will also place them under a directory
texture in the WAD. It will also place them under a directory
                with the name of the WAD. In addition, it will create
with the name of the WAD. In addition, it will create
                .resizeinfo files in the materials directory if it has to
.resizeinfo files in the materials directory if it has to
                resize the texture. Then Hammer's File->WAD To Material
resize the texture. Then Hammer's File->WAD To Material
                command will use them to rescale texture coordinates.
command will use them to rescale texture coordinates.
        -bmpfile <wildcard>
-bmpfile <wildcard>
                -bmpfile acts like -WadFile but for BMP files, and it'll place
-bmpfile acts like -WadFile but for BMP files, and it'll place
                them in the root materials directory.
them in the root materials directory.
        -sprfile <wildcard>
-sprfile <wildcard>
                Acts like -bmpfile, but ports a {{sprite}}.
Acts like -bmpfile, but ports a {{sprite}}.
        -Transparent (BMP files only)
-Transparent (BMP files only)
                If this is set, then it will treat palette index 255 as a
If this is set, then it will treat palette index 255 as a
                transparent pixel.     -SubDir <subdirectory>
transparent pixel.
                -SubDir tells it what directory under materials to place the
-SubDir <subdirectory>
                final art. If using a WAD file, then it will automatically
-SubDir tells it what directory under materials to place the
                use the WAD filename if no -SubDir is specified.
final art. If using a WAD file, then it will automatically
        -Quiet
use the WAD filename if no -SubDir is specified.
                Don't print out anything or wait for a keypress on exit.
-Quiet
Don't print out anything or wait for a keypress on exit.
   
   
  ex: xwad.exe -vtex -BaseDir c:\hl2\dod -WadFile c:\hl1\dod\*.wad
  ex: xwad.exe -vtex -BaseDir c:\hl2\dod -WadFile c:\hl1\dod\*.wad

Revision as of 12:18, 29 January 2006

A copy of this program can be found in the bin folder of the sourcesdk. This tool can convert WAD, BMP, and SPR files to TGA, VTF, and accompanied VMT files.

Help from xwad run without any parameters:

	[-AutoDir]
		Automatically detects -basedir and -wadfile or -bmpfile based
		on the last parameter (it must be a WAD file or a BMP file.
	[-decal]
		Creates VMTs for decals and creates VMTs for model decals.
	[-onlytex <tex name>]
	[-shader <shader name>]
		Specify the shader to use in the VMT file (default
		is LightmappedGeneric.
	[-vtex]
		If -vtex is specified, then it calls vtex on each newly-created
		.TGA file.
	[-vmtparam <ParamName> <ParamValue>]
		if -vtex was specified, passes the parameters to that process.
		Used to add parameters to the generated .vmt file
	-BaseDir <basedir>
	-game <basedir>
		Specifies where the root mod directory is.
	-WadFile <wildcard>
		-wadfile will make (power-of-2) TGAs, VTFs, and VMTs for each
		texture in the WAD. It will also place them under a directory
		with the name of the WAD. In addition, it will create
		.resizeinfo files in the materials directory if it has to
		resize the texture. Then Hammer's File->WAD To Material
		command will use them to rescale texture coordinates.
	-bmpfile <wildcard>
		-bmpfile acts like -WadFile but for BMP files, and it'll place
		them in the root materials directory.
	-sprfile <wildcard>
		Acts like -bmpfile, but ports a sprite.
	-Transparent (BMP files only)
		If this is set, then it will treat palette index 255 as a
		transparent pixel.
	-SubDir <subdirectory>
		-SubDir tells it what directory under materials to place the
		final art. If using a WAD file, then it will automatically
		use the WAD filename if no -SubDir is specified.
	-Quiet
		Don't print out anything or wait for a keypress on exit.

ex: xwad.exe -vtex -BaseDir c:\hl2\dod -WadFile c:\hl1\dod\*.wad
ex: xwad.exe -vtex -BaseDir c:\hl2\dod -bmpfile test.bmp -SubDir models\props
ex: xwad.exe -vtex -vmtparam $ignorez 1 -BaseDir c:\hl2\dod -sprfile test.spr -SubDir sprites\props