[MOD]Ambidexterity Module (Shield Module Branch)

Show off your mod creations or just a work in progress.
Post Reply
l3lessed
Posts: 546
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

[MOD]Ambidexterity Module (Shield Module Branch)

Post by l3lessed »

I began work on the parry system but found out very quickly, I would be building heavily off the work I already did for my shield module mod.

As a result, I have decided to begin a second module that is an updated branch of the shield module, and I will call it the Ambidexterity Module; I think you can figure out why I am naming it that. Look at the magic I created this evening.

What's Done/Included:

Blue = New Features
  • SHIELD MODULE: Everything from the original, plus anything I add further down.
  • COUNTER ATTACKING/PARRYING: You can time your attack against your enemy's attacks to counter them zeroing out damage and knocking you both away from one another, but it must be timed to your weapons hit frame (The second render frame).
  • OFF-HAND WEAPON WITH FULL ATTACK ANIMATIONS: Already recreated the animation system and implemented a full fps weapon for the off hand, including attacks and attack animations. It mimics the traditional system down to the frame. Weapon animation/times are exactly the same as default and hit ray is tied to the hit frame and animation time like traditional DF FPSWeapon system. Should feel exactly the same as your main weapon.
  • SMART/RESPONSIVE KEY INPUT: The mod will monitor for the attack keys. Upon detecting the player pushing either one, it will begin the smart input system using c# queue class. From here, it will allow you to begin a parry up for a small window before beginning the swing. Once the attack starts, it will monitor for follow up key presses, and will start chaining attacks if it detects a new attack triggered them during the current attack last frame.
  • BASIC CHAIN ATTACK COMBO SYSTEM: Using the key input detection system, you can prime a follow up attack during the current attack to keep the momentum of your attacks/body/combo going. The moment you stop this chain of attacks, it resets, and you have to wait the small attack primer window before beginning another chain of attacks (Defaults to .16 seconds but it adjustable in mod settings).
  • WEAPON PARRY: A short animation that has you put your weapon up to try a momentary weapon parry. Will be for offhand weapons and two handed weapons. Will play counter attack animation, stun enemy for a moment, and allow quicker counter attacks.
  • WEAPON COLLISION SIMULATION/FEEDBACK - DF engine begins sending out raycasts on every frame. Once it hits an object, the raycasts stop. A bool trigger then tells the animation system to replay the animation backwards at an accelerated rate. This simulates a hit and collision. Marking it as finished, but plan on smoothing animations at some point.
  • MULTIPLE RAYCAST CODE - I have inserted in a coding loop so hit detect raycasts will continually shoot out from the players camera to simulate actual weapon swings from beginning to end. Currently raycast stops on first object hit detection. Uses weapons animation time to sync raycast and time their shots (shoots about 30 within a normal animation). As each raycast is shot, a lerp vector transform moves it along a defined axis based on the animation time. Once an object is hit, raycast stop, fps collision animation begins, and player sets back to idle. Marked as finished, even though I have to refine the vector offsets for the stab and down animations.
What Will Be Added:
  • More Mod Settings for more customization
  • Patches for most commonly used combat mods. They will be ready before public release to ensure players don't have to choose between mods.
  • Exploring weapon sparks/debri on object/parry hit.
  • Melee blocking/parrying for stopping melee attacks but not weapons.
Key Setup & Combo: Bug List:

Green = Bug Fix Submitted but waiting for player testing to confirm fixed.
Red = Currently debugging.
  • Equipping from a shield to a bow the bow breaks the shield and will stay there forever without switching to something else
    [*]Downright attack animation for the offhand is misaligned, which shows the art clipping border on the first frame.
  • Shield breaks when using left handiness setting. This is a result of how ambidexterity manager assigns each hands item object and how the base game sets up player equipped items when in shield state.[/color]
  • When using physical weapons & left-handedness, hit arcs don't flip also and cause reverse alignment.
  • Casting hands render over duel wield gui hands.
  • Werebeast state offhand breaks when loading a save in form.
  • Parry animation shows slight artwork clipping for certain weapons. This is a result of the devs never expecting the artwork to move on screen. I'll fix this through some offsetting or an updated parry animation.
  • Enemy Paralysis effect doesn't stop attacking or hide weapons during effect. Fixed: copied the weaponmanager check over to ambidexterity script.
  • Input manager routine has a state stuck bug. Every now and then, it won't clear the input que and will cause a parry when initiating a new attack.
TEST VIDEO WITH DUEL WIELD DEMO


Download At l3lessed's MOD Hub
Last edited by l3lessed on Tue Oct 20, 2020 8:30 pm, edited 40 times in total.
My Skyrim Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

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

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

Re: [MOD]Ambidexterity Module (Shield Module Branch)

Post by l3lessed »

Thought I would show off the most recent chunk of my work. It doesn't look like much difference from the above video, but it actually has a ton of changes and improvements from it on the coding back end side.

In quicker terms, I first hide the fpsweapon. After that, I took everything I learned and reconstructed the fpsweapon script, duplicated that to create a second off hand weapon to render. Now I had two largely functional rendered weapons and a shield render, if you include the shield module. This is where it got really dicy fast, as it clearly would be impossible to control all those individual scripts themselves and keep a stock look to the three differing ongui elements being rendered.

So, at this point, I created a equipment state/weapon state management master script object, used it to load up all the script objects into the mod, and then set it up to control all the different ongui renders based on the numerous different equipment states possible with both hands and a shield allowed now.

So now, all weapon states are in, rendered, and animated.

Weapon States Include:
  • One handed (with opposite hand in melee)
  • Two Handed Weapon (Both hands being used by one weapon)
  • Duel Wield (Both hands used by two separate weapons)
  • Shield + One Handed(Including melee if you want)
    *Can use melee/hand-to-hand combat with any open hand.
This also forced me to clean up some animation stuff with the shield module, so now the classic animation system works better/smoother, and it also has a classic animation bob feature for the shield.

Here's the video. There is a bug I had to fix at the end with the two handed weapons and a shield. You can see me code for a moment.


Now, on to getting the swing animations alignments tweaked and sounds setup properly, adding in a parry animation and block system, and release.

Then, at that point, I can begin recreating combat overhaul features in this mod, including smooth animations.
My Skyrim Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

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

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

Re: [MOD]Ambidexterity Module (Shield Module Branch)

Post by l3lessed »

Okay, got in parry animation/framework for weapons.

Way it will work is you will setup an offhand bind key to control the other hand, just like the main weapon. That is, it will be a smart, multi-use button. It will control your shield, off-hand weapons, and parry system depending on your current equipment setup/state.

Now, with a offhand and main hand key, you will attack/press both of them them at the same time, and it will initiate the proper parry routine based on if your duel or one hand wielding.

I also built in a small delay window using the Input Manager HasStarted method. This gives players a few frames to push both buttons down, so the parry is a little more natural, forgiving, and easier to use. As a result of the old animation system, this does cause a small frame jump every great once in a while, but it's not noticeable enough for me to care. I'll work more on it later or if tons of people start complaining.

Now, we have both counter attack parries and weapon parries.

Counter attack parries will be done when both entities attack and hit each other at the same time. It will stun and push both of you back to signal the push back from the colliding forces. Again, this specific parry features works for npc's fighting each other too (none of the other features do right now, although I hope to add in shield use to enemies at some point).

Weapon parries will be done when you activate parry and are hit during the animation/parry time frame. If this happens, you will take no damage and instead take a much smaller portion of it in fatigue cost. You will not be stunned at all nor pushed. Instead, the enemy will be stunned a little longer than with a attack parry and be pushed back more from your redirecting their force using yours. However, being hit while parrying will create a small extra penalty, maybe little extra damage or cost the player some extra fatigue for being hit when wide open.
My Skyrim Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

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

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

Re: [MOD]Ambidexterity Module (Shield Module Branch)

Post by l3lessed »

Getting close to first release.

Just finalized first pass of full parry system with proper animations and state management to ensure animations and attacks feel natural.

Right now, you can load up a second attack on opposing idle hand during the last frame of your current attack hand. This allows you to prime an attack without allowing unrealistic attack spamming and god mode in duel wielding, but still gives a small advantage for using a second weapon and not a shield or twohander.

Parry will engage, as long as you are hit during the first 75% of the animation or so, you will stop the damage and play a counter attack animation, but not an actual attack that does damage. You will also push the enemy back more, sometimes pushing them out of distance of their follow up attacks.

If parrying, you of course are locked to parry until you finish the full animation cycle.

I need to do a few more things before release, but getting close. Just need to put in the code to manage the sheath state and left/right swap states, so the sprites don't render during these periods like in default DF, and I think I can release this.

Here is a video of the full system in action, with the new finished parry state and animation.
My Skyrim Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

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

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

Re: [MOD]Ambidexterity Module (Shield Module Branch)

Post by l3lessed »

Will be dropping in the next week I think. Going to add an option to limit offhand weapons to small weapons only for immersion freaks like me.

Still, I'm getting close. I wrapped up proper weapon swapping, and attacking priming for very basic two attack combo system.

Now I need to do some cleaning, add in a few more possible settings, and drop in one last feature.

The new feature will be a balance/immersion feature: You will choose the handiness your character has the first time you load the mod. There will be two choices, 1. Default choice (Left or Right handiness selected in main menu) or 2. Ambidexterity(Custom mod setting).

1. Default choice: Main weapon stats normal. Off hand weapon stats and attack time -20% to compensate for lack of ambidexterity and training in offhand weapon combat.

2 .Ambidexterity Choice: Both off and man hand weapons get a %10 reduction in attack speed and stats because of your ability to use both hands and training over your life in it. However, having to counter balance and focus on two weapons has a small penalty for both hands of the mentioned 10%.

*EDIT*
Added bullets explaining the smart key input system and the simple chain combo system
My Skyrim Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

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

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

Re: [MOD]Ambidexterity Module (Shield Module Branch)

Post by l3lessed »

*EDIT*
Thought might get it out by tomorrow, but I overlooked one area. The stinking mouse drag attacking. There is no easy way to access it and use it for the offhand weapon, since it is bound in the weapon manager to the attack key press and directly tied to the fpsweapon I hid. This means, I will have to copy and rebuild the mouse manager using int states, since I can't replicate enums yet. The developers never expected a second script object for a offhand weapon, so it was hidden and bound to FPSWeapon.

Question to possible users of this mod, would you want power attacks recreated and put into the game, like most modern FPS melee games use?

With the delayed key input system, I can now put this in I think semi-easily. Just delay the beginning of the attack for a amount of keypress time, and then modify damage and attack time based on how long it is held, up to max time hold time.
My Skyrim Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

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

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

Re: [MOD]Ambidexterity Module (Shield Module Branch)

Post by l3lessed »

Getting close to a first release. Going to release it without mouse drag support first to get it out and testing as soon as possible.

However, found one last snag, and that is the werebeast animations/sprites and how they work. They require a custom code block to build two separate idle hands and ensure attacks align properly where they need. But, that will take a few hours, at most once. I just need to set the time aside.

Probably drop 1.0 by end of this week.

After that, on to moving combat overhaul features over.
My Skyrim Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

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

ArcadeMischief
Posts: 3
Joined: Sat Dec 28, 2019 8:48 pm

Re: [MOD]Ambidexterity Module (Shield Module Branch)

Post by ArcadeMischief »

I think having power attacks would be interesting and cool, but maybe a few people would not like that. Maybe if it's toggleable.

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

Re: [MOD]Ambidexterity Module (Shield Module Branch)

Post by l3lessed »

Thanks for the input. It would be optional. I always try my best to make all parts of my mods independent, so each part can easily be turned on and off if needed, without crashing the whole script/mod. Why not since we are using an OO language, plus it's just good practice and learning for how to properly do OO Languages.

One more issue happened yesterday that will slow this again. Sigh.

I was cleaning out my watercooling system because it got a little buildup on the block, and I accidentally snagged a CPU pin with single piece of hair on my arm and pulled it off the motherboard cpu socket setting area. needless to say, my motherboard and CPU are now toast. Can't run a cpu with a missing cpu pin on the MB.

I'm writing this on a decade old computer I pulled out of my closet. I took apart my fried computer, and made some Frankenstein of a machine strapping whatever newer components I could into my decade old plus MB and CPU. Hey it works for distant working. However, the old school into duo core and 8gb of bottom line ddr2 ram aint going to cut it for my coding and developing. And, I can't get it to detect my newer Sata3 drive with my main OS install, even though it is suppose to be backwards compatible with Sata I and II. Oh well, just got to have a working computer for my job for next week or so, until I can rebuild.

Good news, I didn't loose any data. Both hard drives should be fine. Just have to order a new I7 9700 and Asus gaming/performance board, and rebuild. Thankfully, LGA1150 and LGA1151 sockets can be reused on the cpu coolant side, so I can keep my custom watercooling setup and tower. Just got to swap out CPU, MB, and hope windows 10 doesn't freak out when it detects the new MB and CPU.

It will get out in the next few weeks with this new road block. Once I can rebuild the computer, then I can get back to the original window of needing maybe 8 to 10 hours of free coding time to get this to a release, playable state.
My Skyrim Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

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

daggerdude
Posts: 119
Joined: Sat May 23, 2015 2:22 pm

Re: [MOD]Ambidexterity Module (Shield Module Branch)

Post by daggerdude »

Sorry to hear about your mishap, that would have crushed me.

Just wanted to pop in and say that I have begun working on shield graphics, trying to make vanilla shields.

Post Reply