Mount & Blade II: Bannerlord
Help us shape the future of the Vortex mod manager by taking our survey
0 of 0

File information

Last updated

Original upload

Created by


Uploaded by


Virus scan

Safe to use

About this mod

A very Humble Unit Editor for creating and editing all units, including troops, lords and even non-combatant NPC's.

Permissions and credits
Say hello to the new and (arguably) improved:

HUE - The Humble Unit Editor v1.3
Did I go overboard this time? Maybe. Little gremlins in my head just couldn't stop screaming "MORE".
So what's new?
< < < E V E R Y T H I N G > > >

The entire program has been rebuilt from scratch to make it easier to work with, add features and hopefully make it as compatible as possible with future developments without having to redo things much.

Before we get to it's features, I have an important Public Service Request to make:
FOR ALL THINGS GOOD AND HOLY, CAN WE PLEASE NOT USE THE SAME NAMES/ID's? thank you, this is *totally* not why this might have taken longer than expected. There WILL be item name derpiness.

What are it's features?
*German accent* Let me show you it's features *insert happy German chuckle*

A standard menu bar now contains the core program functions.

In the File menu you have:
Set Directory:
No more pesky restarts, press this bad boy to set the game directory on the fly.
Load Unit Patch:
This will load any unit XML (NPCCharacter elements) in to the mod for editing. Just select an XML file that contains units in it. Works not only for patches created by this mod but also others. Read below on how to use this for BannerPeasants (which you should definitely check out if you haven't!).*
Load Custom Culture: With some help from Gauneer I've mod this mod able to jive with his Bannerlord Kingdom Creator. Select the cultures.xml generated by his program. It will automatically generate all non-combatant NPC's (which you can of course edit), all you need to do is create the militia units and starting units (basic and noble) for the culture. Once you press finalize, it'll produce make all the necessary adjustments in his xml's!  More on this below.
Load Custom Items:  Just select an items XML that contains either Item or CraftedItem elements. All items defined will be added to the item selection menus for the respective item type. If there a custom item with an ID that already exists, my program WILL scream at you.
Create New Unit: As the name might potentially give away, this will generate a blank slate unit with only a name and ID (that I sure do hope you plan on making unique *obnoxious cough*). More on this below.**
Edit Units: This brings up the selection menu for adding and removing units from the Main Unit Editing List for editing.

In the Commit menu you have:
Commit to mod: Chose a unique mod name. All the units currently in the Main Unit Editing List will be written to a unit XML. The unit XML will  be placed inside a ModuleData folder which in turn will be placed inside a folder with your modname, alongside an appropriate SubModule.xml. All you have to do now is activate the mod in the game launcher. Just be cautious of load order.

Edit Base Code: It's back bois. Takes units from the Main Unit Editing List and replaces the unit nodes in spnpccharacters that have the same id. If a new unit has been added, adds the new node at the bottom instead! Creates a backup spnpcharacters_backup if one does not already exist.

Restore Original: If you have backup, will replace the current spnpccharacters file with the backup. No more manual labour for you my friend! Any modded version you have made will be saved as spnpcharacters_modded If you don't have a backup, either you haven't used the tool yet or you managed to yeet the backup, verify dem files boi!

Restore Modded: If a spnpccharacters_modded exists, replaces spnpcharacters with it, bringing back all the modded goodness to the game. If not found, doesn't really do anything except tell you the obvious.

The Unit Editor
The new Unit Editor is pretty comprehensive. Below is an attempt at explaining what each things is, when it is required etc. If it just says "FIIK", that would be F***** If I Know.
Unit Name:
The name the unit will appear with in game
Translation ID: This is used for locale translations. If I understand correctly, you need to add this to a strings xml for new units if you want their names to be translatable.
ID: The ID used by Taleworlds to identify the unit
Culture: The culture the unit will belong to
Basic Troop: If this unit is the first in the basic or noble troop tree for a given faction.
Level: The unit level. Will govern how much XP needed when upgrading. Note: If you set an upgrade path to units of lower or same level, spooky things may occur.
Age: Unit age, thought I frankly don't know the difference between this one and the one in Body Properties.
Gender: That oh so problematic topic: will you conform to the gender binary?
Is Mercenary: FIIK
Default Group: Which Formation this unit will default to (F1 being infantry, F2 archers, F3 cavalary etc in game)
Occupation: The occupation of the unit? Soldiers be soldiers. Lords be Lords.
Formation Position Preference: FIIK. Sturgian Veteran Warriors are the only units that have this.
Voice: The... voice?
Battle Template: I believe this provide equipment templates for combat which can be merged with additional equipment sets?
Skill Template: Like Battle Template, I think it provides a template for skills? Or maybe skill perks? FIIK.
Civilian Template: I believe this is the equipment template for civilian scenarios.
Upgrade Requires: Used for upgrading from foot to cavalry, determines if you need to become a horse poorer.
Is Template: FIIK
Is Hero: FIIK

Body Properties
This is the default face used.
Hair: This is the default hair used. You should actually be able to add multiple like equipment sets but... nah. That can come later.
Beard: Like hair, sets default hair used.
Age: Is this Age? Is the attribute Age the real Age? Who knows? FIIK.
Build: FIIK
Key: I believe this is the key that can be copied (ctrl+c) from character creation screen if you want a particular look.
Version: FIIK
Weight: Maybe it's a weight scale where 0 is a stick and 1 is a mucho chonky boi but frankly, FIIK.
Don't forget to press Set Properties to set any of the 5 properties above!


Skills should hopefully be self-explanatory, just press Update Skills when you want to change any of the values.

Primarily for lords. Sets how they behave, while the combat related ones I am pretty sure determine their skills and perks.

Here's the tricky part. When making a mod, equipment sets created will be merged with the equipment sets that already exist in the unit definition in spnpccharacters. Let's take an example: let's say a unit has 3 sets. The first has a sword, the second has an axe, the third has a spear. This unit has an equal 1/3 probability of spawning with either a sword, axe or spear. Let's then say you add 3 more equipment sets with a mod, all three having a sword, axe and spear respectively. That means that the unit still has a 1/3 (2/6) probability of spawning with either sword, axe or spear. If you instead add 3 equipment sets, two with swords and one with spear. With a total of 6 sets, this means the unit now has a 1/2 (3/6) probability of spawning with a sword, a 1/3 (2/6) probability of spawning with a spear and only 1/6 to spawn with an axe.

Realising some people want to be able to make sure all their units have the same weapon or piece of armor etc, we now have the following:

Overwrite Equipment Slots:
Press Edit on the slot you want to change and select the item from the list. If it's any of the handitem slots (Item0,...,Item3), you need to select the weapon type from the dropdown first. Any item set in here will overwrite ALL equipment sets in that slot. So even if you have 3 sets with axes and spears in slot 0, if you set a sword in slot 0 in here, ALL of them will now spawn with a sword. This is how they currently do it for cavalry units and I realised it works for any of the slots.

Edit Equipment Set X: This will open Equipment Set X (X being the number of the equipment set, units usually have 3). Used in the same was as Overwrite Equipment Slots.

Add Equipment Set: This will copy the last Equipment set as a basis for a new one. So if there are currently 3 equipment sets, this will copy Equipment Set 3 and make a new set called Equipment Set 4.

If you wish a slot to be empty, select Empty (for hand items, select the None drop down option, then select Empty). This is especially useful in Overwrite Equipment Slots if you want to force certain slots to be empty for a certain unit.

Upgrades To
Sets the units this unit can upgrade to, which is how you build a troop tree. I'd love  to figure out a good way to plot this out in the software but for now I recommend some good ol' fashioned pen and paper or that mushy memba thingy you got between your ears to keep track of it. I haven't tried cross-cultural upgrades, so if you're feeling adventurous,  please do tell me how it goes.

* BannerPeasants   works on the principle of generating equipment sets to meet a probability of a unit carrying a flag. If a unit has 10 equipment sets and one of the sets contains a banner, thatmeans 1/10 of those units will spawn with a banner. Due to complications of how equipment sets work and so (and probably me no big brain enough), the only way I found to make this compatible with BannerPeasants  is by loading both the item file "flags.xml" using Load Custom Items and then loading the units file "newtroops.xml" using Load Unit Patch. 
All the units should now load with all of their equipment sets. The last equipment set is the equipment set with the banner inside. Edit whatever units you want and generate the mod. Here's the important bit: Don't load my mod. Take the generated unit xml, rename it to "newtroops.xml" and replace it in the BannerPeasants ModuleData folder.
*My mod won't do all the work for you, the first units of the troop tree must be created (basic and noble) and 4 militia units. All other npc's will be generated automatically according to whatever cultural template you chose in his mod. All these units can be edited though once loaded! Note: Right now my mod merges npcs with lords in to a single npcs file.

*** When creating a new unit, a thing to know is that the Main Editing List doesn't like it when it has two units of the same name. In fact, it will outright refuse, and rightfully so, how dare you!

Jokes aside, if you are making units for starting a new troop tree, ensure that if they are the first units that you set Basic Troop to True. Also, don't forget to set the culture, otherwise the unit won't pop up in the Edit Units menu. As for what to set, if you don't know what you're doing, the bare minimum for a functioning soldier should be:

Level -> technically you could pick any but try to follow an ascending order from 6,11,16,21,26,31.
Age -> Not necessary but you may end up with an absolutely hilarious child running around armed to their teeth if you don't!
Default Group -> Whatever fits the unit you are making
Occupation ->
Civilian Template - > Set it to one that matches the culture
Face -> Set it to the culture that fits, if you don't you'll have to live with employing child soldiers!
Skills -> From Onehanded down to Athletics, everything after that is superfluous for a combat npc.
Equipment -> you do you man
Upgrades to -> unless it is the last unit of the tree

Final Thoughts
I have not thoroughly tested this! I have made basic modifications to a small number of units just to make sure the game doesn't scream at me and so far it has worked.

Why do the names look so strange in the program you may ask? This is because of so many damn items and units have the exact same name. To make is possible for you to differentiate between the names (and to even make it possible to edit them), I had to find ways to give each repeated name an identifier. In some cases it works really well, like Bolt A, Bolt B, Bolt C etc or Aserai Guard, Battania Guard etc. In other cases it's just pants-on-head r*******, like Highland Cloak Cloak. My personal favourite which isn't at all driving me mad is the mutliple instances of Empire Empire Judge, incase you weren't sure he's Judge in the Empire (even though he isn't wtf Taleworlds, why do judges of other cultures all have the empire culture tag!?). I'm sorry if you got hyped about editing the Judges but right now they are my enemies and I need some time away from them before they give me an aneurysm.

If you spot anything that seems flat out wrong, broken annoying or anything, either hit me up in the comments, drop a fat deuce in the bug reports or PM me if you're feeling shy, I don't bite <3

And as always,
Happy Editing