Posts:
4.248
Threads:
274
Joined:
Sep 2013
Reputation:
Solved with the next version!
The issue was that if another portal that wasn't closest to the rally flag was closer to the creatures than the other portal, then the creature decent into the that one because it had a higher job priority.
So if portal "A" has a distance 10 to the rally flag, and portal "B" has a distance 15 to the rally flag and distance 5 to portal "A".
* Then the creatures will use portal "A" to reach the surface.
* And on the surface they will prioritize jobs depending on distance.
- Portal "A" has distance 0 from the creature, but it is disabled because it is the one closest to the rally flag.
- Portal "B" has distance 5 from the creature and it is NOT disabled.
- Rally flag has distance 10.
* So the creatures will goto Portal "B" as it has the closest distance.
* And when they are in the dungeon they will goto portal "A" and around it goes.
It was not just a matter of changing the priority because if the rally flag moves to a location that makes portal "B" closer to it, then I want the creatures that are on the surface to go down to the dungeon through portal "A" and then back to the surface through portal "B".
So what I did was that I blocked portal "B" if the creatures were closer to portal "A" that than to portal "B".
Solved with the next version!
Posts:
4.248
Threads:
274
Joined:
Sep 2013
Reputation:
Version 0.11.5 BT released! This bug is solved but need confirmation!
Posts:
2.428
Threads:
188
Joined:
Aug 2013
Reputation:
I believe this one if fixed. I found 2 portals practically side by side and placed the rally flag to the right of the one on the far right. They came up through that portal. Then I placed it on the far left, and they ended up going through the portal on the right, and back up again to the flag through the portal on the left.
When I placed the flag between the two, they came back up through the portal which was closest to the flag. I'm guessing this is the behavior you're going for with this fix. I don't see why they need to enter the portal in the first place when they could just travel across the surface. It would seem that would be fastest.
Posts:
4.248
Threads:
274
Joined:
Sep 2013
Reputation:
Yeah, it would be faster. But it will have to stay so for now, right now they are following plain logic that if there are another portal closer they go down through the dungeon and then back up to that portal. It's a bit stupid I agree, but I don't want to mess with the algorithm right now. And in the future when I do the map generation the portals will be farther away from each other thus solving the issue automatically.