Mount & Blade II: Bannerlord
0 of 0

File information

Last updated

Original upload

Created by

Vaeringjar - xtul

Uploaded by

noafk9

Virus scan

Safe to use

Tags for this mod

Mod articles

  • Modders: How to add your items to armoury

    In this article I will describe a detailed, step by step way to quickly add many items to an armoury. It may seem overkill for few items, but for anything over 50 items this will be godsend, I promise.
    Our goal is to add new Aserai Helmets to Aserai armouries. Currently, there's only one way to put items to the armoury.

    -----

    0. Setup
    I recommend using a text file such as Sublime Text for it's ability to:
    - find strings with Regular Expressions
    - select and write in multiple rows.
    However nothing is stopping you from using other text editor with similar functionality, or doing everything by hand.

    1. Get item IDs
    Let's say we have the following item definition XML:
    <?xml version="1.0" encoding="utf-8"?>

  • How this mod works and other details

    In this article I will summarize how this mod works step by step. You can view the source code here.

    When the save is loaded (or a new game is started), the item XMLs are loaded and all merged in memory into one, large XML. The following files are loaded, in order:


    DefaultItems.xml, must be present at all times. Contains only rare vanilla items.
    CustomItems.xml, user-defined items, could contain anything an user wishes. Features default XML override.
    Mods directory and all XML files within it. No matter what, all XMLs present here will be present in final, in-memory XML.


    If any XML contains invalid data it will be simply ignored. The game will not crash, items simply won't be added.
    This approach allows each user to have ...