Mount & Blade II: Bannerlord

Mount & Blade II: Bannerlord

7,975 ratings
Harmony
39
11
4
12
9
3
10
8
4
2
7
6
2
2
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
5.278 MB
Sep 5, 2022 @ 11:48am
Apr 7 @ 3:54am
30 Change Notes ( view )

Subscribe to download
Harmony

In 1 collection by Pinkie Arg
BUTR Stack
4 items
Description
For the Early Access version please visit this!

A library for patching, replacing and decorating .NET and Mono methods during runtime. Intended to ensure that all mods in a player's modlist are using the latest version of Harmony to minimize conflicts. We also added a Debug UI! Available via CTRL+ALT+H.

Notes
This is an unofficial distribution of the Harmony[github.com] library maintained by the community to have an easier way to manage external library dependencies.
The repository of the mod - Bannerlord.Harmony[github.com].

Installation
This module should be the highest in loading order. Any other module that requires to be set at the top (Better Exception Window, ButterLib, MCM, etc.) should be loaded after this mod.

For Players
This mod is intended to ensure that all mods in a player's modlist are using the latest version of Harmony to minimize conflicts.

For Modders
We added a Debug UI! Available via CTRL+ALT+H.

You still need to reference Harmony as a NuGet package, it is not required to include 0Harmony.dll in the final /bin output of your module.
You do need to add this to your SubModule.xml
<DependedModules> <DependedModule Id="Bannerlord.Harmony" /> </DependedModules>
This way the game will ensure that the Harmony library is loaded before your mod.

Versioning
The Module combines the Harmony version used and the Build Id that published the Module. The Build Id is simply added to the end.
2.0.2.22 indicates that Harmony 2.0.2.0 is used and 22 is the Build Id.
2.0.0.1025 indicates that Harmony 2.0.0.10 is used and 25 is the Build Id.

We considered using the Rimworld approach with introducing our own version system, but it won't give a clear way to detect which Harmony version the Module contains. It's easier for the user to report the version of the Module used than to check the assembly version/send it.

Troubleshooting
  • Steam is not always updating all mods. We suggest to manually resubscribe to Harmony if you experience crashes!
  • Check that the Modules folder (C:\Program Files (x86)\Steam\steamapps\common\Mount & Blade II Bannerlord\Modules) does not contain a Bannerlord.Harmony folder!
  • If the game crashes on start, might have used Fixed Launcher. When installed, it copies 0Harmony.dll which prevents Bannerlord.Harmony from working.
  • If Fixed Launcher was uninstalled or never installed, check that the following files are not in the game's main /bin folder (Mount & Blade II Bannerlord\bin\Win64_Shipping_Client)
    • TaleWorlds.MountAndBlade.Launcher.exe.config (if BUTRLoader was installed, reinstall it after)
    • 0Harmony.dll
    • LauncherPatcher.dll
    • LauncherPatcher.pdb

About
Harmony gives you an elegant and high level way to alter the functionality in applications written in C#. It works great in games and is well established in titles like 7 Days To Die, BattleTech, Besiege, Cities:Skylines, Kerbal Space Program, Oxygen Not Included, Ravenfield, Rimworld, Sheltered, Stardew Valley, Staxel, Subnautica, The Ultimate Nerd Game, Total Miner, Unturned and many more.

It is also used in unit testing WFP controls and in many other areas.

How it works
If you develop in C# and your code is loaded as a module/plugin into a host application, you can use Harmony to alter the functionality of all the available assemblies of that application. Where other patch libraries simply allow you to replace the original method, Harmony goes one step further and gives you:
  • A way to keep the original method intact
  • Execute your code before and/or after the original method
  • Modify the original with IL code processors
  • Multiple Harmony patches co-exist and don't conflict with each other
  • Works at runtime and does not touch any files

Documentation
Please check out the documentation[harmony.pardeike.net].

Contribute
pardeike put thousands of hours into this project and its support. So every little action helps:
• Upvote this stackoverflow answer[stackoverflow.com]
• Spread the word in your developer communities
• Become a GitHub sponsor[github.com] or a Patreon[www.patreon.com]

This project uses the great MonoMod.Common[github.com] library by 0x0ade[github.com].
Popular Discussions View All (5)
31
Aug 21, 2023 @ 1:43pm
Crash
jerome_lacey1888
8
1
Mar 10 @ 10:17am
How to i change the version of the mod
SexLord Farquaad
2
1
Oct 25, 2023 @ 4:14pm
Harmony.PatchClassProccssor error
Gaming4ever
891 Comments
Çoban Hüsnü May 1 @ 7:48pm 
nice
Bloody_Odin Apr 24 @ 1:24am 
i cant get this mod to work for any version of the game, i need it for 3 mods, how to fix this?
catbox99 Apr 21 @ 9:02am 
STILL running fine for me. Have you ever considered that it might not be this mod that's broken, but rather your understanding of modding in general?
Brebs Apr 20 @ 12:59pm 
Is this fixed yet? I cant play bannerlord without the health regen mod and this is one of the dependencies...
michealtolbert65 Apr 20 @ 10:40am 
this mod is required for so many mods and yet every day i get errors because its incompatible with every other mod i use.
catbox99 Apr 20 @ 7:09am 
It is compatible with 1.29, which is the latest version.
[Ger] Baasti89 Apr 20 @ 1:10am 
can u do a update for the new game version?
catbox99 Apr 10 @ 9:12pm 
This isn't really the place to discuss that mod. Suffice to say, it allows you to exceed game-recognized character skill values. Additionally, it incidentally hires NPC companions, gets them killed, and makes it more expensive to hire them going forward (please note that those companions are still listed as being in an NPCs retinue when you hire them). Then there's issues that occur when "rejoining" after a defeat. There is the issue that you rarely receive loot or monetary incentives (particularly during seiges), because the game does not recognize that you are a member of the army. Finally, there are some issues created when the leader puts you in charge of troops on the battlefield. The game doesn't know how to handle that if you're not in the army (you're not). Any or all of that can lead to corrupt save files.
mads Apr 10 @ 10:59am 
What do you mean? it crashes if i use the mod at the start if i add it later there are less problems
catbox99 Apr 10 @ 10:22am 
I never use "Serve as Soldier past the very start." We're talking just to tweak a character background, and then remove the mod. It's an interesting concept, but it has never worked particularly well (even in M&B: Warband), and there's little to be gained by using it that you can't set up at the very beginning.

Cultured Start can cause issues too, but is more stable now than in the past.