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

If you've already converted your Source1 content to Source2, you may think you can go ahead and import a source1 .vmf and call it a day, but unfortunately, there is some data lost from Source1 to Source2, including some important scaling data in the .vtf. To fix this we need to give Source2 access to your source1 content.

To start, take your imported materials / textures, put them in a new addon called "modname_imported".

Next place your Source1 content (.vmt / .vtf) and basic source1 gameinfo.txt (from tf2 for instance), into a new MOD folder located at "Half-Life Alyx\game\source1mod". (source1 .vpk files are unsupported by source2, extract the content using gcfscape)

After that, in the current active mod for Half-Life Alyx (default: Half-Life Alyx\game\hlvr), edit gameinfo.gi with a text editor and scroll down to find "Source1Import", edit "importmod" and "importdir" to point to your source1mod folder we just created.

Source1Import
	{
		"importmod"				"source1mod"
		"importdir"				"..\source1mod"

		"createStaticOverlays"	"1" // info_overlay entities will be converted to static overlay nodes instead of preserved as Info_overlay entities
	}

Finally, to import a .vmf it needs to be in a matching folder on the content side, for example "Half-Life Alyx\content\source1mod\maps\ctf_2fort_d.vmf". This is an important step because it tells source2 that we are importing a source1 .vmf.

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