Redrawn Space Connections


Algorithmically redraws the routes on the space map to improve navigation between modded planets. In order to keep this mod effective and composable, it avoids making exceptions or compatibility patches for specific planets, leaving that to other mod authors.

Tweaks
18 days ago
2.0
22.8K
Factorio: Space Age Icon Space Age Mod
Transportation Environment

g OMNI + Secretas/Paracelsin = Missing Aquilo-Solar System Edge Connection

26 days ago
(updated 26 days ago)

See reported issue here (also in the Discord)

But basically, running all three planet mods removes the connection between Aquilo and the Solar System Edge. See log below:

Script @__Redrawn-Space-Connections__/data-final-fixes.lua:524: Redrawn Space Connections: Connection solar-system-edge to aquilo filtered out by triangle inequality. Direct length: 98581, Alternative path length: 94363

Is this just an unfortunate circumstance of planet placement? Removing OMNI restores the Aquilo-SSE connection (and of course, removing RSC also retains the connection). I think so far, this is the only planet mod I've found to cause a connection removal this.. blatant?

Finally attached image (I have my RS Compat mod enabled that adds the Frozeta orbit, but the same issue occurs even without it):

26 days ago
(updated 26 days ago)

The logs reveal what is happening:

2.567 Script @Redrawn-Space-Connections/data-final-fixes.lua:524: Redrawn Space Connections: Connection aquilo to solar-system-edge filtered out by triangle inequality. Direct length: 98581, Alternative path length: 82793

Triangle inequality filtering is a postprocessing step where we remove 'redundant' paths. In this case, the distance multiplier for solar system edge routes applies to OMNI and Aquilo, but OMNI is much closer to the solar system edge so it short-circuits: the mod notices you can go via OMNI so eliminates the Aquilo route.

Are there any suggestions to improve the algorithm?

26 days ago

On reflection, this may be more an issue with 3rd party game balance. If the intention is to have similar difficulty journies to OMNI like travel to the solar system edge, OMNI probably wants a redrawn_connections_length_multiplier property, similar to the SSE's value of 4.8. If OMNI is meant to be a shortcut to the solar system edge, the current situation is fine.

26 days ago
(updated 26 days ago)

Planet discovery OMNI requires Promethium Science. This removal causes a deadlock, making the discovery impossible. And in turn, the victory is impossible, too.

26 days ago
(updated 26 days ago)

Triangle inequality filtering is a postprocessing step where we remove 'redundant' paths

I didn't realize base RSC did this sort of thing, but yeah, checking the logs I do see some other "redundant" paths being removed, and those make a lot more sense (I think there was a Vulcanus to Secretas one in my testing, that made sense to remove)

this may be more an issue with 3rd party game balance

OMNI seems to position itself as a post-SSE planet, since (as stated by valneq) it requires Promethium Science. I do wonder if this should be handled either by OMNI itself, or by a third party patch mod, since OMNI probably shouldn't have those connections to Secretas and Paracelsin (assuming its actual location is somewhere outside of the nauvis system, not as close as it appears visually on the map)

I have no idea what needs to be done to fix/improve the math/logic within RSC, but I could just implement the patch through RS Compat (as it was originally requested).

Marking Aquilo-SSE as non-removable by RSC (if OMNI + Secretas/Paracelsin installed), then cutting the alternative paths to OMNI if they exist (since it makes sense that player should have to exit nauvis system via SSE, in order to reach a planet located outside the nauvis system).

Might probably need to add some other conditionals in there to deal with things like Outer Rim, Asteroid Belt, Void Processing, Shattered Planet, etc (the usual suspects) shifting things around, but something like that in general

26 days ago
(updated 26 days ago)

There can be legitimate reasons to remove the connection Aquilo–SSE. As long as there is an alternative path.

Interestingly, adding Outer Rim fixes the deadlock. Still, the other connections still seem wrong.

26 days ago
(updated 26 days ago)

Yup, that's what I meant by adding some conditionals, I had a feeling one or more of those would "fix" the issue by creating some alternative paths. I'll have to play around with different sets of planets and overhauls (Outer Rim, Asteroid Belt, etc) to see which require changes and which don't.

And yeah, there are so many things wrong in that image above, assuming RS Compat is enabled (which it seems to be, judging by the Frozeta orbit). Frozeta as a satellite shouldn't have a connection to OMNI to begin with (not sure how that could have happened) and the connection from Aquilo to SSE was supposed to be preserved when playing with Outer Rim (since it looked really good that way, with the triplet surrounding Paracelsin)

Think OMNI just needs to be pushed further out so that it doesn't create too many connections with things inside the nauvis system, similar to how I handled the Void Processing black hole (which has auto-connections all the way to like Gleba, under certain conditions)

26 days ago
(updated 26 days ago)

I have no idea what needs to be done to fix/improve the math/logic within RSC, but I could just implement the patch through RS Compat […]

After looking at the connection distances with different mod loadouts, my gut feeling is that "just" setting (exactly as thesixthroc suggested)

redrawn_connections_length_multiplier property, similar to the SSE's value of 4.8

Also looking at the other connections, (without Outer Rim!) Secretas might need a factor of 3 and Paracelsin maybe a factor of 2. RSC pulls them much closer to Aquilo than their default values.

26 days ago

And yeah, there are so many things wrong in that image above, assuming RS Compat is enabled

No that image is without compat. Outer Rim alone fixes the Frozeta orbit, yet does not remove the Aquilo–Frozeta connection.

25 days ago
(updated 25 days ago)

Outer Rim alone fixes the Frozeta orbit

Huh, ya learn something new every day.. this must have been a recent change, I don't remember it being that way before (both the thumbnail and the images gallery shows Frozeta without an orbit). I don't even see any mention of that in the changelog either (though they aren't very verbose to begin with, see v0.3.3: "fixed")

25 days ago
(updated 25 days ago)

Ah, I have a different idea, rather than setting redrawn_connections_length_multiplier on OMNI.

Perhaps the route-elimination code (using the triangle inequality) should ignore the redrawn_connections_length_multiplier, and eliminate routes based on their default length to make a reasonable-looking spacemap. Then in an extra step afterwards, the lengths are rescaled as required.

25 days ago
(updated 25 days ago)

There can be legitimate reasons to remove the connection Aquilo–SSE. As long as there is an alternative path.

Interestingly, adding Outer Rim fixes the deadlock. Still, the other connections still seem wrong.

What happens is that the outer rim and dea dia exclude themselves from tiered solar system to not break up the progression I'm building. Those groups are a bit more tied together now, so any redrawing would cause problems. I also decided to not make the asteroid field a hard requirement, even if that is the intended way to have it set up so you can use tiered solar system with it.
Tiered solar system, the outer rim and the asteroid field tries to do some organization that are not fully compatible with each other, but don't break enough to be a problem.
I'd need to check, those paths may also get set up after redrawn space connections did its thing.

Huh, ya learn something new every day.. this must have been a recent change, I don't remember it being that way before (both the thumbnail and the images gallery shows Frozeta without an orbit). I don't even see any mention of that in the changelog either (though they aren't very verbose to begin with, see v0.3.3: "fixed")

I know I'm not good with those, but I'm trying. :'(

25 days ago
(updated 25 days ago)

I have implemented my idea: In RSC 2.2.7 redrawn_connections_length_multiplier now takes effect after the routes are constructed, rather than before.

I believe this is an improvement to the algorithm, whether or not it fixes all the problems with OMNI. If there are serious issues, please let me know.

25 days ago
(updated 25 days ago)

Can confirm, the new update fixes the issue (at least in the minimal loadout of Secretas, Paracelsin, and OMNI).

The route between Aquilo and the Solar System Edge is properly retained. Any other specific fixes regarding OMNI can definitely be done by a third-party mod from here, thanks!

I know I'm not good with those, but I'm trying. :'(

No worries, I sometimes forget to add some minor things to the changelog too lol

25 days ago
(updated 25 days ago)

Something about the way this factor is applied to the Solar System Edge connections is weird. The final results seem to violate triangle inequality :(
[distances are multiples of 1000km, shortest path Aquilo–SSedge highlighted in white]

25 days ago

It is expected that some edges will not respect the triangle inequality if you look at the in-game length of the routes. Instead, the triangle equality filtering is being applied to 'how the map appears on the screen', before redrawn_connections_rescale takes effect.