A B C D E F G H I J K L M N O P Q R S T U V W X Y Z #
Home » Guides » Mount & Blade II: Bannerlord - How to Edit Units

Mount & Blade II: Bannerlord - How to Edit Units

Written by Deus Volt   /   Apr 9, 2020    


Short guide on how to get started with editing your own units in Bannerlord.

Guide to Edit Units



Getting Started



Right-click on M&B Bannerlord --> Manage --> Browse local files



Modules



Now open the folder: Modules



SandboxCore



Open the folder SandboxCore (ignore the other folders for now).



ModuleData



Now head for the folder ModuleData.



Spnpccharacters.xml



Open the spnpccharacters.xml with any editor (I recommend Notepad++).

But first make a copy just to be safe!



Fin



Before you change anything, make sure you made a copy of the .xml

This should look like this now:



You can skip the following textwall if you want and head to the next section.

Under skills you can change the value of the skills.

Under equipment you can change the equipment the unit has (some might have multiple equipment trees. You can give the trees different equipment, so that the unit gets randomized equipment in battle).

for example: EQ-tree 1 got 1 sword:

  • <equipment slot="Item0"
  • id="Item.sturgia_sword_2_t3" />

and EQ-tree 2 got an axe:

  • <equipment slot="Item0"
  • id="Item.sturgia_axe_3_t3" />

Now the unit can hold a sword OR an axe in battle, since both weapons are for item slot 0 ("Item0") so there is a 50% chance for one of the items. If you make 3 different "Item0" weapons there is a 33.333333% chance and so on.

Character section

  • <NPCCharacter id="sturgian_soldier" <-------- don't change
  • default_group="Infantry" <-------- infantry, archer or chavalry etc
  • level="16" <------- level of the unit
  • civilianTemplate="NPCCharacter.sturgia_troop_civilian_template_t2" <--- Character model
  • name="{=brlJJW5I}Sturgian Veteran Fyrd" <-------- Ingame Name
  • occupation="Soldier" <---- don't change
  • culture="Culture.sturgia" <---- don't change
  • skill_template="NPCCharacter.infantry_heavyinfantry_level16_template_skills"> <--- don't change

Gear section

<equipmentSet> <--- Start <...>
<equipment slot="Item0" <---- item 1
id="Item.sturgia_sword_2_t3" />
<equipment slot="Item1" <--- item 2
id="Item.northern_round_shield" />
<equipment slot="Item2" <--- item 3
id="Item.northern_spear_2_t3" />
<equipment slot="Head" <--- Headgear
id="Item.goggled_helmet_over_leather" />
<equipment slot="Cape" <--- Shouldergear
id="Item.wrapped_scarf" />
<equipment slot="Body" <--- Bodygear
id="Item.northern_padded_gambeson" />
<equipment slot="Gloves" <--- Handgear
id="Item.highland_gloves" />
<equipment slot="Leg" <--- Thicc legs
id="Item.highland_boots" />
</equipmentSet> <--- end (always with </...>)


Easy isn't it? just don't do any spelling mistakes and it will work out.

Skill section

Just don't change the names of the "<skill id="..." and you will be fine. Just touch the numbers and destroy the balance of the game, haha. Or fix the heavy lancers...you know which ones...

<skills>
<skill id="Athletics"
value="70" />
<skill id="Riding"
value="30" />
<skill id="OneHanded"
value="70" />
<skill id="TwoHanded"
value="40" />
<skill id="Polearm"
value="70" />
<skill id="Bow"
value="30" />
<skill id="Crossbow"
value="10" />
<skill id="Throwing"
value="40" />
</skills>


Facetime. Honestly, i never touched this.

<face>
<face_key_template value="NPCCharacter.villager_sturgia" /> <---- change to make beautiful
</face>


But wait! There is more!

In the spitems.xml you can find all the precious item-ID's your heart desires.



Now have fun messing with the game. 

The original xml is gone! What now?!

If you f'ed it up and forgot to make a copy of the xml. you can always delete it and repair M&B Bannerlord via Steam. After that, the old xml should be back.

Timesaver

Copy the xml, and edit the copy on a second screen, while playing. so you can look up the armor etc ingame.

How to get all items ingame

\documents\mygames\Mount and Blade II Bannerlord\Configs\engine_config.txt ---> cheat_mode = 0

Change the 0 to a 1.

Now you are able to look up all ingame items if you open your inventory. and then search for the ID in the spitems.xml via search.



Written by Deus Volt.