Mount & Blade II: Bannerlord
0 of 0

File information

Last updated

Original upload

Created by

Cheyron

Uploaded by

Cheyron

Virus scan

Safe to use

Tags for this mod

About this mod

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

Requirements
Permissions and credits
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:
  1. at TaleWorlds.CampaignSystem.Campaign.<>c.b__545_0(Settlement s)
  2. at Helpers.SettlementHelper.FindRandomSettlement(Func`2 condition)
  3. at TaleWorlds.CampaignSystem.Campaign.OnPlayerCharacterChanged()
  4. at TaleWorlds.CampaignSystem.Actions.ChangePlayerCharacterAction.Apply(Hero hero)
  5. at HeroesMustDie.PlayerBattleBehavior.OnHeirSelectionOver(List`1 element) in D:\Documents\Mount and Blade II Bannerlord\Module Projects\HeroesMustDie\HeroesMustDie\MySubmodule.cs:line 847
  6. at TaleWorlds.Core.ViewModelCollection.PopUpVM.ExecuteProcess()