Documentation Coding Community Modding Documentation

Users who are viewing this thread

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:
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.
 
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:
 
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.
 
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.
 
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?
 
Thank you very much. This is invaluable for people like me who struggle to understand how these things work. You saved me from despair.
 
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:
 
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:
 
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
 
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:
 
Back
Top Bottom