Beginner-Expert QC Guide + Templates

Got a model all rigged to the ValveBiped? Want to make it a ragdoll or playermodel, but don’t know where to start with all this QC business? Well look no further because I got all you need right here!

Absolute minimum needed for a single very simple ragdoll, no complicated structures like face or eye posing.

A single ragdoll but with a few more advanced features, all in one file.

Same as above, but with much better organization.

Set up with a common scripts directory, to easily manage a lot of models at once.

Multiple model subcategories, different head models, fast switching between GMOD and SFM compiling, global definition directory, non-Valve bones.
Professionals only!

Here’s a few general tips and strategies:


Any time you don’t know what a specific command is or what it does or what the syntax is, look it up! The Valve Developer Wiki has a whole list of QC commands with explanations.


You do not need to put quotes everywhere. You only need them if a string has a space in it, ex:

$modelname MyFolder/my model.mdl	// causes an error

$modelname "MyFolder/my model.mdl"	// will work

But as a general rule it’s better to avoid spaces in names completely.

$modelname MyFolder/MyModel.mdl		// best solution

Deprecated & Redundant commands

Some QC commands are deprecated, meaning they are outdated and have been replaced with something a lot better.

$cd is an excellent example. It used to specify a new location of SMD files. It has now been replaced with the far superior $pushd and $popd, yet for some reason people still include it in their QCs. What makes it even worse is that they don’t even use it for it’s old intended purpose. They just stick it in there once and have it point to the current QC directory, which does absolutely nothing since the compiler automatically sets the QC directory as the default.

$scale is another one. It is not deprecated, and actually useful for scaling the model in-game as opposed to in-editor.
But what people like to do is put $scale 1.0 which scales the model by 100%, effectively doing absolutely nothing. That’s just silly and utterly pointless.

Relative vs Absolute paths

Absolute paths are another one of those things you technically can do, but never should.
Only use them for things that will never change position, for example global configs. You can see an example of this in the Enterprise template.

This is also another reason why $cd is so bad. Say you have:

$cd D:/MyStuff/MyModel/

What happens if you rename the folder MyStuff to MyThings? The compile will break. And if you have multiple QCs with $cd in the MyStuff, they will ALL break! You’ll have to change them one by one.

Same goes for $model and $bodygroup commands. And besides, which is cleaner, this:

$model Body D:/MyStuff/MyModel/Model_1.smd

or this?

$model Body Model_1.smd

If your SMDs are stored in a different folder, the Standard template shows you how to use $pushd and $popd to get those easily.


If you’re the only person that will ever see your code, you can format it however you want. However, if you plan to ever show it to people, for the love of god please format it decently.

$texturegroup is by far the worst offender when it comes to bad formatting. Ex:

$texturegroup skinfamilies

Absolutely disgusting, not mention incredibly difficult to edit and keep track of.

$texturegroup skinfamilies
	{	texture_A1		texture_B1		texture_C1		texture_D1		texture_E1	}
	{	texture_A2		texture_B2		texture_C2		texture_D2		texture_E2	}
	{	texture_A3		texture_B3		texture_C3		texture_D3		texture_E3	}
	{	texture_A4		texture_B4		texture_C4		texture_D4		texture_E4	}

That is much cleaner, more compact, and overall better.

This thread also doubles as a help thread! If you have any issues (QC only) here’s what to do:

  1. Copy/paste the full compiler log into a .txt file

  2. Zip up that file, along with all QCs, QCIs, and all SMDs

  3. Post a link here along with a short description of the error and I’ll take a look!

Thank you, this helped me fix a problem.

Do you know anything about QCs for view models because I have a couple of questions about that.

A QC is a QC, the rules are the same no matter what it’s for. Go right ahead.

I have four major questions.

  1. Will having all of my bones for my rig in my .SMD file cause problems with the QC file loading in HLMV
  2. What dose “animations are Out of Range” mean
  3. The original tutorial I saw for left 4 dead 2 said to use a copy of the original QC file ( or QC files in my case ) as a base and then change what need’s to be changed to get the model to work. Is this the best way to do this or should I use a basic base / start from scratch
  4. what dose $BoneSaveFrame do I checked the wiki articular but I still don’t understand it

I hope the answers aren’t super obvious because I swear I have been looking for info for this for a week straight

I don’t know anything about L4D, but your smd bones need to match the animation bones, names and parenting included.

Out of Range means there something wrong with your animation smds. What exactly are you trying to do anyway? Make custom arms?

custom weapon model and animations