Friday, January 18, 2008

New Bloodtypes Added



For the carnage lovers among us.

And for the Max Payne 2 modders:

There are normally two steps to the process of setting different bloodtypes to bodies, but in Marathon I've added a third.

Step 1: The particle effect (the "misting" that occurs when someone's shot).
Assuming you know how to use ParticleFX, put together your different blood effects and link them up properly in particles.txt. Next, in the character's skin file, there will be a series of bones listed, each with a "Material", usually set to "character". Set this to something else (in my case, it's character_pfhor) and then make a material of the same name in your materials.txt file. Finally, go to your particles.txt again and find the heading [bullethit_generic]. Add your material to the list here and link it up to your particle effect. Also, a tip here: for some reason, the shotgun uses the bullethit_lowdetail particle effect, so you may want to link your particles up there, too.

Step 2: The decals (blood that's thrown on the floors and walls)
In Max Payne, a projectile called a blood_bullet is generated along the same trajectory as your bullets when someone is killed. The trick here is getting the game to generate different blood_bullets for different people. Go to your character's skin file, locate the bone scripts again, and under "type", you will have either "TARGET_CHARACTER", "TARGET_BODYARMOR", or "TARGET_HELMET". The intended purpose of the type is to produce different effects (such as a metallic richochet) depending on what the character's wearing, but these also have different blood_bullet definitions. Under each of the projectiles you use (such as BulletBerettaSingle_Player.txt), there are three definitions that match these types - [CharacterHit], [BodyArmorHit], and [HelmetHit], with the latter two commented out. Take out the comment slashes and point these to a new type of blood_bullet. Copy the existing blood_bullet, rename it to this new name, and you can pretty much figure out from there how to set up your new decals. Keep in mind you'll have to define them in decals.txt just like everything else.

Step 3: The ragdoll decals
I've added blood decals to the ragdolls, which make delightful splatters whenever a corpse hits an object at a decent rate of speed. The way you change the decals here is to first change the ragdolls used in your character's skin file, then copy the existing ragdolls, rename them to your new names, and on "CollisionDecal", either point it directly to your blood decal or to a new one which throws down your blood decals as part of its script.

And there you have it - 3 different kinds of blood :)

No comments: