Skip to content
Bannerlord Wiki
Share
Explore
Tutorials

Rider Debugger and SetUp Tutorial

Set-Up Debugger
Download (My IDE of choice), open, and create a new project. Be sure to select .NET class library and to set the Framework to .Net Framework v.4.7.2
image.png
Now we will create a SubModule.XML file. Go to the path below, and create the ExampleUIMod directory.
Mount & Blade II Bannerlord/Modules/ExampleUIMod
Create a SubModule.XML file. Paste this code. For information about what each node means, go to
<Module>

<Name value="ExampleUIMod"/>

<Id value="ExampleUIMod"/>

<Version value="a1.0.0"/>

<SingleplayerModule value="true"/>

<MultiplayerModule value="false"/>


<DependedModules>

<DependedModule Id="Native"/>

<DependedModule Id="SandBoxCore"/>

<DependedModule Id="Sandbox"/>

<DependedModule Id="StoryMode"/>

</DependedModules>


<SubModules>

<SubModule>

<Name value="ExampleUIMod"/>

<Version value="a1.0.0"/>

<DLLName value="ExampleUIMod.dll"/>

<SubModuleClassType value="ExampleUIMod.SubModule"/>

<Tags/>

</SubModule>

</SubModules>

</Module>


Return back to Rider, and now click on Add Configuration located top right.
image.png
Click the plus button

image.png

6, Select Net Executable
image.png

Now click on the folder icon next to Exe path and choose your BannerlordLauncher.exe. Located here:
C:\Program Files (x86)\Steam\steamapps\common\Mount & Blade II Bannerlord\bin\Win64_Shipping_Client
image.png



Now select apply then ok. You have successfully configured the debugger!
image.png
Run Debugger
To run the debugger simply press the bug icon located top-right.
image.png
For more information on Debugging, please consult the documentation:
SubModule Setup
Right Click References and add this .dll file:
TaleWorlds.MountAndBlade.dll
image.png

image.png


Paste the following code:
using TaleWorlds.MountAndBlade;

namespace ExampleUIMod
{
public class SubModule: MBSubModuleBase
{
protected override void OnSubModuleLoad()
{
base.OnSubModuleLoad();
}
}
}
Congrats! you have configured your SubModule!
Configuring Build Output
When you delve deeper into builder epic C# mods, you will want to configure the build output and filename.
Right-click ExampleUIMod in RIder and click Properties.
image.png
Go to Debug and set the Output path to this directory. You will need to create a bin folder and a Win64_Shipping_Client folder. Click Ok
C:\Program Files (x86)\Steam\steamapps\common\Mount & Blade II Bannerlord\Modules\ExampleUIMod\bin\Win64_Shipping_Client\
image.png
Now you are ready to create amazing mods!
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.