Cracking Open Combat

Discuss modding questions and implementation details.
l3lessed
Posts: 34
Joined: Mon Aug 12, 2019 4:32 pm

Re: Cracking Open Combat

Post by l3lessed » Tue Aug 13, 2019 11:21 pm

One last thought for the day. Using both weapon weight and range stats, I may be able to extrapolate and assign a good fatigue value to each weapon. Makes since in my head, but will see once it is coded in.

Point being, the longer and heavier the weapon, the more energy it takes to get going and stop. Basic physics. I could use this logic to create something like a base cost of 5 stamina or something and then do this. TotalStaminaCost = 5 + range+weight,

Of course, that is just an example and would not work or scale well in the game, but you get the idea now, right?

According to the official wiki, armor rating in traditional dagger fall does not do damage mitigation at all. It merely adds to your agility rating to increase your chance of dodging or deflecting an attack. It was a rudimentary way to implement advanced combat mechanics through all school D&D chance systems.

If you have been around long enough, you quickly realize how all RPGs from this time period and before largely are just visual copies of D&D, as that is what developers had to pull from. D&D being diced based is all chance based, and is the reason daggerfall went this way. The original developers were highly into D&D and other table tops.

None of daggerfall has to be this way. It was a developer choice based on the game theories, design, and understanding of the time.

However, I am only two days in, so who knows what craziness I will find myself banging my head against in another week or two.

If I can just get range and speed differences in, that alone would make a huge difference for me. I'll worry about the more crazy stuff after.

l3lessed
Posts: 34
Joined: Mon Aug 12, 2019 4:32 pm

Re: Cracking Open Combat

Post by l3lessed » Tue Aug 13, 2019 11:26 pm

And yes, dodge would be a simple boolean state coupled with a invuln state, crouch, and a quick movement one direction. Once all parts of the dodge are triggered in the code and cleared, the state would click back to false again and start a cd.

Also, dodge being built into the game doesn't have to be game breaking. It could be high risk / high reward. Cost a lot of stamina at first and doesn't move you to far. However, if you dump points into certain skills, the cost could come down and distance increased. This way, every character can try dodging like any real human being, but only those trained can do it well every time and not worry about messing it up that much.

User avatar
Jay_H
Posts: 2489
Joined: Tue Aug 25, 2015 1:54 am

Re: Cracking Open Combat

Post by Jay_H » Tue Aug 13, 2019 11:37 pm

My idea for blocking was to give it graded time windows. It could reduce damage based on timing:

0.0 to 0.15 seconds within click: 100% blocked
0.151 to 0.35 seconds within click: 75% blocked
0.351 to 0.5 seconds within click: 50% blocked
0.51 to 0.65 seconds within click: 25% blocked

I dunno if that's useful but I thought it'd be a meaningful way of mixing interaction and reward. If you time it really badly, it could do extra damage (110-125%).
Come join the Unofficial Daggerfall Unity Discord.
Try the first Daggerfall Unity Quest Pack with many all-new quests.
Progress on fixing classic quests here.

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

Re: Cracking Open Combat

Post by Ommamar » Wed Aug 14, 2019 1:07 am

Jay_H wrote:
Tue Aug 13, 2019 11:37 pm
My idea for blocking was to give it graded time windows. It could reduce damage based on timing:

0.0 to 0.15 seconds within click: 100% blocked
0.151 to 0.35 seconds within click: 75% blocked
0.351 to 0.5 seconds within click: 50% blocked
0.51 to 0.65 seconds within click: 25% blocked

I dunno if that's useful but I thought it'd be a meaningful way of mixing interaction and reward. If you time it really badly, it could do extra damage (110-125%).
There are some attacks that are harder to read then others though for instance a rat and a bat don't have very good attack animations, so using a shield to block them with this method might be very difficult making a low level mob harder to block then other mobs with more pronounced attacks. How would you work it with a multiple attack animation? Would it interrupt a person attack sequence if a block was successful? What about an archer? Sometimes I see them in bow attack animation but it often varies on when they actually fire so that would be another case where it might be hard to react quick enough using a system like that.

"According to the official wiki, armor rating in traditional dagger fall does not do damage mitigation at all. It merely adds to your agility rating to increase your chance of dodging or deflecting an attack. It was a rudimentary way to implement advanced combat mechanics through all school D&D chance systems."-l3lessed

The issue we have had with the UESP and wiki's for Daggerfall is that a good majority of the data has been incomplete, misleading or in some cases just straight up false. It is being worked on but the best way we can validate how things have been extrapolate into DFU is by finding the applicable code. I am not saying that wiki is wrong and game testing I have heard about points to it being valid but I would still prefer to see the relevant code to ensure that is how things are working.
l3lessed wrote:
Tue Aug 13, 2019 11:26 pm
And yes, dodge would be a simple boolean state coupled with a invuln state, crouch, and a quick movement one direction. Once all parts of the dodge are triggered in the code and cleared, the state would click back to false again and start a cd.

Also, dodge being built into the game doesn't have to be game breaking. It could be high risk / high reward. Cost a lot of stamina at first and doesn't move you to far. However, if you dump points into certain skills, the cost could come down and distance increased. This way, every character can try dodging like any real human being, but only those trained can do it well every time and not worry about messing it up that much.
So would you base the stamina cost of your dodge skill? Would you use the baked in modifier of every ten levels skill you see a modifier applied? For instance going from 50 to 60 in the skill would give you an additional foot you could move in the chosen direction? Then you could increment in inches for each skill point until you raised the full distance. What do you think is the maximum distance a master dodge (that being 100 skill) could move?

User avatar
Jay_H
Posts: 2489
Joined: Tue Aug 25, 2015 1:54 am

Re: Cracking Open Combat

Post by Jay_H » Wed Aug 14, 2019 1:34 am

Ommamar wrote:
Wed Aug 14, 2019 1:07 am
There are some attacks that are harder to read then others though for instance a rat and a bat don't have very good attack animations, so using a shield to block them with this method might be very difficult making a low level mob harder to block then other mobs with more pronounced attacks. How would you work it with a multiple attack animation?
It's all in the skill of learning it, I say. It's like Dark Souls. Your skill in the game is memorizing each enemy's attack patterns, attack speed, and so on. (And it would make sense for a person to have an easier time defending a human's swipe than a bat's bite.)

As for multiple attacks, they could each count as a hit to be blocked. A good enough player will do so on each hit.
Come join the Unofficial Daggerfall Unity Discord.
Try the first Daggerfall Unity Quest Pack with many all-new quests.
Progress on fixing classic quests here.

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

Re: Cracking Open Combat

Post by Ommamar » Wed Aug 14, 2019 2:01 am

Jay_H wrote:
Wed Aug 14, 2019 1:34 am
Ommamar wrote:
Wed Aug 14, 2019 1:07 am
There are some attacks that are harder to read then others though for instance a rat and a bat don't have very good attack animations, so using a shield to block them with this method might be very difficult making a low level mob harder to block then other mobs with more pronounced attacks. How would you work it with a multiple attack animation?
It's all in the skill of learning it, I say. It's like Dark Souls. Your skill in the game is memorizing each enemy's attack patterns, attack speed, and so on. (And it would make sense for a person to have an easier time defending a human's swipe than a bat's bite.)

As for multiple attacks, they could each count as a hit to be blocked. A good enough player will do so on each hit.
I think it is the Nightblade enemy that has the 3 swing animation so would you interrupt the animation on a successful block?

User avatar
Jay_H
Posts: 2489
Joined: Tue Aug 25, 2015 1:54 am

Re: Cracking Open Combat

Post by Jay_H » Wed Aug 14, 2019 2:17 am

No need. Each attack animation can carry out fully; the damage would be blocked.

Of course this is just my imagination. |3lessed is going to have to do things within technical feasibility and possibility.
Come join the Unofficial Daggerfall Unity Discord.
Try the first Daggerfall Unity Quest Pack with many all-new quests.
Progress on fixing classic quests here.

l3lessed
Posts: 34
Joined: Mon Aug 12, 2019 4:32 pm

Re: Cracking Open Combat

Post by l3lessed » Wed Aug 14, 2019 2:59 am

I personally like attacks to recoil on hitting physical objects of any type. It feels natural to me.

I can't answer the question about the three attacks though. I need to see how it works in the files and code.

Also, interesting discovery. In EnemyAttack.cs, It may be that all enemies are set to only attack at the default attack range or less.

If this is what it seems to be, which is a universal default for how close enemies have to be to attempt an attack, it could allow for some more variety in enemy combat. Enemies could take into consideration their weapons range, if it can be pulled from the item template data, so they keep some distance between you when attacking.

Cool side note, enemies already consider your approach speed when deciding to attack you or not. Uses a coded senses engine to create and simulate artificial senses for enemies. Neat, huh? :o

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

Re: Cracking Open Combat

Post by Ommamar » Wed Aug 14, 2019 3:07 pm

I feel the same way about enemy responsiveness to my blocking an attack.

That is interesting and can cause some challenges, if you manage to get different ranges to work the next thing would be how the enemies would decide which weapon to use. They will sometime opt to use a bow if they have LOS which if broken makes them walk into melee range. So there is something going on within the code already to allow them to choose missile weapon vs melee. But if it came down to a dagger vs a Dai-Katana it could be challenging to get them to decide which would be better. Right now I would say the Dai-Katana but if you could make it so there is an optimal range to use a two handed weapon by giving negative modifiers to hit as the target got closer or a drop in damage that would be a good start.

There is a discussion about that on just how much running effects the stealth check versus using the sneak button. The modifier is decided in a function called "playerMotor.IsMovingLessThanHalfSpeed" so far I have not been able to find the code to see what the modifier is while sneaking.

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

Re: Cracking Open Combat

Post by mikeprichard » Wed Aug 14, 2019 4:28 pm

l3lessed - I first wanted to say how great it is to see you taking the initiative to get into these mechanics. Whatever you end up doing here, it will be pioneering work for similar efforts down the road. Cheers!

On a point Ommamar just raised re: Stealth mechanics, since it's likely something you'd eventually be interested in for your own purposes, and you also seem to know your way around the code, I'm hoping I can leverage your knowledge. I'm trying to update the UESP wiki pages for classic Daggerfall (see viewtopic.php?f=8&t=2514) to correct vague/inaccurate information. I understand from Interkarma that DFU replicates exactly classic's Stealth behavior, but the point I'm trying to 100% confirm here from the DFU code is the following (paraphrased from the other topic). Would you have any insight into this? I'd greatly appreciate any comments/direction you could share:

While trying to determine how Stealth mechanics (i.e. detection of player by enemies related to the player's Stealth skill) work in classic/DFU, I found this DFU code (https://github.com/Interkarma/daggerfal ... es.cs#L573). I have no idea how to correctly read this, but what I'm trying to clearly determine is whether the Stealth skill is completely "deactivated" when the player is running - i.e. whether it's only active when walking, sneaking, and/or crouching (all of which slow the player as noted by Interkarma, and which I'm guessing "playerMotor.IsMovingLessThanHalfSpeed" is referring to, though I'm not sure how that line actually translates to running vs. walking vs. sneaking vs. crouching in-game(?)). If Stealth is in fact not operative when the player is running, I'll need to tweak the UESP page again for classic/DFU.

Post Reply