Custom PPM corpse?

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Ehrnam45

New Member
Sep 28, 2001
4
0
0
Visit site
I've been poking around for info on making a custom corpse/gibs for a PPM and can't seem to gind anything. I decided tp post here since this is a script-based forum and the issue is largely scipt-based. I've got the whole import model thing down, but I'm new to chopping up UScript. I've got experience in c++, JAVA, javascript, and a tiny bit of pascal, so feel free to get technical.

The general idea as I understand it is that you extend MasterChunkReplacement and show it where your custom chunks are. Would something like this require a MOD, or can it just be attached to the PPM/thrown in the .u? It seems like corpse management is a fairly internal process, so I'm willing to bet that there's a lot to the actual implementation.

My biggest reason for this is that non-flesh models just shouldn't make big red chunks of bleeding meat when you "redeem" their sorry butts.

If anyone knows where I can find something about this, please let me know!
 

Captain Kewl

I know kewl.
Feb 13, 2001
794
0
0
IN YOUR HOUSE
Visit site
You'll probably want to subclass and modify one of the UT/CreatureChunks classes. Then you can either make a new Carcass class that uses this as the MasterReplacement defaultproperty and then set the CarcassType in your PlayerPawn subclass, or override the SpawnCarcass/SpawnGibbedCarcass functions in the PlayerPawn subclass to change the property when the carcass is spawned.

To answer your question, no, you don't need a Mod (though technically, PPMs *are* mods themselves). You're just using a custom pawn class and affecting how it behaves.
 

Ehrnam45

New Member
Sep 28, 2001
4
0
0
Visit site
well, as technical as your reply is, it still leaves out one critical thing: where can I find an example of this? That I know of, there aren't any popular PPMs that support/implement this, so I can't just yoink a script for it...

Do you know of any mods that use custom corpses so I can harrass -er, I mean ask them about it?

If not, could you be a little more specific about what functions go into what scripts, i.e. does all of this go into the MyPlayer.uc, or do I have to write extra .uc's to overwrite the innate functions? Seems like it could go into the MyPlayer, and the extra models would go into another .u, resulting in MyPlayer.u and MyPlayerCarcass.u.

Getting a vision... OK. Any function for a PPM can be an override for the native function (just like java) and when the PPM itself calls its spawnGibbedCarcass function, it uses the one in the script first, or if not present, uses inheritance to use the superClass default. In most cases to save production time, PPMs extend TournamentMale (female) and use their function calls -which results in Bender, Lego, Wraithguard etc. spawning red meaty human chunks, red blood, and making squish-plop noises in a very non-sequiteur (sp?) way.

In theory, I can have a gibbedCarcass that spawns whatever I want, e.g. rockets, redeemer blast, (items?) etc. -which is how the Relic of Vengance (sp?) works to a lesser extent- and the engine doesn't care what it is, it just makes the spawned stuff behave appropriately in the World, right?

:trans:
 

Captain Kewl

I know kewl.
Feb 13, 2001
794
0
0
IN YOUR HOUSE
Visit site
Pretty much. You can also affect objects as they are spawned and change their properties on the fly. I should probably mention that it's not particularly pertinent -- it's entirely possible (and probably cleaner) to do this just by changing defaultproperties to point to entirely new classes -- I just thought I'd throw it in there.

Use new .uc's to override superclass functions, and then refer to them where necessary. For your carcass you could have MyCarcass.uc expanding one of the UTHumanClasses or subclasses, depending on whatever code you want to inherit. MyChunks would expand UTCreatureChunks or its subclasses.

You can actually compile this all into the same package and refer to them each as MyPlayer.MyCarcass, MyPlayer.MyChunks, etc.

A quick example (without having actually tried it, so it may be incorrect in places, but it's the general gist of what I'm saying), where the package name is MyPlayer:

Code:
// MyPlayer.MyPlayer -- custom player model class
class MyPlayer extends TournamentMale;
.
.
.
// An alternative to setting the CarcassType in the
// defaultproperties (below) is to just affect the pointer to 
// the CarcassType when it is spawned to use the custom
//  MasterChunk -- this makes
// the MyCarcass class redundant.  As follows:

function Carcass SpawnCarcass()
{
	local carcass carc;

	carc = Spawn(CarcassType);
	if ( carc == None )
		return None;
	carc.Initfor(self);
	if (Player != None)
	{
		carc.bPlayerCarcass = true;
		carc.MasterReplacement = Class'MyPlayer.MyMasterChunk';
	}
	if ( !Level.Game.bGameEnded && (Carcass(ViewTarget) == None) )
		ViewTarget = carc; //for Player 3rd person views
	return carc;
}


function SpawnGibbedCarcass()
{
	local carcass carc;

	carc = Spawn(CarcassType);
	carc.MasterReplacement = Class'MyPlayer.MyMasterChunk';
	if ( carc != None )
	{
		carc.Initfor(self);
		carc.ChunkUp(-1 * Health);
	}
}
.
.
.
// (OTOH if you want to do more than just affect the
// spawn a different MasterChunk, just go ahead and spawn
// the custom Carcass cass.)
.
.
.
defaultproperties{
   CarcassType=MyPlayer.MyCarcass
}
// EOF

// MyPlayer.MyCarcass -- custom carcass for MyPlayer
class MyCarcass extends UTHumanCarcass;
.
.
.
// you might want to override functions that produce any
// effects (like blood), if you don't want any.
.
.
.
defaultproperties{
   MasterReplacement=Class'MyPlayer.MyMasterChunk'
}
// EOF

// MyPlayer.MyMasterChunk -- MasterReplacement for MyCarcass
class MyMasterChunk extends UTMasterCreatureChunk;
.
.
.
// same as above -- pay attention to any functions that
// spawn chunks
.
.
.
// EOF

Hope that helps.
 
Last edited:

Ehrnam45

New Member
Sep 28, 2001
4
0
0
Visit site
That;s pretty much how it looks like it will come together. I was browsing the UT tree in UED last night and checked out all the related code (tournamentPlayer, corpse, chunk, UT_BloodHit, etc.) and it refers to things like spawn(class='FemaleCorpse') in the Gibbed() function and I can't find the related class definitions/models for stuff like the masterChunkReplacements. I looked through Actor, Pawn, Player, TournamentPlayer, TournamentFemale/Male and the 1/2 subparts to no avail. UED isn't very friendly for browsing for strings and won't do multiple classes at one time. Is there a .u browser somewhere that I can use to rip apart botpack.u and gaff the scripts/models that way?

I did however find the locations of the blood spawning routines/models/textures. Only bad part is that I can't figure out how the whole Carcass goes together, i.e. how does the carcass know what pieces to spew out?
 

Ehrnam45

New Member
Sep 28, 2001
4
0
0
Visit site
Well, I got my hands on a copy of WOTgreal and it's the BOMB! It helped me to track down all the .uc's for the corpse parts. Now I just have to figure out how to extract all the models and see how they all fit together...

The only remaining issue is how to scope it: i.e. do I realy need to make a new sibling of humanCarcass (nonHumancarcass?) to speed development of other corpses, or should I just chuck it all into the MyModel .uc? I'm thinking that I might as well make another sibling so that I can just reference it later and save some copying/pasting.