Enable Enemies Mid-Game
Enable Enemies Mid-Game
I have played a while now without enemies (No Enemy bases). But now i have a good running factory and i want to have enemies now. Is it possible to turn them on using the console?
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Enable Enemies Mid-Game
Code: Select all
/c
local s = game.player.surface.map_gen_settings
s["enemy-base"] = {
frequency = "normal",
richness = "normal",
size = "normal"}
game.player.surface.map_gen_settings = s
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: Enable Enemies Mid-Game
Tank you for the answer!
I tried it but it did not worked for me. Maybe because of the mods i play with.
But is it possible to just spawn the biter nests manually an then wait till they expand?
I tried it but it did not worked for me. Maybe because of the mods i play with.
But is it possible to just spawn the biter nests manually an then wait till they expand?
Re: Enable Enemies Mid-Game
Beware enemies!
Code: Select all
/c local surface = game.player.surface
for c in surface.get_chunks() do
local position = surface.find_non_colliding_position("biter-spawner", {x=c.x*32+16, y=c.y*32+16}, 10, 3)
if position and surface.is_chunk_generated(c) then
surface.create_entity{name="biter-spawner", position=position}
end
end
Re: Enable Enemies Mid-Game
Thanks, this one worked. But now i have enemies in every free position on the map . Including my base :/.
Re: Enable Enemies Mid-Game
Just kill them all, it's for balance of no-biters-on-start