Problems converting v_model to c_model

I decided I wanted to convert a v_model to a c_model. But I’m having a big problem doing so. Here’s what I’ve done:

-Decompiled the mdl file
-Imported the smd to Blender
-Deleted the ‘hand’ part of the model but kept the weapon
-Exported it as smd
-Created a .QC file for the model
-Re-compiled the model

And yet, it refuses to show up ingame. Here’s my .QC file:



$modelname	"weapons\modelname.mdl"
$model studio	"Pistol_reference.smd"
$cdmaterials	"models\weapons\modelname"

$origin 0 0 68

$sequence idle01 "Idle01" loop fps 30 activity ACT_VM_IDLE 1 node 0
$sequence idle01empty "Idle01empty" loop fps 30 activity ACT_VM_IDLE_EMPTY 1 node 0
$sequence fire "Fire" snap fps 30 activity ACT_VM_PRIMARYATTACK 1 { event AE_MUZZLEFLASH 0 "PISTOL MUZZLE" } node 2
$sequence fire1 "Fire1" snap fps 30 activity ACT_VM_RECOIL1 1 { event AE_MUZZLEFLASH 0 "PISTOL MUZZLE" } node 2
$sequence fire2 "Fire2" snap fps 30 activity ACT_VM_RECOIL2 1 { event AE_MUZZLEFLASH 0 "PISTOL MUZZLE" } node 2
$sequence fire3 "Fire3" snap fps 30 activity ACT_VM_RECOIL3 1 { event AE_MUZZLEFLASH 0 "PISTOL MUZZLE" } node 2
$sequence fireempty "Fireempty" fps 30 activity ACT_VM_DRYFIRE 1 node 2
$sequence draw "Draw" snap fps 30 activity ACT_VM_DRAW 1 node 0
$sequence drawempty "Drawempty" fps 30 node 0
$sequence reload "Reload" fps 30 activity ACT_VM_RELOAD 1 node 0
$sequence holster "Holster" fps 30 activity ACT_VM_HOLSTER 1 node 0
$sequence holsterempty "Holsterempty" fps 30 activity ACT_VM_HOLSTER 1 node 0
$sequence idletolow "idletolow" fps 30 activity ACT_VM_LOWERED_TO_IDLE 1  transition 0 1
$sequence lowtoidle "lowtoidle" fps 30 activity ACT_VM_IDLE_TO_LOWERED 1 transition 1 0
$sequence lowidle "lowidle" fps 30 loop activity ACT_VM_IDLE_LOWERED 1 node 1

And here’s my compile log (using Notepad++ to re-compile):


"C:\Program Files (x86)\Steam\steamapps\common\garrysmod\bin\studiomdl.exe" -nop4 -r "C:\Users\username\Desktop\alyxgun\modelname.qc"
Process started >>>
WARNING: Failed to load keyvalues file cfg/mount.cfg!
qdir:    "c:\users\username\desktop\alyxgun\"
gamedir: "C:\Program Files (x86)\Steam\SteamApps\common\Source SDK Base 2013 Multiplayer\garrysmod\"
g_path:  "C:\Users\username\Desktop\alyxgun\modelname.qc"
Building binary model files...
Working on "modelname.qc"
SMD MODEL Pistol_reference.smd
SMD MODEL Idle01.smd
SMD MODEL Idle01empty.smd
SMD MODEL Fire.smd
SMD MODEL Fire1.smd
SMD MODEL Fire2.smd
SMD MODEL Fire3.smd
SMD MODEL Fireempty.smd
SMD MODEL Draw.smd
SMD MODEL Drawempty.smd
SMD MODEL Reload.smd
SMD MODEL Holster.smd
SMD MODEL Holsterempty.smd
SMD MODEL idletolow.smd
SMD MODEL lowtoidle.smd
SMD MODEL lowidle.smd
WARNING: @idle01 : bounding box out of range : -130952 -35 -68 : -43 4 -43
WARNING: @idle01empty : bounding box out of range : -130952 -35 -68 : -43 4 -43
WARNING: @fire : bounding box out of range : -130953 -36 -68 : -39 4 -39
WARNING: @fireempty : bounding box out of range : -130953 -36 -68 : -40 4 -40
WARNING: @draw : bounding box out of range : -130953 -35 -74 : -41 4 -41
WARNING: @drawempty : bounding box out of range : -130953 -35 -74 : -41 4 -41
WARNING: @reload : bounding box out of range : -130952 -35 -68 : -35 4 -35
WARNING: @holster : bounding box out of range : -130953 -35 -68 : -43 4 -43
WARNING: @holsterempty : bounding box out of range : -130953 -35 -68 : -43 4 -43
WARNING: @idletolow : bounding box out of range : -130952 -36 -68 : -43 4 -43
WARNING: @lowtoidle : bounding box out of range : -130952 -36 -68 : -43 4 -43
WARNING: @lowidle : bounding box out of range : -130952 -36 -68 : -46 4 -46
---------------------
writing C:\Program Files (x86)\Steam\SteamApps\common\Source SDK Base 2013 Multiplayer\garrysmod\models/weapons\modelname.mdl:
bones         4136 bytes (15)
animations   18524 bytes (15 anims) (517 frames) [0:17]
sequences     3644 bytes (15 seq) 
ik/pose        164 bytes
eyeballs         0 bytes (0 eyeballs)
flexes           0 bytes (0 flexes)
textures       136 bytes
keyvalues        0 bytes
bone transforms     2104 bytes
collision        0 bytes
total        29880
---------------------
writing C:\Program Files (x86)\Steam\SteamApps\common\Source SDK Base 2013 Multiplayer\garrysmod\models/weapons\modelname.vvd:
vertices     87840 bytes (1830 vertices)
tangents     29280 bytes (1830 vertices)
total       117184 bytes
---------------------
Generating optimized mesh "C:\Program Files (x86)\Steam\SteamApps\common\Source SDK Base 2013 Multiplayer\garrysmod\models/weapons\modelname.sw.vtx":
body parts:         8 bytes
models:            20 bytes
model LODs:        12 bytes
meshes:            18 bytes
strip groups:      50 bytes
strips:            54 bytes
verts:          16470 bytes
indices:        12450 bytes
bone changes:       8 bytes
everything:     29114 bytes
---------------------
Generating optimized mesh "C:\Program Files (x86)\Steam\SteamApps\common\Source SDK Base 2013 Multiplayer\garrysmod\models/weapons\modelname.dx80.vtx":
body parts:         8 bytes
models:            20 bytes
model LODs:        12 bytes
meshes:            18 bytes
strip groups:      50 bytes
strips:            54 bytes
verts:          16470 bytes
indices:        12450 bytes
bone changes:      48 bytes
everything:     29154 bytes
---------------------
Generating optimized mesh "C:\Program Files (x86)\Steam\SteamApps\common\Source SDK Base 2013 Multiplayer\garrysmod\models/weapons\modelname.dx90.vtx":
body parts:         8 bytes
models:            20 bytes
model LODs:        12 bytes
meshes:            18 bytes
strip groups:      50 bytes
strips:            54 bytes
verts:          16470 bytes
indices:        12450 bytes
bone changes:      48 bytes
everything:     29154 bytes

Completed "modelname.qc"
<<< Process finished. (Exit code 0)
================ READY ================


Can anyone help me out here?

Are you sure you deleted ONLY the arms mesh, and not any of the bones as well?

Yeah, I actually decompiled the model again just to make sure and it still didn’t work.

That page has all the info on view model hands.

IIRC, you’re not supposed to delete the arms entirely, but instead use an SMD of the c_hands model. There are downloads to these near the bottom of that linked page.

You sure the origin is set right? Think I recall there being four numbers, X Y Z and then the Z angle.

I also mean more than just format, also asking if you know that that’s where its origin needs to be for it to be on-screen.


WARNING: @idle01 : bounding box out of range : -130952 -35 -68 : -43 4 -43
WARNING: @idle01empty : bounding box out of range : -130952 -35 -68 : -43 4 -43
WARNING: @fire : bounding box out of range : -130953 -36 -68 : -39 4 -39
WARNING: @fireempty : bounding box out of range : -130953 -36 -68 : -40 4 -40
WARNING: @draw : bounding box out of range : -130953 -35 -74 : -41 4 -41
WARNING: @drawempty : bounding box out of range : -130953 -35 -74 : -41 4 -41
WARNING: @reload : bounding box out of range : -130952 -35 -68 : -35 4 -35
WARNING: @holster : bounding box out of range : -130953 -35 -68 : -43 4 -43
WARNING: @holsterempty : bounding box out of range : -130953 -35 -68 : -43 4 -43
WARNING: @idletolow : bounding box out of range : -130952 -36 -68 : -43 4 -43
WARNING: @lowtoidle : bounding box out of range : -130952 -36 -68 : -43 4 -43
WARNING: @lowidle : bounding box out of range : -130952 -36 -68 : -46 4 -46

There’s your problem: the animations are all fucked up. Decompile the model with Crowbar and replace those files.

Yup, that worked. Thank you! :smiley: