Mount & Blade II: Bannerlord
0 of 0

File information

Last updated

Original upload

Created by


Uploaded by


Virus scan

Safe to use

About this mod

ModLib is a dependancy mod that provides useful code and a settings menu for mods to use.

Permissions and credits
ModLib is a modder's resource mod which provides useful code and an easy to use mod settings menu for modders to hook into.

1.3 Version
ModLib has had some major changes to how it should be implemented from version 1.3 onwards. Modders, please see this Wiki page for details on the changes. 
These changes will reduce mods' dependancy upon ModLib, meaning they will be able to run even if ModLib is not installed.

Modders: You can find the source code for ModLib here. For information on using ModLib with your mod, and how to hook into the mod settings menu, check out the mod's Wiki.

ModLib is a mod that other mods depend upon. If you are using a mod that requires ModLib, such as Bannerlord Tweaks, ensure that ModLib is listed above that mod in the mods list.

Unblock the mod's .dll files
Windows automatically flags .dll files downloaded from the internet as suspect and puts a security block on them. While this is usually good, it causes problems with Bannerlord's mod loading system. To fix this, open the ModLib mod folder in your modules folder, then navigate to bin -> Win64_Shipping_Client. Right click on ModLib.dll and select Properties. In the popup window, check the 'Unblock' checkbox at the bottom of the General tab. Do the same for 0Harmony.dll and ModLib.Patches.dll as well.

Unblock all files with PowerShell (advanced method)
If you feel comfortable using a terminal, you can use PowerShell to automatically unblock all files in the Bannerlord directory. This will fix not just the files for this mod, but those for others that have issues also. Follow the instructions below:

Try running the game in administrator mode
Navigate to "C:\Program Files (x86)\Steam\steamapps\common\Mount & Blade II Bannerlord\bin\Win64_Shipping_Client" then right click on the file named "TaleWorlds.MountAndBlade.Launcher.exe" and click properties. Go to the "Compatibility" tab and check the "Run this program as an administrator" checkbox, then hit OK. (This requires you to have administrator priviliges on your computer.)

Try Another Launcher
Other modders have created better launchers for the game that help fix some of the issues that are caused by the default one. 
Try one of these:
Alternative Bannerlord Launcher
Fixed Launcher

Check other mods for issues
Mods that are not setup correctly will cause issues for all other mods that you have added to the game. One bad mod will bring the whole house down.

Make sure that ModLib is beneath all of the official modules in the launcher. This mod depends on code from the official modules and needs to be loaded after them. It has been brought to my attention that other mods that don't have their SubModule.xml file setup correctly can cause problems for those that do. If the mod load order is being jumbled up, check through the SubModule.xml file for each mod you have installed and ensure they contain this piece of code:

    <Official value="false"/>
        <DependedModule Id="Native"/>
        <DependedModule Id="SandBoxCore"/>
        <DependedModule Id="Sandbox"/>
        <DependedModule Id="CustomBattle"/>
        <DependedModule Id="StoryMode"/>

If they are missing even one of the lines, edit the SubModule.xml file and add the missing pieces in. Check the launcher again to see if the mod order is correct. The official TaleWorlds modules should all be grouped together at the top.
Note: If you do this incorrectly it will add to your issues. I only recommend this if you are confident in what you are doing.

Don't edit the SubModule.xml file for ModLib
I have gone through and checked this file many times. There are no issues with it. Changing it will just add to your problems.

Even mods that are not activated in the launcher can cause problems.
If none of the above works, try temporarily removing all other mods from the Modules folder except for this one. Run the game and see if it will run with just this mod.
Remember: Simply deactivating the mods won't fix the issue, you have to actually remove them from the modules folder.
When you get the game to run, add one mod back and run the game again. If it still runs, add one more mod and run the game again. Repeat this, going one mod at a time, until you find the mod that causes the issue.