1.Create a team by typing /c game.create_force("Name of your force")
2.Join the team by typing /c game.player.force = game.forces["Name of your force"]
3.That's it. When no one is online on that team/force, aliens won't attack them. Machines will remain running.
This mod is based off of Offline PeaceUPDATED by nR7CooKie https://mods.factorio.com/mod/OfflinePeaceUPDATED