BL Other Creating a custom culture, crash help

Users who are viewing this thread

Heivenner

Recruit
Im having a lot of trouble with a certain error message when creating a custom culture. It seems to be directly related to the spcultures.xml file because if i copy the empire culture id's verbatim the crash goes away. Anywhere here is the message I keep getting from better exception window. **** if anyone can figure this out Ill give em ten bucks if they got cashapp

Source: TaleWorlds.CampaignSystem
Object reference not set to an instance of an object.

Inner exception callstack: No inner exception was thrown
Outer exception callstack: at TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.WorkshopsCampaignBehavior.BuildWorkshopForHero(Hero ownerHero, Int32 shopIndex, Boolean changeOwnerName)
at TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.WorkshopsCampaignBehavior.BuildWorkshopsAtGameStart()
at TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.WorkshopsCampaignBehavior.OnNewGameCreatedPartialFollowUp(CampaignGameStarter starter, Int32 i)
at TaleWorlds.CampaignSystem.MbEvent`2.InvokeList(EventHandlerRec`2 list, T1 t1, T2 t2)
at TaleWorlds.CampaignSystem.CampaignEvents.OnNewGameCreated(CampaignGameStarter campaignGameStarter)
at TaleWorlds.CampaignSystem.CampaignEventDispatcher.OnNewGameCreated(CampaignGameStarter campaignGameStarter)
at TaleWorlds.CampaignSystem.Campaign.OnNewGameCreated(CampaignGameStarter gameStarter)
at TaleWorlds.CampaignSystem.Campaign.DoLoadingForGameType(GameTypeLoadingStates gameTypeLoadingState, GameTypeLoadingStates& nextState)
at StoryMode.CampaignStoryMode.DoLoadingForGameType(GameTypeLoadingStates gameTypeLoadingState, GameTypeLoadingStates& nextState)
at TaleWorlds.Core.GameType.DoLoadingForGameType()
at SandBox.SandBoxGameManager.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_Patch1(Module this, Single dt)
 
Solution
Here, game tries to spawn a caravan master, but couldn't find a proper template. Check out caravan_master_aserai and create one for your own culture.

beybi123

Developer
I think it could be related to missing notable templates of your culture.

<notable_and_wanderer_templates>
.
.
.
</notable_and_wanderer_templates>
 
Upvote 1

Heivenner

Recruit
I'm wondering if they changed how cultures work in 1.7.1 or if other people found work arounds in their mods cause ive been digging through lots of different mods to find out their structure and none of them really have the notable templates laid out in the spcultures.xml however I have created all those and when I put them back into spcultures.xml this is the error i get instead. I wish i was better at reading these callstacks so i could just read them and know what the error was.

Outer exception callstack: at System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)
at TaleWorlds.CampaignSystem.CaravanPartyComponent.InitializeCaravanOnCreation(MobileParty mobileParty, Hero caravanLeader, ItemRoster caravanItems, Int32 troopToBeGiven)
at TaleWorlds.CampaignSystem.CaravanPartyComponent.<>c__DisplayClass29_0.b__0(MobileParty mobileParty)
at TaleWorlds.CampaignSystem.MobileParty.CreateParty(String stringId, PartyComponent component, OnPartyComponentCreatedDelegate delegateFunction)
at TaleWorlds.CampaignSystem.CaravanPartyComponent.CreateCaravanParty(Hero caravanOwner, Settlement spawnSettlement, Boolean isInitialSpawn, Hero caravanLeader, ItemRoster caravanItems, Int32 troopToBeGiven)
at TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.CaravansCampaignBehavior.SpawnCaravan(Hero hero, Boolean initialSpawn)
at TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.CaravansCampaignBehavior.OnNewGameCreatedPartialFollowUpEvent(CampaignGameStarter starter, Int32 i)
at TaleWorlds.CampaignSystem.MbEvent`2.InvokeList(EventHandlerRec`2 list, T1 t1, T2 t2)
at TaleWorlds.CampaignSystem.CampaignEvents.OnNewGameCreated(CampaignGameStarter campaignGameStarter)
at TaleWorlds.CampaignSystem.CampaignEventDispatcher.OnNewGameCreated(CampaignGameStarter campaignGameStarter)
at TaleWorlds.CampaignSystem.Campaign.OnNewGameCreated(CampaignGameStarter gameStarter)
at TaleWorlds.CampaignSystem.Campaign.DoLoadingForGameType(GameTypeLoadingStates gameTypeLoadingState, GameTypeLoadingStates& nextState)
at StoryMode.CampaignStoryMode.DoLoadingForGameType(GameTypeLoadingStates gameTypeLoadingState, GameTypeLoadingStates& nextState)
at TaleWorlds.Core.GameType.DoLoadingForGameType()
at SandBox.SandBoxGameManager.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_Patch1(Module this, Single dt)
 
Upvote 0

beybi123

Developer
Here, game tries to spawn a caravan master, but couldn't find a proper template. Check out caravan_master_aserai and create one for your own culture.
 
Upvote 1
Solution

Heivenner

Recruit
Wow, thank you. So I had a caravan_master for my culture, but apparently the issue was that I made it level 31 instead of 26, as I wanted them to be a bit stronger. Never would have guessed that on my own so I really appreciate you pointing me in the right direction.
 
Upvote 0

Heivenner

Recruit
This issue is solved but since I got you here and you know a ton about this stuff I got another issue that I just found. When i hit 'alt' on one of these caravans to display troops it crashes and i get this

at TaleWorlds.CampaignSystem.ViewModelCollection.TooltipVMExtensions.AddPartyTroopProperties(TooltipVM tooltipVM, TroopRoster troopRoster, TextObject title, Boolean isInspected, Func`1 funcToDoBeforeLambda)
at TaleWorlds.CampaignSystem.ViewModelCollection.TooltipVMExtensions.UpdateTooltip(TooltipVM tooltipVM, MobileParty mobileParty, Boolean openedFromMenuLayout, Boolean checkForMapVisibility)
at TaleWorlds.Core.ViewModelCollection.TooltipVM.OpenTooltip(Type type, Object[] args)
at TaleWorlds.Core.ViewModelCollection.TooltipVM.set_IsExtended(Boolean value)
at TaleWorlds.MountAndBlade.GauntletUI.InformationUIManager.OnTick(Single dt)
at TaleWorlds.Engine.Screens.ScreenManager.Tick_Patch1(Single dt)
 
Upvote 0

beybi123

Developer
Happy to help.

Hmm can't be sure about the last issue. Maybe related to companion you picked - if it's your caravan. If you can send me your files, I can take a look at it, though.
 
Upvote 1

Heivenner

Recruit

Still a lot of work to do on it obviously. New culture based on stories myths and empire is made strong, basically wanted tall empire vs wide empire. Anyway the caravan crash in question is in the new culture in top left of the map between Vlandia and Sturgia.
 
Upvote 0

Heivenner

Recruit
I solved the above error, it was due to a typo in partyTemplates. it was trying to spawn a troop that didnt exist. however i got this one after playing with my mod for a bit.

at TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.UrbanCharactersCampaignBehavior.SpawnNotablesIfNeeded(Settlement settlement)
at TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.UrbanCharactersCampaignBehavior.DailyTickSettlement(Settlement settlement)
at TaleWorlds.CampaignSystem.MbEvent`1.InvokeList(EventHandlerRec`1 list, T t)
at TaleWorlds.CampaignSystem.CampaignEvents.DailyTickSettlement(Settlement settlement)
at TaleWorlds.CampaignSystem.CampaignEventDispatcher.DailyTickSettlement(Settlement settlement)
at TaleWorlds.CampaignSystem.CampaignPeriodicEventManager.PeriodicTicker`1.PeriodicTickSome(Double timeUnitsElapsed)
at TaleWorlds.CampaignSystem.CampaignPeriodicEventManager.PeriodicDailyTick()
at TaleWorlds.CampaignSystem.Campaign.Tick()
at TaleWorlds.CampaignSystem.MapState.OnMapModeTick(Single dt)
at TaleWorlds.CampaignSystem.MapState.OnTick(Single dt)
at TaleWorlds.Core.GameStateManager.OnTick(Single dt)
at TaleWorlds.Core.Game.OnTick(Single dt)
at TaleWorlds.Core.GameManagerBase.OnTick(Single dt)
at TaleWorlds.MountAndBlade.Module.OnApplicationTick_Patch1(Module this, Single dt)
 
Last edited:
Upvote 0

beybi123

Developer
I'm glad you figured it out.
Last crash you sent happens because "Headman" templates in spcultures.xml are wrong.

NPCCharacter.spc_empire_hypheadman_1
NPCCharacter.spc_empire_hypheadman_2
NPCCharacter.spc_empire_hypheadman_3

They should be:

NPCCharacter.spc_hypempire_headman_1
NPCCharacter.spc_hypempire_headman_2
NPCCharacter.spc_hypempire_headman_3
 
Upvote 1

Heivenner

Recruit
Thank you very much. All my issues are solved for now and I can just focus on adding more content and stuff. Someone should give you a promotion:grin:
 
Upvote 0
Top Bottom