Dismemberment System

Grab your favourite IDE and tinker with the innards of game engines

Dismemberment System

Postby TechieUK on Sat Jan 25, 2014 6:22 pm

Surprisingly, this is not a request, but a showcase of sorts.
I've been working on getting a sort of dismemberment system into a mod.
It's far from done, but I thought I'd show off what I've done so far and post updates as I make progress.
I started out by going into Silo 2 and loading in a base model.
Image

And then after that I separated limbs and the head into separate models.
Image
Image
Image

I also created a destroyed version of each model...
Image
Image

So if you import the base and then various destroyed/normal versions...
Image
G(ib)-Man.

After that, I got it into Source with bodygroups to change all the parts.
I didn't rig the fingers and I didn't mess about with the rigging 3ds max gave me, so parts may stretch out a bit in-game.
Image
Image
Image
Image
Image
Image
So there we go, that's working.

After that, I put enemy.mdl into a Source 2013 SP mod, and opened up npc_combines.cpp.
I found Event_Killed, and added in some code to change the head bodygroup on death. I also made his default model enemy.mdl instead of combine_soldier.mdl, but he still uses prisonguard and super_soldier if set to.

Alive:
Image

Dead:
Image

So the npc loses the head on death.
Image
You can sort of see the lack of head when he dies.

After this, I'm going to work on getting the bodygroup removed to change based on where the killing bullet hit, or maybe how much damage different hitboxes take. I'm also going to work on getting it to spawn gibs.

So there we go. A basic system to allow decapitation. Because of the way it works right now you can make his head come off by shooting him in the foot, but I've only been working for about an hour or so.

Thoughts?
Last edited by TechieUK on Sun Jan 26, 2014 4:02 pm, edited 1 time in total.
Also know as WILLAM; TechieUK is my old name. If you see WILLAM on Steam or ModDB, it's me.
User avatar
TechieUK
Regular
Regular
 
Joined: Sat Apr 13, 2013 4:29 pm

Re: Dismemberment System

Postby LordDz on Sat Jan 25, 2014 8:25 pm

Needs more blood!
Blood for the blood god!
User avatar
LordDz
May Contain Skills
May Contain Skills
 
Joined: Mon Sep 01, 2008 12:28 pm
Location: Hammer Crash Logs

Re: Dismemberment System

Postby TechieUK on Sat Jan 25, 2014 9:33 pm

I'll get some new blood particles set up! :D
Also know as WILLAM; TechieUK is my old name. If you see WILLAM on Steam or ModDB, it's me.
User avatar
TechieUK
Regular
Regular
 
Joined: Sat Apr 13, 2013 4:29 pm

Re: Dismemberment System

Postby Garrador on Sat Jan 25, 2014 9:41 pm

Need gibs as well! Will follow this ;)
You click on Build or type
make (or some equivalent), and you are astonished, then mortified, as you realize that the whole world is being
recompiled and relinked!
- Scott Meyers
User avatar
Garrador
Veteran
Veteran
 
Joined: Fri May 12, 2006 10:39 pm
Location: Norway

Re: Dismemberment System

Postby TechieUK on Sat Jan 25, 2014 9:51 pm

Definitely needs gibs, I'll probably use the non-destroyed arm models but cut some of the polys off of the end so it fits together with the destroyed ones. Also I think I might be able to make a "stream" blood particle, then try attach it to a bone on the gibs so they spurt blood everywhere as they fall to the floor.
Also know as WILLAM; TechieUK is my old name. If you see WILLAM on Steam or ModDB, it's me.
User avatar
TechieUK
Regular
Regular
 
Joined: Sat Apr 13, 2013 4:29 pm

Re: Dismemberment System

Postby TechieUK on Sat Jan 25, 2014 10:33 pm

Image
Made it take out every limb.
Last edited by TechieUK on Sun Jan 26, 2014 4:01 pm, edited 1 time in total.
Also know as WILLAM; TechieUK is my old name. If you see WILLAM on Steam or ModDB, it's me.
User avatar
TechieUK
Regular
Regular
 
Joined: Sat Apr 13, 2013 4:29 pm

Re: Dismemberment System

Postby vcool on Sat Jan 25, 2014 11:48 pm

Brutal. I like it. Is the gib propulsion done by code or is the rocket explosion affecting them?
Image

Neighborhood Forum Elitist
User avatar
vcool
Veteran
Veteran
 
Joined: Fri Jun 23, 2006 1:03 am
Location: USSR

Re: Dismemberment System

Postby TechieUK on Sun Jan 26, 2014 11:02 am

The torso is pushed by the rocket explosion, just like any other npc corpse.
Also know as WILLAM; TechieUK is my old name. If you see WILLAM on Steam or ModDB, it's me.
User avatar
TechieUK
Regular
Regular
 
Joined: Sat Apr 13, 2013 4:29 pm

Re: Dismemberment System

Postby Garrador on Sun Jan 26, 2014 12:23 pm

Are they "ragdolled" as well? Should definitely be ragdolls ;)
You click on Build or type
make (or some equivalent), and you are astonished, then mortified, as you realize that the whole world is being
recompiled and relinked!
- Scott Meyers
User avatar
Garrador
Veteran
Veteran
 
Joined: Fri May 12, 2006 10:39 pm
Location: Norway

Re: Dismemberment System

Postby [Steve] on Sun Jan 26, 2014 12:24 pm

If you have access to the dod code take a look at void CDODPlayer::TraceAttack
has everything you would need for shooting parts off players based on hitbox's/damage including spawning phys enabled gibs
User avatar
[Steve]
Interlopers Staff
Interlopers Staff
 
Joined: Fri Mar 06, 2009 11:25 pm

Re: Dismemberment System

Postby TechieUK on Sun Jan 26, 2014 1:05 pm

Gibs will be ragdolls. I haven't got the DoD code, was it in the Source 2007 leak? I'll try and find it.

Edit:
I made some new changes, parts will only be removed if the npc is killed by an explosion, and the bodygroups will change randomly so there is a random chance of blowing each part off.
Also know as WILLAM; TechieUK is my old name. If you see WILLAM on Steam or ModDB, it's me.
User avatar
TechieUK
Regular
Regular
 
Joined: Sat Apr 13, 2013 4:29 pm

Re: Dismemberment System

Postby SM Sith Lord on Sun Jan 26, 2014 3:42 pm

Epic dude, nice work.
SM Sith Lord
Been Here A While
Been Here A While
 
Joined: Sat Nov 25, 2006 4:25 pm
Location: Los Angles, CA

Re: Dismemberment System

Postby TechieUK on Sun Jan 26, 2014 4:14 pm

Randomisation in-game:

Missing an arm:
Image

Missing a leg:
Image

Missing both arms and a leg:
Image

Missing the head and a leg:
Image

Gibs will be added in a bit later.
Also know as WILLAM; TechieUK is my old name. If you see WILLAM on Steam or ModDB, it's me.
User avatar
TechieUK
Regular
Regular
 
Joined: Sat Apr 13, 2013 4:29 pm

Re: Dismemberment System

Postby Garrador on Sun Jan 26, 2014 7:03 pm

Sweet! Looking forward to updates ;)
You click on Build or type
make (or some equivalent), and you are astonished, then mortified, as you realize that the whole world is being
recompiled and relinked!
- Scott Meyers
User avatar
Garrador
Veteran
Veteran
 
Joined: Fri May 12, 2006 10:39 pm
Location: Norway

Re: Dismemberment System

Postby TechieUK on Sun Jan 26, 2014 7:14 pm

I'm going to experiment with taking damage to see if I can allow parts to be shot off while keeping the NPC alive. Obviously I'll have to kill the NPC if they lose both legs or their head, but for the gun there might be a way to let them drop it so you can take the arms out and have a (h)armless combine soldier. Alternatively I could use StartRagdollBoogie if the NPC loses both legs so they sort of twitch about feebly when they lose their legs so they seem to be alive still.

Hmm, thinking... :D
Also know as WILLAM; TechieUK is my old name. If you see WILLAM on Steam or ModDB, it's me.
User avatar
TechieUK
Regular
Regular
 
Joined: Sat Apr 13, 2013 4:29 pm
Next

Return to Programming

Who is online

Users browsing this forum: No registered users

cron