Mount & Blade II: Bannerlord

File information

Last updated

Original upload

Created by

Manuel Martinez

Uploaded by

onejuanez

Virus scan

Safe to use

About this mod

This mod increases troop tier cap from 6 to 20, you can also customize your troop tier icon.

Requirements
Permissions and credits
Changelogs
Introduction
My inspiration came while I was playing Boogies Troop Upgrade. Out of the many troop trees available, I favored this troop tree structure the most. However, the game kept crashing after a few in-game days due to vanilla's limitation on handling tiers above 6.

I spent several hours searching for an alternative troop tier mod that extends beyond Tier 6 but couldn't find anything suitable. Although there were mods extending beyond Tier 6, they lacked custom icons. It wasn't until I saw a post on Boogies' mod page discussing the issue that I learned how to start tracing errors and this inspired me to create this mod.

MCM
I have included MCM settings, allowing you to assign the icons to each tier above 6.
For example, you can assign T7 troops with Icon 20 (as shown in screenshots).

Tier Icons  v1.1.2 Update
Some of the icons exists in the vanilla game, they are just not mapped to anywhere in the game.
Below are the Icon, and ID, as of v1.1.2:
- Icon 1
- Icon 2
- Icon 3
- Icon 4
- Icon 5
- Icon 6
- Icon 7
- Icon 8
- Icon 9
- Icon 10
- Icon 11
- Icon 12
- Icon 13
- Icon 14
- Icon 15
- Icon 16
- Icon 17
- Icon 18

Upgrade Xp Cost  v1.1.2 Update
The xp cost for upgrade from T1 - T6 will follow vanilla rates.
From T7, you can modify the xp cost to upgrade your troops in MCM options.
I would recommend 1700 (T5 to T6) or 2100 (Supposedly T6 to T7).

Troops Wage
Vanilla wages are calculated as such, wages cost are increased by the previous increment + 1.
As such, I'll be implementing the same logic calculation of wages for T6 and up.
T1: 1 + 1
T2: 2 + 1
T3: 3 + 2
T4: 5 + 3
T6: 8 + 4
T7: 12 + 5
T8: 17 + 6
T9: 23 + 7
T10: 30 + 8
T11: 38 + 9
T12: 47 + 10
T13: 57 + 11
...

Tutorial: Customize Tier Sprite  v1.1.2 Update
This mod has the capability to customize troop tier sprite.
Sprite image must be 71 x 71 pixels, png format.
You will need to know how to generate tpac file.

Follow this tutorial to learn how to generate -> Generating and Loading UI Sprite Sheets
Tbh, it's pretty tedious. I have tried to simplify some of the process.
And you will also need to download Mount & Blade II: Bannerlord - Modding Kit from Steam; 25GB my friend.

If you are still very determined, here are the rough steps to do this:
  • Put all your png into Mount & Blade II Bannerlord/Modules/TroopTierTweaks/GUI/SpriteParts/ui_trooptiericons/
  • Run Mount & Blade II Bannerlord/bin/Win64_Shipping_wEditor/TaleWorlds.TwoDimension.SpriteSheetGenerator.exe (You need Mount & Blade II: Bannerlord - Modding Kit for this)
  • A sprite sheet will be generated AssetSources/GauntletUI/ui_trooptiericons_1.png and a sprite data xml file will be generated /GUI/TroopTierTweaksSpriteData.xml
  • Start Mount & Blade II Bannerlord/bin/Win64_Shipping_wEditor/TaleWorlds.MountAndBlade.Launcher.exe
  • Ensure my mod is selected in the launcher, then click Play
  • Once in game menu, press Alt+` to bring out the console.
  • Type resource.show_resource_browser, then navigate to Modules/TroopTierTweaks/AssetSources
  • Click Scan new asset files, then exit the game. You got your tpac file in Modules/TroopTierTweaks/Assets/GauntletUI/ui_trooptiericons_1_tex.tpac

As of v1.1.2, I have included a python script (parse_sprite_data.py) you can run that will update the TroopTierTweaksSpriteData.xml and icon_dictionary.xml.
If you have ran parse_sprite_data.py, you are done.

Otherwise, if you prefer to do this manually, you can proceed to the next step.
Editing the TroopTierTweaksSpriteData.xml file.
General\TroopTierIcons\ must be appending to the SpritePart.Name.
As shown in example below:

  <SpriteParts>
    <SpritePart>
      <SheetID>1</SheetID>
      <Name>General\TroopTierIcons\TTT_Icon_1</Name>
      <Width>71</Width>
      <Height>71</Height>
      <SheetX>873</SheetX>
      <SheetY>4</SheetY>
      <CategoryName>ui_trooptiericons</CategoryName>
    </SpritePart>


Once you have done that, scroll all the way down and do the same for GenericSprite.Name and GenericSprite.SpritePartName

    <GenericSprite>
      <Name>General\TroopTierIcons\TTT_Icon_1</Name>
      <SpritePartName>General\TroopTierIcons\TTT_Icon_1</SpritePartName>
    </GenericSprite>


Last step, update Modules/TroopTierTweaks/ModuleData/icon_dictionary.xml definition.
Name will represent what is shown for MCM dropdown options.
Value must follow the the SpritePart.Name from TroopTierTweaksSpriteData.xml .

Your sprite should show up in the dropdown options.
If all else fails, just use my sprite.

Requirements
This mod requires Harmony and MCM, I was working on these versions while developing the mod.
  • Harmony - 2.3.3
  • MCM - 5.0.0 (Tested and working on v5.9.2)

Compatibility
Compatible with Boogies Troop Upgrades, Warlords Battlefield, My Little Warband (Mod is hardcoded to T6, with T7 patch),  and various Troop Tree Overhaul mods.
Incompatible with Unlock troops T7-t13, Tier 7 Unlocker, and Troop Tier Plus

Installation
Either install via Vortex or unzip TroopTierTweaks into your Bannerlord's Module directory.
Default Bannerlord Module Directory


C:\Program Files (x86)\Steam\steamapps\common\Mount & Blade II Bannerlord\Modules\