Community Modding Documentation

Currently viewing this thread:

Ster

Veteran
Best answers
1
Community Modding Documentation for Bannerlord

Over the past few weeks I have been putting together some basic documentation for modding Bannerlord. With the release of Early Access, many of us are eager to check out some of the new mods that Bannerlord will bring. While this documentation is still a heavy work in progress, I feel that it has at least reached a point where someone with basic understanding of C# will be able to create a basic mod. I hope that this will give the modding community a head start into modding the game and hopefully make a lasting impact.


What this Documentation currently includes
  • Step-by-Step instructions for setting up and debugging a Project
  • Basic information on how to Mod without C#.
  • General overview of important Classes and what they are used for.
  • Step-by-Step Tutorial for a basic C# Mod
  • Dark Mode
  • Search by Headings
Upcoming Content & Features
  • More Tutorials & Guides
  • Gauntlet Documentation
  • A breakdown of more XML Files
  • More detailed descriptions
  • Engine configuration

Any contributions or even just general feedback for the documentation would be greatly appreciated!
 
Last edited:

FDEL

Sergeant
Best answers
1
The pastebin example (https://pastebin.com/x8NU4FLN) for SubModule.xml doesn't work. If used as-is, the launcher will just crash with no warning or error message. However the on-page example (for the basic-csharp-mod page) works.

I tracked this issue down to the cause, which is that the version string seems to have a strict format. The pastebin example doesn't work because it had the version string as "1.0". I've tried various values and found the following:

- "1.0" doesn't work
- "v1.0" doesn't work
- "0.0.1" doesn't work
- "v0.0.1" works

The format looks like it requires some letter followed by a major-minor-patch versioning scheme.

Hope it helps someone.
 

Kaasovic

Sergeant at Arms
Best answers
1
I had some trouble setting the Framework while creating the project in Visual Studio 2019 as there was no such option. What I ended up doing was creating it with no Framework set (defaults to .net core 2.0) and then manually setting it in the csproj XML file by setting the TargetFramework manually to
XML:
<TargetFramework>net472</TargetFramework>
which solved the issue for me.

Also made a contribution on github providing some useful links in the setting up steps, looking forward to do some more contributions as I figure stuff out :smile:
 

HolyRomanSloth

Recruit
Best answers
0
Instructions unclear, spawned in King Harlaus who is now leading an army of 1800 Swadian knights and lots of butter.
 

Jyger

Recruit
Best answers
0
Hey it seems that the CampaignSystem DLL is actually included in the game files now. I noticed in the Getting Started section it says that modding is limited due to the lack of CampaignSystem DLLs and modding tools (which of course are still not included).

Just thought it was worth mentioning that they are included because I've been going over 2 mods namely DeveloperConsole and TimerFix that seem to be accessing the Campaign class and directly modifying quests etc. which I thought might be worth mentioning to anyone still wondering whether it was possible to modify campaign stuff.
 

Ster

Veteran
Best answers
1
Hey it seems that the CampaignSystem DLL is actually included in the game files now. I noticed in the Getting Started section it says that modding is limited due to the lack of CampaignSystem DLLs and modding tools (which of course are still not included).

Just thought it was worth mentioning that they are included because I've been going over 2 mods namely DeveloperConsole and TimerFix that seem to be accessing the Campaign class and directly modifying quests etc. which I thought might be worth mentioning to anyone still wondering whether it was possible to modify campaign stuff.
Yes, CampaignSystem DLLs were included with Early Access. I have yet to add basic documentation for these DLLs though. I am the developer of the DeveloperConsole mod as well. I've been spending a lot of my time trying to give support for the mod to better inform mod users in the community. Hopefully those that I inform will help others in the future. I guess I can probably remove that part of the documentation, just know that there is no documentation for the CampaignSystem DLLs right now. I will add it when I can. I would take a look at the Basic C# Mod section of the documentation for more information on how to mod the game.
 

Jyger

Recruit
Best answers
0
Yes, CampaignSystem DLLs were included with Early Access. I have yet to add basic documentation for these DLLs though. I am the developer of the DeveloperConsole mod as well. I've been spending a lot of my time trying to give support for the mod to better inform mod users in the community. Hopefully those that I inform will help others in the future. I guess I can probably remove that part of the documentation, just know that there is no documentation for the CampaignSystem DLLs right now. I will add it when I can. I would take a look at the Basic C# Mod section of the documentation for more information on how to mod the game.
Ah I see, fair enough. I've already gone over your Basic C# Mod, it was very helpful thank you :smile:

Currently I've been looking through the DeveloperConsole source code with dnSpy and it's been quite helpful to get things working. From what I've been going over so far, you seem quite knowledgable about various classes/functions within the TaleWorlds namespaces, I was just wondering how you acquired this knowledge, was it just trial and error? Also I assume you had access to Bannerlord qutie a bit earlier than it's EA release?
 

Ster

Veteran
Best answers
1
I've been modding the game since November so I am quite familiar with the inner-workings of the game.
 

MitchPTI

Veteran
Best answers
0
This is phenomenal, so excited to see this level of documentation already being put together!
 

GitiUsir

Sergeant
WB
Best answers
0
Thank you very much. This is invaluable for people like me who struggle to understand how these things work. You saved me from despair.
 

Kaasovic

Sergeant at Arms
Best answers
1
Went through the Items XML and wrote down the nodes with their attributes/childnotes etc.
Still have to go through Materials and child nodes.
List was kinda rushed and doesn't look that pretty :razz:
 

Ster

Veteran
Best answers
1
Went through the Items XML and wrote down the nodes with their attributes/childnotes etc.
Still have to go through Materials and child nodes.
List was kinda rushed and doesn't look that pretty :razz:
If you'd like to create a pull request for these changes, I can add them to the community documentation. Great work btw :xf-smile:
 

Kaasovic

Sergeant at Arms
Best answers
1
If you'd like to create a pull request for these changes, I can add them to the community documentation. Great work btw :xf-smile:
Will do once I have sorted out the missing nodes. The MarkDown could probably be improved as well, but I am no expert on that area
 

Rhuarc

Knight
M&BWBWF&S
Best answers
0
Just getting started with modding. So excited they moved over to C# with Bannerlord cuz I'm really familiar with it. Will let you know how I find your documentation! :smile: