Mount & Blade II: Bannerlord

File information

Last updated

Original upload

Created by

mylittletantan

Uploaded by

mylittltetantan

Virus scan

Safe to use

Tags for this mod

About this mod

Adds equipment and stats to the troop and hero encyclopedia pages allowing you to compare units a lot easier. Also lets you edit troops.

Requirements
Permissions and credits
Changelogs
This mod changes the encyclopedia page for units/heroes to show more information such as skill effects and the different equipment sets.

It can also be used to edit units in game, this feature is mostly meant to help modders test changes and help them create troops. Most things can be edited on the unit page, these changes will vanish when reloading a save. To save the changes you can export the unit to a .xml (will show up in the mod folder). Simply copy the npccharacter to your own mods spnpcharactes.xml or replace the original character in SandBox/ModuleData.


As the mod has its own GUI/Prefabs make sure it is below the native modules or the mods UI will not be loaded.
To install copy paste the EquipmentInEncyclopedia folder into your Modules folder in the Bannerlord install directory, then simply activate in the launcher.
To uninstall, remove the folder you copied.


This mod should be save compatible and safe to add/remove at any time.
This mod should work with custom/modded troops and items.
This mod should be compatible with all other mods unless they patch the same EncyclopediaPageVM or have their own versions of the GUI/Prefabs.


Please report any bugs/crashes that you believe are connected to this mod on the bug section.
 

Compatibility
Diplomacy Fixes
This mod has a slight incompatibility with Diplomacy Fixes as both mods change the hero page. Only the hero page seems to be affected and the other parts of both mods should still work. You will have to choose which hero page you want to use.
To use the DF hero page: Remove the EncyclopediaHeroPage.xml file from this mods folder. Then make sure Diplomacy Fixes is BELOW this mod in load order.
To use the this mods hero page: Remove the EncyclopediaHeroPage.xml file from Diplomacy Fixes folder. Then make sure this mod is BELOW Diplomacy Fixes in load order.

Telepathy
You can use both mods together. Open the EncyclopediaHeroPage in Telepathy/Gui/prefabs/Encyclopedia/EncyclopediaSubPages, you should see <!--Talk button-->, copy everything from <Widget> to </Widget> and paste it in this mods EncyclopediaHeroPage at the same place. Make sure this mod is lowest in load order and both mods will work.


Other modders feel free to do whatever you want with this mod, I honestly just made this as a proof of concept in the hopes someone else can make a better version, because there should be a better way to compare units than searching through xmls. 
I have added a custom ItemVM, EncyclopediaPageUnitVM and EncyclopediaHeroPageVM, using dnSpy you should easily be able see what I changed. These are then loaded instead of the normal pages by using harmony to patch GetEncyclopediaPageInstance() in EncyclopediaData. This was done to add DataSourceProperties for use in the EncyclopediaUnitPage.xml and the EncyclopediaHeroPage.xml.

To configure the ui, change the EncyclopediaUnitPage.xml/EncyclopediaHeroPage.xml. Using the developer console mod you can use ui.toggle_debug_mode which updates the ui every time you change stuff in the GUI/prefabs, without it you have to restart to see changes.

Please consider checking out my other mods