Page 1 of 1

Changing Ragdolls

PostPosted: Tue May 21, 2013 5:44 pm
by TechieUK
Hey everyone! It's me again. :)
I was playing Garry's Mod and Half-Life 2, and I noticed how the ragdolls are just so floppy.
After playing a bit of Skyrim, I noticed how the ragdolls are very stiff.
So, I was wondering, what steps would I have to take to make the ragdolls fall a bit slower, and be a bit stiffer?
Can this be done in the qc?
To make it move/fall a bit slower, would I need to make it lighter?
To make it stiffer, I assume I would just have to lower the constraints, but then it can't rotate as much.
Is there any way to have the joints not rotate as fast, but still be able to rotate as much as normal?
Changing phys_timescale isn't ideal for the clientside ragdolls because I don't think they're affected by it. It would also effect other props, which I don't want to change.
The effect I want is something not as floppy as HL2 but not as stiff as Skyrim. Sort of an in-between.
Any ideas?

Re: Changing Ragdolls

PostPosted: Tue May 21, 2013 7:18 pm
by Black_Stormy
You can definitely do this. Decompile the model and change the values in the $collisionjoints block. $jointdamping and $jointrotdamping should do what you want, just trial am error to get otherwise right. As for making them fall slower I'm not sure I think you can change the mass of each bone but I can remember all my ragdolls being super heavy and I couldn't figure out how to fix it.

Re: Changing Ragdolls

PostPosted: Tue May 21, 2013 7:19 pm
by Black_Stormy
You can definitely do this. Decompile the model and change the values in the $collisionjoints block. $jointdamping and $jointrotdamping should do what you want, just trial am error to get otherwise right. As for making them fall slower I'm not sure I think you can change the mass of each bone but I can remember all my ragdolls being super heavy and I couldn't figure out how to fix it.

Re: Changing Ragdolls

PostPosted: Tue May 21, 2013 8:22 pm
by TechieUK
Cheers, I'll try it tomorrow when I get the time.

Re: Changing Ragdolls

PostPosted: Wed May 22, 2013 4:26 am
by Black_Stormy
Black_Stormy wrote:I can remember all my ragdolls being super heavy and I couldn't figure out how to fix it.


HURRR $jointmassbias

Re: Changing Ragdolls

PostPosted: Mon May 27, 2013 8:57 am
by TechieUK
Me and modelling really don't go well together. There's no end to my problems. I should stick to mapping.
AAANNYWAY!
I changed G-Man's ragdoll constraints and the $damping settings to get an effect I wanted.
Code: Select all
$collisionjoints "ragdoll.smd" {

   $mass 90.0
   $inertia 10.00
   $damping 5
   $rotdamping 0.00
   $rootbone "valvebiped.bip01_pelvis"
   $jointmerge "ValveBiped.Bip01_Pelvis" "ValveBiped.Bip01_Spine1"

   $jointconstrain "valvebiped.bip01_spine2" x limit -84.00 84.00 0.00
   $jointconstrain "valvebiped.bip01_spine2" y limit -55.00 55.00 0.00
   $jointconstrain "valvebiped.bip01_spine2" z limit -104.00 55.00 0.00

   $jointconstrain "valvebiped.bip01_r_upperarm" x limit -39.00 39.00 0.00
   $jointconstrain "valvebiped.bip01_r_upperarm" y limit -111.00 153.00 0.00
   $jointconstrain "valvebiped.bip01_r_upperarm" z limit -129.00 79.00 0.00

   $jointconstrain "valvebiped.bip01_l_upperarm" x limit -39.00 39.00 0.00
   $jointconstrain "valvebiped.bip01_l_upperarm" y limit -111.00 153.00 0.00
   $jointconstrain "valvebiped.bip01_l_upperarm" z limit -129.00 79.00 0.00

   $jointconstrain "valvebiped.bip01_l_forearm" x limit 0.00 0.00 0.00
   $jointconstrain "valvebiped.bip01_l_forearm" y limit 0.00 0.00 0.00
   $jointconstrain "valvebiped.bip01_l_forearm" z limit -149.00 15.00 0.00

   $jointconstrain "valvebiped.bip01_l_hand" x limit -60.00 60.00 0.00
   $jointconstrain "valvebiped.bip01_l_hand" y limit 0.00 0.00 0.00
   $jointconstrain "valvebiped.bip01_l_hand" z limit -57.00 70.00 0.00

   $jointconstrain "valvebiped.bip01_r_forearm" x limit 0.00 0.00 0.00
   $jointconstrain "valvebiped.bip01_r_forearm" y limit 0.00 0.00 0.00
   $jointconstrain "valvebiped.bip01_r_forearm" z limit -149.00 15.00 0.00

   $jointconstrain "valvebiped.bip01_r_hand" x limit -60.00 60.00 0.00
   $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.00

   $jointconstrain "valvebiped.bip01_r_thigh" x limit -57.00 73.00 0.00
   $jointconstrain "valvebiped.bip01_r_thigh" y limit -95.00 180.00 0.00
   $jointconstrain "valvebiped.bip01_r_thigh" z limit -97.00 32.00 0.00

   $jointconstrain "valvebiped.bip01_r_calf" x limit 0.00 0.00 0.00
   $jointconstrain "valvebiped.bip01_r_calf" y limit 0.00 0.00 0.00
   $jointconstrain "valvebiped.bip01_r_calf" z limit -12.00 162.00 0.00

   $jointconstrain "valvebiped.bip01_head1" x limit -97.00 97.00 0.00
   $jointconstrain "valvebiped.bip01_head1" y limit -64.00 64.00 0.00
   $jointconstrain "valvebiped.bip01_head1" z limit -39.00 68.00 0.00

   $jointconstrain "valvebiped.bip01_l_thigh" x limit -57.00 73.00 0.00
   $jointconstrain "valvebiped.bip01_l_thigh" y limit -95.00 180.00 0.00
   $jointconstrain "valvebiped.bip01_l_thigh" z limit -97.00 32.00 0.00

   $jointconstrain "valvebiped.bip01_l_calf" x limit 0.00 0.00 0.00
   $jointconstrain "valvebiped.bip01_l_calf" y limit 0.00 0.00 0.00
   $jointconstrain "valvebiped.bip01_l_calf" z limit -12.00 162.00 0.00

   $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.00
   $jointconstrain "valvebiped.bip01_l_foot" z limit -15.00 35.00 0.00

   $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.00
   $jointconstrain "valvebiped.bip01_r_foot" z limit -15.00 35.00 0.00

   $jointcollide valvebiped.bip01_l_forearm valvebiped.bip01_pelvis
   $jointcollide valvebiped.bip01_r_forearm valvebiped.bip01_pelvis
   $jointcollide valvebiped.bip01_l_forearm valvebiped.bip01_spine2
   $jointcollide valvebiped.bip01_r_forearm valvebiped.bip01_spine2
   $jointcollide valvebiped.bip01_r_thigh valvebiped.bip01_l_thigh
   $jointcollide valvebiped.bip01_r_calf valvebiped.bip01_l_calf
   $jointcollide valvebiped.bip01_l_foot valvebiped.bip01_r_foot
   $jointcollide valvebiped.bip01_l_foot valvebiped.bip01_r_calf
   $jointcollide valvebiped.bip01_r_foot valvebiped.bip01_l_calf
   $jointcollide valvebiped.bip01_l_forearm valvebiped.bip01_l_thigh
   $jointcollide valvebiped.bip01_l_forearm valvebiped.bip01_r_thigh
   $jointcollide valvebiped.bip01_r_forearm valvebiped.bip01_l_thigh
   $jointcollide valvebiped.bip01_r_forearm valvebiped.bip01_r_thigh
}
$sequence ragdoll       "ragdoll_pose"       FPS 30       activity ACT_DIERAGDOLL 1


And I get this in the console:
Bad ragdoll for gman.mdl!

If I do $includemodel gman.mdl, it works as a ragdoll, but it uses his constraints and not my edited ones. A .phy file is not made. Without that line, it does make the ragdoll and .phy file, but I get the bad ragdoll error. He just floats there in a t-pose (leaning slightly to the side). I got the ragdoll.smd from the SDK (the male06 one) and tried again, still to no avail.