I don't know how to disable this command

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
Eurodos
Burner Inserter
Burner Inserter
Posts: 8
Joined: Tue Mar 22, 2016 4:09 pm
Contact:

I don't know how to disable this command

Post by Eurodos »

Hello, recently i used this command to kill every enemies:

/c local surface = game.player.surface
for c in surface.get_chunks() do
for key, entity in pairs(surface.find_entities_filtered({area={{c.x * 32, c.y * 32}, {c.x * 32 + 32, c.y * 32 + 32}}, force= "enemy"})) do
entity.destroy()
end
end

but now i want to disable this command and restore enemies back
Greetings, Eurodos

RoddyVR
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Thu May 07, 2015 6:29 am
Contact:

Re: I don't know how to disable this command

Post by RoddyVR »

explore more map,
that will create new chunks
keep eploring till you find some bitter nests.
go back to you base,
leave game running for a few hours (or increase speed if your base isnt huge and comp can handle it)
the bitters will spread out and repopulate the earth

Eurodos
Burner Inserter
Burner Inserter
Posts: 8
Joined: Tue Mar 22, 2016 4:09 pm
Contact:

Re: I don't know how to disable this command

Post by Eurodos »

This is describe of my command:

"This will kill all biters, bases and worms. Anything that is an enemy will be completely destroyed. This only affects enemies in the explored world, so any unexplored parts of the map which still need to be generated will still have enemies."

I can see enemies in the map but when i am going close to enemies they disappear

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: I don't know how to disable this command

Post by Adil »

You see where enemies were, they all were destroyed when you've entered this command. New enemies will only start appearing after you reach the edge of generated map.
The "command" you refer to is actually a sequence of instructions, there is no single undo statement for that.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

Eurodos
Burner Inserter
Burner Inserter
Posts: 8
Joined: Tue Mar 22, 2016 4:09 pm
Contact:

Re: I don't know how to disable this command

Post by Eurodos »

wow, you had right
Thanks!!!

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: I don't know how to disable this command

Post by darkfrei »

Respawn 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

RoddyVR
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Thu May 07, 2015 6:29 am
Contact:

Re: I don't know how to disable this command

Post by RoddyVR »

I'm not sure i'm reading that right, but will it generate spawners in every possible spot (ie packed tight like no tomorow) or something sparce like 1/chunk or something&

a command that'll max populate the map would be interesting for testing "impenetrable wall" claims.

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: I don't know how to disable this command

Post by Klonan »

RoddyVR wrote:I'm not sure i'm reading that right, but will it generate spawners in every possible spot (ie packed tight like no tomorow) or something sparce like 1/chunk or something&

a command that'll max populate the map would be interesting for testing "impenetrable wall" claims.
Looks like it will just place 1 per chunk on every chunk in the game

mrvn
Smart Inserter
Smart Inserter
Posts: 5704
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: I don't know how to disable this command

Post by mrvn »

Klonan wrote:
RoddyVR wrote:I'm not sure i'm reading that right, but will it generate spawners in every possible spot (ie packed tight like no tomorow) or something sparce like 1/chunk or something&

a command that'll max populate the map would be interesting for testing "impenetrable wall" claims.
Looks like it will just place 1 per chunk on every chunk in the game
Doesn't that put biter spawners inside your base?

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: I don't know how to disable this command

Post by darkfrei »

mrvn wrote:Doesn't that put biter spawners inside your base?
Only if you have enough place for it.

Post Reply

Return to “Gameplay Help”