Hey mate it's really good and I'd love to contribute. However it seems to be missing a lot of key information. I'm left with more questions than answered. I've followed what I could in terms of creating a basic readable module for the launcher. Named my Module Folder exactly the same as the XML. And the ID's are exactly the same. Case Sensitive. However when I load up the launcher it does not see my new module at all. Am I missing something? Do I need to copy any folders out of the Native? I've basically got a Singleplayer module. No DLL yet. So I left out the SubModules as per instructions. Any tips? Thanks
Also, do you need all the depended modules for a basic Singleplayer mod? I'd imagine I don't need CustomBattle, Sandbox + SandBoxCore? What about Story Mode though? What's the difference between that and Native? Is Native the Base game and Story Mode is the campaign? It's very confusing haha.
The documentation is still in the early stages, so missing information is to be expected and there are still thousands of things to be covered. The goal for right now is to help modders create their own working mod. Once you have something that works, it's easier to learn by experimentation.Hey mate it's really good and I'd love to contribute. However it seems to be missing a lot of key information. I'm left with more questions than answered. I've followed what I could in terms of creating a basic readable module for the launcher. Named my Module Folder exactly the same as the XML. And the ID's are exactly the same. Case Sensitive. However when I load up the launcher it does not see my new module at all. Am I missing something? Do I need to copy any folders out of the Native? I've basically got a Singleplayer module. No DLL yet. So I left out the SubModules as per instructions. Any tips? Thanks
Also, do you need all the depended modules for a basic Singleplayer mod? I'd imagine I don't need CustomBattle, Sandbox + SandBoxCore? What about Story Mode though? What's the difference between that and Native? Is Native the Base game and Story Mode is the campaign? It's very confusing haha.
Modules
folder. Inside this folder is where you should create a folder for your mod and then inside that folder, you will put your SubModule.xml
. Once you do this, your mod should be visible from the launcher's Singleplayer > Mods
tab.The documentation is still in the early stages, so missing information is to be expected and there are still thousands of things to be covered. The goal for right now is to help modders create their own working mod. Once you have something that works, it's easier to learn by experimentation.
If you follow the step-by-step instructions for the tutorial, you should have a working mod. Going off of what you have said, it seems that you probably don't have your mod in the right location. Go to your game files and open theModules
folder. Inside this folder is where you should create a folder for your mod and then inside that folder, you will put yourSubModule.xml
. Once you do this, your mod should be visible from the launcher'sSingleplayer > Mods
tab.
The depended modules are a bit buggy right now and seem to be causing issues all around for some people, so experiment with them at your own discretion. In theory, you should add any modules that your mod depends on to your Depended Modules. Most mods will depend on Native as it contains many assets required to play the game, the SandBox/SandBoxCore modules are for campaign, you may not need CustomBattles though.
RenameThanks for your hastey reply. I have my mod xml located as followed: Bannerlord\Modules\MyMod\MyMod.xml
MyMod.xml
to SubModule.xml
. Otherwise, it won't be found.Aaah of course! Thank you sir, I for some reason was under the assumption that SubModule.xml was just a placeholder name haha. Do you think we could add that specificy to the docos incase somebody else falls into that trap or am I just special? xD
I had the same issue fixed like this: make sure to name your xml in the submodule folder 'submodule.xml'
That is exactly what I explained to you 2 posts above.
I've got the basis of whats going on down, but am unable to figure out how to look at the taleworlds code itself and not sure if its possible (im sure it is). For example, if i wanted to edit say, the skills system, I would need to know what classes, methods, and variables they use for me to then override and edit, however when I go through the references and object browser in visual studio it wont show me the actual code. I come from UE4 and they have their own documentation so I never had to worry about that.
That's a good question actually. I'm assuming you have linked all the DLL files, I'd imagine they would be buried in some kind of xml file somewhere which I "believe" is read by these DLLs? Is that fair to assume that?
Also, in the documentation, Step 4: Setup an override for the OnSubModuleLoad() inherited method.
Now, I'm not too cluey with code, and I'm doing my darndest to learn on the fly (Inheriting the MBSubModuleBase was I'm assuming the base class for the MySubModule class, so I.E class MySubModule : MBSubModuleBase), but I'm stuck on the next step, 4. Is the Override function being written straight into the MySubModule class as a public override method? What is it's return type and what method are we actually overriding?
Or is OnSubModuleLoad() the method the actual method in our class we are overriding? And from what? Man I feel like a complete dunce sometimes with coding.
This is what I've got so far but I'm getting an error saying: The modifier 'override' is not valid for this item and that the method must have a return type. This is my code:
using TaleWorlds.Core;
using TaleWorlds.Localization;
using TaleWorlds.MountAndBlade;
namespace MyMod
{
class MySubModule : MBSubModuleBase
{
public override OnSubModuleLoad()
{
Module.CurrentModule.AddInitialStateOption(new InitialStateOption("Message",
new TextObject("Message", null),
9990,
() => { InformationManager.DisplayMessage(new InformationMessage("Hello World")); },
false));
}
}
}
You want to watch this video from GlorifiedPig where he explains this :
You want to watch this video from GlorifiedPig where he explains this :