Precision Based Attack System

Overhauls the attack mechanics for Both Player and NPC actors. In both First and Third Person perspective. This type of Overhaul emulates games such as Mordhau and Bannerlord that focuses purely on Sword play and breaking the defense By finding the right position or stance of Attack

Prerequisites

Make sure you have understood and have everything in the Fundamental Section Installed, everything described in this guide is under the context that you either already understand terms such as DAR, AMR, motion data or you have read about them in the fundamental section; if you aren’t aware of that Check it out Here :

Additional Prerequisites

NOTE: SKYRIM PLATFORM will not be needed in this Overhaul

 

Precision By Ersh

While not installing this mod won’t really cause crashes, The feature is highly essential for its collision based detection that’s not present in the base game. The base game only determines who’s damaged based on who is in front of the caster, so the appearance of the animation and position of the weapon during the swing didn’t matter. This mod overhauls the collision system to be more accurate instead of just fixed damage in front of the caster, it raycasts the weapon’s trajectory so all objects colliding with the said trajectory get dealt damage. Block Positioning is now more important than before while changing stances or attack swing angles actually have purpose.

The Working Principle

Either Tap the Directional Key + Attack button, or for More control; Hold the Attack Button to set your stance while swap directions with your directional keys

 

_______________________________________________________________________________________________________________________________________

 

All about positioning

Other Games have their own style of directional Inputs, The reasoning behind the directional Keys + Attack Button input is due to how the input and camera movement system is implemented by the Devs. The directional inputs are similar to Unreal Engine’s default movement and camera code where in there is one input event for movement, camera code and the directional keys are just settings to x and y axis variables.

Behaviors require Events to allow transitioning. There aren’t events for the specific direction of the attack therefor Mouse Movement for every direction cannot be used since there are no Events for it.

 

How the Behaviors were implemented…

Instead a Dynamic Blending System, or a “Parametric Blend” is Used. For every movement the character does, based on the vector, the character gives a value that can be read in the behaviors, this is Cyclic meaning the value is from 0.01 -> 1.00. There are 8 main values that have an Equivalent Direction, so in each of those 8 main values, you can swap between specific animations once those value ranges are attained.

 

_______________________________________________________________________________________________________________________________________

 

How the Attacks are Dynamically Switched;

The Process happens in two Behavior Graphs, The Locomotion Behaviors and the Attack Behaviors; Every Attack Idle Animation triggers an annotation that sets the value of a Variable. Once that’s established. When the Attack Input is pressed. Once the Behavior graph sends this instruction, the Attack state has an enumerator that decides which animation is played based on the variable that’s switched.

This ensures, every Attack Idle has the correct End Animation.

 
  1. FIRST PERSON Directional Attack Framework - Contents

There are only two main contents of this Project. for the Animations, first person animations go in :

“Mods\First Person Directional Attack System\meshes\actors\character\_1stperson\animations”

If you plan on replacing animations, Put them all in the DynamicAnimationReplacer folder. DAR folders take priority and Cache faster then in the regular Animations folder originally Referenced by nemesis.

 

The Animation Files

 

There are two Animation Files for Each Direction; Hold and Release Animations. Nomenclature for each attack direction:

Nomenclature of the Attack and Charge Animations

Forward

1h_fwd_chg.hkx

1h_fwd_chg_atk.hkx

Backward

1h_bwd_chg.hkx

1h_bwd_chg_atk.hkx

Right

1h_rt_chg.hkx

1h_rt_chg_atk.hkx

Left

1h_lt_chg.hkx

1h_lt_chg_atk.hkx

Diagonal - Forward-Right

1h_FdiagR_CHG.hkx

1h_FdiagR_atk.hkx

Diagonal - Backward-Right

1h_BdiagR_CHG.hkx

1h_BdiagR_atk.hkx

Diagonal - Forward-Left

1h_FdiagL_CHG.hkx

1h_FdiagL_atk.hkx

Diagonal - Backward-Left

1h_BdiagL_CHG.hkx

1h_BdiagL_atk.hkx

2. The Third Person Framework

The only difference from the FP and TP behaviors are that the animations are located in : Mods\Third Person Directional Attack System\meshes\actors\character\animations; First Person animations need to go in _1stPerson folders. I made The filenames similar so it’s less work when it comes to patching new animations to recognize in the behavior.

Like first person behaviors, they’re best put in the DAR folders to cache easily.

Variations of the Third Person Framework

Free Movement Rootmotion Movement

There are two variations of the Attack Framework in 3rd Person. One with the Attack Release Still Remaining Blended and One with Rootmotion Movement or Movement that uses that full Bones of the Animation as well as movement data from that animation file. Different People Different Preferences. I can make both so I did. I won’t argue about what works best, it’s all your choice.

Free Movement - Retains blending once attacks are released. If you like more control over your attacks while not minding Animation Quality and really want a 1:1 concept with games like bannerlord, then this variation is for you. To balance this Variant, Only Player attacks are blended. NPCs will use the Rootmotion movement because They’re AI in this regard is different. They do not have instructions for when attacks should be delayed and released. Putting them in permanent Rootmotion Movement is much more efficient and will cause less issues with blending along the way. A

Rootmotion Movement - The Attack Release is fully animated, This for users who want commitment to the attacks. Both NPCs and the Player character will be using these behaviors,

 

Animating for the Attack Framework

 
  1. The Attack Idle

The Attack Idle is always a blended behavior for both dedicated and free movement. The Bones Crossed out are the ones you don’t need to bother with. You can hide them on the dopesheet if you want as well

 

2. The Swing(Free Movement)

For the Free Movement Option, it’s just similar to the Idles where in the bones crossed on the image above are left out. It’s much preferred to use an AMR ready rig so you can include the Annotations in your blend file such as Weaponswing, Hitframe, Prehitframe, CastOK start as well.

 

3. The Swing(Rootmotion)

For this Variation, All bones are used including the base bone for Motion Data. Again, It’s much preferred to use an AMR ready rig so you can include the Annotations in your blend file such as Weaponswing, Hitframe, Prehitframe, CastOK start as well.

 

———————————————————————————————————————————————————————————————————————————————————————————————————————————

 

THERE ARE NO SPECIAL ANNOTATIONS REQUIRED SUCH AS “ATTACKWINSTART” SINCE THIS ATTACK SYSTEM DOESN’T RELY ON COMBOS THEREFOR DON’T NEED THOSE QUEUES FOR TRANSITION

The Block System

With this type of Attack Framework, The block system is as important as the attack system. Since you could dynamically swap your Attack Positioning, Making sure both Player and NPC was able to swap the block position as well. In a good combat system, there should always be a weakness or counter to every maneuver or feature, that give and take dynamic is important to making combat good. Since attacks have been amplified for precision, Blocks have also been given the sufficient features for both actors to be able to counter this new mechanic.

The Block Behaviors use thesame Working Principle as the Attack Behaviors

To simply put, Blocking are idle behaviors with Specialized annotations and Modifiers which change the properties of the idle to utilize Defensive Perks. Through Additional Parametric Blends, instead of having 1 idle, this is dynamically switched for each of the 8 directional values hardcoded in the game.

 

————————————————————————————————————————-————————————————————————————————————————-——————————————————————————

Purely Behaviors and animation alone…

So why was a scrub like me able to make this in the game, while World Class professional Developers like bethesda hadn’t? This is a design Choice more than anything, Bethesda could make any feature I’ve made work and even better if they wanted to. First of all, there would be no point in an accurate collision system since the game mechanics weren’t focused on things like sword play or fencing, Implementing a collision system nevertheless would’ve cost more and would tank an already performance heavy code which was impractical for what their Target is in the combat department.

Having said that, this is where the mods come in, and because of Precision by Ersh; the dynamic idle switch turned from an obsolete function to a core feature in making this type of System since the animation change actually means something.

File Nomenclature for the Block Animations

For those that want to animate and replace the animations, Simply Refer to the image above for which anim file is assigned to which. You have to use DAR folders when replacing these animations so they take priority.

 

For those that want to get into behavior modding, here is the Behavior Resource for All of the Projects Mentioned in the System