HOTFIX##
The issue occurs because some newly-added modded planets do not have asteroid_spawn_definitions in their connections (space-connection). When the script iterates over all space-connection prototypes, it encounters a connection without asteroid_spawn_definitions, causing a nil error on line 78.
A simple fix is to skip any connections that do not define asteroid_spawn_definitions (since only certain planets and connections require them). Insert this check right before calling map_definitions (around line 77) (asteroids.lua):
if connection == main_connection then
goto continue
end
-- Skip connections that don't have asteroid_spawn_definitions
if not connection.asteroid_spawn_definitions then
goto continue
end
This way, connections added by other mods that lack asteroid_spawn_definitions won't trigger an error when the script tries to run map_definitions(connection.asteroid_spawn_definitions).