This article relates to the game "Vampire: The Masquerade - Bloodlines". Click here for more information.

Compiling a prop static

From Valve Developer Community
Jump to navigation Jump to search
English (en)Translate (Translate)
Crowbar How to

Compiling a prop static

For this, the BaseProp_example present in the Bloodlines SDK at Vampire The Masquerade - Bloodlines\SDKContent\ModelSrc will be used

BaseProp example.png

It contains: The base mesh Chair_Basic_REF.smd The LOD mesh Chair_Basic_REF_lod1.smd The physic Chair_Basic_physics.smd The animation in the folder Chair_Basic_anims The qc Chair_Basic.qc

For more information, don't hesitate to click on the qc command or have a look to QC

  • 1. You can edit the qc by opening in a text editor, you will have those lines:
$modelname	"scenery/furniture/Chair_Basic/Chair_Basic.mdl"
$bodygroup "Body"
{
	studio "Chair_Basic_REF"
}
$lod 25
{
	replacemodel "Chair_Basic_REF.smd" "Chair_Basic_REF_lod1.smd"
}
$staticprop
$illumposition 0 0 0
$eyeposition 0.5 -0.5 0.5
$cdmaterials	"models\scenery\furniture\couch_basic\"
$cbox 0 0 0 0 0 0
$bbox -30.441 -42.366 -27.903 30.512 42.366 27.503
$sequence "only_sequence" {
	"chair_basic_anims\only_sequence.smd"
	activity "ACT_IDLE" 1
	fps 30
}
$collisionmodel	"chair_basic_physics.smd"
{
	$mass 20
	$inertia 1
	$damping 0
	$rotdamping 0
	$rootbone " "
}
  • 2. Make your change in the qc file:

When you port a model, try to stick to this example, you may try to add some commands that are in the original file, the compiler will throw error if those commands are not taken into account. When you compile a base game model, there is usually no changes, except if you want to remove LOD.

Note.pngNote:The usual changes when porting are the modelname, the mesh in bodygroup, lod if you need them, the material for texture, the sequence and the collisionmodel name.
  • 3. Compile your model, select your qc file in the explorer, do a right click and choose compile mdl.
Note.pngNote:It use the Vampire Bloodlines configuration in Crowbar
Right click on model file and select Compile
  • 4. It opens a command windows and then ask if you want to rotate the mesh to have it corrected, click yes so the model will appear normal in game.
Click yes to rotate the model
Note.pngNote:For ported model from cs for example, click No that will avoid the prop to have a weird position if you port map.
Note.pngNote:If you don't put the $staticprop, it will ask if you want to set it, you should always say yes otherwise, your prop might crash Hammer/Model viewer, for prop_dynamic there is another way.
  • 5. Your model is ready and have been compiled in the path specified in the $modelname in your configured mod directory.
Files generated