Cracking Open Combat

Discuss modding questions and implementation details.
Post Reply
User avatar
mikeprichard
Posts: 1037
Joined: Sun Feb 19, 2017 6:49 pm

Re: Cracking Open Combat

Post by mikeprichard »

Thank you! I just made corresponding fairly extensive corrections/expansions to the UESP page at https://en.uesp.net/wiki/Daggerfall:Armor. This crosses one major item off my list. :)

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

Re: Cracking Open Combat

Post by mikeprichard »

By the way, found this explanation (viewtopic.php?f=4&t=1662&p=19058&hilit=shield#p19115) from now-MIA DFU reverse-engineering guru Allofich/R.D. This explains my above confusion as to why Daedric's displayed "21" armor rating seems to have a much greater effect on enemy hit chance than merely 21% - that displayed value is only a fraction of the value actually used by the game in the hit calculation. This might help you work with armor mechanics further.

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

Re: Cracking Open Combat

Post by l3lessed »

thanks for the link on armor. Kind of what I was already saying about it not being a 1 to 1 because mechanics is considering more than armor. Thanks for pointing me to the thread.

Adjusting attack speed is easy in thoery. Injecting a dynamic variable has been far more difficult because of how the script structures are setup. I'll figure it out. Have a new idea going to try soon.

I discovered a coding trick to interrupt attack animations. in weaponbasics, you can define the length of an animation. This will allow for thinks like parries, deflects, and possibly wall and object collision.
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

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

Re: Cracking Open Combat

Post by mikeprichard »

Not only are the hit calculations of course considering more than armor, but the displayed armor values themselves are only a fraction of the actual values used in the hit calculations - that was the important point for me. Anyway, carry on!

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

Re: Cracking Open Combat

Post by l3lessed »

Yep, you are correct.

So, dynamic range, fatigue, and attack speed are officially in the df unity engine.

After two days of pounding my head with overly complicated coding solutions, I found a public int variable connected to the fpsWeapon.cs object was all that was needed. Now, all you need to do is load the fpsWeapon.cs object and assign whatever attack speed you want using the .AttackSpeed method. Here is a video of all the features I have put in and some examples of the code I am speaking of.

On to the hard one, programming selectable attacks and toggle block.

My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

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

Re: Cracking Open Combat

Post by Ommamar »

D
Last edited by Ommamar on Sat Apr 18, 2020 12:49 am, edited 1 time in total.

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

Re: Cracking Open Combat

Post by l3lessed »

Trying to figure out how to rework the animation system to have weapon collision simulations. Right now, the engine detects hitrays hitting all objects, including walls. It just has nothing built to simulate collisions with animations. I found a way to short circuit animations to possible simulate a collision, but this will probably take a little time to figure out. The animation system is confusing me to a degree.
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

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

Re: Cracking Open Combat

Post by l3lessed »

And wala, I put in my first direction attack and tried it a moment ago. It works. Rather easy, once I stopped over complicating it with unneeded codes and tricks :lol: . As I said, I told the weaponManager.cs to see if the moveleft action is taking place when the click attack is activated, and if so, assign the mouse.direction attack we want associated.

I'll be releasing a test alpha soon. I think want to get it out once basic strafe directional attacks are in. The base components I want will all be setup and ready for testing.

So, finally hit the slower harder stuff, shield mechanics, collision mechanics, parry mechanics, and movement modifiers for weapon states.

Took a quick crack in last two days at reworking the animation system to allow me to hard code in recoil animations, but the structure of the files and code makes it very hard to do it without making whole new coding sets of animations.

I'm still going to try a hard coding work around so we don't need all new animations made right now. Also, again, I want to make a version that is as classic friendly as possible.
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

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

Re: Cracking Open Combat

Post by l3lessed »

So, I now have all four movement directions assigned to attack.

Currently, standing still and attacking uses the old classic random formula. May replace this with another attack, if it is ever worth it.

I also found easy methods to strap into other script objects to get easy var returns. Point being, I was able to easily put together a movement modifier system too.

It creates a separate combat/unsheathed debuff modifier, on top of the crouch and spring modifiers. This allows crouching and sprinting while in combat state, but still with the minor combat movement penalty.

Currently, combat state causes a 20% decrease in movement. Attacks cause a 50% decrease until the animation is finished.

Again, all numbers lack real testing, are just best guesses for first release, and will certainty be changed and tweaked over time.

I'm putting together a github on my first release version, which should be soon. I want to get one last feature int, which is my array raycasting, to simulate the full hit pattern of the animation.
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

User avatar
MasonFace
Posts: 543
Joined: Tue Nov 27, 2018 7:28 pm
Location: Tennessee, USA
Contact:

Re: Cracking Open Combat

Post by MasonFace »

Just wanted to pop in and give you an "atta boy!"

Post Reply