Help! Errors when compiling model.

So I ended up removing a silencer off the gun by simple .vmt commands then I wanted to add a muzzle flash

I decompile my model and do what I need to do and recompile

The actual compilation progress is also fine except I’m using StudioMDL 2013 (not by valve) which is capable of compiling high poly models. I know this compiler works as I have compiled a different gun before.

Then this is how it appears in game:

I have also one time tried to remove the silencer with .smd editing but not in this case. And also, it already has a bone in front of the barrel for the muzzle flash.

My QC:


$cd "C:\Users\George\Desktop\SMD\2nd go\1\"
$modelname "weapons/v_cst_ak12.mdl"
$model "Studio" "ak12_body.smd"
$model "Studio" "ak12_bolt.smd"
$model "Studio" "ak12_hands.smd"
$cdmaterials "models\weapons\v_models\Casper's AK12\"
$cdmaterials "models\weapons\v_models\hands\"
$origin 0 0 0 -90
$hboxset "Default"
// Model uses material "AK12SNewVegas.vmt"
// Model uses material "AK12BNewVegas.vmt"
// Model uses material "AK12MNewVegas.vmt"
// Model uses material "pbs1soundsuppresorjpeg.vmt"
// Model uses material "V_hands.vmt"
// Model uses material "sleeve_diffuse.vmt"
$attachment "1" "Muzzle_Flash" 0.00 0.00 0.00 rotate -0.00 0.00 0.00
$attachment "2" "Shell_Eject" -0.80 -0.00 -0.60 rotate 0.00 130.00 90.00
$surfaceprop "Default"
$illumposition 3.995 -9.538 -6.393
$sequence ak12_idle "ak12_idle" ACT_VM_IDLE 1 fps 1.00 node 0
$sequence ak12_shoot1 "ak12_shoot1" ACT_VM_PRIMARYATTACK 1 fps 33.00 node 1 {
  { event AE_MuzzleFlash 0 "357 1" }
  { event 5001 0 "1" }
  { event AE_CLIENT_EFFECT_ATTACH 2 "EjectBrass_556 2 110" }
}

$sequence ak12_shoot2 "ak12_shoot2" ACT_VM_PRIMARYATTACK 1 fps 34.00 node 1 {
  { event AE_MuzzleFlash 0 "357 1" }
  { event 5001 0 "1" }
  { event AE_CLIENT_EFFECT_ATTACH 2 "EjectBrass_556 2 110" }
}

$sequence ak12_shoot3 "ak12_shoot3" ACT_VM_PRIMARYATTACK 1 fps 35.00 node 1 {
  { event AE_MuzzleFlash 0 "357 1" }
  { event 5001 0 "1" }
  { event AE_CLIENT_EFFECT_ATTACH 2 "EjectBrass_556 2 110" }
}

$sequence ak12_draw "ak12_draw" ACT_VM_DRAW 1 fps 30.00 node 1 {
  { event 5004 2 "AK12.Deploy" }
  { event 5004 15 "AK12.Shoulder" }
}

$sequence ak12_reload1 "ak12_reload1" ACT_VM_RELOAD 1 fps 45.00 node 1 {
  { event 5004 2 "AK12.Foley" }
  { event 5004 43 "AK12.Magout" }
  { event 5004 66 "AK12.Magin" }
  { event 5004 80 "AK12.Foley" }
  { event 5004 110 "AK12.BoltPull" }
  { event 5004 130 "AK12.Shoulder" }
}

$sequence ak12_reload2 "ak12_reload2" ACT_VM_RELOAD 1 fps 35.00 node 1 {
  { event 5004 2 "AK12.Foley" }
  { event 5004 43 "AK12.Magout" }
  { event 5004 66 "AK12.Magin" }
  { event 5004 80 "AK12.Foley" }
  { event 5004 95 "AK12.Shoulder" }
}



Thanks.

come on…

The animations are probably broken. If the weapon appeared normally prior to being decompiled and then recompiled, there’s a good chance that the animations probably broke during the decompile process. The only ways to get around that is to either find something else that uses the same animation set and make the appropriate edits to the reference or somehow get a hold of the original animation set.

or to take the original .mdl (just the .mdl),rename it,remove all anims from the decompiled qc, add in


$includemodel "models/something.mdl"

to the qc, and compile.

I knew I was forgetting another workaround.

Try adding rotate -90.00 after “$sequence ak12_idle “ak12_idle” ACT_VM_IDLE 1”. Just for every sequence

Like this