Deus Ex: Gore Mod - Help

A refuge for those migrating from the fallen DXEditing.com and a place for general discussion relating to Deus Ex editing (coding, mapping, etc).
DxVentura
Mole Person
Posts: 7
Joined: Thu Aug 09, 2012 9:30 am

Deus Ex: Gore Mod - Help

Post by DxVentura »

Hi,
I've registered in this forum today, and this will be my first topic ever, so don't be afraid to tell me if I've done anything wrong.
I'm making a Gore Mod for Deus Ex which enhances the quantity and the quality of the gore in Deus Ex, making it realistic. In other words the blood textures are now more realistic then the ones in the original game, injured people can now paint the walls with their blood, etc, etc.
In case you would like to check it out: http://www.moddb.com/mods/deus-ex-gore-mod
The BETA version of it has already been released, so I'm now working on the second version (GoreMod-v2) which will be even more realistic than the first version.
I'm trying to create so when the player injures someone near him/her, the blood will be splattered to his/her screen. I already know EXACTLY how to do it, but I'm having trouble DOING it, if you know what I mean. So this is what I need help with: I'm trying to create a custom sphere (Class SphereEffect from DeusEx), so when the player is in its Radius, he/she will have the DrunkFX texture in their screen, like when you get hit by a poison dart. I'm having a lot of trouble doing that, I've tried DOUZENS and DOUZENS of times, in different ways, but it always gives me error when I compile the DeusEx.u.
The code which makes the player have the DrunkFX texture when he's hit by a dart or when he's drunk is in DeusExPlayer class. I would give you the exact line o where the code starts but mine is a bit different from yours, it has tons of custom stuff for the GoreMod in the DeusExPlayer, so just Search for "DrunkFX" and you'll find something like this:

// ----------------------------------------------------------------------
// DrugEffects()
// ----------------------------------------------------------------------

simulated function DrugEffects(float deltaTime)
{
local float mult, fov;
local Rotator rot;
local DeusExRootWindow root;

root = DeusExRootWindow(rootWindow);

// random wandering and swaying when drugged
if (drugEffectTimer > 0)
{
if ((root != None) && (root.hud != None))
{
if (root.hud.background == None)
{
root.hud.SetBackground(Texture'DrunkFX');
root.hud.SetBackgroundSmoothing(True);
root.hud.SetBackgroundStretching(True);
root.hud.SetBackgroundStyle(DSTY_Modulated);
}
}

mult = FClamp(drugEffectTimer / 10.0, 0.0, 3.0);
rot.Pitch = 1024.0 * Cos(Level.TimeSeconds * mult) * deltaTime * mult;
rot.Yaw = 1024.0 * Sin(Level.TimeSeconds * mult) * deltaTime * mult;
rot.Roll = 0;

rot.Pitch = FClamp(rot.Pitch, -4096, 4096);
rot.Yaw = FClamp(rot.Yaw, -4096, 4096);

ViewRotation += rot;

if ( Level.NetMode == NM_Standalone )
{
fov = Default.DesiredFOV - drugEffectTimer + Rand(2);
fov = FClamp(fov, 30, Default.DesiredFOV);
DesiredFOV = fov;
}
else
DesiredFOV = Default.DesiredFOV;

drugEffectTimer -= deltaTime;
if (drugEffectTimer < 0)
drugEffectTimer = 0;
}
else
{
if ((root != None) && (root.hud != None))
{
if (root.hud.background != None)
{
root.hud.SetBackground(None);
root.hud.SetBackgroundStyle(DSTY_Normal);
DesiredFOV = Default.DesiredFOV;
}
}
}
}

As I said, I can't make so when the player is in its radius, he/she will have the DrunkFX in their HUD.
My plan is, then, to replace the DrunkFX texture in the sphere with a custom blood splatter one that I've made, and then make the sphere invisible. Then everytime you blow someone up it will spawn the sphere and you'll have blood on your screen.

I would be very thankful to anyone who helps me doing this, I would even give you credits for my mod.

Thank you very much :)
Captain_Destro
UNATCO
Posts: 100
Joined: Wed Sep 28, 2011 10:48 pm

Re: Deus Ex: Gore Mod - Help

Post by Captain_Destro »

I can't wait until version 2 comes out. I'd like to see how this works with my Modern Weapons mod.

Is it possible to add blood decals to where you shoot an enemy? Even golden-eye 64 had this so there has to be a way for unreal to handle it. I honestly have no idea how to code that though.

I did want to welcome you though.

Also to port it over to shifter you may have to get a hold of the Shifter Deus Ex.u and import all of your code and such into it. I Wonder if this can be done through ucc make with no issues.
DDL
Traditional Evil Scientist
Traditional Evil Scientist
Posts: 3791
Joined: Mon Oct 17, 2005 10:03 am

Re: Deus Ex: Gore Mod - Help

Post by DDL »

I've tried incredibly hard to get "blooddecals on NPCs" to work, even 'roughly', by spawning a duplicate mesh over the top of the NPCs that mimics their movement indentically and that does nothing else but retexture itself with bloodsplats when needed, but the problem is that you really want a modulated texture for that (translucent looks both too faint and too pink), and for reasons I cannot fathom, setting it to STY_Modulated simply doesn't work (the textures appear to display only on the INSIDE faces of the mesh polys).

The alternative would be to either make unique pre-splatted textures for each NPC, or do it via scriptedtextures, both of which would be a fucking nightmare.

DxVentura: as for drawing blood like that, I'd be more tempted to actually draw it on the canvas rather than on a sphere around the player. I'm pretty sure this can be done, I just can't remember if it's easy/possible to draw multiple layers on the canvas. I'll look into it.
DxVentura
Mole Person
Posts: 7
Joined: Thu Aug 09, 2012 9:30 am

Re: Deus Ex: Gore Mod - Help

Post by DxVentura »

Captain_Destro wrote:I can't wait until version 2 comes out. I'd like to see how this works with my Modern Weapons mod.

Is it possible to add blood decals to where you shoot an enemy? Even golden-eye 64 had this so there has to be a way for unreal to handle it. I honestly have no idea how to code that though.

I did want to welcome you though.

Also to port it over to shifter you may have to get a hold of the Shifter Deus Ex.u and import all of your code and such into it. I Wonder if this can be done through ucc make with no issues.
Funny thing is I did try that, but as DDL said, it didn't work. :( This might sound a little crazy but I think I might use a particlegenerator to serve as a blood decal. The particlegenerator will hopefully stick to the pawn (I'll use the code in the 'Rocket' class, then I'll just edit the particlegen properties and set the ejectspeed to 0 so it doesn't move like a normal particlegen, it will act as a static sprite, and it will hopefully stick to the pawn).

This might be a very wild idea, and I'm not sure it will even work.
DDL
Traditional Evil Scientist
Traditional Evil Scientist
Posts: 3791
Joined: Mon Oct 17, 2005 10:03 am

Re: Deus Ex: Gore Mod - Help

Post by DDL »

No need to use a particlegenerator, if all you need is a sprite. Make your own class: particlegenerators have a ton of surplus code you don't need and they may even slow the game down, even if they're not doing anything.

It'll look silly though, because unreal uses a cylinder-based collision system. You'd just end up with bloodsplats stuck to a magical forcefield column around each NPC. Getting it to stick to the pawn convincingly would probably involve working out where in game-space all of an NPCs bodyparts are at any given frame of animation, and synching the attachment to that. Which would be a fucking nightmare (to say the least). :(
DxVentura
Mole Person
Posts: 7
Joined: Thu Aug 09, 2012 9:30 am

Re: Deus Ex: Gore Mod - Help

Post by DxVentura »

DDL wrote:No need to use a particlegenerator, if all you need is a sprite. Make your own class: particlegenerators have a ton of surplus code you don't need and they may even slow the game down, even if they're not doing anything.

It'll look silly though, because unreal uses a cylinder-based collision system. You'd just end up with bloodsplats stuck to a magical forcefield column around each NPC. Getting it to stick to the pawn convincingly would probably involve working out where in game-space all of an NPCs bodyparts are at any given frame of animation, and synching the attachment to that. Which would be a fucking nightmare (to say the least). :(
Yea, that's exactly what I thought. The blood decal won't be in the mesh itself but it will be in its Collision Radius and it'll look weird. And I guess it would give me a lot of trouble too. Oh well I guess there's nothing left to do then. Perfect blood decals in Unreal engine 1 are basically impossible.
AlvinD
HDTP Member
HDTP Member
Posts: 181
Joined: Thu Mar 01, 2007 10:13 pm
Location: Northern Ireland

Re: Deus Ex: Gore Mod - Help

Post by AlvinD »

Impossible? No! Extremely difficult! Yes! :mrgreen:
DxVentura
Mole Person
Posts: 7
Joined: Thu Aug 09, 2012 9:30 am

Re: Deus Ex: Gore Mod - Help

Post by DxVentura »

Well, a friend of mine which is quite fond of making spheres for Deus Ex, gave me a piece of one of his sphere codes, on which he makes a player have a certain FOV on his screen when he is caught INSIDE the sphere's radius.

The code for it is:

ForEach RadiusActors(class'DeusExPlayer',DXP,128,Self.Location)
if (DXP != None)
{

DXP.FovAngle=170;
}
}
}

He says he has no experience on HUDs, therefore he can't make a player have a certain texture on his screen when he's caught in the sphere's radius.

I've tried too and still nothing. The pieces are there, I just got to put them together. Can anyone help me out?
User avatar
SilverSpook
MJ12
Posts: 319
Joined: Wed Feb 15, 2012 8:34 am

Re: Deus Ex: Gore Mod - Help

Post by SilverSpook »

I've got stuff popping up in the HUD for a while, then going away, in my mod.

Stuff like this:

Image

I might be able to help you with something like that if that's in the ballpark of what you're looking for.
Image
DxVentura
Mole Person
Posts: 7
Joined: Thu Aug 09, 2012 9:30 am

Re: Deus Ex: Gore Mod - Help

Post by DxVentura »

SilverSpook wrote:I've got stuff popping up in the HUD for a while, then going away, in my mod.

Stuff like this:

Image

I might be able to help you with something like that if that's in the ballpark of what you're looking for.
Yes, I guess that's exactly what I'm looking for. :)
Alhough my idea is for the player to have a texture in his screen when he is caught in the radius of the sphere :D. Do you think that's hard to make? I've been trying for ages, but no luck.
DxVentura
Mole Person
Posts: 7
Joined: Thu Aug 09, 2012 9:30 am

Re: Deus Ex: Gore Mod - Help

Post by DxVentura »

I've edited the DeusExPlayer class and made so when you get drunk, the DrunkFX gets replaced by a blood splatter texture I've made, just to know what it's like to have blood on your screen, in Deus Ex. My idea is for the player to have that texture on his screen only when he is caught inside the sphere's radius.

http://www.moddb.com/mods/deus-ex-gore- ... d-sshot-25
User avatar
SilverSpook
MJ12
Posts: 319
Joined: Wed Feb 15, 2012 8:34 am

Re: Deus Ex: Gore Mod - Help

Post by SilverSpook »

Ok, so you just need to do a check in your "PlayerTick" events in each of your alive states for whether or not the player is inside one of your spheres. Then you call the hud-modifying code from the DrugEffects function:

Code: Select all

				root.hud.SetBackground(Texture'DrunkFX');
				root.hud.SetBackgroundSmoothing(True);
				root.hud.SetBackgroundStretching(True);
				root.hud.SetBackgroundStyle(DSTY_Modulated);
if the sphere-check is true.
Image
User avatar
SilverSpook
MJ12
Posts: 319
Joined: Wed Feb 15, 2012 8:34 am

Re: Deus Ex: Gore Mod - Help

Post by SilverSpook »

Need voice actors, message plz! Trying to make another gameplay vid.
Image
User avatar
SilverSpook
MJ12
Posts: 319
Joined: Wed Feb 15, 2012 8:34 am

Re: Deus Ex: Gore Mod - Help

Post by SilverSpook »

Lol sorry, posted that in the wrong thread.
Image
User avatar
Chris
UNATCO
Posts: 135
Joined: Wed Jul 11, 2012 11:56 pm
Location: In the secret underground MJ12 base in Goat City, as a prisoner.

Re: Deus Ex: Gore Mod - Help

Post by Chris »

hello Ventura,

Awesome add-on. I really like the blood effect.

One problem, if the blood piles on each other. (the blood particles land on top of each other on same location). The blood becomes brighter.

Make it darker for a better effect. :twisted:
Platypus
Post Reply