Redrawn Space Connections


Algorithmically redraws the routes on the space map to improve navigation between modded planets.

Tweaks
12 days ago
2.0
10.4K
Factorio: Space Age Icon Space Age Mod
Transportation Environment
Owner:
thesixthroc
Source:
https://github.com/danielmartin0/fact...
Homepage:
N/A
License:
GNU GPLv3
Created:
4 months ago
Latest Version:
2.2.0 (12 days ago)
Factorio version:
2.0
Downloaded by:
10.4K users

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 to and from moons (defined as the PlanetsLib subgroup satellites) are left alone.
    • This is to make them more visually distinct from planets on the space map.
  • Asteroids are generated on each route.
    • For new routes, asteroids are chosen based on the orbital asteroids of the planets at either end.

See also

Special thanks

  • AnotherZach for collaborating on the algorithm to build route asteroids out of orbital asteroids.
  • Boomshroom for writing a bugfix for real-space triangulation and suggesting we make it the default.

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.
    • Otherwise, each new route between two planets will examine the orbital asteroids at either end to construct the asteroids for the route. It is not a direct interpolation and the midpoint will generally have more asteroids than either end.
  • The algorithm is sensitive to the following fields on prototypes.
    • redrawn_connections_keep — Boolean — If true on a space connection, this route will not be deleted.
      • In a future version of the mod it is planned that this route will gracefully be included in the triangulation.
    • redrawn_connections_exclude — Boolean — If true on a planet or space location, the location and its connections are excluded from the algorithm.
      • This defaults to true for the shattered planet, hidden locations, and any locations on the subgroup=satellites row in PlanetsLib.
      • In a future version of the mod it is planned that this route will gracefully be included in the triangulation.
    • redrawn_connections_rescale — Boolean — If true 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 such 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.