Page 1 of 1
Enable enemies after map creation
Posted: Thu Sep 17, 2015 9:06 am
by DutChen18
So, When is started a game i turned off enemy bases because i didn't want to worry about enemies attacking me when i was building the most amazing factory of all factories, not knowing that you would need aliën artifacts to create purple science packs. But i still want to complete the game (create rocket silo) but i can't because i'm unable to create purple science packs. I don't want to create a new map in order to get aliën artifacts, i have put too much time into this map for me to even think about doing such a thing.
I wasn't sure if this should be in 'Technical Help' or 'Gameplay Help' but after thinking about it for at least 30 seconds, i decided this was the best place.
Apologies for my (possibly) bad english.
Re: Enable enemies after map creation
Posted: Thu Sep 17, 2015 9:37 am
by oLaudix
You could try using Peace Mod -
https://forums.factorio.com/forum/vie ... =40#p92300. It creates patches of ore that can be mined and turned into artifacts. You would ave to create patch of it with console command though so I'm not sure if you wont consider this cheating.
Re: Enable enemies after map creation
Posted: Thu Sep 17, 2015 9:55 am
by prg
Or you can just do
Code: Select all
/c game.player.insert{name="alien-artifact", count=500}
without the need for any mods.
Re: Enable enemies after map creation
Posted: Thu Sep 17, 2015 9:56 am
by daniel34
How did you disable the enemy bases? If you just activated the peaceful mode, there should still be biter nests on the map that you can kill and get alien artefacts from.
Or you can disable peaceful mode altogether by entering the following two commands in the console. You open the console by default with the key '/' or '~'.
Code: Select all
/c game.peaceful_mode = false
/c game.forces['enemy'].kill_all_units()
Re: Enable enemies after map creation
Posted: Thu Sep 17, 2015 10:32 am
by DutChen18
oLaudix wrote:You could try using Peace Mod -
https://forums.factorio.com/forum/vie ... =40#p92300. It creates patches of ore that can be mined and turned into artifacts. You would ave to create patch of it with console command though so I'm not sure if you wont consider this cheating.
I prefer not using any mods, but if there's no other option i may try this.
prg wrote:Or you can just do
Code: Select all
/c game.player.insert{name="alien-artifact", count=500}
without the need for any mods.
I don't like cheating, it makes me feel bad...
daniel34 wrote:How did you disable the enemy bases? If you just activated the peaceful mode, there should still be biter nests on the map that you can kill and get alien artefacts from.
Or you can disable peaceful mode altogether by entering the following two commands in the console. You open the console by default with the key '/' or '~'.
Code: Select all
/c game.peaceful_mode = false
/c game.forces['enemy'].kill_all_units()
I disabled enemy bases like this:

and yes, i did also turn on peaceful mode, and i still want that to be on if i do manage to enable enemies...
Re: Enable enemies after map creation
Posted: Thu Sep 17, 2015 10:51 am
by prg
Don't think it's possible to change map generator settings for a running game. If it feels less cheaty to you, maybe create some enemy spawners with something like
Code: Select all
for x = 1, 4 do
for y = 1, 4 do
game.player.surface.create_entity{name="biter-spawner", position={game.player.position.x-50+x*6, game.player.position.y-15+y*6}}
end
end
That will place a couple of biter spawners to the left of your character.
Re: Enable enemies after map creation
Posted: Thu Sep 17, 2015 11:23 am
by DutChen18
prg wrote:Don't think it's possible to change map generator settings for a running game. If it feels less cheaty to you, maybe create some enemy spawners with something like
Code: Select all
for x = 1, 4 do
for y = 1, 4 do
game.player.surface.create_entity{name="biter-spawner", position={game.player.position.x-50+x*6, game.player.position.y-15+y*6}}
end
end
That will place a couple of biter spawners to the left of your character.
I didn't even think about creating the enemies myself, but is there a way to create enemies all over the map in a way that the factorio map generator would do it? because if i just go around creating my own bases that kinda defeats the purpose of exploring the map for said enemy bases and because they are always the same it will get repetitive and boring to have to kill the same base over, and over, and over...
Another option i thought of was creating a new map that did have enemies and then killing them, but this would require a terraria-like character system wich factorio sadly does not have.
ANOTHER option i thought of was creating a new map with the same seed but with enemies enabled, and then copy and pasting my current factory and everything i've researched into that map, but sadly i do not know how to do this, or if it's even possible
Re: Enable enemies after map creation
Posted: Thu Sep 17, 2015 11:39 am
by prg
DutChen18 wrote:I didn't even think about creating the enemies myself, but is there a way to create enemies all over the map in a way that the factorio map generator would do it? because if i just go around creating my own bases that kinda defeats the purpose of exploring the map for said enemy bases and because they are always the same it will get repetitive and boring to have to kill the same base over, and over, and over...
Maybe if you create a couple of spawners manually and wait a bit, the resulting biters might decide to go found new bases in empty areas themselves. At least this is how it would work in a normal game, not sure if enemy base size set to none affects this.
DutChen18 wrote:Another option i thought of was creating a new map that did have enemies and then killing them, but this would require a terraria-like character system wich factorio sadly does not have.
Create new map, kill enemies and collect artifacts, remember number of collected artifacts, resume old game and do the game.player.insert thing...
DutChen18 wrote:ANOTHER option i thought of was creating a new map with the same seed but with enemies enabled, and then copy and pasting my current factory and everything i've researched into that map, but sadly i do not know how to do this, or if it's even possible
Wouldn't know a feasible way of doing this, either.
Re: Enable enemies after map creation
Posted: Thu Sep 17, 2015 11:59 am
by DutChen18
prg wrote:DutChen18 wrote:I didn't even think about creating the enemies myself, but is there a way to create enemies all over the map in a way that the factorio map generator would do it? because if i just go around creating my own bases that kinda defeats the purpose of exploring the map for said enemy bases and because they are always the same it will get repetitive and boring to have to kill the same base over, and over, and over...
Maybe if you create a couple of spawners manually and wait a bit, the resulting biters might decide to go found new bases in empty areas themselves. At least this is how it would work in a normal game, not sure if enemy base size set to none affects this.
May try this, because of private reasons i cannot try doing this untill next wednesday tho, so it'll have to wait.
prg wrote:DutChen18 wrote:Another option i thought of was creating a new map that did have enemies and then killing them, but this would require a terraria-like character system wich factorio sadly does not have.
Create new map, kill enemies and collect artifacts, remember number of collected artifacts, resume old game and do the game.player.insert thing...
it will be very annoying to have to do this, because if i need ammo or new fuel for my tank or whatever, i will need to go back to old world, somehow delete ammo, go to new world, and then cheat in ammo. And even worse: Using turrets (i heard it was a very good strategy to place alot of turrets, anger the monsters, and then lure them to the turrets), Getting new ammo for them every time will be an absolute pain in the ass.
But oh well, if the first option doesn't work, i'll just have to live with this.
Re: Enable enemies after map creation
Posted: Thu Sep 17, 2015 12:56 pm
by prg
DutChen18 wrote:it will be very annoying to have to do this, because if i need ammo or new fuel for my tank or whatever, i will need to go back to old world, somehow delete ammo, go to new world, and then cheat in ammo. And even worse: Using turrets (i heard it was a very good strategy to place alot of turrets, anger the monsters, and then lure them to the turrets), Getting new ammo for them every time will be an absolute pain in the ass.
But oh well, if the first option doesn't work, i'll just have to live with this.
If it should come to this, to make things maybe a bit less annoying you could dump your current character's main inventory to a file with something like
Code: Select all
/c local i = game.player.get_inventory(1) game.makefile("inv.dump", "/c local i = game.player.get_inventory(1) i.clear() for name, count in pairs("..serpent.block(i.get_contents())..") do i.insert{name=name, count=count} end") i.clear()
then use the content of that file (inv.dump in the script-output directory) to recreate the inventory for a different character. The file will already contain the commands required for that, just paste it into the console. If you also want to take the quickbar contents and equipped weapons with you, you'd need to do the same thing with higher inventory numbers, but i guess the easiest thing would be to just put everything into the main inventory.
Re: Enable enemies after map creation
Posted: Thu Sep 17, 2015 1:58 pm
by DutChen18
prg wrote:DutChen18 wrote:it will be very annoying to have to do this, because if i need ammo or new fuel for my tank or whatever, i will need to go back to old world, somehow delete ammo, go to new world, and then cheat in ammo. And even worse: Using turrets (i heard it was a very good strategy to place alot of turrets, anger the monsters, and then lure them to the turrets), Getting new ammo for them every time will be an absolute pain in the ass.
But oh well, if the first option doesn't work, i'll just have to live with this.
If it should come to this, to make things maybe a bit less annoying you could dump your current character's main inventory to a file with something like
Code: Select all
/c local i = game.player.get_inventory(1) game.makefile("inv.dump", "/c local i = game.player.get_inventory(1) i.clear() for name, count in pairs("..serpent.block(i.get_contents())..") do i.insert{name=name, count=count} end") i.clear()
then use the content of that file (inv.dump in the script-output directory) to recreate the inventory for a different character. The file will already contain the commands required for that, just paste it into the console. If you also want to take the quickbar contents and equipped weapons with you, you'd need to do the same thing with higher inventory numbers, but i guess the easiest thing would be to just put everything into the main inventory.
Thanks for the help, not sure what else i can say but my message feels really empty so i've written this to fill it up...