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.
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.
- PARTICLE SYSTEM/WEAPON SPARKS - Setup particle system and created realistic looking metal sparks for succesful parries. Particle system emits between 15 and 30 metal sparks, each one a unique tiny 3d mesh with collisions. Also, the mesh changes colors, emits light, and has trails, all changing overtime to mimic real life sparks.
- Dynamic Hands - both hands will always animation during an attack. Non-attacking hands moves out and back into view as attack animation plays to mimic natural attacking body movements. Will add this to primer attack window too, so weapons pull back quickly before initiating attack to mimic more natural, real attacking movements.
- 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.
- Animation smoothing (As seen in my combat Overhaul project).
- Unique weapon attack reach.
- Movement modifiers for unsheathed state and when in attacking state.
- Setup the key using the proper unity keycode property name from the list on this site: https://docs.unity3d.com/ScriptReference/KeyCode.html
- Parry: Offhand Weapon Key + Mainhand Weapon key
Green = Bug Fix Submitted but waiting for player testing to confirm fixed.
Yellow= Bug Fixed but not submitted.
Red = Currently debugging.
Purple = Reported Bug.
- Sparks generate at larger enemies feet. Need to move generation location to hitcast location.
- 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.
Parry animation glitches out on successful parry. Bow equip state largely broken and buggy. Will add bowstates to remedy this issue. Will add vanilla mode, plus add mode for added offhand render. Enhanced bow setting breaks bow and render states when enabled and bow equipped. Now checks and restores enhanced bow mechanics. Can swap weapons during attacking but shouldn't be able to. Bow doesn't disappear on reload. Weapons do not disappear during equip. Weapons do not disappear during swapping. Can't attack villagers or guards. Offhand stops rendering when equipping shield without weapon. 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. 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. 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 OF PARTICLE SYSTEM/WEAPON SPARKS
Download At l3lessed's MOD Hub