My man this has nothing to do with the space age dlc.
This error happens with no space age dlc
You do not need the dlc to get this error
I don't have the dlc
This is an error that should occur for everyone when trying to make a new world with your mod installed, Even with nothing else but rampant running
I can't say I particularly have figured out how to mod factorio yet, but I do know how to read code and error messages, and here's what I can tell you.
In control.lua near the beginning, when you are defining functions you use this code on line 104 :
local player = game.players[1]
What I can tell you about this line from the error code is that game.players[1] is not valid during world creation (there's no player yet) and therefore assigns nil to the local variable player.
This means on lines 105 (only during world creation) when you return player.surface.index you're indexing a nil value, which instantly causes a crash (that factorio understands so it boots you to title with the log).
The line works and everything seems to work fine while playing, which is why I noted it's only invalid on world creation.
The big hiccup ultimately comes on line 105 when called by line 271 from what I can tell. Line 469 and 740 show up because of nested function calls.
This means you might need to add an if statement before 105 checking to see if player==nil and if so return something special (maybe nil) for the function get_player_surface_index and then of course checking to see if that special value was given prior to line 271, and if so respond accordingly.
I don't know if the space age dlc lets you start on alien planets and what the ramifications of what that does to the surface index might be. What I can tell you is that Nauvis (the default world) has a surface index of 1 (where we primarily care about changing evolution) therefore adding the following after line 104 should put a bandaid on the issue.
if player == nil then
return 1
end