How armor works

Discuss Daggerfall Unity and Daggerfall Tools for Unity.
Post Reply
Ommamar
Posts: 541
Joined: Thu Jul 18, 2019 3:08 am

How armor works

Post by Ommamar »

In another thread viewtopic.php?f=22&t=2508&start=40 l3lessed who is working on a combat mod posted some code showing how armor works. Since that thread is getting multi paged I decided to make a thread to discuss armor specifically as a general topic. To paraphrase the relevant section the piece your body is hit when attacked is decided by a dice roll, with you feet being the hardest to hit and your chest the easiest. Then the armor value for that piece is used as a modifier for the attack to miss, in this way your armor has a way to reduce your damage taken.

I have been thinking about this and logically it is backwards as heavier plate mail will make you harder to hit, when it should be chain and leather armor giving you more mobility. I had the thought that maybe dodge would be modified by how much weight you where carrying but looking at the code also located in that thread it doesn't appear there is anything about weight just the skill modifier. There of course might be other functions else where that effect things but right now the design of armor seems off. I am not saying it isn't following classic as the person who reverse engineered things seem to have gotten very close to how things worked just that it strikes me as an odd way to do things.

There is also a little bit about magic shield speculation, what is not clear is that value added to the chest or every piece of armor? While playing I have noticed that at times I will take damage but my shield will still be up, where other times I won't but the shield spell will dissipate having absorbed the damage. What I think might be happening is that the attack roll targeted an armor piece not tied to the shield spell. All speculation based of game play but I think the spell shield might be tied to your chest piece.

User avatar
mikeprichard
Posts: 1037
Joined: Sun Feb 19, 2017 6:49 pm

Re: How armor works

Post by mikeprichard »

I agree it's a nonsense mechanic - heavier armor should reduce damage directly, not reduce your chance to be hit - but that's the way Daggerfall often is! As to the "Shield" spell, it's not armor-piece-specific - it just absorbs damage overall, up to a certain threshold. See https://en.uesp.net/wiki/Daggerfall:Alteration_Spells. (I can't find a supporting DFU forum reference for the spell right now, but I'm confident on this one - maybe someone else can point to a source.)

Zomgmeister
Posts: 21
Joined: Mon Aug 05, 2019 3:05 pm

Re: How armor works

Post by Zomgmeister »

In the Path of Exile, which is a great game, there are 3 defence stats, excluding resistance.

- Shield: basically additional health points, but with fast inherent regeneration if no one attacks you for 2 seconds.
- Evasion: chance to completely ignore an incoming attack.
- Armor: halves incoming damage.

And in Daggerfall armor grants "Evasion", which is yeah, suboptimal. Worked at the time, but can be changed.

So, we can do roughly this:

1. When an attack comes, there goes some sort of Agility/Dodging check. This check may be penalized by heavier armor, and that penalty may be halved by an Armor skill, which I've suggested in another thread. Also spells like Chameleon or something should probably grant a bonus to the check.
2. If an attack goes through dodge, then it can be stopped by some sort of magical shield. We don't have that spell effect at the moment, but we probably should. Won't go into specifics now, unnecessary at the moment.
3. If an attack comes through dodge and magical shield, if any, it should check a location where it actually goes to. By default the highest chance is for the body, then head and hands, then arms and legs, then feet. Certain monsters may have different distribution patterns, such as Rats attacking feet mostly, and Acrobats kicking everyone to their nether regions, protected by Greaves.
4. Armor class of an armor piece plainly removes a part of a damage. Everything that remains go straight to health.

Of course, this requires complete rebalance of values, but if the engine will allow to do this sort of mechanics, then this would be great.

Ommamar
Posts: 541
Joined: Thu Jul 18, 2019 3:08 am

Re: How armor works

Post by Ommamar »

Path of Exile was ok but my interest waned after a few months.

Agree with some of it, some of the system you describe is already in there. There is already modifiers for both agility and dodging you can see them referenced in the code posted in that thread. What is not in there I agree with is the weight penalty, I use weight as it would be even harder to evade something with a lot of weight being held whether it be armor or just stuff your carrying. Just a general modifier on how much weight you are carrying would simulate this. One thing I like about illusion spells is they cause the enemy to lose track of you to take advantage you need to move around so you can naturally use them as damage reduction. They require the player to interact though which should remain the same.

We have the ability to cast a shield that absorbs a certain amount of damage on a successful hit, I am not sure what you mean by stopping the attack.

There is a system in place that does this randomly the order is a little different but same concept. There have been mention of hit box used giving both enemies and players the chance to decide tactically where they would choose to target.

I agree that the armor pieces should be more about removing damage done as opposed to deciding whether you where hit at all. I think it can and will be modded in the game which is where it belongs no need to tweak the base game to fit a preference of how things work.

User avatar
mikeprichard
Posts: 1037
Joined: Sun Feb 19, 2017 6:49 pm

Re: How armor works

Post by mikeprichard »

Right, I wasn't suggesting any changes to how armor fundamentally works will be added to base DFU - Interkarma wouldn't be interested in doing that regardless. This is modding territory.

Post Reply