Per-slot armor rating

Feedback on past, current, and future development.
Post Reply
User avatar
akortunov
Posts: 185
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation
Github profile: https://github.com/akortunov

Per-slot armor rating

Post by akortunov » 13 Jan 2018, 13:29

Inspired by Daggerfall and Wizardry 8: https://github.com/akortunov/openmw/tree/armorclass
Screenshot_20180113_155604.png
Vanilla Morrowind (OpenMW too) calculates the mean armor rating and uses it to reduce damage for any slot, which takes the damage.
With this feature OpenMW takes actual armor rating for slot, which takes the damage. For example, cuirass will not protect from arrow in the head. Shield magic effect supposed to increase armor rating for all bodyparts. If there is no armor in slot, the Unarmored skill is used.

Notes:
1. I have no GMSTs to localize strings
2. This feature is not aimed to be merged upstream (without discussion, at least).

Feel free to provide any feedback.

User avatar
AnyOldName3
Posts: 646
Joined: 26 Nov 2015, 03:25

Re: Per-slot armor rating

Post by AnyOldName3 » 13 Jan 2018, 13:55

This was something I wanted to have eventually in my somewhat far-fetched vision for a future VR version of OpenMW where it mattered where you hit someone. In my envisaged version it would also require knowing which parts of a mesh are actually armour and which are exposed skin so you could get a sneaky jab into a soft bit, but I don't think that's necessary until way after VR OpenMW is a thing.

In the short term, though, I'm not even sure that our hit detection system knows which part of an actor has been hit and that's obviously a prerequisite for this feature.
AnyOldName3, Master of Shadows

User avatar
akortunov
Posts: 185
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation
Github profile: https://github.com/akortunov

Re: Per-slot armor rating

Post by akortunov » 13 Jan 2018, 14:21

AnyOldName3 wrote:
13 Jan 2018, 13:55
I'm not even sure that our hit detection system knows which part of an actor has been hit.
It does not know. For now, we use collision box for hit detections. When NPC takes hit, we choose which slot to hit randomly (in Npc::onHit()).
I suppose mentioned games behave in the similar way.

From the other hand, we generate blood particles in the hit point somehow.

UPDATE: the Npc::onHit() has the hitPosition parameter. Can we determine which armor part to select, using this parameter?
As rough approximation instead of random generator:
1. Take the distance from hit position to some bodyparts position (e.g. chest, groin, feet, etc.)
2. Select minimum value
3. Select the related slot (e.g. if the nearest bodypart is Chest, select the cuirass slot)

Of course, this approach is not good for some mods with extravagant armor (e.g. boots covering Head bodypart).
Also AI is not supposed to take advantage from this feature yet.

Chris
Posts: 1333
Joined: 04 Sep 2011, 08:33

Re: Per-slot armor rating

Post by Chris » 13 Jan 2018, 15:51

akortunov wrote:
13 Jan 2018, 14:21
UPDATE: the Npc::onHit() has the hitPosition parameter. Can we determine which armor part to select, using this parameter?
Probably not. That's the position where the hit box intersects the NPC's capsule collision shape, and there's no easy way to map that to the limb. You'd need to give a basic collision shape to each of the body parts and test collisions against those to see what's actually hit (some kind of 'accurate hit detection" mode).

Kageseigi
Posts: 3
Joined: 06 Jun 2017, 15:32

Re: Per-slot armor rating

Post by Kageseigi » 18 Jan 2018, 06:47

Wow, locational damage is one of my big wishes for Morrowind. While it may not help the player yet, is there a way to favor the odds of hitting a specific body part based on the attacker's attributes (such as Luck or Intelligence... or maybe Agility) to simulate their ability to notice if and where the opponent is wearing no/light armor?

Or is there an ability to replace a character's hitbox with multiple invisible objects/hitboxes, then apply the damage taken from those objects to the character's associated location?

User avatar
Thunderforge
Posts: 236
Joined: 06 Jun 2017, 05:57
Github profile: https://github.com/Thunderforge

Re: Per-slot armor rating

Post by Thunderforge » 18 Jan 2018, 21:19

Is locational damage a thing in Oblivion or Skyrim? Just wondering if we can use those as inspiration for how that might work in a post-1.0 feature or if we’d be making it up on our own.

User avatar
Capostrophic
Posts: 273
Joined: 22 Feb 2016, 20:32

Re: Per-slot armor rating

Post by Capostrophic » 18 Jan 2018, 22:04

It isn't.
shitty lingua anglica grammar ftw

User avatar
AnyOldName3
Posts: 646
Joined: 26 Nov 2015, 03:25

Re: Per-slot armor rating

Post by AnyOldName3 » 18 Jan 2018, 22:58

The later Elder Scrolls games don't have locational damage, and indeed don't even have enough body parts for it to be added nicely as a mod. The Fallout games on the same engine do, though. It's a critical part of VATS and is in the original games, so Bethesda would not have been clever if they removed it.
AnyOldName3, Master of Shadows

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests