Mount & Blade II: Bannerlord

File information

Last updated

Original upload

Created by

Anthony Dombrowski

Uploaded by

akdombrowski

Virus scan

Safe to use

About this mod

This is a patch that attempts to fix melee combat when swing speeds of weapons are high. When swing speeds are high in vanilla, hitting an enemy with a weapon doesn't register contact. This fixes that. Just install with vortex or unpack in modules folder.

Requirements
Permissions and credits
Changelogs
Donations
Brief Intro:
Leveling up can increase swing speeds of melee weapons. But, when swing speeds get too high, contact doesn't register with an enemy.

This can be incredibly frustrating and make the game unplayable (I've had swing speeds in the 40's that don't register contact).


Please endorse and vote if it works for you!

Check Out My Other Mods:
Don't Interrupt Me - attacks aren't interrupted
Slice Through - cut through multiple enemies
RichVillages - adjust town and village gold

Installation Instructions:
Just install with vortex or unpack in modules folder.

Detailed Info:
This mod fixes that by editing two XML files animations_combat and combat_parameters (both of the original files can be found under Native/ModuleData/.

In animations_combat.xml the duration for the swing animations are increased.

In combat_parameters, the window for collision to be detected is increased.

From Article*
It took me awhile to figure this one out, but the game was becoming unplayable for me and I couldn't find a mod that fixed this. It even looks like it might've been a problem in the first game from what I've seen on the forums. I thought I was going to have to find a way to mess with their custom physics engine to ensure contact.

When I was debugging, I found that TaleWorlds.MountAndBlade.Mission.MeleeHitCallback wasn't getting triggered, but the trigger was hidden in their custom engine code. A harmony patch wasn't going to help here.

So, the next step was to scour the xml files and look for any variables that might be related to melee or combat or swinging a weapon. After several days (two weeks) of searching and testing, I've found two xml files that modifying some variables seems to have an effect an allow collisions to be registered even with high swing speeds.

Although I've tested with 120-130 swing speeds with a healthy boost from my 2H vigor traits, I wouldn't go crazy with swing speeds and push the limit. Otherwise, you'll have to adjust the durations I've used in animations_combat.xml.
*Be careful if you do edit the animations_combat.xml duration values. Some of the animations look to be for when you strike but are blocked. You don't want to take forever to recover from a blocked attack. Search for "block" and "stuck".

Modules/Native/ModuleData/animations_combat.xml
Spoiler:  
Show

Adjust duration values (mostly from 1.1 to 25) for melee swing attacks for 1h, 2h, and polearm animations.
Here's what one looks like edited:
<animation id="quick_release_overswing_1h" param1="0" duration="25.0" anim_data_name="anim_overswing_1h_unbalance" source1="13" source2="123" blend_in_period="0.3" blend_out_period="0.2" blends_with_action="act_quick_release_overswing_1h_balanced" step_points="0.2, -1.0, -1.0, -1.0" sound_code="event:/mission/combat/swing/med" combat_parameter_id="1h_up">
  <flags>
    <flag name="enforce_root_rotation" />
    <flag name="priority" value="10" />
    <flag name="client_prediction" />
  </flags>
</animation>


Modules/Native/ModuleData/combat_parameters.xml
Spoiler:  
Show

Adjust the collision detection start and end percentages. Opened them up to .01-.99.
ie,
collision_check_starting_percent="0.01"
and
collision_check_ending_percent="0.99"
Here's what one looks like edited:
<combat_parameter id="1h_up" collision_check_starting_percent="0.01" collision_check_ending_percent="0.99" vertical_rot_limit_multiplier_up="0.0" vertical_rot_limit_multiplier_down="0.0" left_rider_rot_limit="overswing_rider_rot_limit_left" left_rider_min_rot_limit="up_min_rider_rot_limit_left" right_rider_rot_limit="overswing_rider_rot_limit_right" right_rider_min_rot_limit="up_min_rider_rot_limit_right" rider_look_down_limit="overswing_rider_look_down_limit" left_ladder_rot_limit="overswing_ladder_rot_limit_left" right_ladder_rot_limit="overswing_ladder_rot_limit_right" hit_bone_index="27"/>


Future Upgrades Planned:
The next step is to open these values up to be able to be configured from the menu. Examples of configurable variables and their values: animation_melee_swing_duration: 25.0, collision_check_starting_percent: 0.01, collision_check_ending_percent: 0.99.
I just need to figure out how to do this.

Hope this helps your bannerlord experience. Let me know if you have any questions or ideas!