Needed for my mods where the player can die. Heroes Must Die and Executioner Edit. It is also needed for my PlayerSwitcher mod too since it isn't death that is bugged but rather switching heroes is bugged. Probably should have named it, ChangePlayer patch... oh well :3
Needed to fix crash because TaleWords doesn't check null for a settlement's clan. And When the player dies, the training field gets operated on and has no clan so TaleWorlds done goofed!
Needed to fix crash because TaleWords doesn't check null for a settlement's clan. And When the player dies, the training field gets operated on and has no clan so TaleWorlds done goofed!
You aren't dying in this mod but this patch fixes a crash when changing the player's hero.
Permissions and credits
Credits and distribution permission
Other user's assetsAll the assets in this file belong to the author, or are from free-to-use modder's resources
Upload permissionYou are not allowed to upload this file to other sites under any circumstances
Modification permissionYou must get permission from me before you are allowed to modify my files to improve it
Conversion permissionYou are not allowed to convert this file to work on other games under any circumstances
Asset use permissionYou must get permission from me before you are allowed to use any of the assets in this file
Asset use permission in mods/files that are being soldYou are not allowed to use assets from this file in any mods/files that are being sold, for money, on Steam Workshop or other platforms
Asset use permission in mods/files that earn donation pointsYou are not allowed to earn Donation Points for your mods if they use my assets
Author notes
Be fair!
File credits
This author has not credited anyone else in this file
Donation Points system
This mod is opted-in to receive Donation Points
Needed to fix crashing with player death in my other mods Executioner Edit and Heroes Must Die.
I uploaded this as a seperate mod because I can't add the patch to each mod and I didn't want to force users to install both of those mods so now this exists. FML.
Patches:
Campaign.OnPlayerCharacterChanged - This patch fixes when TaleWorld's random settlements code returns the training field which is a settlement that has no clan. This method will try to operate on that settlement's clan and because it is null the game crashes. This won't happen with this installed.
Inner Exception information Type: System.NullReferenceException Message: Object reference not set to an instance of an object. Source: TaleWorlds.CampaignSystem CallStack:
at TaleWorlds.CampaignSystem.Campaign.<>c.b__545_0(Settlement s)
at Helpers.SettlementHelper.FindRandomSettlement(Func`2 condition)
at TaleWorlds.CampaignSystem.Campaign.OnPlayerCharacterChanged()
at TaleWorlds.CampaignSystem.Actions.ChangePlayerCharacterAction.Apply(Hero hero)
at HeroesMustDie.PlayerBattleBehavior.OnHeirSelectionOver(List`1 element) in D:\Documents\Mount and Blade II Bannerlord\Module Projects\HeroesMustDie\HeroesMustDie\MySubmodule.cs:line 847
at TaleWorlds.Core.ViewModelCollection.PopUpVM.ExecuteProcess()