Documentation Coding Community Modding Documentation

Users who are viewing this thread


Yeah I'd love to write up some guides for when I get my head around it all. If you're doing a docblock style auto documentation scheme, I have been commenting using triple slash xml format:

/// <summary>
/// blah
/// </summary>

As outlined in the DocFX guide.

I'd be happy to send you the files I have commented when you get your autodoc up and running if it would work. I am wary of posting TaleWorlds source code on the net though, which is why I have only added the generated docs to that github.


With a little more mentoring added and a verification, tutorials like this one and this one need to be in this guide.
You are right, these are definitely helpful articles, but I wouldn't call it tutorial based on what that guy asked for. Because I'm 100% sure that, he would now say "In nowhere its saying that we should use SaveableClass, I thought it was a comment" or "You didn't say we have to name it SyncData in anywhere, it should be more detailed and you should explain it" etc. So you are seeing the problem, right? If one have no prior knowledge about attributes or inheritance then those writings are becoming buzzwords for them. Which is understandable of course. I'm not blaming anyone but they have to learn that by themselves until someone with a lot of free time come up and create super detailed tutorials.

My curiosity is peaked that, for some reason, Tale used different solutions to solve the same problem in different parts of the code... instead of DRY. Notice how static dictionary data is loaded, parsed and processed into game objects differently depending on the files. If a modder changes or adds an XML, they might expect theses processes (merges, etc.) to behave consistently. However, in at least one case, document names are literals in a bespoke load method.
Even class and method fields don’t use consistent name standards.
That's true and I know why. This is because of how Taleworlds works. There are two reasons of this mess.
  • Taleworlds is following - do first, make it okayish, then change code to something moddable for modders. This is more like a PoC approach, so that team leads and Armagan can approve or tweak them before they spend too much time to waste for something bad. However, this approach is not good at all. You are doubling and perhaps tripling the work you will do with this approach. And it creates weirdness and integrity issues within the same code base. And since you actually don't have any alignment in your code, you also don't have notation rules and such.
  • Taleworlds doesn't have very long-lasting bulk plans about the future. Apart from the core features, most of the other side features we are seeing in-game are just ad hoc decisions. They have a high-level idea, but later, when it comes down to break that into pieces in game design, they are not keeping their fidelity and they are changing it based on the situation. This doesn't just make gameplay strange but also making code weird as well. They are doing something, then they are seeing that its causing too many issues, they are stripping down features instead of fixing it, and since the first structure is planned by keeping the initial features in mind, this other version with less features is not actually fitting in the plan but since they don't want to rewrite everything they are just trying to make it fit in that. Which, as all devs can guess, is a bad way to handle things.
As a company, you are allowed to do dirty hacks like this. But if you are developing a game for like 8 years, without having a very sustainable/static team, if you don't enforce writing guidelines, you will see issues like this at the end since every newcomer will try to do things with their own way. And not just that but Taleworlds used bullet-point 2 very very ( and very ) often in the game.


Is there any way to switch it back to the light theme? I have the retinal disease, dark theme hurts my eyes. (it's also hard for me to use this forum)


Is there any way to switch it back to the light theme? I have the retinal disease, dark theme hurts my eyes. (it's also hard for me to use this forum)
Although Its not related to this thread, you can check this one for old theme vibes. Or you can scroll down all way to bottom of this page, you will see TaleWorlds and English ( or your language ) click Taleworlds then select XenForo default for light theme


Is there any way to switch it back to the light theme? I have the retinal disease, dark theme hurts my eyes. (it's also hard for me to use this forum)
A light theme is in the works! Until then, I recommend using the Dark Reader Extension (yes, it has a light theme mode too). If you are using light theme mode, go to the More tab and then select Static under Theme Generation to ensure that the background is changed as well.


Sergeant at Arms
I am wondering have anyone tried your hand on a forced weapon command mod? Like back in WB have some mod that allow you force troop using spear instead of sword for example?


Hello, just wanted to drop in my appreciation for the work you guys are doing, hopefully it doesn't die and continues. I myself haven't found yet in it what I was personally looking for within documentation, however, decompiling and reverse engineering did the trick (as usual). For example, I wanted to subscribe to events when players enters the lord's hall, or a tavern etc. I did find it through forward tracing from the actual menu item, but thought, perhaps it would be great if every event and where is used gets documented at some point. (in my case was the ever so generic "OnMissionStartedEvent").

Anyways, thank you guys for all you done so far and please keep going!


I assume it's possible to edit the maps (main map, combat maps, and settlements) ? I haven't been able to find any information on this for some reason.


I assume it's possible to edit the maps (main map, combat maps, and settlements) ? I haven't been able to find any information on this for some reason.

They will provide software to customize the campaign map as far I've read.


Edit: I have fixed the issue. I had referenced .DLLs from the core modules that were not beginning with Taleworlds.*.

Hello, I am humbly asking for help with an error while building the basic mod from Basic C# Modding Guide. My error is occurring at the last steps of outputting Hello World inside of the game. I am getting crash during launch. Any assistance would be greatly appreciated.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TaleWorlds.Core;
using TaleWorlds.Localization;
using TaleWorlds.MountAndBlade;

namespace JustinMod
// The following code creates class MySubModule and inherits from MBSubModuleBase
class MySubModule : MBSubModuleBase
override void OnSubModuleLoad()
Module.CurrentModule.AddInitialStateOption(new InitialStateOption("Message",
new TextObject("Message", null),
() => {
InformationManager.DisplayMessage(new InformationMessage("Hello World"));

I get a crash on game launch, listed below

Message=Object reference not set to an instance of an object.
at TaleWorlds.MountAndBlade.Module.InitializeSubModules()
at TaleWorlds.MountAndBlade.Module.LoadSubModules()
at TaleWorlds.MountAndBlade.Module.Initialize()

I'm trying to follow the errors but can't seem to find anything. I have double checked my references to the TaleWorlds.* dlls and had no effect. Could anyone assist? Thank you in advance.
Last edited:


im trying to change the number of days / weeks / months in a year. anyone know where to edit or what to do?
Top Bottom