How to create additional enemy bases?
How to create additional enemy bases?
Hello. I created the world but as a beginner I have set up a small number of enemy bases because I did not know that I need it to research .. now I can not research because there have little amount of enemies ... I just wanted to somehow reconfigure it
Re: Small amount of enemies
This creates one respawner every 32x32 tiles:
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: How to create additional enemy bases?
Thanks but i dont know anything about codes.. where do I put that code
Re: How to create additional enemy bases?
Open console, Ctrl+V this code, Enter.DJ_M1k3 wrote:Thanks but i dont know anything about codes.. where do I put that code
Repeat.
You must create a lot of turrets everywhere. Before you enter this code, yeah.
Re: How to create additional enemy bases?
I tottaly destroyed my base Is there command that create it only 32 block around me not create it on the whole map?
Re: How to create additional enemy bases?
This creates one respawner every 32x32 tiles, chances around 10:90DJ_M1k3 wrote:I tottaly destroyed my base Is there command that create it only 32 block around me not create it on the whole map?
old code
Code: Select all
/c local surface = game.player.surface
for c in surface.get_chunks() do
if (math.random(1,100) < 10) then
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
end
Last edited by darkfrei on Wed Mar 28, 2018 10:33 am, edited 1 time in total.
Re: How to create additional enemy bases?
It dont work... .D
Re: How to create additional enemy bases?
You must write it twice, but you get no achievements.DJ_M1k3 wrote:It dont work... .D
- impetus maximus
- Smart Inserter
- Posts: 1299
- Joined: Sat Aug 20, 2016 10:07 pm
- Contact:
Re: How to create additional enemy bases?
does this still work? will this work for a world that has nests set to 'none'?
thanks
thanks
Re: How to create additional enemy bases?
Yes, try it twice (after the first you get some warning the your achievements will be disabled).impetus maximus wrote:does this still work? will this work for a world that has nests set to 'none'?
thanks
- impetus maximus
- Smart Inserter
- Posts: 1299
- Joined: Sat Aug 20, 2016 10:07 pm
- Contact:
Re: How to create additional enemy bases?
ok thanks. i tried it (entered twice) and it didn't seem to work for me.
the person i was trying to help on steam had success with the command.
thanks for the help.
the person i was trying to help on steam had success with the command.
thanks for the help.