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

Users who are viewing this thread

Captain_Octavius

Sergeant Knight
WB
I'd like to request the "unsealing" of the following public class so it can be derived from:

DestructableComponent

I'd also like to request the removal of the "internal" keyword of the following virtual methods and their overrides in derived classes (Such as SynchedMissionObject and DestructableComponent):

ScriptComponentBehavior
OnInit​
OnPreInit​
OnTick​
OnTickParallel​
OnTickParallel2​
OnTickOccasionally​
MovesEntity​
OnPhysicsCollision​

MissionObject
OnMissionReset​
OnHit​

Especially important to me is being able to inherit the DestructableComponent class and overriding its OnInit and OnHit, I hope at least that can be made possible.

Thanks in advance!
 
Last edited:

Dejan

Community Manager
WBNWVCM&B
I'd like to request the "unsealing" of the following public class so it can be derived from:

DestructableComponent

I'd also like to request the removal of the "internal" keyword of the following virtual methods and their overrides in derived classes (Such as SynchedMissionObject and DestructableComponent):

ScriptComponentBehavior
OnInit​
OnPreInit​
OnTick​
OnTickParallel​
OnTickParallel2​
OnTickOccasionally​
MovesEntity​
OnPhysicsCollision​

MissionObject
OnMissionReset​
OnHit​

Especially important to me is being able to inherit the DestructableComponent class and overriding its OnInit and OnHit, I hope at least that can be made possible.

Thanks in advance!
Thank you for your request. We'll look into this.
 

VVyrd

Knight at Arms
WBWF&SM&B
I'd like to request the "unsealing" of the following public class so it can be derived from:

DestructableComponent

I'd also like to request the removal of the "internal" keyword of the following virtual methods and their overrides in derived classes (Such as SynchedMissionObject and DestructableComponent):

ScriptComponentBehavior
OnInit​
OnPreInit​
OnTick​
OnTickParallel​
OnTickParallel2​
OnTickOccasionally​
MovesEntity​
OnPhysicsCollision​

MissionObject
OnMissionReset​
OnHit​

Especially important to me is being able to inherit the DestructableComponent class and overriding its OnInit and OnHit, I hope at least that can be made possible.

Thanks in advance!
+1 on all these. Currently trying to use them.
 

Dejan

Community Manager
WBNWVCM&B

1.8.0 Changes​

Greetings!

Here are the modding-related changes that came with patch 1.8.0.
  • We released API documentation for Bannerlord. You can find it here: apidoc.bannerlord.com
  • Modders can now define & add different races like Orcs, Elves,... through the skins.xml file. Custom skeleton support has been added for humanoid characters.
1654777005678.png
  • Fixed various issues with the implementation of a modded world map, removed the hardcoded assumption that the world map is named "Main_map", fixed the hardcoded map size,...
    • In response to the reports from various community members. Special thanks to @NPC99 for his continuous testing and feedback. @hunharibo thank you for your report as well, we now fetch the terrain size from the overridden scene.
  • Enabled warning & assertion texts to help modders with common errors (the Modding Kit must be installed).
  • The Atmosphere Curve Editor is now available through the Atmosphere Inspector. It allows you to change the visuals of an atmosphere.
    • In response to the community request by @NPC99.
  • Added the Color Grade Manager script to the main map scene. It allows the dynamic color grade and atmosphere effects to be previewed within the editor. Color grade textures can be changed from worldmap_color_grades.xml file.
    • In response to the community request by @NPC99.
  • Added exposure compensation to materials for glow effects.
  • Changed the physics object colors of barriers that only players can pass through to green for clarity.
  • Implemented a new method of using generated banner textures in item materials. A new channel called "TableauMaskMap" has been added to explicitly mark where the banner texture will be applied. This leaves the alpha channel on the original texture to be used for the item's own requirements for tassel etc. "use_tableau_mask_as_separate_texture" flag needs to be enabled for this to take effect.
  • Language files are now referenced in language folders in the "language_data.xml" (they were previously automatically searched for and added).
  • Added XSD for game texts, they are now added via SubModule.xml.
  • Players can now override the TournamentModel.GetParticipantArmor to change the tournament participant armor.
  • Changed the SettlementComponent list to single SettlementComponent in Settlement.cs. Settlements can no longer have multiple SettlementComponents.
  • "NonSerializedObjectTypeRecords" were removed from MBObjectManager. There are now only ObjectTypeRecords and their appropriate functions.
  • Removed XML support from game menus and moved related content to code (EncounterGameMenuBehavior.cs).
  • Removed XML support from conversations and moved related content to code.
  • Modders can now use the OnCrimeRatingChanged event for various purposes. This event will trigger with the change amount and the faction it is related with.
  • Added IRandomOwner for easier random usages.
  • Added a dev config option to show localization IDs of texts (relevant for translators).
  • Enabled modders to go above the maximum tier cap for troop upgrades (above tier 6).
  • Modders can now modify the voices of agents (via voice_definitions.xml).
  • The skill leveling system is now fully moddable (Skill Leveling Manager).
  • Removed the campaign cookie system.
  • Refactored the Quest system to make every quest use only one dedicated menu instead of creating multiple menus per quest.
  • Fixed a bug that prevented the navmesh grid generation on big scenes from working correctly.
  • Fixed a crash that occurred when generating rivers.
  • Fixed a bug that caused different instances of a model to use the same factor color.
  • Fixed a bug that prevented the addition of custom troops to villager parties. Villager parties can now use different troop types.
  • Fixed a bug that caused decals to discard season visibility settings.
  • Fixed a crash that occurred when exiting editor scenes while retreating outside of the border.
  • Fixed a freeze issue on the campaign map that was caused by modded troops not having any upgrades.
  • Fixed a crash that occurred when clicking on the Leave edit mode button.
  • Fixed a bug that caused the second editor window to freeze.
  • Fixed a crash that occurred when placing decals on an empty editor scene.
  • Fixed a bug that caused civilian battle sets (for troop spawn) placed in editor scenes to be processed wrongly.
  • Improved the warning messages for incorrect battle set placement.
  • Added an experimental search functionality to the inventory screen. It can be enabled with "ui.set_inventory_search_enabled [1/0]" while the inventory screen is open. We think modders can use this functionality to test and find their items in-game more easily.
  • Extended the functionality of the UI debug mode. Added a new command ("ui.set_screen_debug_information_enabled [True/False]") to help modders find and examine GauntletLayers more easily. This new panel will show the currently loaded GauntletLayers, list included widgets, their visual properties and more in real time.
  • Added the Core.FaceGen.UpdateDeformKeys boolean. Previously, all the sliders in the body generation screen were cleared and added again after gender change. Since we don't use different deform keys between genders, we've moved this functionality to this boolean. If your mod uses different deform keys between genders, your mod should set this value to true. If not done, some deform keys might not show up as sliders in the body generation screen. Can be toggled with "facegen.toggle_update_deform_keys" command.
  • Added Scene.GetAllEntitiesWithScriptComponent method to gather all entities with the given script type.
  • Introduced a "CustomScale" value to font properties, used by Gauntlet. This value is used to scale the whole font. It’s used especially for fonts that generally have bigger characters compared to other fonts used in the game. Modders can use this value to make their fonts bigger or smaller across the whole font.
  • Added a new boolean to the Hero tooltip, isNear. It's used to hide tooltip entries of a hero tooltip that shouldn't be visible if the main hero is not near, like available quests by hero.
  • Improved the spritesheet generator performance, especially for generating numerous sheets at the same time.
  • Changed the banner editor layout to support more colors. Useful for mods expanding the available color set.
  • Changed how we determine singleplayer and multiplayer modules in the SubModule.xml.
    • <SingleplayerModule/> and <MultiplayerModule/> have been renamed to <ModuleCategory/>
    • The correct usage is now <ModuleCategory value="Singleplayer"/> or <ModuleCategory value="Multiplayer"/>
    • The default ModuleCategory is Singleplayer.
  • Fixed a bug that prevented mods from overwriting already existing custom widgets in Gauntlet, consistently.
We have also published a new page on the modding documentation:
We continue to work on other modding-related features/issues:
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).
 
Last edited:

feydras

Recruit
Fantastic! I can't wait to see what people create!

As a very amateur modder I was disappointed to see conversations moved out of xml. If I understand that correctly it will make changes to quests and NPC interaction much more difficult as it will be locked behind dlls. That's my only disappointment in an amazing update! Thank you!
 

Duchess Skye

Regular
WBWF&SNW
I have a question about whether a feature would be possible with the banner on item system. I'm part of a modding team focusing on Wars of the Roses, and we'd like to if possible be able to apply proper livery to the troops. However the way livery is handled in our setting is that most often the livery is simply a badge belonging to a lord which has been sewn onto a jacket.

Meaning that to get this to work properly we'd need to be able to apply a custom icon to specific clothes which are tied to a specific lord, but does not necessarily look like their banner. Moreover we'd need a way to make only the badge be applied without the colour of the item itself being modified by the banner. Resulting in soldiers under one lord running around with various colours (which is already possible with POC colour) but all of them having a unified symbol on the chest or wherever else we decide to put it.

I realise that this probably isn't possible with the current update, and might be something that cannot be implemented, however if it is in any way possible that'd be great.
 

Maroon

Grandmaster Knight
WBWF&SNW
Modders can now define & add different races like Orcs, Elves,... through the skins.xml file. Custom skeleton support has been added for humanoid characters.
Will this be possible in multiplayer for player characters at a later stage, or will that remain hardcoded like in Warband? Warband assumes the player character always uses one of the default skeletons (male or female) in multiplayer, and it is impossible to assign other skeletons to them. This severely limits the scope of what is possible in multiplayer. Having the option to change this in Bannerlord would be a massive improvement.
 
@Dejan

Ok, after reading the patch and been pretty excited about the new options i got my hands in coding and it's a cold shower.

First, why fore single OR multiplayer for a module? What happen for modes like the one trying to make the campaign a coop, it will be a single player AND multiplayer mod you can play both. Again starting to restrict badly what modders are trying to achieve.

Secondly, why remove isNoble in the hero class. Ok you moved it to the clan class but it has no sense at all. So a hero not noble joining a clan becomes nobles and is not anymore when he is kicked out? What about the the herocreation that was actually giving bonus depending on if the hero was noble or not, mainly in leadership, it was a bit like his education and how he was raised, so now all the clan have the bonus no matter what, while other non noble clans won't have it, even if you marry a noble woman.

Finally where is the IHeroCreationCampaignBehavior implemented in the last version? If you actually try to use it now you got an exception in submodule class of the game with a "reflection" error that do not tells you anything except "Oh dude there's an error" come on guys ...
 
Last edited:

BrightSpark

Recruit
VolunteerProductionModel is no longer part of the TaleWorlds.CampaignSystem.
Where I can find it now or what I have to use instead?
 

Dejan

Community Manager
WBNWVCM&B
First, why fore single OR multiplayer for a module? What happen for modes like the one trying to make the campaign a coop, it will be a single player AND multiplayer mod you can play both. Again starting to restrict badly what modders are trying to achieve.
Some clarification on this one would be needed.
Secondly, why remove isNoble in the hero class. Ok you moved it to the clan class but it has no sense at all. So a hero not noble joining a clan becomes nobles and is not anymore when he is kicked out? What about the the herocreation that was actually giving bonus depending on if the hero was noble or not, mainly in leadership, it was a bit like his education and how he was raised, so now all the clan have the bonus no matter what, while other non noble clans won't have it, even if you marry a noble woman.
This feature wasn't utilized properly. Everyone was noble except minor clan members. This is still the same. We simplified the design and the code. We did not use the noble property in hero properly and now we are using it in a better way. If you want a distinction, you can always add a noble bool to the heroes and use it properly.
Finally where is the IHeroCreationCampaignBehavior implemented in the last version? If you actually try to use it now you got an exception in submodule class of the game with a "reflection" error that do not tells you anything except "Oh dude there's an error" come on guys ...
We made DeriveSkillsFromTraits properly moddable. You can use CharacterDevelopmentModel.GetSkillsDerivedFromTraits.
VolunteerProductionModel is no longer part of the TaleWorlds.CampaignSystem.
Where I can find it now or what I have to use instead?
We made some namespace changes so it would be more consistent. Models in CampaignSystem are in the namespace "TaleWorlds.CampaignSystem.GameComponents" now.
 
Wanderers weren't nobles, at least most of them. Now they all become automatically when joining your clan and loose it as soon as they leave. That's a bit strange to my point of view as being a noble is related to the family more than the clan.
 

ChizuNoYama

Recruit
I was wondering why setting the skill level directly is still not allowed. Is there a way to reduce skills? I would rather not use Harmony like the open letter says. IHeroDeveloper lets us do a lot, except change the skill level down instead of up as a result Hero.SetSkillLevelValue() being internal and HeroDeveloper.ChangeskillLevelFromXpChange() being private. Is it because of how Skill levels work in conjunction with XP?
 

Dejan

Community Manager
WBNWVCM&B
I was wondering why setting the skill level directly is still not allowed. Is there a way to reduce skills? I would rather not use Harmony like the open letter says. IHeroDeveloper lets us do a lot, except change the skill level down instead of up as a result Hero.SetSkillLevelValue() being internal and HeroDeveloper.ChangeskillLevelFromXpChange() being private. Is it because of how Skill levels work in conjunction with XP?
We'll discuss it at the modding meeting.
 

CaptainFracas

Sergeant
M&BWBWF&SNWVC
With a friend, we are working on a mod in which we would like to let the player place barricades at the during or at the beginning of a battle.
If I'm right, the navmesh is not dynamic in Bannerlord. Which mines it can't be done with the current game. Could taleworlds add this possiblity for modders to moddify the navemash after the load of the scene ?

Example of what we want to do:
 
Top Bottom