Here's the save file of what I meant in thread title - basically wherever I place my rally flag close to portals creatures instead going there in this particular terrain decides to walk from one portal to another.

Sebt If its one tile to the whole that your creatures climb up and down, i wonder if thats just the confusing part of path. See if you with the mouse can find a tree to chop down first before placing the flag so close to the portal hole

So you managed to call creatures to rally flag placed the south from these portals? I cut trees that could be obstacles, but than they still were going from one portal to another. There was an issue reported earlier where portals were too close to each other and creatures were marching in a loop cycle through these two portals. Here I couldn't order creatures to meet with rally flag to the south of these portals around. Also earlier Rasmus made that creatures won't go through surface from one portal to another, but by underground pass to ensure their safety, I wonder if that somehow cause the issue in cases like reported here.

You had a lot of surface portals that weren't reachable by the creatures on the surface. And what the creatures do on the surface is to measure distances between themselves and the portals, and distances between themselves and the rally flags. If one is closer to another they will decide weather to go down a portal or go to the rally flag. The problem here was that if a portal isn't reachable the distance it returns to the creature (in code) is -1, and I didn't take into account that the portal should be ignored if the distance is equal to -1. Instead the unreachable portals became the closest portals...

The main reason here is actually that some of the portals you took over actually was under water and were therefore unreachable, but this has been fixed now as well if you restart the level with the same seed.

Well I think it's fixed, but only in halfway? If there are for example two portals close to each other, than if my army is closer to the 1st portal and I put Rally Flag closer to 2nd portal they will go enter 1st portal and exit from 2nd portal on surface, which sometimes make it hard to command creatures. It's weird because some creatures goes through 1st and some ignores that and goes on surface (picture below).

Maybe some restriction of going through underground could be made if rally flag is put close to any portal (like 6-8 tiles), so creatures would pick the way through surface instead of going from one portal to another to reach the same point?

Sorry, I don't keep older save files since we can't play them any more in newer version. You can try reproducing this using the map seed I gave you. Coordinates of these portals when looping happens are shown on the minimap fortunately.