Factorio

Factorio

Not enough ratings
Change Map Settings Mid-Game
By Morsk
Console commands WILL disable achievements, but mods DON'T, if used correctly. This can be used to cheat, but also to fix maps with bad settings.
   
Award
Favorite
Favorited
Unfavorite
Unlisted Guide
The guide is unlisted, so Favorite it or you may not be able to find it again.

I don't want to tell impulsive people how to cheat and still get achievements, as if it becomes too public the developers may change the system. But there are a lot of good reasons to change map settings!

When someone asks about editing settings for a good reason, feel free to link the guide to them.
TLDR
Use a mod called Change Map Settings, and disable the mod once you're done.

If you want to change already-generated terrain to match new settings, you need more than the TLDR.
Overview
Script Commands Disable Achievements
Using /c to invoke Lua script will permanently disable achievements on the map. It is also called /command and has a few variants; they all disable achievements, as do /cheat and /editor. You will be warned if a command disables achievements.

There are many other commands, which don't disable anything, like /help and /evolution.

Mods Don't Disable Achievements
Mods put achievements into a separate modded-achievement category that does not update to Steam, only locally. However, there is no permanent flagging here. You go in or out of the category by having 1+ mods, vs. 0 mods. If you disable all mods, achievements are back in the not-modded category, and will update on Steam again.

"Surfaces"
Mods sometimes mention "surfaces" in their description. A surface is a planet, or sometimes a mini-area inside a building. Fixing maps with multiple surfaces is more complicated, but vanilla games only have one surface so we don't have to worry about it.
Mods and Commands
Change Map Settings
https://mods.factorio.com/mod/ChangeMapSettings

The main mod which actually changes things.

Delete Empty Chunks
https://mods.factorio.com/mod/DeleteEmptyChunks

Removes chunks you aren't using, letting them regenerate with new/changed settings.
Only necessary if you've changed map generation. You don't need this if you've only changed settings.

Regenerate Terrain
https://mods.factorio.com/mod/regenerate-terrain

Regenerates the entire map, even chunks you are using. This is more drastic, and will regenerate trees & ores inside the factory, but it avoids visible boundaries between changed regions.
Only necessary if you've changed map generation. You don't need this if you've only changed settings.

Reveal Black Chunks
/c game.player.force.chart_all()

This will reveal chunks that have been generated but not explored. There is no other way to do this, as the game tries to create the illusion of endless space outside the factory. You aren't supposed to know how far the "endless" space goes. But if you are trying to understand why changed map settings don't immediately manifest in "new" chunks, you need to know what's actually new, not generated-but-not-explored. This command lets you know.

(The community often says the game generates "about 3" of these "black" chunks, past explored areas, but that's an estimate not the actual game mechanic. Chunks are slowly generated around the player to a radius of 20 (!!). Radar explores to a radius of 14. So you will have between 0-6 extra chunks beyond radar range, depending on how much time the player spent in that area.)

Of course you would save before using this, and reload after. It is used to test changes, not make changes.

Refresh Map
/c game.player.force.rechart()

This re-scans explored chunks, to update the map. It won't reveal generated-but-not-explored chunks. It is not useful for our purposes, but it is good to know these are two different things.
The Process
Check First
Check that achievements aren't already disabled! We won't be able to tell when / how we broke something, if it was already broken!

Click the achievements button over the mini-map to bring up the achievement panel.

A modded game without "real" achievements. We DON'T want to see this message. On an unmodded game, there is no message here. The panel will be smaller, with no space for a message.

A "cheated" game after commands were used. We DON'T want to see this message. A game can be modded, cheated, both, or neither. The messages are in separate places.

Normal achievements that haven't been disabled by cheats. This is what we want to see, but remember that modding is separate, and to check also the top of the panel to see if the game is modded.

The Process
  1. Save the map with a new name you won't overwrite accidentally. Something like "Map Name - BEFORE CHANGES".
  2. Install and enable mods. You can use the in-game mod manager for this. You only need the names of the mods; it will find them: Change Map Settings , Delete Empty Chunks , Regenerate Terrain
  3. Reveal Black Chunks: /c game.player.force.chart_all()
  4. Use Change Map Settings to make changes.
  5. Optionally, use Delete Empty Chunks or Regenerate Terrain .
  6. Optionally, explore to see that new map is generating correctly.
  7. Reload the save, and repeat from Step 3. When you are certain of the changes you want to make, repeat from Step 4 and don't use any console commands that time.
  8. Save, with another unique name like "Map Name - AFTER CHANGES".
  9. Disable mods, and restart.
  10. Test that achievements are enabled. Check the in-game achievement panel in both places, described in the images above.