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

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

Previous topic - Next topic

Zhentar

No fix tonight because I haven't been able to reproduce the problem. Anyone able to share a save that demonstrates it?

RemingtonRyder

Not sure what the cause is, to be honest. I thought that maybe area restrictions mess with the pathfinding but testing hasn't turned up anything.

Nimrod

Quote from: Zhentar on October 15, 2016, 02:53:16 AM
No fix tonight because I haven't been able to reproduce the problem. Anyone able to share a save that demonstrates it?

I will put 1.2 back in and see if I can come up with anything that narrows it down...

Nimrod

Okay, got the error again.

I saved my game - exited the program - restarted, loaded and the error cleared - the pawn did the job that froze him without problem

Once again there where Visitor pawns on my map - Hospitality Mod was active
Are the other who see that error using Hospitality too?


Nimrod

#49
Just got it without visitors too.

Screenshot attached.

edit: after I unpaused the game the error cleared itself and the job continued.

edit2: it happens quite regularly now. If I draft the pawn and move him around, the error clears sometimes, sometimes it doesnt (depends if the job gets canceled I guess) - switching back to 1.1 now

edit3: exact same setup with v1.1 throws zero errors - so at least its narrowed down to "the changes you made from 1.1 to 1.2" Its something, eh? :D

[attachment deleted by admin - too old]

zloitermit

#50
После обновления 1.2 колонисты стали ни с то ни с сего вставать на месте, после откакта на 1.1 проблема пропала ;(


Translation through Google: After the update 1.2 Colonists began for no reason with any of this up on the spot after otkakta 1.1 problem disappeared; (


User has been sent a PM in regards to the forums being English only broken or otherwise.

Zhentar

Quote from: Nimrod on October 15, 2016, 07:28:09 AM
edit3: exact same setup with v1.1 throws zero errors - so at least its narrowed down to "the changes you made from 1.1 to 1.2" Its something, eh? :D

I'm pretty sure I know what is happening... the problem is, by my understanding that should be impossible. I have to be wrong about at least one of those two things... from what you've posted, I'm pretty sure it's the impossible happening.

Could you guys give this version a try? It will still log an error if what I think is happening happens, but it also tries a possible fix, so hopefully your pawn can still get where they are going. Additionally, it flashes the cell(s) responsible red (with a "!!!" label); a screenshot of that would be very helpful.

[attachment deleted by admin - too old]

Nimrod

#52
Quote from: Zhentar on October 15, 2016, 01:52:33 PM
I'm pretty sure I know what is happening... the problem is, by my understanding that should be impossible. I have to be wrong about at least one of those two things... from what you've posted, I'm pretty sure it's the impossible happening.

Could you guys give this version a try? It will still log an error if what I think is happening happens, but it also tries a possible fix, so hopefully your pawn can still get where they are going. Additionally, it flashes the cell(s) responsible red (with a "!!!" label); a screenshot of that would be very helpful.


No problem, mate. Giving it a try now.
Feedback will follow as soon as I got something. ;)

cheers

edit: okay, I get the error again - pawns freeze and cant complete their job but there a absolutely no flashing cells ...

I am playing on the biggest map possible - may that be a factor to consider?

edit2: it seems to happen very often when my pawns want to build something...

edit3: as I said, there a no flashing cells, but for what its worth, here is a screen. The two pawns in the red circle want to get to the blue circle and have to follow the arrows. Both are frozen at this moment, the debug log shows both of them with the same error as above.

edit4: when I unpause after a long game pause (like now when I made the screenshot and post) - the error disappears and the job(s) continue as intended.

[attachment deleted by admin - too old]

Zhentar

Hmm. Then I was wrong about what was happening; I see one other reasonable possibility. This should be a fix, then. Can you see if it works?

[attachment deleted by admin - too old]

zloitermit

After Update 1.2 colonists became either with no rhyme or reason to get up on the spot, after returning to 1.1 problem disappeared;(
Try an updated version, then accomplish

Nimrod

Quote from: Zhentar on October 15, 2016, 03:39:29 PM
Hmm. Then I was wrong about what was happening; I see one other reasonable possibility. This should be a fix, then. Can you see if it works?

I can and will test this tomorrow!

Thanks!

Jcewazhere

Looks like a great mod going to try it tonight, however I had another question you might be able to answer: In some games, especially ones with big groups of mobs one unit is promoted to pathfinder and others stay near him to limit the overall pathfinding done. If the pathfinder dies a new one is promoted. Does/can Rimworld do anything like that for those 50+ tribesman raids? Would it help?

JerryBi

Exception ticking Boomalope202125: System.IndexOutOfRangeException: Array index is out of range.
  at Verse.RegionGrid.GetRegionAt_InvalidAllowed (IntVec3 c) [0x00000] in <filename unknown>:0
  at BetterPathfinding.PathFinder+<>c.<FindPathInner>b__47_0 (IntVec3 c) [0x00000] in <filename unknown>:0
  at System.Linq.Enumerable.All[IntVec3] (IEnumerable`1 source, System.Func`2 predicate) [0x00000] in <filename unknown>:0
  at BetterPathfinding.PathFinder.FindPathInner (IntVec3 start, TargetInfo dest, TraverseParms traverseParms, PathEndMode peMode, HeuristicMode mode) [0x00000] in <filename unknown>:0
  at BetterPathfinding.PathFinder._FindPath (IntVec3 start, TargetInfo dest, TraverseParms traverseParms, PathEndMode peMode) [0x00000] in <filename unknown>:0
  at Verse.AI.PathFinder.FindPath (IntVec3 start, TargetInfo 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

no visitors, raiders

just boomlape froze on map

Nimrod

Quote from: Zhentar on October 15, 2016, 03:39:29 PM
Hmm. Then I was wrong about what was happening; I see one other reasonable possibility. This should be a fix, then. Can you see if it works?

Yes, I think that fixed it! Been testing for 30 minutes now, no errors. :)
Excellent work!

Zhentar

Okay, here's the 1.2.1 release: https://github.com/Zhentar/BetterPathfinding/releases/download/1.2.1/Better.Pathfinding.v1.2.1.zip

Fixes the issue reported by Nimrod et. al, and I think masaykh's issue as well.