Hello everyone,
while starting to mod a little bit and looking fortips on how to do things i most of time ended with with people telling i should use harmony to get things to work. Since Bannerlord is supposed to be a game allowing you to mod a lot of things it looked a bit suspect to me and i investigated a little more and came up with this solution.
Before we start.
NoHarmony is not by any mean something to prevent you from using harmony, i have a deep respect for the people who developed this tool. But Harmony should be used as a last resort, when nothing else worked, cause it might bring more issues than it would actually solve. So this mods aims to reduce harmony's use in banner lord and keep it for really unsolvable issues.
How it works.
NoHarmony loader is available as a DLL or a C# source file, add it to your project and derive your submodule classe from NoHarmonyLoader instead of MBSubModuleBase.
You will have two methods to override :
NoHarmonyInit() that you can leave as it is, (it's used for configuration and to load things before the main menu)
NoHarmonyLoad() where you will put models and behaviors you want to load in the game. (using a collection of methods including "AddBehavior" "ReplaceBehavior" "AddModel" "ReplaceModel")
Features.
External links.
GitHub project page
NoHarmony wiki (on GitHub)
Latest release available here
Research post about MBSubModuleBase
while starting to mod a little bit and looking fortips on how to do things i most of time ended with with people telling i should use harmony to get things to work. Since Bannerlord is supposed to be a game allowing you to mod a lot of things it looked a bit suspect to me and i investigated a little more and came up with this solution.
Before we start.
NoHarmony is not by any mean something to prevent you from using harmony, i have a deep respect for the people who developed this tool. But Harmony should be used as a last resort, when nothing else worked, cause it might bring more issues than it would actually solve. So this mods aims to reduce harmony's use in banner lord and keep it for really unsolvable issues.
How it works.
NoHarmony loader is available as a DLL or a C# source file, add it to your project and derive your submodule classe from NoHarmonyLoader instead of MBSubModuleBase.
You will have two methods to override :
NoHarmonyInit() that you can leave as it is, (it's used for configuration and to load things before the main menu)
NoHarmonyLoad() where you will put models and behaviors you want to load in the game. (using a collection of methods including "AddBehavior" "ReplaceBehavior" "AddModel" "ReplaceModel")
Features.
- Compatibility, NoHarmony will manage most of the coding and updates into a single DDL. So you won't need to rewrite your class if Taleworld change their calls, simply update the DLL when the new version is out.
- Logging and error control, choose how much control you want over the error control and the logs. It can go from completely silent to track for you every model and behavior and the moment they are loaded in the game.
- Easy to use, I have made it as simple as possible to use and preventing most errors you can do while making your own submodule class.
- Documentation, .NoHarmony methods are commented and explained to allows beter use and understanding, the wiki will be filled to go further and makes more in depths use of it's feature or the SubmoduleBase class TW offers.
External links.
GitHub project page
NoHarmony wiki (on GitHub)
Latest release available here
Research post about MBSubModuleBase
Last edited: