Bannerlord HarmonyX Update

  • Comment
A couple of weeks ago, we shared an update on the future of Bannerlord modding with the release of Bannerlord Software Extender and a shift to HarmonyX as the preferred library for mod authors. After a brief testing period, HarmonyX hasn't worked out quite as well as the community expected so a new version of the original Harmony library has been introduced to replace it. Once again, thank you to Aragas for the information! 


The first closed test of HarmonyX revealed some quirks, such as a difference in reverse patcher behavior. While almost no one was using this feature and there were known workarounds for the issue, it suggested that HarmonyX might not be a true drop-in replacement. We continued the test as a public beta to see if there were any more issues, and we did find some.

For example, we found that patching some game structures caused an AccessViolationException with no known workarounds. Since major mods depend on patching those structures, this issue is unacceptable. We therefore decided that the best course of action would be to continue using Lib.Harmony but introduce a fork that fixes some development issues that HarmonyX was fixing for us.

If you switched to the HarmonyX package, you need to switch to Bannerlord.Lib.Harmony. The version schema will be reverted to v2.2.2. We will support mods that were written and will be written with *Lib.Harmony** indefinitely. We do not force you to use Bannerlord.Lib.Harmony to develop mods, but if you do, it should ease cross-platform support for Steam/GOG/Epic and Xbox versions of the game.

Why is a fork necessary?
The original Lib.Harmony supports both game's runtimes - .NET Framework 4.7.2 and .NET Core 3.1. To build a mod, you can either target each runtime separately or use a shared target that can be used by both runtimes - netstandard2.0. However, Lib.Harmony doesn't support netstandard2.0. We fix this by reintroducing it back for modders in our fork.

Additionally, Lib.Harmony packs its dependencies differently. MonoMod.Common is included in Lib.Harmony (static linking) for .NET Framework, while on .NET (Core) it's a separate dependency (dynamic linking). With our fork, we switch to dynamic linking on both runtimes.

While HarmonyX supported these changes out of the box, we need to reinvent the wheel for Lib.Harmony with the fork.

The good news is, this doesn't make a lot of difference for players, all you need to do is make sure your mods are up to date. 

We hope our Bannerlord mod authors find this information helpful!

13 comments

Comments locked

A moderator has closed this comment topic for the time being
  1. theoo12
    theoo12
    • premium
    • 0 kudos
     will we be able to use mods with all of the new updates
  2. HetmanChodkiewicz
    HetmanChodkiewicz
    • member
    • 0 kudos
    Where can i download it ? 
  3. e04su3no
    e04su3no
    • member
    • 0 kudos
    Please consider work on STEAMDECK
    1. Aragas
      Aragas
      • premium
      • 197 kudos
      It should work on Linux via Proton!
  4. AdeptusFreemanicus
    AdeptusFreemanicus
    • supporter
    • 12 kudos
    Not sure if anyone is answering questions, but I got one. I remember in the original post about HarmonyX there was something about it being good at having mods work with newer/older game versions, in this fork, will it do that too?
    1. Aragas
      Aragas
      • premium
      • 197 kudos
      Yep! We didn't lose anything with the migration. We just didn't want to add another fork of Lib.Harmony (like HarmonyX) to the pool and wanted to reuse HarmonyX. This didn't work out so we have now Bannerlord.Lib.Harmony.
  5. Vasiliy1988
    Vasiliy1988
    • member
    • 0 kudos
    ok
  6. jazza1198
    jazza1198
    • premium
    • 3 kudos
    I'm somewhat retarded when it comes to techno babbel, can this be dumbed down for me please?
    1. Philozoraptor
      Philozoraptor
      • premium
      • 72 kudos
      HarmonyX was causing crashes to some mods so they are reverting back to "normal" Harmony. Harmony is esentailly a form of hack (I believe originally developed for game Outher Worlds) that enables code based mods (complex mods) in Bannerlord.
    2. ADamnSexyName
      ADamnSexyName
      • premium
      • 233 kudos
      still no clue :(
    3. nomadofwarZDEfdssd
      nomadofwarZDEfdssd
      • member
      • 0 kudos
      why was i told of this??
    4. Makron8
      Makron8
      • member
      • 11 kudos
      Thank you. There are so many arbitrary names for things just to make mods work that it helps to at least understand where they come from. I know Subnautica since the Living Large update also has a Harmony folder as well.
    5. Dromundas
      Dromundas
      • member
      • 37 kudos
      Yeah for sure…

      This for people modding Bannerlord. It all good now.

      There you go little buddy.