Hello everyone.
I am in the process of developing a mod, which requires its own world map. For this I copy the map from the Vanilla version, take it to another module and start working with it. I keep the same name so that my map overwrites the base game map.
I also copy the distance_cache_bin from the vanilla game and take it to the ModuleData of my module.
Everything is fine with the terrain modification and everything else, however I get errors when I try to modify the pathfinding.
If I delete just one of the vertices of the pathfinding, the game throws an error. I can modify the pathfinding already set, but what I really want is to delete that pathfinding and generate a new one from scratch.
I am in the process of developing a mod, which requires its own world map. For this I copy the map from the Vanilla version, take it to another module and start working with it. I keep the same name so that my map overwrites the base game map.
I also copy the distance_cache_bin from the vanilla game and take it to the ModuleData of my module.
Everything is fine with the terrain modification and everything else, however I get errors when I try to modify the pathfinding.
If I delete just one of the vertices of the pathfinding, the game throws an error. I can modify the pathfinding already set, but what I really want is to delete that pathfinding and generate a new one from scratch.
I am grateful in advance for any help I can get. Have a nice day.Exception information
Type: System.AccessViolationException
Message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Source: SandBox
CallStack:
- at Vec2 SandBox.MapScene.GetNavigationMeshCenterPosition(PathFaceRecord face)
- at Settlement TaleWorlds.CampaignSystem.GameComponents.DefaultMapDistanceModel.GetClosestSettlementForNavigationMesh(PathFaceRecord face)
- at bool TaleWorlds.CampaignSystem.GameComponents.DefaultMapDistanceModel.GetDistance(IMapPoint fromMapPoint, Settlement toSettlement, float maximumDistance, out float distance)
- at Settlement Helpers.SettlementHelper.FindNearestSettlement(Func condition, IMapPoint toMapPoint)
- at void TaleWorlds.CampaignSystem.CampaignBehaviors.VillageTradeBoundCampaignBehavior.TryToAssignTradeBoundForVillage(Village village)
- at void TaleWorlds.CampaignSystem.CampaignBehaviors.VillageTradeBoundCampaignBehavior.UpdateTradeBounds()
- at void TaleWorlds.CampaignSystem.MbEvent.InvokeList(EventHandlerRec list, T t)
- at void TaleWorlds.CampaignSystem.CampaignEvents.OnNewGameCreated(CampaignGameStarter campaignGameStarter)
- at void TaleWorlds.CampaignSystem.CampaignEventDispatcher.OnNewGameCreated(CampaignGameStarter campaignGameStarter)
- at void TaleWorlds.CampaignSystem.Campaign.OnNewGameCreated(CampaignGameStarter gameStarter)
- at void TaleWorlds.CampaignSystem.Campaign.DoLoadingForGameType(GameTypeLoadingStates gameTypeLoadingState, out GameTypeLoadingStates nextState)
- at void StoryMode.CampaignStoryMode.DoLoadingForGameType(GameTypeLoadingStates gameTypeLoadingState, out GameTypeLoadingStates nextState)
- at bool TaleWorlds.Core.GameType.DoLoadingForGameType()
- at void SandBox.SandBoxGameManager.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)
- at void TaleWorlds.DotNet.Managed.ApplicationTick_Patch2(float dt)