Whats wrong with my ragdoll

It crashes whenever I spawn it
(its really big btw)

http://anyhub.net/file/1Or6-messed-up-ragdoll.rar

Pics, system specs, details, info, HELP SECTION.

No, this is fine. Work-in-Progress and help threads belong right here. There is no specific help forum for models. As for info, the thread starter did the right thing by including a *.RAR. This is more info than one can ask for.

To the point …

The model has multiple problems. Firstly, you’ve included a number of animation libraries that are normally used by player models. These will not work with a model that’s been resized this way and must be removed from the *.qc. You’ve also left in a block of hitbox data that’s not necessary and a bunch of attachment parameters. Feel free to remove this entire block of code from the *.qc:


$hboxset "default"
$hbox 3 "ValveBiped.Bip01_Pelvis" -35.500  -25.500  -30.000  35.500  40.500  25.000
$hbox 1 "ValveBiped.Bip01_Head1" -6.250  -30.500  -15.190  40.250  15.500  15.310
$hbox 4 "ValveBiped.Bip01_L_UpperArm" 0.000  -10.750  -10.750  60.510  5.750  10.250
$hbox 4 "ValveBiped.Bip01_L_Forearm" 0.000  -10.190  -10.380  65.000  5.810  5.620
$hbox 4 "ValveBiped.Bip01_L_Hand" 0.300  -10.000  -5.500  20.060  5.000  10.500
$hbox 5 "ValveBiped.Bip01_R_UpperArm" 0.000  -15.000  -10.250  60.390  10.000  10.750
$hbox 5 "ValveBiped.Bip01_R_Forearm" -2.500  -10.200  -5.550  60.500  5.800  10.450
$hbox 5 "ValveBiped.Bip01_R_Hand" 0.060  -10.000  -10.500  20.060  5.000  5.500
$hbox 6 "ValveBiped.Bip01_L_Thigh" 0.000  -15.750  -15.250  85.850  15.750  15.250
$hbox 6 "ValveBiped.Bip01_L_Calf" 0.000  -15.510  -15.280  75.640  15.490  10.720
$hbox 6 "ValveBiped.Bip01_L_Foot" -5.070  -10.000  -10.840  25.040  25.000  10.160
$hbox 7 "ValveBiped.Bip01_R_Thigh" 0.000  -15.750  -15.250  85.850  15.750  15.250
$hbox 7 "ValveBiped.Bip01_R_Calf" 0.000  -15.510  -10.820  75.640  15.490  15.180
$hbox 7 "ValveBiped.Bip01_R_Foot" -5.060  -10.010  -10.280  25.050  20.990  10.720
$hbox 2 "ValveBiped.Bip01_Spine2" -10.500  -10.500  -35.000  70.500  35.500  35.000

// Model uses material "megadestroyer.vmt"
// Model uses material "sweet_seat.vmt"

$attachment "forward" "ValveBiped.forward" -0.00 -0.00 -0.00 rotate 0.00 0.00 -0.00
$attachment "anim_attachment_RH" "ValveBiped.Anim_Attachment_RH" 0.00 0.00 -0.00 rotate -90.00 -90.00 0.00
$attachment "anim_attachment_LH" "ValveBiped.Anim_Attachment_LH" 0.00 0.00 -0.00 rotate -90.00 -90.00 0.00
$attachment "emp" "ValveBiped.Anim_Attachment_RH" 0.00 0.00 5.00 rotate -90.00 -90.00 0.00
$attachment "Emp_Holster" "ValveBiped.Bip01_Pelvis" -6.44 2.22 -1.95 rotate -1.37 -103.07 90.28


$bonemerge "ValveBiped.Bip01_R_Toe0"
$bonemerge "ValveBiped.Bip01_L_Toe0"
$bonemerge "ValveBiped.Bip01_Head1"


$includemodel "humans/male_shared.mdl"
$includemodel "humans/male_ss.mdl"
$includemodel "humans/male_gestures.mdl"
$includemodel "humans/male_postures.mdl"
$includemodel "alyx_animations.mdl"
$includemodel "alyx_postures.mdl"
$includemodel "alyx_gestures.mdl"
$includemodel "humans/female_shared.mdl"
$includemodel "humans/female_ss.mdl"

Phew! Now that all that’s gone, things will start shaping up!

Next, you’re going to have to jump down to where you’ve set up your ragdoll’s movement limits and change this line:


$collisionmodel "bicycle_megadestroyer_phys.smd"

to


$collisionjoints "bicycle_megadestroyer_phys.smd"

The ‘$collisionjoints’ command is what tells your model that it’s a ragdoll. If ‘$collisionmodel’ is used, it will be compiled as a jointless prop.

For our final act, you’ll have to re-rig the phymodel. The skeleton of the phymodel you’re using has problematic bone hierarchy and, as a result, will hassle you when being compiled. Import the skeleton from your reference model (bicycle_megadestroyer.smd) without its mesh, then import your phymodel (bicycle_megadestroyer_phys.smd) without its skeleton and rig the meshes of the phymodel to the bones of the reference model. This will be exported as your new, non-problematic phymodel!

Once that’s all been done, the rest is on you. Good luck

That was incredibly helpful

I already fixed the bones [by the time you posted this] it was just the qc that had me confounded.

Just for future reference. Say I wanted to add animations say for an npc or something. HOw would I go about that?

Glad I could help =D

You can add in animations with the $sequence function. There’s already one $sequence in your *.qc for your model’s ragdoll animation. Some of the functions used by an NPC might look like these:


$sequence idle "idle" ACT_IDLE 1 loop fps 30.00
$sequence walk "walk" ACT_WALK 1 LX loop fps 30.00
$sequence run "run" ACT_RUN 1 LX loop fps 30.00
$sequence attack "attack" ACT_RANGE_ATTACK_PISTOL 1 fps 30.00 

ACT_ activities differ between NPCs. The ones shown above are laregly generic, with the exception of the pistol activity which is used by bipeds. The ‘LX’ tag included on the run and walk commands is used to interpolate movement speed from their respective SMDs. When these animations are made in your modelling program, you’ll actually move the model forward to define its movement speed.