Mount & Blade II: Bannerlord

File information

Last updated

Original upload

Created by

BUTR

Uploaded by

Aragasas

Virus scan

Safe to use

About this mod

Extension library for Mount & Blade II: Bannerlord containing common functions for modification development.

Requirements
Permissions and credits
Translations
Changelogs
Sources available at GitHub!

Installation
This module should be one of the highest in loading order and placed above native modules. Ideally, it should be second in load order after Bannerlord.Harmony.

For Players.
This mod is a dependency mod that does not provide anything by itself. You need to additionaly install mods that use it.

For Modders
Distributed libraries:
ButterLib 2.1.0 distributes with itself some libraries. Unfortunately, the game has a strict dependency system and if the versions don't match the game will crash. So here's the list of packages:
  • Microsoft.Extensions.DependencyInjection - 2.0.0
  • Microsoft.Extensions.DependencyInjection.Abstractions - 2.0.0
  • Microsoft.Extensions.Logging - 2.0.0
  • Microsoft.Extensions.Logging.Abstractions - 2.0.0
  • Microsoft.Extensions.Options - 2.0.0
  • Microsoft.Extensions.Primitives - 2.0.0

  • System.Reflection.Metadata - 5.0.0
  • System.Collections.Immutable - 5.0.0
  • System.Memory - 4.5.4
  • System.Buffers - 4.5.4
  • System.Runtime.CompilerServices.Unsafe - 4.5.3

  • Serilog - 2.10.0
  • Serilog.Extensions.Logging - 3.1.0
  • Serilog.Sinks.File - 5.0.0
We are unfortunately enforcing everyone to use exactly these versions. Microsoft.Extensions.* are 2.0.0 because Serilog is compiling against 2.0.0 versions of the libraries and the game is enforcing exact version match! Same for System.Reflection.Metadata, System.Runtime.CompilerServices.Unsafe is enforcing it.

Highlighted features:
  • ExceptionHandler - Catches all exceptions in BEW style and gives the ability to save the crash report
  • CrashUploader - Uploads those crash reports to https://butr.dev for creating tiny url's for sharing!
  • CampaignIdentifier - Associates unique string ID with every campaign based on the initial character.
  • DistanceMatrix - A generic class that pairs given objects of type MBObject and for each
  • pair calculates the distance between the objects that formed it.
  • DelayedSubModule - Execute code after specific SubModule method.
  • SubModuleWrappers - Wraps MBSubModulebase for easier calling of protected internal metods.
Check the /Articles section in the documentation to see all available features!

Troubleshooting
Unblocking DLL's
You may need to right click on every Bannerlord.ButterLib.*\bin\Win64_Shipping_Client\*.dll
 files, click Properties, and click Unblock if you extracted the zip file with Windows Explorer or other programs that try to secure extracted files.
Harmony installation issues:
Check Harmony's Troubleshooting for more info on how to fix it.