QC: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
m (Not to be confused with actual qc files)
Line 9: Line 9:
Comments can be lines starting with <code>//</code>, <code>#</code> or <code>;</code>, or blocks contained between <code>/*</code> and <code>*/</code>.
Comments can be lines starting with <code>//</code>, <code>#</code> or <code>;</code>, or blocks contained between <code>/*</code> and <code>*/</code>.


{{note|Although the "QC" file extension is derived from the [[W:QuakeC|QuakeC]] programming language used by {{quake|4.1}}, the syntax of StudioMDL QC files is largely unrelated to QuakeC.}}
{{tip|Shared QC files intended for use with {{ent|$include}} are typically given the extension <code>qci</code>.}}
{{tip|Shared QC files intended for use with {{ent|$include}} are typically given the extension <code>qci</code>.}}



Revision as of 12:11, 15 June 2023

English (en)日本語 (ja)Русский (ru)Translate (Translate)
For a list of QC commands, see Category:QC Commands.
To learn how to compile a model, see Compiling a model.

A QC file is a script which controls the process of compiling SMDs into a binary model that can be loaded into a game. A QC configures the model's location and name, which SMD files are used to provide geometry, collision meshes and animations, how the model reacts when shot, and so on.

Comments can be lines starting with //, # or ;, or blocks contained between /* and */.

Note.pngNote:Although the "QC" file extension is derived from the QuakeC programming language used by Quake Quake, the syntax of StudioMDL QC files is largely unrelated to QuakeC.
Tip.pngTip:Shared QC files intended for use with $include are typically given the extension qci.

Example

Here is a very simple QC file for a solid model without any animation or special properties (click on each command for details):

$modelname	"props_sdk\myfirstmodel.mdl"
$body mybody	"myfirstmodel-ref.smd"

$surfaceprop	combine_metal
$cdmaterials	"models\props_sdk"

$sequence idle	"myfirstmodel-ref.smd" // no animation wanted, so re-using the reference mesh

$collisionmodel	"myfirstmodel-phys.smd" { $concave }

See Also