Goldsource editing

What is within a .QC file?

I will be using the following QC file (called "cube.QC") as a reference. this is as simple as a QC file can possibly be

$modelname Cube.mdl

$cd "./"

$cdtexture "./textures"

$scale 1

$cliptotextures

//reference mesh
$body studio cube
    
//Animation
$sequence "static" "cube"
            

Each area will be explained below:

$modelname: This simply tells the compiler (studioMDL) what the file output will be named. This needs to be first and is required.

$cd: Tells the compliler the root directory. In this case "./" simply points to the directory that "cube.QC" resides in. This is ALSO a requirement, and needs to be placed after the $modelname attribute; it should also be noted that this can only be called once.

$cdtexture: Purpose is similar to $cd but tells the compiler where to look for textures. This attribute isn't required but is Highly reccommended if you want to have your texture images in a separate directory. "./textures" simply points toward a folder named textures. Also note that if the appropriate images aren't detected by studioMDL it will not compile the model.

$scale: Sets the model scale of any meshes called after it. setting the Value of scale to 1 "Normalizes" it, This is to ensure that the model you were viewing in your model editor (blender, 3ds max, Maya, etc) will be the same size, instead of some scale set by the model editor.

As a side note you can also place another $scale attribute if you wanted a body group to be a different size, although the compiler can have trouble dealing with this.

$cliptotextures: WAY TO CONFUSING SORRY

$body: Tells studioMDL what .SMD file to use and the name. In this case, "studio" is the name and "cube" is the SMD file
    in goldsrc  you don't need to add ".QC" to the file name, however in Source you need to add the ".QC" file extension
    This is the MOST important attribute since this is how studioMDL creates a model (i.e you cant make the MDL without the SMD file.).
    It should ALSO be noted that this will be used as the main reference mesh, 
    meaning that geometry, and positioning need to be the same as in this file
                    

$sequence: in charge of telling the compiler where to find animations, and what to name each sequence, Uses animation SMD's (different from mesh SMD files), has the MOST properties when it comes to QC.

More about Sequences