S2General/Importing VCDs to Source 2

From Valve Developer Community
Jump to: navigation, search

Source 2 has support for Source 1 VCDs, and adding them to a Source 2 Mod is quite simple.

Creating a scenes.vrman file

For the first step, you'll need to create a scenes.vrman file. This file is a manifest that informs the asset system what "vcdlist" files exist. In your mod's content directory, create a scenes folder, and create an empty file named "scenes.vrman". Open this file in your favorite text editor, and add the following:

<!-- schema text {7e125a45-3d83-4043-b292-9e24f8ef27b4} generic {198980d8-3a93-4919-b4c6-dd1fb07a3a4b} -->
    string name = "Scenes Manifest"
    string[] resourceFileNameList =

The file should be a list of vcdlist files, so for instance, if you add a second vcdlist file, add it to a new line under the "scenes/_root.vcdlist" line, and make sure you add a comma to the end of the first line. A comma should be on the line preceding any lines with additional vcdlist files.

Creating a vcdlist file

For the second step, you'll need to create a vcdlist file. This file is used to generate a vcdlist_c file, which is a file containing all the VCDs you with to import. Your first vcdlist file should be named _root.vcdlist (NOTE: It's not mandatory to create more vcdlist files, but it's useful for organizing them.) Create an empty file named _root.vcdlist in the same folder as your scenes.vrman file, and it should contain a list of VCD files that are present in your content/modname/scenes folder. As an example, here's a snippet of what a vcdlist for Half-Life 2 Scenes would look like:


Getting vcdlist files to be recognized by the tools

For the third step, you'll need to modify either game\bin\sdkassettypes.txt, or game\bin\assettypes.txt, depending on whether -nocustomermachine is in use. You'll need to add this to it after a similar entry:

            _class = "CResourceAssetTypeInfo"
            m_Name = "choreoscenefiledata_asset"
            m_FriendlyName = "Choreo Data List"
            m_Ext = "vcdlist"
            m_IconLg = "toolimages:assettypes/vcd_choreo_lg.png"
            m_IconSm = "toolimages:assettypes/vcd_choreo_sm.png"
            m_bHideTypeByDefault = true
            m_bContentFileIsText = true
            m_CompilerIdentifier = "CompileChoreoSceneFileData"

This will allow the tools to recognize and compile vcdlist files correctly. Assuming you did everything correctly, scenes should now work.