Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO1 Modding Releases & Resources
  3. [ZM] [LIB] Custom Ragdoll Death Animations (gore mod)

[ZM] [LIB] Custom Ragdoll Death Animations (gore mod)

Scheduled Pinned Locked Moved BO1 Modding Releases & Resources
16 Posts 7 Posters 1.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • bhfffundefined Offline
    bhfffundefined Offline
    bhfff
    wrote on last edited by bhfff
    #1

    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 named lib and drop the file called d_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 file ragdoll_simulator.gsc into it.

    This is how it looks like

    3e48705a-639d-4c6a-978a-4e53b72fa694-immagine.png


    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 function actor_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);
    	}
    

    fcf1fd18-f417-439a-874d-f49b2ca8fa3b-immagine.png

    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 called blood() which should be called like this:

    self thread blood(sHitLoc);

    60d6e5fc-a49e-4e88-aa6a-756fe9c0cf5d-immagine.png

    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 the ragdoll 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.

    1 Reply Last reply
    3
    • bhfffundefined bhfff referenced this topic on
    • XEViLX_502undefined Offline
      XEViLX_502undefined Offline
      XEViLX_502
      wrote on last edited by
      #2

      can u create mod 150 health on zombie online

      ? please

      1 Reply Last reply
      0
      • GhostRider0125undefined Offline
        GhostRider0125undefined Offline
        GhostRider0125
        wrote on last edited by GhostRider0125
        #3

        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?

        bhfffundefined 1 Reply Last reply
        0
        • bhfffundefined Offline
          bhfffundefined Offline
          bhfff
          replied to GhostRider0125 on last edited by
          #4

          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

          1 Reply Last reply
          1
          • GhostRider0125undefined Offline
            GhostRider0125undefined Offline
            GhostRider0125
            wrote on last edited by
            #5

            ah i thought so appreciate it😄

            1 Reply Last reply
            0
            • GhostRider0125undefined Offline
              GhostRider0125undefined Offline
              GhostRider0125
              wrote on last edited by GhostRider0125
              #6

              doesnt work : (

              bhfffundefined 1 Reply Last reply
              0
              • bhfffundefined Offline
                bhfffundefined Offline
                bhfff
                replied to GhostRider0125 on last edited by
                #7

                GhostRider0125 Only works in private matches, go into one and type in the console xpartygo to bypass the minimum player requirement

                dontknowletsplundefined 1 Reply Last reply
                1
                • dontknowletsplundefined Offline
                  dontknowletsplundefined Offline
                  dontknowletspl
                  replied to bhfff on last edited by dontknowletspl
                  #8

                  bhfff You get zom folder scripts loaded for solo if you press first online and then go back and press solo.
                  44c51ef9-3136-4aa5-bc02-f33acb330665-kuva.png

                  bhfffundefined 1 Reply Last reply
                  2
                  • bhfffundefined Offline
                    bhfffundefined Offline
                    bhfff
                    replied to dontknowletspl on last edited by
                    #9

                    dontknowletspl crazy, I never knew about this trick, thanks !

                    1 Reply Last reply
                    0
                    • FaZe Flickundefined Offline
                      FaZe Flickundefined Offline
                      FaZe Flick
                      wrote on last edited by
                      #10

                      very nice... is this possible to have on steam as well and is the hit box collision still there after killing them

                      bhfffundefined 1 Reply Last reply
                      1
                      • bhfffundefined Offline
                        bhfffundefined Offline
                        bhfff
                        replied to FaZe Flick on last edited by bhfff
                        #11

                        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 there

                        As 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)

                        1 Reply Last reply
                        0
                        • FaZe Flickundefined Offline
                          FaZe Flickundefined Offline
                          FaZe Flick
                          wrote on last edited by
                          #12

                          would you mind making it into a script for steam or as like some sort of ragdoll patch?

                          bhfffundefined 1 Reply Last reply
                          0
                          • bhfffundefined Offline
                            bhfffundefined Offline
                            bhfff
                            replied to FaZe Flick on last edited by
                            #13

                            FaZe Flick Put both the lib in the maps folder and this modified _zombiemode.gsc https://pastebin.com/7FYT6wq0

                            1 Reply Last reply
                            0
                            • SidewaysGamer69undefined Offline
                              SidewaysGamer69undefined Offline
                              SidewaysGamer69
                              wrote on last edited by
                              #14

                              Is this highly compatible?

                              bhfffundefined 1 Reply Last reply
                              0
                              • bhfffundefined Offline
                                bhfffundefined Offline
                                bhfff
                                replied to SidewaysGamer69 on last edited by
                                #15

                                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 🙂

                                1 Reply Last reply
                                0
                                • Amantisundefined Offline
                                  Amantisundefined Offline
                                  Amantis
                                  wrote on last edited by
                                  #16

                                  What file is actor_killed_override in?

                                  1 Reply Last reply
                                  0

                                  • Login

                                  • Don't have an account? Register

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Recent
                                  • Tags
                                  • Popular
                                  • Users
                                  • Groups
                                  • Donate