I’m trying to recompile some Korin models into player models.
I decompiled it, added player animations to the qc file, then recompiled it.
Then I made it an addon. When I load gmod, the ragdoll of the Korin model
spawns from the browse tab just fine. When I select her as a player model
then kill myself to change into her, I get a big red error sign.
Here is the qc (the only thing I changed before compiling was the “$includemodel” stuff,
lines 85-100) which I copied/pasted from a decompiled Korin that was already a player model):
[lua]$cd "C:\Program Files\Steam\SteamApps\imoutosan\half-life 2\hl2\models\Humans\Group03"
$modelname "Humans/Group03/KorinGant.mdl"
$model "Female_06" "korin.smd" {
flexfile "mdldecompiler_expressions.vta" {
flex "upper_left" frame 4
flex "lower_left" frame 6
}
eyeball righteye ValveBiped.Bip01_Head1 -1.350 -2.660 65.290 eyeball_r 1.400 -1.000 pupil_r 0.800
eyeball lefteye ValveBiped.Bip01_Head1 1.350 -2.660 65.290 eyeball_l 1.400 1.000 pupil_l 0.800
eyelid upper_right "mdldecompiler_expressions.vta" lowerer 1 -0.500000 neutral 0 0.000000 raiser 1070596096 0.000000 split 0.1 eyeball righteye
eyelid lower_right "mdldecompiler_expressions.vta" lowerer 2 -0.500000 neutral 0 0.000000 raiser 1070596096 0.000000 split 0.1 eyeball righteye
eyelid upper_left "mdldecompiler_expressions.vta" lowerer 4 -0.500000 neutral 0 0.000000 raiser 1070596096 0.000000 split -0.1 eyeball lefteye
eyelid lower_left "mdldecompiler_expressions.vta" lowerer 6 -0.500000 neutral 0 0.000000 raiser 1070596096 0.000000 split -0.1 eyeball lefteye
flexcontroller head head_rightleft "range" -30.000 30.000
flexcontroller head head_updown "range" -15.000 15.000
flexcontroller head head_tilt "range" -15.000 15.000
flexcontroller eyes eyes_updown "range" -15.000 15.000
flexcontroller eyes eyes_rightleft "range" -30.000 30.000
flexcontroller body body_rightleft "range" -30.000 30.000
flexcontroller chest chest_rightleft "range" -30.000 30.000
flexcontroller head head_forwardback "range" -0.200 0.200
flexcontroller gesture gesture_updown "range" -1.000 1.000
flexcontroller gesture gesture_rightleft "range" -1.000 1.000
}
$lod 20
{
replacemodel "korin" "lod1_korin"
}
$lod 60
{
replacemodel "korin" "lod2_korin"
}
$shadowlod
{
replacemodel "korin" "lod3_korin"
}
$cdmaterials "models\player\kogan\"
$cdmaterials "models\Humans\Female\"
$hboxset "default"
$hbox 0 "ValveBiped.Bip01_Pelvis" -6.923 -6.218 -5.520 6.923 9.012 3.861
$hbox 0 "ValveBiped.Bip01_L_Thigh" -4.672 -3.771 -4.809 19.964 5.475 3.078
$hbox 0 "ValveBiped.Bip01_L_Calf" -2.453 -9.168 -3.193 22.095 2.857 3.126
$hbox 0 "ValveBiped.Bip01_L_Foot" -0.939 -2.170 -1.826 9.782 4.300 2.169
$hbox 0 "ValveBiped.Bip01_L_Toe0" -1.475 -2.019 -1.810 3.357 1.361 2.183
$hbox 0 "ValveBiped.Bip01_R_Thigh" -4.672 -3.771 -3.077 19.964 5.475 4.809
$hbox 0 "ValveBiped.Bip01_R_Calf" -2.453 -9.168 -3.126 22.095 2.857 3.193
$hbox 0 "ValveBiped.Bip01_R_Foot" -0.940 -2.146 -2.188 9.783 4.302 1.820
$hbox 0 "ValveBiped.Bip01_R_Toe0" -1.486 -1.997 -2.134 3.348 1.494 1.911
$hbox 0 "ValveBiped.Bip01_Spine" -5.101 -2.456 -6.167 7.771 5.645 6.167
$hbox 0 "ValveBiped.Bip01_Spine1" -4.566 -2.371 -5.664 7.813 6.514 5.664
$hbox 0 "ValveBiped.Bip01_Spine2" -11.367 -2.870 -6.293 20.852 7.089 6.293
$hbox 0 "ValveBiped.Bip01_Spine4" -1.397 -2.288 -4.586 6.379 5.578 4.586
$hbox 0 "ValveBiped.Bip01_Neck1" -2.538 -3.926 -3.873 3.286 2.142 3.873
$hbox 0 "ValveBiped.Bip01_Head1" -3.300 -4.838 -4.244 7.775 4.246 4.267
$hbox 0 "ValveBiped.Bip01_L_Clavicle" -1.496 -5.071 -4.199 8.875 4.898 2.830
$hbox 0 "ValveBiped.Bip01_L_UpperArm" -1.512 -2.486 -3.343 11.920 2.839 2.460
$hbox 0 "ValveBiped.Bip01_L_Forearm" -0.425 -2.225 -1.463 17.591 1.878 1.683
$hbox 0 "ValveBiped.Bip01_L_Hand" -0.575 -1.058 -1.567 4.562 1.006 1.513
$hbox 0 "ValveBiped.Bip01_L_Finger2" 0.000 -0.667 -1.581 2.038 0.584 0.405
$hbox 0 "ValveBiped.Bip01_L_Finger21" -0.265 -0.847 -1.334 1.344 0.245 0.405
$hbox 0 "ValveBiped.Bip01_L_Finger0" 0.000 -0.204 -0.867 1.659 0.921 0.764
$hbox 0 "ValveBiped.Bip01_L_Finger01" -0.179 -0.248 -0.621 1.241 0.932 0.764
$hbox 0 "ValveBiped.Bip01_R_Clavicle" -0.583 -5.324 -2.943 8.875 4.865 4.020
$hbox 0 "ValveBiped.Bip01_R_UpperArm" -1.512 -2.486 -2.460 11.920 2.839 3.343
$hbox 0 "ValveBiped.Bip01_R_Forearm" -0.425 -2.225 -1.683 17.591 1.878 1.463
$hbox 0 "ValveBiped.Bip01_R_Hand" -0.575 -1.059 -1.510 4.562 1.006 1.569
$hbox 0 "ValveBiped.Bip01_R_Finger2" 0.000 -0.658 -0.404 2.038 0.584 1.583
$hbox 0 "ValveBiped.Bip01_R_Finger21" -0.272 -0.839 -0.404 1.344 0.244 1.338
$hbox 0 "ValveBiped.Bip01_R_Finger0" 0.000 -0.201 -0.760 1.659 0.927 0.867
$hbox 0 "ValveBiped.Bip01_R_Finger01" -0.181 -0.241 -0.760 1.238 0.937 0.626
$hbox 0 "ValveBiped.Bip01_L_Bust" 0.000 -2.337 -3.755 6.585 3.494 2.075
$hbox 0 "ValveBiped.Bip01_R_Bust" 0.000 -2.337 -2.075 6.585 3.494 3.275
// Model uses material "eyeball_l.vmt"
// Model uses material "eyeball_r.vmt"
// Model uses material "korin01C.vmt"
// Model uses material "but.vmt"
// Model uses material "hairC4.vmt"
// Model uses material "hairC.vmt"
// Model uses material "hairC2.vmt"
// Model uses material "hairC3.vmt"
// Model uses material "pupil_r.vmt"
// Model uses material "glint.vmt"
// Model uses material "pupil_l.vmt"
$attachment "eyes" "ValveBiped.Bip01_Head1" 2.76 -3.05 -0.00 rotate 0.00 -80.10 -90.00
$includemodel "alyx_animations.mdl"
$includemodel "alyx_postures.mdl"
$includemodel "alyx_gestures.mdl"
$includemodel "humans/female_shared.mdl"
$includemodel "humans/female_gestures.mdl"
$includemodel "humans/female_shared.mdl"
$includemodel "humans/female_postures.mdl"
$includemodel "humans/female_ss.mdl"
$includemodel "player/female_anims.mdl"
$includemodel "player/f_anm.mdl"
$includemodel "player/f_gst.mdl"
$includemodel "player/f_pst.mdl"
$includemodel "player/f_shd.mdl"
$includemodel "player/f_ss.mdl"
$includemodel "player/cs_fix.mdl"
$includemodel "player/global_include.mdl"
$surfaceprop "flesh"
$eyeposition -0.000 0.000 70.000
$illumposition 2.744 -0.148 33.707
$sequence ragdoll "ragdoll" ACT_DIERAGDOLL 1 fps 30.00
$ikchain rhand ValveBiped.Bip01_R_Hand knee 0.707 0.707 0.000
$ikchain lhand ValveBiped.Bip01_L_Hand knee 0.707 0.707 0.000
$ikchain rfoot ValveBiped.Bip01_R_Foot knee 0.707 -0.707 0.000
$ikchain lfoot ValveBiped.Bip01_L_Foot knee 0.707 -0.707 0.000
$collisionjoints "phymodel.smd" {
$mass 60.0
$inertia 10.00
$damping 0.01
$rotdamping 1.50
$rootbone "valvebiped.bip01_pelvis"
$jointconstrain "valvebiped.bip01_spine1" x limit 0.00 0.00 0.00
$jointconstrain "valvebiped.bip01_spine1" y limit 0.00 0.00 0.00
$jointconstrain "valvebiped.bip01_spine1" z limit 0.00 0.00 0.00
$jointconstrain "valvebiped.bip01_spine2" x limit -48.00 48.00 0.20
$jointconstrain "valvebiped.bip01_spine2" y limit -25.00 25.00 0.20
$jointconstrain "valvebiped.bip01_spine2" z limit -25.00 50.00 0.20
$jointconstrain "valvebiped.bip01_r_upperarm" x limit -30.00 30.00 0.00
$jointconstrain "valvebiped.bip01_r_upperarm" y limit -90.00 90.00 0.00
$jointconstrain "valvebiped.bip01_r_upperarm" z limit -90.00 25.00 0.00
$jointconstrain "valvebiped.bip01_r_forearm" x limit 0.00 0.00 0.20
$jointconstrain "valvebiped.bip01_r_forearm" y limit 0.00 0.00 0.20
$jointconstrain "valvebiped.bip01_r_forearm" z limit -149.00 4.00 0.20
$jointconstrain "valvebiped.bip01_l_upperarm" x limit -30.00 30.00 0.20
$jointconstrain "valvebiped.bip01_l_upperarm" y limit -90.00 90.00 0.20
$jointconstrain "valvebiped.bip01_l_upperarm" z limit -90.00 25.00 0.20
$jointconstrain "valvebiped.bip01_l_forearm" x limit 0.00 0.00 0.20
$jointconstrain "valvebiped.bip01_l_forearm" y limit 0.00 0.00 0.20
$jointconstrain "valvebiped.bip01_l_forearm" z limit -149.00 4.00 0.20
$jointconstrain "valvebiped.bip01_l_hand" x limit -37.00 37.00 0.20
$jointconstrain "valvebiped.bip01_l_hand" y limit 0.00 0.00 0.20
$jointconstrain "valvebiped.bip01_l_hand" z limit -57.00 59.00 0.20
$jointconstrain "valvebiped.bip01_head1" x limit -20.00 20.00 0.20
$jointconstrain "valvebiped.bip01_head1" y limit -25.00 25.00 0.20
$jointconstrain "valvebiped.bip01_head1" z limit -30.00 30.00 0.20
$jointmassbias "valvebiped.bip01_r_bust" 0.40
$jointinertia "valvebiped.bip01_r_bust" 5.00
$jointrotdamping "valvebiped.bip01_r_bust" 5.00
$jointconstrain "valvebiped.bip01_r_bust" x limit -15.00 15.00 0.00
$jointconstrain "valvebiped.bip01_r_bust" y limit -15.00 15.00 0.00
$jointconstrain "valvebiped.bip01_r_bust" z limit -15.00 15.00 0.00
$jointconstrain "valvebiped.bip01_r_hand" x limit -60.00 60.00 0.20
$jointconstrain "valvebiped.bip01_r_hand" y limit 0.00 0.00 0.00
$jointconstrain "valvebiped.bip01_r_hand" z limit -57.00 70.00 0.20
$jointconstrain "valvebiped.bip01_r_thigh" x limit -10.00 10.00 0.20
$jointconstrain "valvebiped.bip01_r_thigh" y limit -30.00 70.00 0.20
$jointconstrain "valvebiped.bip01_r_thigh" z limit -90.00 30.00 0.20
$jointconstrain "valvebiped.bip01_r_calf" x limit 0.00 0.00 0.20
$jointconstrain "valvebiped.bip01_r_calf" y limit 0.00 0.00 0.20
$jointconstrain "valvebiped.bip01_r_calf" z limit -12.00 126.00 0.20
$jointconstrain "valvebiped.bip01_r_foot" x limit 0.00 0.00 0.00
$jointconstrain "valvebiped.bip01_r_foot" y limit -25.00 6.00 0.20
$jointconstrain "valvebiped.bip01_r_foot" z limit -15.00 35.00 0.20
$jointconstrain "valvebiped.bip01_l_thigh" x limit -10.00 10.00 0.20
$jointconstrain "valvebiped.bip01_l_thigh" y limit -70.00 30.00 0.20
$jointconstrain "valvebiped.bip01_l_thigh" z limit -90.00 30.00 0.20
$jointconstrain "valvebiped.bip01_l_calf" x limit 0.00 0.00 0.20
$jointconstrain "valvebiped.bip01_l_calf" y limit 0.00 0.00 0.20
$jointconstrain "valvebiped.bip01_l_calf" z limit -12.00 126.00 0.20
$jointconstrain "valvebiped.bip01_l_foot" x limit 0.00 0.00 0.00
$jointconstrain "valvebiped.bip01_l_foot" y limit -19.00 19.00 0.20
$jointconstrain "valvebiped.bip01_l_foot" z limit -15.00 35.00 0.20
$jointmassbias "valvebiped.bip01_l_bust" 0.40
$jointinertia "valvebiped.bip01_l_bust" 5.00
$jointrotdamping "valvebiped.bip01_l_bust" 5.00
$jointconstrain "valvebiped.bip01_l_bust" x limit -15.00 15.00 0.00
$jointconstrain "valvebiped.bip01_l_bust" y limit -15.00 15.00 0.00
$jointconstrain "valvebiped.bip01_l_bust" z limit -15.00 15.00 0.00
}
[/lua]
I didn’t change any file paths (that i’m aware of), or any filenames. I also
(being new to decompiling/compiling) may have not done something else
I needed to do, so I may have missed steps in the process. I hope I have
been descriptive/informational, and help is much appreciated.