CreateEncyclopediaPages crash on loading saved game with custom kingdom and settlements

Users who are viewing this thread

sinkpoint

Recruit
Hi all,
I'm creating a mod ( 1.5.8 ) with a new custom kingdom and new settlements on the Main_map.
So far everything works fine on creating a new game, but as soon as I load a saved game, it crashes.

I've been scratching my head, as I've compared with multiple custom kingdom mods and I can't see what I'm doing differently.
Reducing the mod down to a single clan and hero still causes this.
Anyone have dealt with something similar before?

The stacktrace is
Code:
Exception information
Type: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
CallStack:
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at TaleWorlds.CampaignSystem.Encyclopedia.EncyclopediaManager.CreateEncyclopediaPages()
at SandBox.SandBoxSubModule.OnGameInitializationFinished(Game game)
at TaleWorlds.MountAndBlade.MBGameManager.OnGameInitializationFinished(Game game)
at TaleWorlds.CampaignSystem.Campaign.OnInitialize()
at TaleWorlds.CampaignSystem.Campaign.DoLoadingForGameType(GameTypeLoadingStates gameTypeLoadingState, GameTypeLoadingStates& nextState)
at StoryMode.CampaignStoryMode.DoLoadingForGameType(GameTypeLoadingStates gameTypeLoadingState, GameTypeLoadingStates& nextState)
at TaleWorlds.Core.GameType.DoLoadingForGameType()
at SandBox.CampaignGameManager.DoLoadingForGameManager(GameManagerLoadingSteps gameManagerLoadingStep, GameManagerLoadingSteps& nextStep)
at TaleWorlds.Core.GameManagerBase.DoLoadingForGameManager()
at TaleWorlds.MountAndBlade.GameLoadingState.OnTick(Single dt)
at TaleWorlds.Core.GameStateManager.OnTick(Single dt)
at TaleWorlds.MountAndBlade.Module.OnApplicationTick(Single dt)
at TaleWorlds.DotNet.Managed.ApplicationTick(Single dt)


Inner Exception information
Type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: TaleWorlds.CampaignSystem
CallStack:
at TaleWorlds.CampaignSystem.Encyclopedia.Pages.DefaultEncyclopediaClanPage.<>c.<.ctor>b__6_7(CultureObject f)
at System.Linq.EnumerableSorter`2.ComputeKeys(TElement[] elements, Int32 count)
at System.Linq.EnumerableSorter`2.ComputeKeys(TElement[] elements, Int32 count)
at System.Linq.EnumerableSorter`1.Sort(TElement[] elements, Int32 count)
at System.Linq.OrderedEnumerable`1.d__1.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at TaleWorlds.CampaignSystem.Encyclopedia.Pages.DefaultEncyclopediaClanPage..ctor()

Thanks!
 
Ok I solved it.
It's because there are missing culture definitions on some mintor NPCCharacter defs.
Double-check that all ids have actual definitions referring to them.
 
Back
Top Bottom