Mount & Blade II: Bannerlord

File information

Last updated

Original upload

Created by

Designer225

Uploaded by

Designer225

Virus scan

Safe to use

About this mod

Adds passive healing while in battle. Affects player, friends, foes, and mounts (configurable). Switch between regen formulas, or define one yourself! (C# and/or VB knowledge required to define formulas.)

Requirements
Permissions and credits
Translations
  • Ukrainian
  • Russian
  • Mandarin
  • Korean
Mirrors
Changelogs
Donations
v2.2.4.110 tested on Bannerlord v1.2.8. You should install MCM. Steam Workshop version pending better images than what I have :P

See first stickied post for more updates and notes.

There are two known passive battle health regeneration mods, and each have its own features and issues:
  • Combat Health Regen for Player and Mount adds regeneration to, as the name suggest, the player and their mount. The regen rate is affected by the player's own medicine skill. Sadly, as the name suggests, it only works for the player and their mount. It uses its own config, though that's liable to be overwritten by Vortex after every update...
  • J0schi Tweaks (formerly Regeneration) adds regeneration to all human agents. The settings are configurable either via its own config (again liable to overwriting by Vortex) or via ModLib. Mounts are unaffected however, and the medicine skill does not affect regen. There also seems to be an issue with units regenerating health way too quickly...

So here's my take on the dumpster fire :P
  • Much like Combat Health Regen, this mod adds passive healing to the player and their mount.
  • Much like J0schi Tweaks, this mod adds passive healing to all human agents.
  • Much like Combat Health Regen, healing in this mod is affected by the medicine skill of the agent in question.
  • Unlike both of them, it does something more (see below).

Details:
  • An agent (horse, camel, other mount, or human) heals a certain percentage of their maximum health every second (default 1%, configurable).
  • Healing is continuous (i.e. it occurs every frame).
  • The healing factor can be boosted by the medicine skill of the agent (or its rider if mount, if applicable), with every 50 points increasing heal rate by 50% (default, configurable). If the agent (or their rider, if applicable) is a hero, the hero gain 5 xp when they heal enough to refill the agent's health bar from 0 (configurable).
  • Commanders (read: anyone who is commanding troops in battle) can also boost the healing factor, but with a 25% boost (configurable). If the commander is a hero, the commander gain 0.5 xp when they heal enough to refill an agent's health bar from 0 (configurable).
  • This healing factor can apply to the player, their companions, their allied heroes/lords, their troops, their allied troops, enemy heroes/lords, enemy troops, and all mounts (all configurable).
  • You can choose between three four formulas that come with this mod. More can be defined by referencing BattleRegen.dll and declare a Formula subclass. When the mod setting is accessed (either by visiting the settings menu or loading a mission), formulas will be created and can be selected in the settings.

Default Regen Formulas:
  • Linear: health increases at a linear rate. (Default.)
  • Quadratic: heal rate is greater the lower an agent's health is. Maximum heal rate is 2x the linear/average heal rate (although if you need that much healing, you are already dead :P). (Desmos)
  • EVE Online: heal rate is at its highest at 25% of maximum health. Maximum heal rate is 2.5x the linear/average heal rate. (It's called "EVE Online" because I based the model on the shield/capacitor recharge system of that game.)
  • Sine (credit: WyrdOh): heal rate is at its highest at 50% of maximum health, with the regen rate looking like a sine curve. Max heal rate is 2.5x the linear/average heal rate.

Additional formulas can be defined. See here for quick instructions and here for class documentation.

Spoiler:  
Show
Settings (possibly outdated; updates will be noted in italics)
  • Regen Amounts (Percents) Per Seconds - What percent of total health to be regenerated every second. (Regen is applied continuously with this mod.) Default is 1%. Now only affects players since v1.3.0; all other types have their own sliders (see "Apply to X" sections updates, below).
  • Medicine Boost (Percents) - Regen is increased by this percentage for every 50 points in a human agent's medicine skill. Riders affect regen for their mounts at standard efficiency. Bonuses stack additively. Default is 50%.
  • Medicine Boost (Percents) For Commanders - Regen is increased by this percentage for every 50 points in a commander's medicine skills. Bonuses stack additively. Default is 25%.
  • XP Gain Per Full Health - How much XP is gained when an agent or its rider (if applicable) heals enough to refill its health bar from 0 to max health. XP gain is continuous. Default is 5.
  • XP Gain Per Full Health For Commanders - How much XP is gained when a commander heals an agent enough to refill its health bar from 0 to max health. XP gain is continuous. Default is 0.5.
  • Regeneration Model (see above): Determines the model used for regenerating health. Default is Linear.
  • Apply To Player - Whether the player should receive passive regen. Default is true. Removed and substituted with sliders in v1.3.0 (see Regen Amount updates, above).
  • Apply To Companions - Whether the player's companions should receive passive regen. Default is true. Converted to slider in v1.3.0
  • Apply To Allied Heroes - Whether the player's allied heroes should receive passive regen. Default is true. Converted to slider in v1.3.0
  • Apply To Party Troops - Whether the player's troops should receive passive regen. Default is true. Converted to slider in v1.3.0
  • Apply To Allied Troops - Whether the player's allied troops should receive passive regen. Default is true. Converted to slider in v1.3.0
  • Apply To Enemy Heroes - Whether the player's enemy heroes should receive passive regen. Default is true. Converted to slider in v1.3.0
  • Apply To Enemy Troops - Whether the player's enemy troops should receive passive regen. Default is true. Converted to slider in v1.3.0
  • Apply To Mounts Animals since v1.2.0 - Whether mounts should receive passive regen. Mounts Animals regenerate regardless of their rider's allegiance. Default is true. Converted to slider in v1.3.0
  • Heal to Max Health: Enable to allow healing to max health, beyond your character's starting health in battle. Disabled by default. (Added in 1.2.4)
  • Time Before Regeneration: The time taken, in seconds, before regeneration will occur. Default is 0 (disabled). (Added in 1.5.1.5)
  • Debug Mode - Whether to print debug outputs to log (in C:/ProgramData/Mount and Blade II Bannerlord/logs folder). Default is false.

Requirements:
  • Mod Configuration Menu: Optional, but highly recommended. (2/17/2021: only now did I notice this and change it lol)

Harmony Patches:
  • Transpiler to TaleWorlds.MountAndBlade.Agent.Health setter to remove the arbitrary call to a ceiling method (TaleWorlds... uncool.)

Source: https://github.com/Designer225/BattleRegeneration
Documentation: https://github.com/Designer225/BattleRegeneration/wiki

Credits:

My mods: