QC: Difference between revisions
SirYodaJedi (talk | contribs) mNo edit summary |
SirYodaJedi (talk | contribs) (jb3 is weird. there isn't any good reason to use backslashes instead of forward slashes, though) |
||
Line 5: | Line 5: | ||
:''To learn how to '''compile a model''', see [[Compiling a model]].'' | :''To learn how to '''compile a model''', see [[Compiling a model]].'' | ||
A '''QC''' file is a script which controls the process of "compiling" [[ | A '''QC''' file is a script which controls the process of "compiling" [[SMD]]s into a binary [[model]] that can be loaded into a game. | ||
A QC configures the model's location and name, while SMD files are used to provide geometry, [[collision mesh]]es and [[skeletal animation|animation]]s, how the model reacts when shot, and so on. | A QC configures the model's location and name, while SMD files are used to provide geometry, [[collision mesh]]es and [[skeletal animation|animation]]s, how the model reacts when shot, and so on. | ||
Comments can be ends of lines starting with <code>//</code>, or blocks contained between <code>/*</code> and <code>*/</code>. Source additionally supports end of line comments starting with <code>#</code> or <code>;</code>. | Comments can be ends of lines starting with <code>//</code>, or blocks contained between <code>/*</code> and <code>*/</code>. Source additionally supports end of line comments starting with <code>#</code> or <code>;</code>. | ||
Paths usually can contain either forward or backslashes, except for {{jbep3}}, which requires forward slashes due to adding support for {{w|escape sequence|escape sequences}} in QC files (due to shared code between [[VBSP]] and StudioMDL). | |||
{{note|Although the "QC" file extension is derived from the [[QuakeC]] programming language used by {{quake|4.1}}, the syntax of StudioMDL QC files is significantly modified from the {{w|C (programming language)|C}}-like syntax used by QuakeC.}} | {{note|Although the "QC" file extension is derived from the [[QuakeC]] programming language used by {{quake|4.1}}, the syntax of StudioMDL QC files is significantly modified from the {{w|C (programming language)|C}}-like syntax used by QuakeC.}} | ||
Line 16: | Line 18: | ||
Here is a very simple QC file for a solid model without any animation or special properties (click on each command for details): | 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 | [[$modelname]] "props_sdk/myfirstmodel.mdl" | ||
[[$body]] mybody "myfirstmodel-ref" | [[$body]] mybody "myfirstmodel-ref" | ||
[[$surfaceprop]] combine_metal | [[$surfaceprop]] combine_metal | ||
[[$cdmaterials]] "models | [[$cdmaterials]] "models/props_sdk" | ||
[[$sequence]] idle "myfirstmodel-ref" // no animation wanted, so re-using the reference mesh | [[$sequence]] idle "myfirstmodel-ref" // no animation wanted, so re-using the reference mesh |
Revision as of 17:14, 3 April 2025
- 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, while SMD files are used to provide geometry, collision meshes and animations, how the model reacts when shot, and so on.
Comments can be ends of lines starting with //
, or blocks contained between /*
and */
. Source additionally supports end of line comments starting with #
or ;
.
Paths usually can contain either forward or backslashes, except for , which requires forward slashes due to adding support for
escape sequences in QC files (due to shared code between VBSP and StudioMDL).




Simple 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" $surfaceprop combine_metal $cdmaterials "models/props_sdk" $sequence idle "myfirstmodel-ref" // no animation wanted, so re-using the reference mesh $collisionmodel "myfirstmodel-phys" { $concave }


StudioMDL automatically looks for files in this order when no extension is present:
File format
[Todo]
Files
[Todo]
See also
- Category:QC Commands
- Compiling a model
- LOD Models
- Prop Types Overview
- Notepad++ VDF languages
- Highlighting and Compiling QCs with ConTEXT