[A16] Better Pathfinding (v1.5.2 update 2/22)

Started by Zhentar, October 02, 2016, 07:43:01 PM

Previous topic - Next topic

Kadjunga

For some reasons, my pawns are "teleporting" around the base on higher loads. Had a pack of manhunters spawn on a far side of the map and while going into the defensive positions, the pawns randomly teleported around in a 5-10 tile radius of where they were moving. Looked odd as hell, but eventually when the manhunters got their "path" straight, everything went back to normal.

Not sure how to upload the savefile / log though

Zhentar

I've uploaded a new A16 version which fixes some bugs and improves performance.

Facepunch


Palypso


joaonunes

Quote from: Palypso on December 22, 2016, 04:19:28 PM
I get some trippy visuals probably thanks to this mod: https://i.imgur.com/yVIg9FL.png https://i.imgur.com/xPCGyGf.png
removing the mod fixed it

That looks like the dev mode for this mod... How did you even activate it? Downloaded the experimental release from github instead of the release? XD
Do you want your colonists to look manlier?
Get a free mustache sample here!

Zhentar

You can manually enable it by going into Dev Mode, and enabling 'Draw Paths' in the Dev Mode View Settings screen. It will persist even if you turn off Dev Mode, but it shouldn't persist if you close & reopen the game.

My debug builds turn that on automatically to save me a couple clicks, but I checked the 1.4 I uploaded and it's definitely not a debug build.

joaonunes

Quote from: Zhentar on December 22, 2016, 05:02:13 PM
You can manually enable it by going into Dev Mode, and enabling 'Draw Paths' in the Dev Mode View Settings screen. It will persist even if you turn off Dev Mode, but it shouldn't persist if you close & reopen the game.

My debug builds turn that on automatically to save me a couple clicks, but I checked the 1.4 I uploaded and it's definitely not a debug build.

Hummm... Good to know how to activate it
(*evil laughter*)
Do you want your colonists to look manlier?
Get a free mustache sample here!

Zakhad

#157
Anyone else getting horrible animal path finding lag when they're confined to a location? The animals keep trying to search for a path to food but unable to, due to confinement but that calculation keeps happening and it lags the entire game down, as soon as I put food in the room or the animals go to sleep or die the lag disappears :S

Zhentar

Can you share a save or a screenshot of your setup?

Zakhad

Quote from: Zhentar on December 23, 2016, 04:48:57 PM
Can you share a save or a screenshot of your setup?

You're mod was not at fault sorry for the accusation it was WM smarter food selection. Ty for being helpful, I would have posted a save but then you'd need all the mods, and at the time I wasn't even able to get into my save due to a mod update requiring me to change my load order, which took a while to figure out*.

*When I was trying to figure out this problem with the animal pathfinding lag, I disabled BetterPathfinding and because it needed to update my mod load order it made my at the time current load order incompatible disabling all my mods (Due to another mod auto update via steam - Really odd bug :P I was somehow playing with a broken load order)

Knedl

I am hunting for a bug that crashes the game. Could this part be related to this mod? Like deer spawned inside a mountain or something like that and causes the crash?

Exception ticking Deer79462: System.OutOfMemoryException: Out of memory
  at (wrapper managed-to-native) object:__icall_wrapper_mono_array_new_specific (intptr,int)
  at System.Array.Resize[IntVec3] (Verse.IntVec3[]& array, Int32 length, Int32 newSize) [0x00000] in <filename unknown>:0
  at System.Array.Resize[IntVec3] (Verse.IntVec3[]& array, Int32 newSize) [0x00000] in <filename unknown>:0
  at System.Collections.Generic.List`1[Verse.IntVec3].set_Capacity (Int32 value) [0x00000] in <filename unknown>:0
  at System.Collections.Generic.List`1[Verse.IntVec3].GrowIfNeeded (Int32 newCount) [0x00000] in <filename unknown>:0
  at System.Collections.Generic.List`1[Verse.IntVec3].Add (IntVec3 item) [0x00000] in <filename unknown>:0
  at Verse.AI.PawnPath.AddNode (IntVec3 nodePosition) [0x00000] in <filename unknown>:0
  at BetterPathfinding.NewPathFinder.FinalizedPath () [0x00000] in <filename unknown>:0
  at BetterPathfinding.NewPathFinder.FindPathInner (IntVec3 start, LocalTargetInfo dest, TraverseParms traverseParms, PathEndMode peMode, HeuristicMode mode) [0x00000] in <filename unknown>:0
  at BetterPathfinding.NewPathFinder.FindPath (IntVec3 start, LocalTargetInfo dest, TraverseParms traverseParms, PathEndMode peMode) [0x00000] in <filename unknown>:0
  at BetterPathfinding.PathFinderDetour.FindPath (Verse.AI.PathFinder this, IntVec3 start, LocalTargetInfo dest, TraverseParms traverseParms, PathEndMode peMode) [0x00000] in <filename unknown>:0
  at Verse.AI.PathFinder.FindPath (IntVec3 start, LocalTargetInfo dest, Verse.Pawn pawn, PathEndMode peMode) [0x00000] in <filename unknown>:0
  at Verse.AI.Pawn_PathFollower.GenerateNewPath () [0x00000] in <filename unknown>:0
  at Verse.AI.Pawn_PathFollower.TrySetNewPath () [0x00000] in <filename unknown>:0
  at Verse.AI.Pawn_PathFollower.TryEnterNextPathCell () [0x00000] in <filename unknown>:0
  at Verse.AI.Pawn_PathFollower.PatherTick () [0x00000] in <filename unknown>:0
  at Verse.Pawn.Tick () [0x00000] in <filename unknown>:0
  at Verse.TickList.Tick () [0x00000] in <filename unknown>:0

Zhentar

Are you using the lastest version? The "RC1" version I posted before the official A16 release had a bug that could cause that, but it should have been resolved.

Knedl

#162
Zhentar thank you for reply! I see I have a 1.4RC version (downloaded 20. Dec) and have now downloaded the last one (ver. 1.3.2.). Will test and I hope I won't report anything back which means it runs fine :) Using approx. 70 mods, made some changes to mods to kill the bugs but this one was above my knowledge of coding.

Thank you for your awesome work on this mod!

EDIT: I wrote versions because if was strange to me that the ver. nr. I downloaded was lower that the one I had. No freaking idea how I did that but sure I got a crash since it's for A15 lol. Downloaded again now and it's the 1.4. ver. so I am going for it again lol. Anyway I'am posting this just to let you know that about.xml should be changed to .1393.

terrordrone_nl

#163
Playing on a large sized Large Hills map, my game freezes every few seconds. Decided to check out the logs and found the following line repeating whenever the game stuttered:
QuoteAlphabeaver217069 pathing from (287, 0, 239) to (90, 0, 96) hit search limit of 160000 cells.
Not sure if your mod messes with animal pathing. The Alphabeaver that's causing the issue arrived in a group of ~12 beavers, and Self-tamed after a small while. Another beaver in the group also self-tamed, and he walked to my base just fine. There's an animal zone in my base that I assigned the beavers to. 
Full debug log can be found at https://gist.github.com/HugsLibRecordKeeper/e369c6d79941902b13dfb3ab45f52dd1
Haven't tested it just yet, but I'll butcher the beaver later to see if it stops the errors. I suspect it will, since the stuttering stopped when it fell asleep.
If your mod doesn't mess with animal pathing, let me know and I'll hit up the official bug reports sections. 

Edit: enabled "Draw Paths" in the dev mode options, game crashed when it checked pathing again. Output.log is claiming a stackoverflow exception:
QuoteException ticking Alphabeaver217069: System.StackOverflowException: The requested operation caused a stack overflow.
  at BetterPathfinding.NewPathFinder.FindPathInner (IntVec3 start, LocalTargetInfo dest, TraverseParms traverseParms, PathEndMode peMode, HeuristicMode mode) [0x00000] in <filename unknown>:0
  at BetterPathfinding.NewPathFinder.FindPath (IntVec3 start, LocalTargetInfo dest, TraverseParms traverseParms, PathEndMode peMode) [0x00000] in <filename unknown>:0
  at BetterPathfinding.PathFinderDetour.FindPath (Verse.AI.PathFinder this, IntVec3 start, LocalTargetInfo dest, TraverseParms traverseParms, PathEndMode peMode) [0x00000] in <filename unknown>:0
  at Verse.AI.PathFinder.FindPath (IntVec3 start, LocalTargetInfo dest, Verse.Pawn pawn, PathEndMode peMode) [0x00000] in <filename unknown>:0
  at Verse.AI.Pawn_PathFollower.GenerateNewPath () [0x00000] in <filename unknown>:0
  at Verse.AI.Pawn_PathFollower.TrySetNewPath () [0x00000] in <filename unknown>:0
  at Verse.AI.Pawn_PathFollower.TryEnterNextPathCell () [0x00000] in <filename unknown>:0
  at Verse.AI.Pawn_PathFollower.PatherTick () [0x00000] in <filename unknown>:0
  at Verse.Pawn.Tick () [0x00000] in <filename unknown>:0
  at Verse.TickList.Tick () [0x00000] in <filename unknown>:0

Zhentar

It's definitely caused by this mod. Which biome? Can you post the save, or at least a screenshot of the map?

And I'm disappointed to hear that draw paths crash is happening to other people too :( It doesn't make any sense...