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

Compiling a prop dynamic from the base game with animations

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

Compiling a prop dynamic

Note.pngNote:This is how to compile a prop_dynamic with his animation, for now it is only possible with model that are in basegame, this page will be edited as soon as informations will change.
Note.pngNote:This has been possible following Ilex tutorial that wou might find here, thanks a lot Ilex!.

For this, the animatic_truckclean.mdl present in \models\scenery\vehicles\paneltruck will be used. Here are the result of the decompile:

Panel truck decompiled files

It contains: The base mesh animatic_truckclean_New_animclose_r.smd The physic animatic_truckclean_physics.smd The animation in the folder animatic_truckclean_anims The qc animatic_truckclean.qc

  • 1. In the generated folder create a folder named compile.
  • 2. In the compile folder create a folder named xmodel.
Note.pngNote:For this example the name of truckc will be used.
  • 3. Copy the original mdl (animatic_truckclean.mdl) and phy file if it exists (animatic_truckclean.phy) in this xmodel folder.
  • 4. Rename those file name with truckclean you should have this in the xmodel folder:
Folder xmodel
  • 5. Go to your compile folder.
  • 6. Copy inside the _anims folder all the smd files that you need as well as the qc file.
  • 7. Rename the animatic_truckclean_New_animclose_r.smd to truckc_REF.smd
  • 8. Rename the animatic_truckclean_physics.smd to truckc_physics.smd
  • 9. Rename the animatic_truckclean.qc to truckc.qc
Note.pngNote:We use the same prefix everywhere except for the anim folder.
  • 10 Edit your qc file by replacing the different original file with the new name you should have this:
$modelname "scenery/vehicles/paneltruck/Animatic_truckclean.mdl"
$bodygroup "Body"
{
	studio "truckc_REF"
}
$illumposition 0 0 0
$eyeposition 0.5 -0.5 0.5
$cdmaterials "models\scenery\vehicles\paneltruck\"
$cdmaterials "models\scenery\misc\bathtub\"
$texturegroup "skinfamilies"
{
	{ "paneltruck2aclean" "paneltruckaclean" "NULL" "bath5" }
}
$cbox 0 0 0 0 0 0
$bbox -140.912 -52.383 -8.222 110.503 52.02 125.546
$sequence "idle_open" {
	"animatic_truckclean_anims\idle_open.smd"
	fps 1
}
$sequence "close" {
	"animatic_truckclean_anims\close.smd"
	fps 45
}
$sequence "idle_close" {
	"animatic_truckclean_anims\idle_close.smd"
	fps 1
}
$collisionmodel "truckc_physics"
{
	$mass 0
	$inertia 1
	$damping 0
	$rotdamping 0
	$rootbone " "
}
  • 11 Open Crowbar, go to Compile tab and select the Alien Swarn compiler
  • 12. Select your newly created qc file in the First top browse
  • 13. The work directory should be your mod directory, you can select it in the second top browse
Crowbar setup for prop_dynamic compilation
  • 14. Click on Compile, the compile process will start you have done everything ok, you shouldn't have any error.
Result of compilation
  • 15. Your files have been generated in your mod folder.
Generated files
Note.pngNote:Sometimes the model are crashing Model Viewer but they are working in game and in hammer.
  • 16 Test your model, create a prop_dynamic in a map and pick your newly generated model, give it a name for testing.
Prop_dynamic in hammer
  • 17. Run your map
  • 18 Test your prop by opening the console
t=Find("truck")
t.SetAnimation("close")

Congratulation You are done!

Here is a video of what you should have in game.