This tutorial will show you how to include any custom materials in your bsp instead of in a zip file which must be unpacked into the materials directory
Note: bspzip must be place in your sourcesdk/bin directory
For this example I have three files which make up a custom texture. These files are:
d:/hl2/hl2/materials/bsptest/stonewall.vmt
d:/hl2/hl2/materials/bsptest/stonewall.vtf
d:/hl2/hl2/materials/bsptest/stonewall_normal.vtf
To include them in the bsp file first create a text file. This textfile lists the absolute path name and relative path name for each file with ONE entry per line (so for each file you have TWO lines). Make sure there is a carrage return after each line including the last and NO spaces. For the above case we would have a file like the following:
Code:
materials/bsptest/stonewall.vmt
d:/hl2/hl2/materials/bsptest/stonewall.vmt
materials/bsptest/stonewall.vtf
d:/hl2/hl2/materials/bsptest/stonewall.vtf
materials/bsptest/stonewall_normal.vtf
d:/hl2/hl2/materials/bsptest/stonewall_normal.vtf
If I have a map named ziptest and a list file above named ziplist.txt I would run the following command which will create a new file named ziptest2.bsp that includes my custom textures:
bspzip -addfile maps\ziptest.bsp ziplist.txt maps\ziptest2.bsp
The output should look list the following:
Code:
D:\hl2\hl2>.<path to sourcesdk/bin>/bspzip -addlist maps\ziptest.bsp ziptst.txt maps\ziptest2.bsp
Opening bsp file: maps\ziptest.bsp
Adding file: d:/hl2/hl2/materials/bsptest/stonewall.vmt
Adding file: d:/hl2/hl2/materials/bsptest/stonewall.vtf
Adding file: d:/hl2/hl2/materials/bsptest/stonewall_normal.vtf
Writing new bsp file: maps\ziptest2.bsp
and if I run the command bspzip -dir I should get the following:
Code:
D:\hl2\hl2>.<path to sourcesdk/bin>/bspzip -dir maps\ziptest2.bsp
materials/maps/ziptest/cubemapdefault.vtf
materials/bsptest/stonewall.vmt
materials/bsptest/stonewall.vtf
materials/bsptest/stonewall_normal.vtf
Now if I run HL2 and load ziptest2.bsp the textures will be there even if they do not exist in my materials folder.
Enjoy,
Cannonfodder