Fixing Models for Server, Problems Ensued

Okay, so I’m doing edits and tweaks for a server and I need to fix a few models. I’m currently trying to add some new weapons to the server, but a few of the playermodels have… problems. I’ve not been able to find a fix for this, and maybe I’m just not looking for it with the right terms - but I could really use some help on this one. I’ll provide some examples of the problem.

Obviously that’s not right. The AR2 should not be at the player’s feet. Basically any weapon using two-handed hold types (from HL2, the TTT SWEPs from CS:S work fine) such as the AR2, SMG, or Shotgun do this and I have absolutely no idea why. I went to try and grab a screenshot from HLMV, which previously had the model’s weapon floating behind it, but couldn’t replicate that issue. The weapon models simply do not appear at all now in HLMV. Not sure why. Anyway, any fix I can apply to sort out the weapon at the feet thing that I’m provided I’m willing to try. I’m no modeling expert by any means, but I know enough to decompile and recompile a model or tweak some bones.

Edit: Most of the models that have this issue also have their flashlight at their feet and pointing in a constant direction as well, regardless of the weapon currently being held.

Another alternate issue I have is that I was requested to find a bottle model from Legend of Zelda for repurposing as a custom SWEP, of which none exist. However, there is a Hyrule Warriors Link playermodel on the marketplace that has a bottle in its bodygroups that I was wondering if I could rip out and use. Is that a thing that can be done? I don’t know enough about bodygroups to know if it’s possible.

Thank you for any and all help with these issues.

Could you post the QC in [noparse]




[/noparse] tags?



// Created by Crowbar 0.24.0.0

$modelname "player\corvo.mdl"

$bodygroup "K"
{
	studio "corvo_reference.smd"
}


$poseparameter "move_yaw" -180 180 0
$poseparameter "body_pitch" -90 90 0
$poseparameter "body_yaw" -90 90 0

$cdmaterials "models\player\corvo\"

$attachment "forward" "ValveBiped.forward" 0 0 0 rotate 0 0 0
$attachment "grenade0" "ValveBiped.Bip01_Pelvis" 7.03 3.57 -5.04 rotate -46.54 -172.45 81.91
$attachment "grenade1" "ValveBiped.Bip01_Pelvis" 3.54 3.74 -5.69 rotate -81.11 178.93 91.12
$attachment "grenade2" "ValveBiped.Bip01_Pelvis" -3.1 3.28 -6.97 rotate -79.99 13.72 -101.78
$attachment "grenade3" "ValveBiped.Bip01_Pelvis" -6.28 4.19 -5.32 rotate -59.27 3.3 -90.98
$attachment "pistol" "ValveBiped.Bip01_R_Thigh" -1.61 3.62 -6.16 rotate -5.76 -9.41 80.11
$attachment "primary" "ValveBiped.Bip01_Spine2" 11.39 -4.34 5.12 rotate -7.8 178.32 -179.54
$attachment "eholster" "ValveBiped.Bip01_L_Thigh" 3.96 -0.87 5.52 rotate 11.2 -91.22 93.32
$attachment "c4" "ValveBiped.Bip01_Spine2" 9.36 -8.28 -6.81 rotate -41.21 58.9 18.01
$attachment "lfoot" "ValveBiped.Bip01_L_Foot" 0 5.35 0 rotate 0 0 0
$attachment "rfoot" "ValveBiped.Bip01_R_Foot" 0 5.35 0 rotate 0 0 0
$attachment "muzzle_flash" "ValveBiped.Bip01_L_Hand" 0 0 0 rotate 0 0 0

$surfaceprop "flesh"

$contents "solid"

$eyeposition 0 0 73

// $hboxset "cstrike"
// $hbox 3 "ValveBiped.Bip01_Pelvis" -8.539 -7.95 -5.585 8.539 2.065 6.773
// $hbox 6 "ValveBiped.Bip01_L_Thigh" 4.708 -5.532 -3.531 23.540001 3.884 4.708
// $hbox 6 "ValveBiped.Bip01_L_Calf" -0.3 -4.419 -3.531 21.486 3.242 3.531
// $hbox 6 "ValveBiped.Bip01_L_Foot" -2.354 -1.177 -2.654 5.885 4.708 2.065
// $hbox 7 "ValveBiped.Bip01_R_Thigh" 4.708 -5.532 -3.531 23.540001 3.884 4.708
// $hbox 7 "ValveBiped.Bip01_R_Calf" -0.3 -4.419 -3.531 21.486 3.242 3.531
// $hbox 7 "ValveBiped.Bip01_R_Foot" -2.354 -1.177 -2.065 5.885 4.708 2.654
// $hbox 3 "ValveBiped.Bip01_Spine1" -9.416 -1.295 -8.239 4.708 11.652 8.239
// $hbox 2 "ValveBiped.Bip01_Spine2" -3.157 -3.531 -9.972 13.964 10.614 9.972
// $hbox 1 "ValveBiped.Bip01_Neck1" -0.107 -4.708 -2.943 5.671 2.354 2.943
// $hbox 1 "ValveBiped.Bip01_Head1" -0.428 -6.42 -3.745 9.63 4.569 3.103
// $hbox 4 "ValveBiped.Bip01_L_UpperArm" -1.177 -2.654 -2.354 15.301 2.654 2.354
// $hbox 4 "ValveBiped.Bip01_L_Forearm" -1.766 -2.472 -2.472 13.536 2.472 2.472
// $hbox 4 "ValveBiped.Bip01_L_Hand" 0.3 -2.536 -1.766 6.773 1.594 2.943
// $hbox 5 "ValveBiped.Bip01_R_UpperArm" -1.177 -2.654 -2.354 15.301 2.654 2.354
// $hbox 5 "ValveBiped.Bip01_R_Forearm" -1.766 -2.472 -2.472 13.536 2.472 2.472
// $hbox 5 "ValveBiped.Bip01_R_Hand" 0.3 -2.536 -2.943 6.773 1.594 1.766
// $skipboneinbbox

// NOTE: The following commented-out $definebone lines might be needed, as is often the case for view models. When needed, simply remove the two slashes '//' from the start of each line.
// $definebone "ValveBiped.Bip01_Pelvis" "" 0 -0.554942 40.109589 1.570796 0 0 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_L_Thigh" "ValveBiped.Bip01_Pelvis" 4.046065 0 0 -1.570425 0.051839 -1.56558 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_L_Calf" "ValveBiped.Bip01_L_Thigh" 18.562101 0 0 0 0 0.0342 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_L_Foot" "ValveBiped.Bip01_L_Calf" 17.186247 0 0 -0.023996 -0.041104 -1.071631 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_L_Toe0" "ValveBiped.Bip01_L_Foot" 7.154625 0 0.000001 -0.009979 -0.005353 -0.584358 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_R_Thigh" "ValveBiped.Bip01_Pelvis" -4.046065 0 0 -1.57101 0.051839 -1.576015 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_R_Calf" "ValveBiped.Bip01_R_Thigh" 18.562092 0 0 0 0 0.0342 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_R_Foot" "ValveBiped.Bip01_R_Calf" 17.186255 0 0 0.04234 0.040968 -1.071635 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_R_Toe0" "ValveBiped.Bip01_R_Foot" 7.154632 0 0 -0.084358 -0.004949 -0.584361 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_Spine" "ValveBiped.Bip01_Pelvis" 0 3.478935 -3.101174 1.570796 0.083193 1.570796 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_Spine1" "ValveBiped.Bip01_Spine" 4.155659 0 0 0 0 -0.028816 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_Spine2" "ValveBiped.Bip01_Spine1" 3.661125 0 0 0 0 0.097307 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_Spine4" "ValveBiped.Bip01_Spine2" 9.278336 0 0 0 0 0.186413 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_Neck1" "ValveBiped.Bip01_Spine4" 3.438606 -0.000001 0 3.14159 0 0.406109 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_Head1" "ValveBiped.Bip01_Neck1" 3.746082 0 0 0 -0.000001 0.405033 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_L_Clavicle" "ValveBiped.Bip01_Spine4" 2.141911 1.017039 2.015167 1.58974 -1.286515 2.950147 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_L_UpperArm" "ValveBiped.Bip01_L_Clavicle" 6.269268 0 0 -1.437168 0.051344 -0.58081 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_L_Forearm" "ValveBiped.Bip01_L_UpperArm" 12.160263 0.000001 -0.000011 0 0 -0.060372 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_L_Hand" "ValveBiped.Bip01_L_Forearm" 11.940947 0.000001 -0.000034 1.568292 -0.038709 0.036022 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_L_Finger2" "ValveBiped.Bip01_L_Hand" 4.036627 0.223278 0.416267 0.087707 0.031641 -0.519952 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_L_Finger21" "ValveBiped.Bip01_L_Finger2" 1.788355 -0.000004 0 0 0.005005 -0.366486 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_L_Finger22" "ValveBiped.Bip01_L_Finger21" 1.257545 0 0 0 0.002798 -0.216403 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_L_Finger1" "ValveBiped.Bip01_L_Hand" 4.026138 0.12212 1.35294 0.352467 -0.032975 -0.463848 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_L_Finger11" "ValveBiped.Bip01_L_Finger1" 1.788204 0.000002 0.000004 0.000001 0.005107 -0.362997 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_L_Finger12" "ValveBiped.Bip01_L_Finger11" 1.14365 -0.000002 0 0.000001 0.003256 -0.244323 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_L_Finger0" "ValveBiped.Bip01_L_Hand" 0.872387 -0.312286 1.365286 -1.251009 -0.6698 -0.720133 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_L_Finger01" "ValveBiped.Bip01_L_Finger0" 1.861378 -0.000004 0.000002 0 -0.002159 0.22863 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_L_Finger02" "ValveBiped.Bip01_L_Finger01" 1.25528 0.000002 0.000004 0 -0.0033 0.363014 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_R_Clavicle" "ValveBiped.Bip01_Spine4" 2.141914 1.017039 -2.015167 -1.661569 1.286515 2.950147 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_R_UpperArm" "ValveBiped.Bip01_R_Clavicle" 6.269265 -0.000004 0 1.520804 -0.011906 -0.583413 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_R_Forearm" "ValveBiped.Bip01_R_UpperArm" 12.160263 -0.000001 0.000008 0 0 -0.060372 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_R_Hand" "ValveBiped.Bip01_R_Forearm" 11.940968 0 0.000004 -1.559993 0.038701 0.036022 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_R_Finger2" "ValveBiped.Bip01_R_Hand" 4.036597 0.219814 -0.418107 -0.087717 -0.035763 -0.519702 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_R_Finger21" "ValveBiped.Bip01_R_Finger2" 1.788363 0 -0.000001 0 -0.007584 -0.366445 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_R_Finger22" "ValveBiped.Bip01_R_Finger21" 1.257545 -0.000002 0 0 -0.004241 -0.216381 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_R_Finger1" "ValveBiped.Bip01_R_Hand" 4.026107 0.110889 -1.353905 -0.352486 0.029262 -0.464072 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_R_Finger11" "ValveBiped.Bip01_R_Finger1" 1.788216 -0.000006 -0.000002 0 -0.007737 -0.362954 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_R_Finger12" "ValveBiped.Bip01_R_Finger11" 1.14365 -0.000002 0.000002 0 -0.004929 -0.244296 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_R_Finger0" "ValveBiped.Bip01_R_Hand" 0.872357 -0.323631 -1.362646 1.248034 0.66431 -0.725028 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_R_Finger01" "ValveBiped.Bip01_R_Finger0" 1.861374 -0.000005 0.000002 0 0.003279 0.228617 0 0 0 0 0 0
// $definebone "ValveBiped.Bip01_R_Finger02" "ValveBiped.Bip01_R_Finger01" 1.255283 0.000002 -0.000002 0 0.00501 0.362995 0 0 0 0 0 0
// $definebone "ValveBiped.weapon_bone" "ValveBiped.Bip01_Spine" -43.648499 -1.081625 0.00003 0 -1.570796 -1.487604 0 0 0 0 0 0
// $definebone "ValveBiped.weapon_bone_RHand" "ValveBiped.weapon_bone" -2 4 -2.354678 -1.472157 -0.471536 0.035774 0 0 0 0 0 0
// $definebone "ValveBiped.weapon_bone_LHand" "ValveBiped.weapon_bone_RHand" 5.701225 0 0 1.58491 0.907874 0.388844 0 0 0 0 0 0
// $definebone "ValveBiped.weapon_bone_Clip" "ValveBiped.weapon_bone_LHand" 0 0 0 0 0 0 0 0 0 0 0 0
// $definebone "ValveBiped.forward" "ValveBiped.Bip01_Head1" 2.000008 -3 0 -1.570796 0 -1.32645 0 0 0 0 0 0




$sequence "ragdoll" "corvo_anims\ragdoll.smd" {
	fps 30
	activity "ACT_DIERAGDOLL" 1
}

$includemodel "m_anm.mdl"

$ikchain "rhand" "ValveBiped.Bip01_R_Hand" knee 0.707 0.707 0
$ikchain "lhand" "ValveBiped.Bip01_L_Hand" knee 0.707 0.707 0
$ikchain "rfoot" "ValveBiped.Bip01_R_Foot" knee 0.707 -0.707 0
$ikchain "lfoot" "ValveBiped.Bip01_L_Foot" knee 0.707 -0.707 0
$ikchain "ikclip" "ValveBiped.weapon_bone_Clip" knee 0.707 -0.707 0

$collisionjoints "corvo_physics.smd"
{
	$mass 0
	$inertia 10
	$damping 0.01
	$rotdamping 1.5


	$jointconstrain "ValveBiped.Bip01_Spine2" x limit -48 48 0
	$jointconstrain "ValveBiped.Bip01_Spine2" y limit -25 25 0
	$jointconstrain "ValveBiped.Bip01_Spine2" z limit -25 50 0

	$jointconstrain "ValveBiped.Bip01_R_Clavicle" x limit 0 0 0
	$jointconstrain "ValveBiped.Bip01_R_Clavicle" y limit 0 0 0
	$jointconstrain "ValveBiped.Bip01_R_Clavicle" z limit 0 0 0

	$jointconstrain "ValveBiped.Bip01_R_UpperArm" x limit -39 39 0
	$jointconstrain "ValveBiped.Bip01_R_UpperArm" y limit -79 95 0
	$jointconstrain "ValveBiped.Bip01_R_UpperArm" z limit -93 23 0

	$jointconstrain "ValveBiped.Bip01_L_Clavicle" x limit 0 0 0
	$jointconstrain "ValveBiped.Bip01_L_Clavicle" y limit 0 0 0
	$jointconstrain "ValveBiped.Bip01_L_Clavicle" z limit 0 0 0

	$jointconstrain "ValveBiped.Bip01_L_UpperArm" x limit -30 30 0
	$jointconstrain "ValveBiped.Bip01_L_UpperArm" y limit -95 84 0
	$jointconstrain "ValveBiped.Bip01_L_UpperArm" z limit -86 26 0

	$jointconstrain "ValveBiped.Bip01_L_Forearm" x limit 0 0 0
	$jointconstrain "ValveBiped.Bip01_L_Forearm" y limit 0 0 0
	$jointconstrain "ValveBiped.Bip01_L_Forearm" z limit -149 4 0

	$jointconstrain "ValveBiped.Bip01_L_Hand" x limit -37 37 0
	$jointconstrain "ValveBiped.Bip01_L_Hand" y limit 0 0 0
	$jointconstrain "ValveBiped.Bip01_L_Hand" z limit -57 59 0

	$jointconstrain "ValveBiped.Bip01_R_Forearm" x limit 0 0 0
	$jointconstrain "ValveBiped.Bip01_R_Forearm" y limit 0 0 0
	$jointconstrain "ValveBiped.Bip01_R_Forearm" z limit -149 4 0

	$jointconstrain "ValveBiped.Bip01_R_Hand" x limit 0 0 0
	$jointconstrain "ValveBiped.Bip01_R_Hand" y limit 0 0 0
	$jointconstrain "ValveBiped.Bip01_R_Hand" z limit 0 0 0

	$jointconstrain "ValveBiped.Bip01_Head1" x limit -20 20 0
	$jointconstrain "ValveBiped.Bip01_Head1" y limit -25 25 0
	$jointconstrain "ValveBiped.Bip01_Head1" z limit -13 30 0

	$jointconstrain "ValveBiped.Bip01_R_Thigh" x limit 0 0 0
	$jointconstrain "ValveBiped.Bip01_R_Thigh" y limit 0 0 0
	$jointconstrain "ValveBiped.Bip01_R_Thigh" z limit 0 0 0

	$jointconstrain "ValveBiped.Bip01_L_Thigh" x limit -12 12 0
	$jointconstrain "ValveBiped.Bip01_L_Thigh" y limit -73 6 0
	$jointconstrain "ValveBiped.Bip01_L_Thigh" z limit -93 30 0

	$jointconstrain "ValveBiped.Bip01_L_Calf" x limit 0 0 0
	$jointconstrain "ValveBiped.Bip01_L_Calf" y limit 0 0 0
	$jointconstrain "ValveBiped.Bip01_L_Calf" z limit -8 126 0

	$jointconstrain "ValveBiped.Bip01_R_Calf" x limit 0 0 0
	$jointconstrain "ValveBiped.Bip01_R_Calf" y limit 0 0 0
	$jointconstrain "ValveBiped.Bip01_R_Calf" z limit -12 126 0
}

$collisiontext
{
	animatedfriction 
	{
		"animfrictionmin" "1.000000"
		"animfrictionmax" "400.000000"
		"animfrictiontimein" "0.500000"
		"animfrictiontimeout" "0.300000"
		"animfrictiontimehold" "0.000000"
	}
	editparams 
	{
		"rootname" "valvebiped.bip01_pelvis"
		"totalmass" "90.000000"
		"jointmerge" "ValveBiped.Bip01_Pelvis,ValveBiped.Bip01_Spine1"
	}
}



Remove the "// " from all the $definebone sections. Typically, compiling a model with the $definebone commands commented out makes the compiler delete or move bones that it deems “unnecessary”.

That should fix the issue.

Okay, I did that and it’s still in the ground, but pointing in a different direction. Hm.

Any ideas?

You’re porting this from Counter-Strike:Source, as it seems to use the bones from it. You’d have to re-rig the model to the Garry’s Mod player model skeleton.

Is there a good tutorial you could link me to for doing so?

If you are using 3DS Max, there’s this one.

If you are using Blender, you can look at this one.