e1.6.0-e1.7.2 Modding Adjustments & Access Modifiers Changes

Users who are viewing this thread

Hi creators and modders
Unfortunatly I need help. Must admit right away that I don't understand anything about modding and XML. I looked into the files of other modders before, tried to understand how it organized and how it works. By the way, I made my own mods which worked well on older versions of Bannerlord. But for now my mods are not working with version 1.70. I learned how other mods are arranged for this version and made the appropriate changes. But now I get the error when game is loading: could not load merged xml file correctly: Items Error: sequence contains no elements. I have looked through all the files from the mod many times and cannot find the error or things which related to it. Can someone tell me how to solve this problem?
 

NPC99

Baron
M&BWBWF&SVC
Hi creators and modders
Unfortunatly I need help. Must admit right away that I don't understand anything about modding and XML. I looked into the files of other modders before, tried to understand how it organized and how it works. By the way, I made my own mods which worked well on older versions of Bannerlord. But for now my mods are not working with version 1.70. I learned how other mods are arranged for this version and made the appropriate changes. But now I get the error when game is loading: could not load merged xml file correctly: Items Error: sequence contains no elements. I have looked through all the files from the mod many times and cannot find the error or things which related to it. Can someone tell me how to solve this problem?
Unfortunately, that just flags an XML error without being helpful. As it occurred while loading the game you could try looking at the rgl_log from your mod's crash and compare it to a clean rgl_log from loading vanilla Calradia to see which xml was about to have been loaded if it hadn't crashed. You could also look at the stack_trace in the crashed rgl_log but these are rarely helpful to anyone apart from TW Devs. Failing that, you would need to reverse out all you xmls and then build them back into your mod one at a time to see which one(s) is/are causing the problem.
It's also worth checking your rgl_log_errors file for the crashed game in case it holds a clearer error message.
1.7.0 broke any mods using XML edits as opposed to XSLT. Hopefully there will be a hotfix.
 
Last edited:
Unfortunately, that just flags an XML error without being helpful. As it occurred while loading the game you could try looking at the rgl_log from your mod's crash and compare it to a clean rgl_log from loading vanilla Calradia to see which xml was about to have been loaded if it hadn't crashed. You could also look at the stack_trace in the crashed rgl_log but these are rarely helpful to anyone apart from TW Devs. Failing that, you would need to reverse out all you xmls and then build them back into your mod one at a time to see which one(s) is/are causing the problem.
It's also worth checking your rgl_log_errors file for the crashed game in case it holds a clearer error message.
1.7.0 broke any mods using XML edits as opposed to XSLT. Hopefully there will be a hotfix.
Thanks. I will try. its better then nothing :smile:
 

Dejan

Community Manager
WBNWVCM&B
We've just pushed out a hotfix. e1.7.0 Beta modding changes:
  • Made map screen's VisualsOfEntities public which should extend the moddability of party visuals.
  • Removed the error for invalid XMLs which was causing crashes.
 

blue2021

Veteran
Hey, we've now added it to both 165 and 170. Apologies for the delay.
Thank you for adding the "GenerateFont.bat" file.
However, I can't find the file "Mount & Blade II Bannerlord\bin\Win64_Shipping_wEditor\TaleWorlds.GauntletUI.FontAtlas.exe".
 
Thank you for adding the "GenerateFont.bat" file.
However, I can't find the file "Mount & Blade II Bannerlord\bin\Win64_Shipping_wEditor\TaleWorlds.GauntletUI.FontAtlas.exe".
same here. Following the steps i get the following message

"bin\Win64_Shipping_wEditor\TaleWorlds.GauntletUI.FontAtlas could not be found
Please make sure you have Modding Kit installed.
See the document for more info."
 

PeasantOP

Recruit
Any way to add a new feats(is there a list or reference guide) or is it use existing once for now.
Example: Sturgia no speed penalty for snow, Khuzait 50 percent longer to build siege equipment's.

Im just a guy who mods troops, hehe
 
Last edited:

Gangfreak88

Recruit
I have a strange phenomenon since 1.7.0 with CraftingTemplates.

Whatever I try, as soon as I try to merge the CraftingTemplates with a module file, I get the following error:


Could not load merged xml file correctly:

CraftingTemplatesError: Object reference not set to an instance of an object.


I even tried to create a new module in which I just replace the CraftingTemplates with the original, without success.

Does anyone else have this error, or where there changes to be aware of?

Best Regards

Gangfreak
 

Dejan

Community Manager
WBNWVCM&B
Thank you for adding the "GenerateFont.bat" file.
However, I can't find the file "Mount & Blade II Bannerlord\bin\Win64_Shipping_wEditor\TaleWorlds.GauntletUI.FontAtlas.exe".
same here. Following the steps i get the following message

"bin\Win64_Shipping_wEditor\TaleWorlds.GauntletUI.FontAtlas could not be found
Please make sure you have Modding Kit installed.
See the document for more info."
Same problem.
Thank you for letting us know, we'll add the missing file as soon as possible and let you know once we do.
"DefaultPartySpeedCalculatingModel" and "DefaultPartyWageModel" in 1.7.0 is broken for modding? Kindly fix it...
Could you clarify what's broken about it, please? Does it cause a crash, what's the bug,...?
I have a strange phenomenon since 1.7.0 with CraftingTemplates.

Whatever I try, as soon as I try to merge the CraftingTemplates with a module file, I get the following error:


Could not load merged xml file correctly:

CraftingTemplatesError: Object reference not set to an instance of an object.


I even tried to create a new module in which I just replace the CraftingTemplates with the original, without success.

Does anyone else have this error, or where there changes to be aware of?

Best Regards

Gangfreak
Could you please send me the module (can even be this new module that you created) so that we can try and replicate the issue on our end? Thanks!
 

Dejan

Community Manager
WBNWVCM&B
Thank you for adding the "GenerateFont.bat" file.
However, I can't find the file "Mount & Blade II Bannerlord\bin\Win64_Shipping_wEditor\TaleWorlds.GauntletUI.FontAtlas.exe".
same here. Following the steps i get the following message

"bin\Win64_Shipping_wEditor\TaleWorlds.GauntletUI.FontAtlas could not be found
Please make sure you have Modding Kit installed.
See the document for more info."
Same problem.
Hey, we've now added the missing file as well as tested adding a custom font on 170/171 by following the guide. It should be working correctly.
 

Dejan

Community Manager
WBNWVCM&B

1.7.2 Changes​

Greetings!

Here are the modding-related changes that came with patch 1.7.2.
  • InquiryData now supports expiration. This allows for the implementation of timed events, for example, "Click yes in 10 seconds".
  • Replaced the "HeroDeveloper" field with the "IHeroDeveloper" interface. This allows modders to change HeroDeveloper of heroes with their own custom classes. As such, they can now change how skill/attribute/focus points work and how heroes gain levels.
  • Added the OnPartyInteraction function to the IMapEntity interface. This allows modders to use custom interaction with custom map objects.
  • Fixed a bug that prevented moved texture files from being moved again in the resource browser.
  • Fixed a bug that caused new Sprites to not override existing ones. Meaning if a sprite is loaded after a sprite with the same name, it wouldn't override the previous one. Because of this modders had to load their overriding sprites before Native or SandBox. This has been fixed.
  • Fixed a bug that caused some GUI textures to appear as missing when launching campaign via the modding tools (also in 1.7.1 latest changes).
We have also published a new page on the modding documentation:
And updated page:
We continue to work on other modding-related features/issues:
  • Automated API documentation
    • In response to the modding open letter.
  • Documentation on implementing new flora
  • Support for custom skins/races
    • In response to the modding open letter.
  • Enable the modifying of equipment of tournament participants
  • The addition of an Atmosphere Curve Editor button to allow for accurate viewing (colours) of the campaign map directly from the scene editor
    • In response to the community request from @NPC99.
  • Other requests in earlier stages of development.
Thank you again for all your feedback and suggestions. If you have any questions or would like to make further requests, please discuss them below (or HERE).
 
Can someone tell me how I can display my own custom data on the UI properly? I found everything I need regarding brushes and windows and so on in the XML files, but the actual data from the game is sourced in some unknown way. For instance on the hero encyclopedia, Text="@InformationText", where does the InformationText data source come from and how can I send my own data to Gauntlet? For instance let's say I have a integer variable "TimesSieged" on a specific castle encyclopedia screen, how can I tell the UI this variable exists? I already have a C# submodule working smoothly, I just need to get my variables into the UI.
 

MRay

Developer
where does the InformationText data source come from
EncyclopediaHeroPageVM.InformationText. EncyclopediaHeroPageVM is the DataSource of the hero encyclopedia page.

how can I send my own data to Gauntlet?
Apart from using third party UI extending libraries made by other modders to add your own custom widget in the xml, you can create your own xml for EncyclopediaHeroPage.xml or EncyclopediaSettlementPage.xml and use your custom widget that way. Using your own xml would mean overwriting the existing ones(both TW and modder made).

For instance let's say I have a integer variable "TimesSieged" on a specific castle encyclopedia screen, how can I tell the UI this variable exists?
One of the ways:
  • Create a EncyclopediaSettlementPage.xml in "\{YOUR_MODULE}\GUI\Prefabs\"
  • Add your custom widget in the xml.
    • You can create a new class derived from TaleWorlds.GauntletUI.Widget(or any other widget type) and use that in your xml.
    • The system will find that widget in your assembly when the game loads your xml and sees that widget in the xml.
  • In that custom widget, set a textwidget to your TimesSieged value.
  • Set UIConfig.DoNotUseGeneratedPrefabs to true.(So that the game will use your xml instead of the generated code)
 
Hello,

I tag here cause i asked a few times for help and got only a bit from another modder but it was also beyond his abilities. So i have an issue in my mod related to saving (and maybe loading) introduced with 1.7.1 of Bannerlord and it's now monthes i'm trying to figure what is going wrong and why it suddenly stopped working.

Here is the initial thread where i explain my issue with the various answers and what we tried.
So if @Dejan could have a look or at least tell me if someone is aware of it, or even looking about the issue? As it's pretty specific i was expecting someone to come back to me and ask precision or to share my code but got nothing like this.
 
Top Bottom