Half-Life: Alyx Workshop Tools/Importing Source 1 Maps

From Valve Developer Community
Jump to: navigation, search

Source 2 has a bit of a complex way of importing Source 1 maps into Source 2, but this tutorial should help you bring over your old maps after you've converted your materials and models.

Setting Up the .VMF

Your .VMF must have header data that some popular decompilers, like BSPSrc, do not include. To add this data, its recommended that you open the .vmf in the Hammer editor most appropriate for the game it's from and saving over it, as this will also help fix any data left over by BSPSrc. The importer especially likes to shred decompiled displacements, so any maps utilizing that will need this done.

Adding Source 1 Game Content

So, if you've already converted your Source 1 content to Source 2, you may think you can go along and load this .VMF file and call it a day, but unfortunately, there is some data that is lost from Source 1 to Source 2, including some important scaling data in the .VTF. So, you need to give Source 2 access to your game. The easiest way to go about this is by taking your imported model, putting it in a new mod called "modname_imported" and then putting your Source 1 materials folder unedited into your modname folder, with the gameinfo.txt file from the Source 1 game. For instance, if I want to port content from TF2, I will have to bring over the Source 1 materials and place them in Half-Life Alyx/game/tf/materials with the gameinfo.txt. I will then need to place my converted content into Half-Life Alyx/game/tf_imported/materials. After that, in my active mod for Half-Life Alyx, I will have to edit the gameinfo.gi file to include "tf_imported" and then it will recognize the materials.

Finally, I must take the .vmf and put it in a matching content folder for the modname folder, i.e. Half-Life Alyx/content/tf/maps. This is an important step because it tells the engine that we are importing a Source 1 map file.

Loading the .VMF

Now, all that's left to do is to load the .vmf file. To load it, go to File->Open, and on the bottom right, select the "Valve Map Files" dropdown and select "Source 1 Map Files (.vmf)" instead. Then, load your map file that's inside your Source 1 content directory.

If all goes well, your map should be upconverted to Source 2, and all entities available in Source 2 should be there, and the rest that aren't are attempted to be upconverted to the new versions (so Source 1 lights are automatically converted to Source 2 lights, free of charge.) You can now freely compile the map and see it in-engine.

Setting up Lighting in Half-Life: Alyx

If you're importing a .VMF file into Half-Life: Alyx, you're going to need to take extra steps to convert the map to the new lighting systems and VRAD3. Valve offers a pretty decent resource for lighting in Half-Life: Alyx, which you can find here:

See Also