Cracking Open Combat

Discuss modding questions and implementation details.
Post Reply
User avatar
Jay_H
Posts: 4061
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: Cracking Open Combat

Post by Jay_H »

Looking forward to first release!

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

Re: Cracking Open Combat

Post by l3lessed »

Okay, I have attack frame raycast tracing in now. It is in early alpha and needs more smoothing around the edges and custom vector offsets for some of the non-horizontal attack animations.

It is pretty simple in how it operates. Took little messing with the weaponManager.cs switches, but it checks for when the attack state is initiated. When this happens, it starts a if then switch that activates anytime the attack animation is between number 1 and 4. When activated, it begins sending out raycasts every frame from the camera direction outward trying to detect what it is hitting and if it is a successful hit.

Currently it keeps going running, even after an initial hit, so broken in a way. When you attack, you can do ten+ attack on an enemy within a second. But hey, the basic setup is there. I also need to create animation offsets for the individual animation types to match what player sees visually.

I plan on adding a time switch to possible minimize the amount of raycast draws, as we probably don't need one every single frame. I also will add a proper hit detection switch, so the raycasts stop going after a successful hit. This will save raycasts and also stop from multiple enemy hit bug. Then just need a parry/recoil 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.

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

Re: Cracking Open Combat

Post by l3lessed »

Hit detection and raycast draw stop is in. Now, any object, including walls, register a hit and stop anymore raycast.

Now, to just hijack the animation update system to force in reverse frame counting, and hopefully we have bug-free functioning recoils. May not be 100% beautifully rendered using a coding, frame count trick instead of actual animation files.
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
Jay_H
Posts: 4061
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: Cracking Open Combat

Post by Jay_H »

Any estimate for a release date on this? You sound like you're wrapping stuff up.

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

Re: Cracking Open Combat

Post by l3lessed »

Depends. Coding has slowed down some, as school is back into full gear. The amount of spare time I have to put into the coding side of this project has gone down as a result.

I have four more large hurdles to overcome before release.

Need to get the time together to figure out proper raycast offsetting and setup switches for animations and proper raycast placement to match attack animation. Should be easy, just time consuming programming each animation raycast offset.

Currently working on finding a way to get in a parry animation. When I have a few hours, I have a new idea I want to try, which is to hijack the animation code that times each individual frame. Will see if it goes smoothly or not.

Blocking mechanism. Coding, I think this should only take a few dedicated hours. Again, animation side may be more complicated, since I can't craft the animations myself. Again, coding solutions via offsets and individual frame updating is a theoretical solution to this, but will see how hard it is.

Weapon parry for those who duel wield or don't use shields. Again, coding I think shouldn't be to hard. Pretty much a short invuln frame. Animation, again, will see.

Hoping no more than three or so weeks for a initial release.
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: 1399
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: Cracking Open Combat

Post by l3lessed »

Ok, I came home from work and had two hours or so to myself. I thought I would take a crack at the animation/collision simulation system. Here is the magic, be it currently buggy, I came up with hijacking the frame by frame system animation system.

So, I largely understand how the specific animation methods, code, and individual frames work and are rendered. This allowed me to hi-jack the existing animation system and then run an animation backwards at a faster rate after a hit is detected. I hope, in the future, I can possibly smooth animations out further by adding offset frames in between each sprite frame. Might allow me to double the frames with minimal time and effort. Will see when I get there.

Here is my first real attempt. It still has one switch bug in it, but I know of one solution already.

Right now, weaponmanager triggers it, then won't stop sending raycasts out and playing the animation until it stops hitting the object. This is because fpsweapon needs to send out a bool trigger the moment a frame hits an object so weaponmanager can update and stop sending raycasts for hit detection. To fix this, all I need to create a unique hitobject bool for the fpsweapon script, so it also keeps track of when each individual frame is hitting and can pass it to Weaponmanager. At that point, the weaponmanager should then flip off the raycasting via its own unique hitobject bool and stop the hit loop animation bug.



Also, I'm almost positive this will have to be a stand alone build, as I am not seeing a way currently to modify the animation system without editing the base files. The base files need added bool triggers to figure out what is happening, when, and this cannot be done, as I understand it, with reflection nor at the speed it needs to. I'll keep exploring though. I could be wrong.
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: 1399
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: Cracking Open Combat

Post by l3lessed »

Well, Collisions are officially in. I will probably try to mess with frame switches little more to see if I can smooth out some of the transitions back to idle.

However, other than the vanilla poor 2d animation system, it seems to be in and working. Each raycast hits, when it hits, it triggers a hitobject switch in the animation updater, which then increases animation time and begins reversing frame count from the current animation position. Once it hits frome 0, it switches back to idle state and animation.

Here is a quick playthrough, until I get rolled by an imp.


I personally am liking the feel more. Weapons feel like they have some physics and weight to them.

I may try and see if I can do something different animation wise for hitting an actual enemy. Maybe I will send the player back to idle faster without the giant recoil animation to try and simulate a weapon pull back.
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
Jay_H
Posts: 4061
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: Cracking Open Combat

Post by Jay_H »

Weapon swings simulating material weight and momentum... What a time to be alive. My big pull for this is dodging/blocking/parrying but this is impressive too.

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

Re: Cracking Open Combat

Post by l3lessed »

Blocking/parry is next. I first needed to sort out how to simulate hits, and manipulate the animation system.

Then release and smoothing out coding, raycasts, and animations as I get feedback and maybe some assists.
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:50 am, edited 1 time in total.

Post Reply