Skip to content

In Game Methods

Yasin Karaaslan edited this page Jun 12, 2021 · 4 revisions

For now there are 5 methods you can use. To use them you need to create public static methods with their names in your class. I want to change the method calling system later on, so you will be able to call every method in MBSubModuleBase class.

For more information about MBSubModuleBase click here.

BannerlordModuleLoad (void)

This method is called during OnSubModuleLoad method, which is called during the first loading screen of the game, always the first override to be called, this is where you should be doing the bulk of your initial setup.

BannerlordGameStart (TaleWorlds.Core.Game, TaleWorlds.Core.IGameStarter)

This method is called during OnGameStart method, which is called immediately upon loading after selecting a game mode (submodule) from the main menu.

BannerlordGameLoad (TaleWorlds.Core.Game, object)

This method is called during OnGameLoaded method, which is called only after loading a save.

BannerlordTick (float)

This method is called during OnApplicationTick method, which is called once every frame, you should avoid expensive operations being called directly here and instead do as little work as possible for performance reasons.

BannerlordModuleUnload (void)

This method is called during OnSubModuleUnload method, which is called when exiting Bannerlord entirely.