[ZM] [LIB] Custom Ragdoll Death Animations (gore mod)
-
This mod replaces the boring and repetitive, default death animations with some fresh and dynamic ones.
In the vanilla game, death animations are somewhat mechanical and repetitive and many have complained about it in the past.
What the mod does
Upon the zombie death, it takes the direction of the bullet and based on the damage dealt it applies a force to the limb that got hit.
Then the force propagates towards the rest of the body, meaning that the impact point (limb) absorbed most of the kinetic energy of the bullet.In other words, instead of making the entire body react the same way, the code checks each body part individually (except the head and neck, to avoid weird movements).
There's also a small random factor to make the movements look more natural and less mechanical.Some physics dvar had to be adjusted to prevent instant fall of the corpse. This makes the character's limbs and torso move and fall somewhat realistically, mimicking how a real body would react to the force of the hit.
Full realism ain't no fun, it's still a game, goal is to make it fun in a believable way.
https://www.youtube.com/watch?v=KawoPfHQ0Rk
How to install
Navigate to%localappdata%\Plutonium\storage\t5\scripts\sp\zom
and create a folder namedlib
and drop the file calledd_lib_gore.gsc
By default this is just a lib, meaning it won't do anything unless you tell it to do it. That's why I've included a demo mod that uses this feature.
Go back to the
\t5\scripts\sp\zom
folder and drop the fileragdoll_simulator.gsc
into it.This is how it looks like
Download
Current version: bo1_ragdoll_mod_0.1.zip
GitHub repo: https://github.com/dragitz/Bo1-plutonium-scripts/tree/main/scripts
GitHub direct link: https://github.com/dragitz/Bo1-plutonium-scripts/raw/main/scripts/bo1_ragdoll_mod_0.1.zip
How to use it
This mod only works in private matches and only the host needs to have it installed.If you want to try it solo, then go into a private match, open the console (or type it in the cmd window that opens with plutonium) and type
xpartygo
.
This will force the game to start even if there are not enough players.
Compatibility
If you have a mod installed that changes the functionactor_killed_override
(aka what happens when a zombie dies) ragdoll_simulator.gsc will break it, make sure you have a clean mod folder before using it
Developing mods with it (Part 1: ragdoll)
There are two steps to add this mod to yours or your server:In the function
actor_killed_override
place this code like in the screenshot// Ragdoll death if(self.is_zombie || self.isdog) { self SetPlayerCollision(0); self thread ragdoll(vDir, sHitLoc, iDamage, sWeapon, attacker, sMeansOfDeath); }
And you are halfway there. Next I'm assuming you either have used
replaceFunc
or modified the function directly in the maps folder.
Upon player spawn you need to set his physics dvars like this:onplayerspawned() { self endon("disconnect"); self waittill("spawned_player"); level.overrideActorKilled = ::actor_killed_override; self setClientDvar("phys_gravity", "-300"); // make bodies fall slower instead of slamming the ground self setClientDvar("phys_ragdoll_joint_damp_scale", "0.08"); // body rigidness (can be set to 0) self setClientDvar("phys_dragAngular", "4"); // 4 was the original self setClientDvar("phys_userRigidBodies", "0"); //self setClientDvar("ragdoll_max_simulating", "24"); // server can not edit this dvar self setClientDvar("ragdoll_baselerp_time", "600"); // Default time ragdoll baselerp bones take to reach the base pose self setClientDvar("ragdoll_jointlerp_time", "6000"); // Default time taken to lerp down ragdoll joint friction self setClientDvar("ragdoll_bullet_force", "2000"); // how strong bullets are self setClientDvar("ragdoll_explode_force", "30000"); // Explosive force applied to ragdolls self setClientDvar("ragdoll_rotvel_scale", "10"); // Ragdoll rotational velocity estimate scale }
Otherwise it looks ass. If you feel confused check
ragdoll_simulator.gsc
to see how I did it and feel free to copy-paste anything you wish.
Developing mods with it (Part 2: blood)
There's another function that is not included in the demo and it's calledblood()
which should be called like this:self thread blood(sHitLoc);
And it's meant to be placed in
actor_damage_override()
If called like this, it will increase the realism of blood without blinding the player with effects
Developing mods with it (Part 3: exploding limbs)
self thread explode(sHitLoc);
is a function that is called in theragdoll
function.Given a limb tag (or hit location) it will simply explode that body part. Blood loss is an inevitable consequence for the zombie.
NOTE: I've added a 4% chance of the zombie loosing all of its limbs for a more gore-y experience. -
-
can u create mod 150 health on zombie online
? please
-
now thats what im talking about it feels like left for dead now sickk mod man
so should i but the gsc in the script folder of t5? -
GhostRider0125 said in [ZM] [LIB] Custom Ragdoll Death Animations (gore mod):
now thats what im talking about it feels like left for dead now sickk mod man
so should i but the gsc in the script folder of t5?Thank you! I appreciate it a lot
the content of the zip file can be drag and dropped into the
zom
folder -
ah i thought so appreciate it
-
doesnt work : (
-
GhostRider0125 Only works in private matches, go into one and type in the console
xpartygo
to bypass the minimum player requirement -
bhfff You get zom folder scripts loaded for solo if you press first online and then go back and press solo.
-
dontknowletspl crazy, I never knew about this trick, thanks !
-
very nice... is this possible to have on steam as well and is the hit box collision still there after killing them
-
FaZe Flick Thank you! The example mod uses
self SetPlayerCollision(0);
so no the hitbox isn't there, but the library itself does not change this as other modders may prefer to keep it thereAs for steam, I haven't loaded gsc via the raw method in years, so I might be rusty on the subject, but since the lib uses vanilla imports I think the only things that needs to be changed is the following import:
#include scripts\sp\zom\lib\d_lib_gore;
to
#include maps\d_lib_gore;
(assuming you put your mods into the maps folder) -
would you mind making it into a script for steam or as like some sort of ragdoll patch?
-
FaZe Flick Put both the lib in the maps folder and this modified _zombiemode.gsc https://pastebin.com/7FYT6wq0
-
Is this highly compatible?
-
SidewaysGamer69 I have not tested any mod with it, so I can not tell. The only thing I can assure is that it's easy to add to any mod
-
What file is actor_killed_override in?