Hi! While working on my character selector mod, I've found a bug that probably won't occur in a real game. I've never seen anything like that before. Guess it happened because yours is not a normal mod, but a scenario.
Reproduce:
As the game has been restarted without your mod, settings.startup["bnw-homeworld-starting-robots"] (line 304) and settings.startup["bnw-homeworld-starting-robots"] (line 309) are undefined. Because the control file from temp/currently-playing is used, trying to read these settings value will trigger the crash.
You could add a check for the settings before trying to read their values. But considering that your mod isn't used anymore, it seems to make more sense to add the following at the top of your control.lua:
if not script.active_mods["brave-new-world"] then
return
end