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

Users who are viewing this thread

Lucon

Subforum Moderator
WBWF&SNWVC
Thanks for the new update! @Dejan

Another update after 1.6.4, we expect much more promising updates very soon. For this, it would be best for us to notify Taleworlds of more reviews of mod developer friends who are involved in total revision mod projects, and also to support the development of both the projects and the full version of Mod Tools as much as we can.
 

blue2021

Sergeant
I wanted to create a custom font by referring to "How to Add Custom Fonts", but I can't find the necessary files.
I don't see the "GenerateFont.bat" file in the "Mount & Blade II Bannerlord\GUI\GauntletUI\Fonts" folder. e1.6.4
 

Notatroll

Knight
Thanks for the new update! @Dejan

Another update after 1.6.4, we expect much more promising updates very soon. For this, it would be best for us to notify Taleworlds of more reviews of mod developer friends who are involved in total revision mod projects, and also to support the development of both the projects and the full version of Mod Tools as much as we can.
:grin:?? More win on the way?
 
Last edited:

Tristram

Recruit
There is a cool mod that has been a great asset and it is Fluid Combat. This really should be added to the game it allows you to control combat so much easier. You can hold the mouse key and switch the position of the attack and defense without haveing to release the mouse and then reclick the mouse. Please check out the MOD on Nexus mods and you can see what I am referring to. The seems like it would be very easy and a real asset to add to the main files and not require a mod to use it. It is something that can be turned on or off easily with keyboard assignment and doesn't really cause any issues that I can see from my continued use. Thank you.
 

Dejan

Community Manager
WBNWVCM&B
Greetings!

Here are the modding-related changes that came with v170.
  • Added new dependency types in SubModule.xml & other improvements.
    • <DependedModule/> Node now supports the Optional attribute. If Optional is true, the launcher will only check if the Depended module is loaded before the current submodule. If Optional is false, the launcher will also check if the Depended module is enabled or not.
    • <ModulesToLoadAfterThis/> Node has been added. Modules given in this scope will be forced to load after the current submodule. Essentially an inverse dependence.
    • <IncompatibleModules/> Node has been added. If any module given in this scope exists and is enabled, the module defined in the node will be disabled. Doesn't depend on load order.
    • Syntax examples for <ModulesToLoadAfterThis/> and <IncompatibleModules/> have been added to the Native SubModule.xml. DependedModule-Optional syntax has been added to the rest of the SubModule.xmls.
    • In response to the community request from @Pickysaurus.
  • Launcher sprite sheets are now located in the Modules/Native/LauncherGUI so that modders can overwrite or add new images for the launcher.
    • In response to the community request from @Lucon via the modding discord.
  • Cultural feats have been moved into CultureObject and are now loaded from XMLs. This allows for much easier replacing or adding of new culture-specific advantages/disadvantages.
  • Child, wanderer, notable, lord and rebel hero templates were moved into CultureObject and are now loaded from XMLs.
  • Mercenary troops for each culture can now be determined in XMLs.
  • Added a new XML (weapon_descriptions.xml) to make weapon descriptions moddable.
  • Removed the PartyBase.Leader, MobileParty.Leader variables. Moved the PartyLeader variable to the PartyComponent.
  • Added more informative errors and warnings for invalid/missing XMLs.
  • Made reload animations moddable. They now support up to 15 reload phases.
  • Fixed a bug that caused the covers_head flag and its usage on helmets to crash the game.
  • Added TickRequirement.TickParallel to provide a multithread tick mechanism for scripts. Can be used with OnTickParallel callback.
  • Added a custom base party speed set option for the custom party component.
  • Added custom harness and mount set options for the custom party component.
  • Added the AvoidHostileActions parameter option for custom party component which prevents the party from being hostile with the encountered party.
  • Fixed a crash that occurred in the editor when closing the scene.
  • Fixed a crash that occurred in the editor when trying to add the ladder spawner.
  • Added slope and height filters to the smoothen brush.
    • In response to the community request from @GourmetBean via the modding discord.
  • Added the ability to select the relevant path by selecting any of the path nodes in the editor.
  • Added a tool that checks the validity of destructible states of destructible components.
  • Reinforced the scene problem checking tool with new additions to the navigation mesh controls.
  • Fixed a bug that caused terrain nodes to only be visible from certain angles and distances on newly created terrains.
  • Fixed a bug that prevented the modification of newly created terrains.
  • Fixed a bug that caused the importer to create redundant mesh vertices.
  • Fixed the activation delay parameter of the particle system.
We have also published a new page on the modding documentation:
We continue to work on the following issues:
  • Documentation on implementing new flora.
  • Other requests (in earlier stages of development).
Thank you for all your feedback and suggestions. If you have any questions or would like to make further requests, please discuss them below (or HERE).
 

Spinozart1

Knight
Greetings!

Here are the modding-related changes that came with v170.
  • Added new dependency types in SubModule.xml & other improvements.
    • <DependedModule/> Node now supports the Optional attribute. If Optional is true, the launcher will only check if the Depended module is loaded before the current submodule. If Optional is false, the launcher will also check if the Depended module is enabled or not.
    • <ModulesToLoadAfterThis/> Node has been added. Modules given in this scope will be forced to load after the current submodule. Essentially an inverse dependence.
    • <IncompatibleModules/> Node has been added. If any module given in this scope exists and is enabled, the module defined in the node will be disabled. Doesn't depend on load order.
    • Syntax examples for <ModulesToLoadAfterThis/> and <IncompatibleModules/> have been added to the Native SubModule.xml. DependedModule-Optional syntax has been added to the rest of the SubModule.xmls.
    • In response to the community request from @Pickysaurus.
  • Launcher sprite sheets are now located in the Modules/Native/LauncherGUI so that modders can overwrite or add new images for the launcher.
    • In response to the community request from @Lucon via the modding discord.
  • Cultural feats have been moved into CultureObject and are now loaded from XMLs. This allows for much easier replacing or adding of new culture-specific advantages/disadvantages.
  • Child, wanderer, notable, lord and rebel hero templates were moved into CultureObject and are now loaded from XMLs.
  • Mercenary troops for each culture can now be determined in XMLs.
  • Added a new XML (weapon_descriptions.xml) to make weapon descriptions moddable.
  • Removed the PartyBase.Leader, MobileParty.Leader variables. Moved the PartyLeader variable to the PartyComponent.
  • Added more informative errors and warnings for invalid/missing XMLs.
  • Made reload animations moddable. They now support up to 15 reload phases.
  • Fixed a bug that caused the covers_head flag and its usage on helmets to crash the game.
  • Added TickRequirement.TickParallel to provide a multithread tick mechanism for scripts. Can be used with OnTickParallel callback.
  • Added a custom base party speed set option for the custom party component.
  • Added custom harness and mount set options for the custom party component.
  • Added the AvoidHostileActions parameter option for custom party component which prevents the party from being hostile with the encountered party.
  • Fixed a crash that occurred in the editor when closing the scene.
  • Fixed a crash that occurred in the editor when trying to add the ladder spawner.
  • Added slope and height filters to the smoothen brush.
    • In response to the community request from @GourmetBean via the modding discord.
  • Added the ability to select the relevant path by selecting any of the path nodes in the editor.
  • Added a tool that checks the validity of destructible states of destructible components.
  • Reinforced the scene problem checking tool with new additions to the navigation mesh controls.
  • Fixed a bug that caused terrain nodes to only be visible from certain angles and distances on newly created terrains.
  • Fixed a bug that prevented the modification of newly created terrains.
  • Fixed a bug that caused the importer to create redundant mesh vertices.
  • Fixed the activation delay parameter of the particle system.
We have also published a new page on the modding documentation:
We continue to work on the following issues:
  • Documentation on implementing new flora.
  • Other requests (in earlier stages of development).
Thank you for all your feedback and suggestions. If you have any questions or would like to make further requests, please discuss them below (or HERE).
While I can already see a few changes that will probably make my mod to crash I would like to thank you for the continuous global improvement (y)
 

Worlok

Squire
Cultural feats have been moved into CultureObject and are now loaded from XMLs. This allows for much easier replacing or adding of new culture-specific advantages/disadvantages.
Which xml/folder is this reffering to? Where can I adjust these culture-specific advantages?
 

Mordorsen

Recruit
It seems now you cannot just modify an existing item by copying it to your mod's XML and editing some stats. The game says it can't read it twice. So, any insight on how to do this?
 

NPC99

Baron
M&BWBWF&SVC
It seems now you cannot just modify an existing item by copying it to your mod's XML and editing some stats. The game says it can't read it twice. So, any insight on how to do this?
HLC's XMLOverrideFix mod lets you keep your XML edits in 1.7.0 without an "Obect is already Initialised" crash.
If you have a custom campaign map, it needs to be loaded after Aurelian's MapFix. Hopefully, it will still work after TW's next hotfix.

This situation was fixed internally. In the meantime, have you tried using XSLT to override XMLs?
Most modders who aren't coders can cope with XML edits but find XSLT beyond them. To keep Bannerlord accessible to modding and new modders any entry barriers should be as low as possible IMO. Armour, weapons or troop tree mods tend to be XML based. It's much easier for 3D artists to publish their work with XML vs XSLT.
 
Last edited:

Dejan

Community Manager
WBNWVCM&B
Some of you had some questions on the new battle terrain system on the modding discord so I am posting the replies here as well:
  • How are the specific areas identified? Is it somehow assignable to specific navmesh faces? or hardcoded coordinates?
    • We have a special texture (worldmap_battle_scene_grid) for defining the battle terrain areas and also their zone coordinates.
  • We can see the map_index numbers in the xml. They just appear to be sequence numbers between 1 and 157. So we can see what scene is used for a map_index number, but where are these map_index numbers correlated to Main_map locations and how can that be modded?
    • Map index number (between 1-157) is also included in the texture. And it is mapped to scenes with the XML (sp_battle_scenes.xml) file. You should be able to define your own texture and replace it with the one we're using - and specify your own scenes by editing the XML file (through XSLT). Battle scene definitions in the sp_battle_scenes.xml file include map_indices for which the battle scene will be used for.
  • Will an encounter outside a grid throw an exception and crash the game?
    • If the engine can't find a scene for the current encounter coordinates (using the texture) we throw an exception but the game won't crash. It should be picking a random scene in this case.
  • Presumably with this colour coding 256 is the maximum number of map index numbers possible irrespective of the campaign maps physical size?
    • That's correct.
 

NPC99

Baron
M&BWBWF&SVC
Some of you had some questions on the new battle terrain system on the modding discord so I am posting the replies here as well:
  • How are the specific areas identified? Is it somehow assignable to specific navmesh faces? or hardcoded coordinates?
    • We have a special texture (worldmap_battle_scene_grid) for defining the battle terrain areas and also their zone coordinates.
  • We can see the map_index numbers in the xml. They just appear to be sequence numbers between 1 and 157. So we can see what scene is used for a map_index number, but where are these map_index numbers correlated to Main_map locations and how can that be modded?
    • Map index number (between 1-157) is also included in the texture. And it is mapped to scenes with the XML (sp_battle_scenes.xml) file. You should be able to define your own texture and replace it with the one we're using - and specify your own scenes by editing the XML file (through XSLT). Battle scene definitions in the sp_battle_scenes.xml file include map_indices for which the battle scene will be used for.
  • Will an encounter outside a grid throw an exception and crash the game?
    • If the engine can't find a scene for the current encounter coordinates (using the texture) we throw an exception but the game won't crash. It should be picking a random scene in this case.
  • Presumably with this colour coding 256 is the maximum number of map index numbers possible irrespective of the campaign maps physical size?
    • That's correct.
To amplify this is the worldmap_battle_scene_grid:
MncVg.jpg
It's red channel in the next screenshot holds the map_index numbers used by sp_battle_scenes.xml to relate the battle scene(s) to the map. The map_index numbers = the red colour values.
eRhEN.jpg
The green channel of the worldmap_battle_scene_grid is possibly used to determine orientation of the parties in the battle scene from its colour value numbers. The next screenshot shows some sample numbers, which progress from left to right and then progressively in stripes.
K7TxM.jpg
The next screen shot shows about half of the map_index numbers with artificial colours highlighting their grids.
1OwB3.jpg
This is a screenshot from the old Development Update 7 video:
0UbO8.jpg

The last screen shot shows an extract from sp_battle_scenes.xml where battle scenes are linked to map_index numbers from the red channel of worldmap_battle_scene_grid
JkLzV.jpg
 
Last edited:
Top Bottom