• Please note that we've updated the Mount & Blade II: Bannerlord save file system which requires you to take certain steps in order for your save files to be compatible with e1.7.1 and any later updates. You can find the instructions here.

Monitor for any changes in your code and automatically compile module system.

Users who are viewing this thread




Monitor for any changes in your code and automatically compile module system with nodemon.

Perfect for development

Nodemon is a development dependency that monitors for any changes in your project and automatically re-compiles your code, saving time and tedious work.
Nodemon does not require any changes to your code or method of development.
It simply wraps your project and keeps an eye on any files that have changed.
You will need:​
  • Node.js installed on your system. (its Nodemon dependency)​
  • Nodemon (install it globally)​
  • W.R.E.C.K. - If you want to speed up your development, W.R.E.C.K is first thing you should implement in your project. Its easy and fun!​

Installing nodemon globally if you’ve npm setup already​
Execute from your terminal.
npm install -g nodemon

Nodemon Config

Create file nodemon.js in your module system directory,

    "ignore": ["ID*.py"],
    "verbose": false

In some cases you will want to ignore some specific files, directories or file patterns, to prevent nodemon from prematurely re-compiling your project.
In our case, we will ignore compiler auto-generated ID files.
If your nodemon keeps restarting even if you didin't made any changes, set verbose to true. It will print the reason why nodemon has restarted.
You can then add it to ignore parameter.

Execute nodemon and watch files for changes.​

Create compile_and_watch.bat file in your module system directory.
Nothing crazy here.
nodemon compile.py tag %1 %2 %3 %4 %5 %6 %7 %8 %9

Aaaand that's about it. Instead of running compile.bat 500 times a day, start compile_and_watch.bat and relax.
With this simple solution, you will save tons of precious time and thousands of mouse clicks!

Last edited:
Top Bottom