Redrawn Space Connections
This mod algorithmically redraws all connections on the space map to improve navigation between modded planets.
- No planets are moved.
- The lengths of the routes are in proportion to their lengths on the map.
- The routes of planets that are specified as moons in PlanetsLib (subgroup
satellites
) are left alone. This is to make them more visually distinct from planets on the space map. - Asteroids are included on each route.
Documentation for modders
- This mod deletes all routes and draws them afresh. However, one part of the original space connections is considered: asteroids.
- Before deleting all the routes, the algorithm records all their
asteroid_spawn_definitions
. If any routes gets recreated, the asteroids for that route are reapplied. For this reason you may wish to create dummy routes even if using this mod as a dependency. - We would like to improve the asteroid handling further, contributions from modders on this topic are welcome on Github.
- Before deleting all the routes, the algorithm records all their
- The algorithm is sensitive to the following fields on prototypes.
redrawn_connections_keep
— Boolean — Iftrue
on a space connection, this route will not be deleted. (In a future version of the mod, it will form a natural part of the resulting triangulation.)redrawn_connections_exclude
— Boolean — Iftrue
on a planet or space location, the location and its connections are excluded from the algorithm. (In a future version of the mod, these routes will form a natural part of the resulting triangulation.)- This defaults to true for the shattered planet, hidden locations, and any locations on the
subgroup=satellites
row in PlanetsLib.
- This defaults to true for the shattered planet, hidden locations, and any locations on the
redrawn_connections_rescale
— Boolean — Iftrue
on a space connection that is kept due to the above fields, the length of the connection will be rescaled in proportion to the other newly generated connections.redrawn_connections_length_multiplier
— Number — All newly drawn connections from this planet or space location will have their length multiplied by this value.- This defaults to 4.8 for the solar system edge so that the length of the route from Aquilo in vanilla is preserved, and 100 for the shattered planet as a sensible fallback.
- If both ends of a newly drawn connection possess this field, the higher of the two values is used.
- An alternative algorithm may be specified by overriding the
forced_value
of the bool settingRedrawn-Space-Connections-real-space-triangulation
totrue
. This performs triangulation in real space rather than polar coordinates, which typically performs worse close to the star but performs better far from the star. The connections will also be more likely to cross theorientation=0
axis.