Should NPC melee hits be reworked?

Feedback on past, current, and future development.
Post Reply
User avatar
Jyby
Posts: 408
Joined: 10 Dec 2013, 04:16

Should NPC melee hits be reworked?

Post by Jyby »

When you come across a hostile NPC and get into a confrontation damage is most likely coming your way. When confronting a melee only character the current state of the engine behaves a bit oddly, perhaps to replicate the original game... Let me explain.

When an NPC is close enough to hit you it starts the attack call in the engine. The success of the attack call is based on various stats and factors, including the range of the attack. If the hit is successful, depending on your stats, it will damage you. But this is also sometimes the case if the NPC swings and you run away, which leads to you getting hit in the back when you hear the swing but are clearly far enough away to avoid the strike.

I've tried getting close to an NPC's staff, enough for him to start the swing, and when his swing is in motion I move enough away from him to "not" get hit. For some reason I still get hit.. Not sure if this is a bug or how the original game handled this combat type.

I propose that we rework the combat system just a little so that "physical" hits appear more real, that is to say when an NPC swings and you are clearly out of the way you shouldn't get hit.. And it's not, lets say, an oblivion or skyrim style combat system. Just making it so that weapons actually take into your mesh hitbox and not your bounding box/if I'm close enough to you..

What do ya'll think?
Chris
Posts: 1626
Joined: 04 Sep 2011, 08:33

Re: Should NPC melee hits be reworked?

Post by Chris »

Jyby wrote:But this is also sometimes the case if the NPC swings and you run away, which leads to you getting hit in the back when you hear the swing but are clearly far enough away to avoid the strike.

I've tried getting close to an NPC's staff, enough for him to start the swing, and when his swing is in motion I move enough away from him to "not" get hit. For some reason I still get hit.. Not sure if this is a bug or how the original game handled this combat type.
OpenMW calculates the hit success when the damage is about to be applied. It doesn't determine attack success early and then apply it later regardless.

What you're experiencing may be that the weapon's reach is longer than the weapon physically appears to be, so you can get hit even though it looks like you shouldn't. IIRC, vanilla MW has some pretty wonky weapon reach values defined in the esm. Similarly, the player/NPC collision shape may extend out farther from your view than you expect, causing hits to happen even though it doesn't look like it should.

I don't remember if the hit detection's collision shape shows up in the collision grid render, but you can try using 'tcg' in the console and go into third person to see where it's hitting.
User avatar
Jyby
Posts: 408
Joined: 10 Dec 2013, 04:16

Re: Should NPC melee hits be reworked?

Post by Jyby »

Chris wrote:
Jyby wrote:But this is also sometimes the case if the NPC swings and you run away, which leads to you getting hit in the back when you hear the swing but are clearly far enough away to avoid the strike.

I've tried getting close to an NPC's staff, enough for him to start the swing, and when his swing is in motion I move enough away from him to "not" get hit. For some reason I still get hit.. Not sure if this is a bug or how the original game handled this combat type.
OpenMW calculates the hit success when the damage is about to be applied. It doesn't determine attack success early and then apply it later regardless.

What you're experiencing may be that the weapon's reach is longer than the weapon physically appears to be, so you can get hit even though it looks like you shouldn't. IIRC, vanilla MW has some pretty wonky weapon reach values defined in the esm. Similarly, the player/NPC collision shape may extend out farther from your view than you expect, causing hits to happen even though it doesn't look like it should.

I don't remember if the hit detection's collision shape shows up in the collision grid render, but you can try using 'tcg' in the console and go into third person to see where it's hitting.
Yeah exactly what I'm seeing. I think we could definitely fix this without a big change.
HiPhish
Posts: 323
Joined: 02 Jul 2012, 08:36

Re: Should NPC melee hits be reworked?

Post by HiPhish »

If it's defined that way in the ESM it should be "fixed" by a mod, not the engine.
Post Reply