Goldsource to Source texture porting

From Valve Developer Community
Revision as of 11:05, 20 October 2005 by DarkDruid (talk | contribs)
Jump to navigation Jump to search

If you have and old HL1 map ported to the source engine, but wanted to keep some of the same textures aswell. First of all you're going to need your custom wad file. For this tutorial we will be using the cstrike.wad from the Counter-Strike.

What you need to do is go to your hard drive and create an HL1 folder somewhere. Then once inside make a new directory. This should be that mods directory. (For example: "cstrike" for counter-strike) Put your .wad file in that directory. For this tutorial it would be C:\hl1\cstrike.

Tut135 1.jpg

Now go to your \sourcesdk\bin folder. You will see the program xwad.exe. Right click on it and click Create Shortcut. Take this shortcut and put it in your C:\hl1\modname folder; for our purposes this would be C:\hl1\cstrike.

Tut135 2.jpg

Tut135 3.jpg

Right click on that shortcut and go to properties. Under Target it should say something like: "C:\Program Files\Steam\SteamApps\<username>\sourcesdk\bin\xwad.exe". We are going to need to add a string so that xwad.exe knows where to find our mod. So after the quotes add this -basedir C:\hl1\cstrike -wadfile C:\hl1\cstrike\cstrike.wad Hit apply then ok.

Before we go onto the next step you need to copy the GameInfo.txt from \sourcesdk\launcher\ to your C:\hl1\cstrike folder.

Tut135 4.jpg

Now we are ready to convert your wad. Find your C:\hl1\modname folder. Click on the wad you want to convert and drag it to the xwad.exe shortcut we just made. It should take a few seconds and show the texture names it is converting and any changes in size it is making to the texture.

Tut135 5.jpg

After that is all said and done you will have a materials and materialsrc folders in your C:\hl1\modname folder. You now need to compile your textures so that they will show up in game. What xwad.exe did for you is convert all your textures to the apropriate size and save them as .tgas and create .vmt files for those textures.

Tut135 6.jpg

So now lets run these textures through vtex.exe. First go to your "counter-strike source\cstrike\materials\" folder and create a new folder witht the same name as your old wads name. For this tutorial it would be cstrike.

Then go to your \sourcesdk\bin\ folder and find vtex.exe. Create a shortcut like before and put it in your C:\hl1\modname folder. After the "C:\Program Files\Steam\SteamApps\<username>\sourcesdk\bin\vtex.exe" you are going to add this C:\hl1\yourmod\materialsrc\wadname\*.tga

(For this tutorial it will be C:\hl1\cstrike\materialsrc\cstrike\*.tga)

This should create the .vtfs' (valve texture files) and place the compiled versions in the "counter-strike source\cstrike\materials\cstrike" After the process finishes, copy all the other files located in "C:\HL1\CSTRIKE\materials\cstrike" to your "counter-strike source\cstrike\materials\cstrike" folder.

Your custom textures will now load up in the Valve Hammer Editor and in game.


Applying Converted Textures To Old Maps

Now for the best part. Open up Valve Hammer Editor to the mod you installed the textures under.

Now open up the old .map or the .vmf (if you already converted the brushes.) Go to:

File : Convert WAD -> VMT

Tut135 7.jpg

(*For advanced users, after the .wad file has been ran through xwad.exe you can modify the .vmt files (in the materials folder) so you can apply bump maps and or reflections. See Also below for more information on that.)

See Also

Creating_Materials

Xwad