Mount & Blade II: Bannerlord

Mount & Blade II: Bannerlord

Choose Your Troops
Crash on CampaignStartUp
Hello,

I am getting a crash whenever I try to go to a battle. I usually run a benchmark before each play session to ensure the game is running properly. With only this mod and the five essential pre-native mods (Harmony, Butter, UI, Better Exception, and MCM), I get a crash report upon loading that bench mark. As a test, I tried starting a new campaign. Everything runs fine until I am done creating a character and going into the game proper. I get the same crash just trying to load a custom battle from the title screen. I saved two error logs but it looks like there's a conflict when creating the GameStarter object. Here's the exception I recetly received.

Unable to cast object of type 'TaleWorlds.MountAndBlade.BasicGameStarter' to type 'TaleWorlds.CampaignSystem.CampaignGameStarter'.

I saced two error logs but here is a clip from my attempt with 36 other mods. My game runs fine with these mods but when I add CyT, the issue starts.

Exception
Exception information
Type: System.InvalidCastException
Message: Unable to cast object of type 'TaleWorlds.MountAndBlade.BasicGameStarter' to type 'TaleWorlds.CampaignSystem.CampaignGameStarter'.

Source: ChooseYourTroops
CallStack:
- at void ChooseYourTroops.SubModule.OnGameStart(Game game, IGameStarter gameStarterObject) in C:/Dev/ChooseYourTroops/ChooseYourTroops/SubModule.cs:line 460
- at void TaleWorlds.MountAndBlade.MBGameManager.OnGameStart_Patch0(MBGameManager this, Game game, IGameStarter gameStarter)
- at void TaleWorlds.MountAndBlade.CustomBattle.CustomGame.OnInitialize()
- at void TaleWorlds.MountAndBlade.CustomBattle.CustomGame.DoLoadingForGameType(GameTypeLoadingStates gameTypeLoadingState, out GameTypeLoadingStates nextState)
- at bool TaleWorlds.Core.GameType.DoLoadingForGameType()
- at void TaleWorlds.MountAndBlade.CustomBattle.CustomGameManager.DoLoadingForGameManager(GameManagerLoadingSteps gameManagerLoadingStep, out GameManagerLoadingSteps nextStep)
- at bool TaleWorlds.Core.GameManagerBase.DoLoadingForGameManager()
- at void TaleWorlds.MountAndBlade.GameLoadingState.OnTick(float dt)
- at void TaleWorlds.Core.GameStateManager.OnTick(float dt)
- at void TaleWorlds.MountAndBlade.Module.OnApplicationTick_Patch2(Module this, float dt)

- Involved Modules

ChooseYourTroops
- Method: virtual System.Void ChooseYourTroops.SubModule::OnGameStart(TaleWorlds.Core.Game game, TaleWorlds.Core.IGameStarter gameStarterObject)
- Frame: void ChooseYourTroops.SubModule.OnGameStart(Game game, IGameStarter gameStarterObject) (IL Offset: 10)
- HarmonyIssue: False

Bannerlord.ButterLib
- Method: static System.Collections.Generic.IEnumerable`1 Bannerlord.ButterLib.Implementation.MBSubModuleBaseExtended.Patches.MBGameManagerPatch::Transpiler(System.Collections.Generic.IEnumerable`1 instructions, System.Reflection.MethodBase __originalMethod)
- Frame: void TaleWorlds.MountAndBlade.MBGameManager.OnGameStart_Patch0(MBGameManager this, Game game, IGameStarter gameStarter) (IL Offset: -1)
- HarmonyIssue: False
- Method: static System.Collections.Generic.IEnumerable`1 Bannerlord.ButterLib.Implementation.MBSubModuleBaseExtended.Patches.MBGameManagerPatch::Transpiler(System.Collections.Generic.IEnumerable`1 instructions, System.Reflection.MethodBase __originalMethod)
- Frame: void TaleWorlds.MountAndBlade.MBGameManager.OnGameStart_Patch0(MBGameManager this, Game game, IGameStarter gameStarter) (IL Offset: -1)
- HarmonyIssue: False

CustomBattle
- Method: virtual System.Void TaleWorlds.MountAndBlade.CustomBattle.CustomGame::OnInitialize()
- Frame: void TaleWorlds.MountAndBlade.CustomBattle.CustomGame.OnInitialize() (IL Offset: 39)
- HarmonyIssue: False
- Method: virtual System.Void TaleWorlds.MountAndBlade.CustomBattle.CustomGame::DoLoadingForGameType(TaleWorlds.Core.GameTypeLoadingStates gameTypeLoadingState, TaleWorlds.Core.GameTypeLoadingStates& nextState)
- Frame: void TaleWorlds.MountAndBlade.CustomBattle.CustomGame.DoLoadingForGameType(GameTypeLoadingStates gameTypeLoadingState, out GameTypeLoadingStates nextState) (IL Offset: 37)
- HarmonyIssue: False
- Method: virtual System.Void TaleWorlds.MountAndBlade.CustomBattle.CustomGameManager::DoLoadingForGameManager(TaleWorlds.Core.GameManagerLoadingSteps gameManagerLoadingStep, TaleWorlds.Core.GameManagerLoadingSteps& nextStep)
- Frame: void TaleWorlds.MountAndBlade.CustomBattle.CustomGameManager.DoLoadingForGameManager(GameManagerLoadingSteps gameManagerLoadingStep, out GameManagerLoadingSteps nextStep) (IL Offset: 62)
- HarmonyIssue: False

BetterExceptionWindow
- Method: static System.Exception BetterExceptionWindow.OnApplicationTickPatch::Finalizer(System.Exception __exception)
- Frame: void TaleWorlds.MountAndBlade.Module.OnApplicationTick_Patch2(Module this, float dt) (IL Offset: -1)
- HarmonyIssue: False

Let me know if this information is helpful or completely useless.
Last edited by NESecretWeapon; 8 May, 2023 @ 7:48am
< >
Showing 1-2 of 2 comments
Carióceco  [developer] 11 May, 2023 @ 8:31am 
Sorry for not seeing this before but i think now it's already fixed
NESecretWeapon 27 May, 2023 @ 6:18pm 
sorry for the delay. just tried it out and everything is working. Thank you for the quick response!
< >
Showing 1-2 of 2 comments
Per page: 1530 50