In other languages: Deutsch Português, Brasil Русский Українська 简体中文

Map generator: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
No edit summary
(→‎Richness: Did I get trolled? Who knows :P)
(48 intermediate revisions by 14 users not shown)
Line 1: Line 1:
{{Languages}}
{{Languages}}
Many players have problems to understand the Map Generator. This is a try to explain the basic function. But it must be also said, that a complete rework/rewrite or whatever is on the devs todo-list, but will take some more time. So the players must live with that, how it works, and if you understand the principle it is really not that bad.
[[File:Default_123456789.png|thumb|right|An example how the world generator might create a new map: Default settings with map seed 123456789]]
World generation is the procedure by which the in game landscape is generated. In short: a number of settings, editable at the start of a new world, define what that world will look like. This can dramatically alter gameplay — a new player is advised to start with the default settings before deciding to change their world.
__TOC__{{Clear}}
== Map generation presets ==
[[File:MapGeneratorOverview.png|thumb|right|500px|Overview of the map generation screen]]
A preset may be chosen instead of manually configuring the generation.
=== Default ===
Normal settings.


==How it works==
All terrain and resource settings set to regular/normal/medium.
: [[File:MapGeneratorOverview.png]]
Basically you need to know, that the map generator generates most parts of the world with an algorithm, called "Perlin Noise". See below for details. You just need to know, that it works a bit like the waves in the sea.
[[File:Water-ocean-waves-sea-high-resolution-pictures.jpg|thumb|300px]]


Everything above a defined level, defines the existing (or non-existing) of some type of terrain.
==== Advanced settings ====
All settings are set to their defaults:


You also need to know, that the map is not generated at game start. Only the parts you see are generated, everything else is not. The map will be generated, when you explore more terrain. See below for more technical details.
{| class="wikitable"
|-
! Pollution                !! Default !! !! Evolution  !! Default
|-
| Absorbed per damaged tree || 500    || || Enabled          || Yes
|-                                   
| Diffusion ratio          || 2%      || || Time factor      || 0.00000400
|-
| Dissipation rate          || 1      || || Destroy factor  || 0.00200000
|-
| Enabled                  || Yes    || || Pollution factor || 0.00001500
|-
| Minimum damage to trees  || 3500
|-
|}


===The top row===
{| class="wikitable"
====Frequency====
|-
This is '''not''', how frequent ore, coal, oil etc. is.
! Enemy expansion                  !! Default !! !! Recipes/Technology      !! Default
|-                                           
| Enabled                          || Yes    || || Recipe difficulty          || Normal
|-                                           
| Maximum expansion distance      || 7      || || Technology difficulty      || Normal
|-                                           
| Minimum group size              || 5      || || Technology price multiplier || 1
|-
| Maximum group size              || 20
|-
| Minimum cooldown (Minutes)      || 4
|-
| Maximum cooldown (Minutes)      || 60
|-
|}


This defines - to keep in this picture - the wavelength of the wave-generators.
=== Rich resources ===
Resources patches have a larger richness, so you don't have to expand far.


''High frequency'': For Terrain segmentation it means: Many different types of terrain, forest, dessert and swamp could be within 10 tiles or less. For resources: Many, but very small patches of resources.
Difference from default: Resources have very good richness instead of regular.


''Low frequency'': For Terrain segmentation it means: Big landscapes, vast areas only with forests. For resources: Not many, but if you found one very big patches of resources.
=== Marathon ===
Recipes and technologies are more expensive.


In short: Low terrain segmentation means large areas with same terrain. High segmentation is the contrary, the terrain changes nature often. Typically huge forests vs. lots of small woods.
Difference from default: Expensive recipes and technology, technology price multiplier 4.


====Size====
=== Death world ===
This defines the "level": Everything above that defined level, defines the existing (or non-existing) of some type of terrain.
Biters are more dangerous and evolve faster.


That means, that the same shaped wave, could look completely different, if you shift this level up and down, but in the end you increase or decrease the average diameter of an ore-patch, of lakes.
Difference from default: Very high frequency and size enemy bases, small starting area, enemy evolution time factor and pollution factor are both set to 0.00002.


With small size you get small ore-patches, with big size you get big ore patches. It is a bit dependent on the frequency, of course.
=== Death world marathon ===
Recipes and technologies are expensive and biters are dangerous and plentiful. Only select this if you are a Factorio veteran.


====Richness====
Combines "Marathon" and "Death world".
This defines the average wave-height. A high wave means: Much resources per [[Tile]].


If you put this to high for Enemy bases, you get as result for killing a "rich" [[Enemies#Spawners]] much more [[Alien artifact]]s.
=== Rail world ===
Resource patches are large and spread far apart, to encourage train systems. Biters won't create any new bases or re-expand into cleared territory.


===The left column===
Difference from default: Coal, copper ore, iron ore, and stone are set to very low frequency and big size instead of normal/medium. Uranium ore and crude oil are set to low frequency and high size. Water has a very low frequency and a big size. The evolution time factor is set to 0.000002 and enemy expansion is disabled.
* Terrain segmentation: How often the terrain changes. There are some different types of terrain.
* Water: How big the lakes get. They can be really big, can take you an hour or more to surround by car. This influences also the chance, to be fully surrounded by water.
* Copper, Stone, Coal, Crude oil: Needed resources.
* Enemy bases: How many and how big could the starting enemy bases. Note, that the enemies develop and build new villages during the game.


===Starting area===
== Manual configuration ==
This is special, cause it defines a special area around the central coordinates, which is also generated by the map-generator, but with a bit different settings, that might guarantee better starting-conditions.  
=== Basic settings ===
==== Peaceful mode ====
The [[enemies]] don't begin fights, only responding if the player hits them.


Note, that if you set "size" here very low or none, the map generator can generate maps, that are impossible to survive, or land on a small island, or on a big island, and many more issues.
==== Enable replay ====
: ''{{Main|Replay system}}''
Record all the actions that the player(s) perform during the game, so that they can later be played back as essentially a timelapse of the save file.


It is generally a good idea, that you discover a bit around your starting position, before you begin to use a map.
==== Map-width and -height ====
If the player limits the width and/or height they may generate maps with finite resources and area. Another option is to make the world infinite in only one axis, this is commonly referred to as a ''ribbon world''.


===Peaceful mode===
==== Map seed ====
The [[Enemies]] don't begin to fight, only if you hit them. This can be also switched on during the game, look into [[Console/Lua_commands#Useful_commands_.28cheats.29|Console commands]].


===Map-width and -height===
This is the starting value for the random number generator that Factorio uses for generating the world based on the generation settings. Know that 'random number' is really a misnomer in Factorio and on computers in general, as they aren't really random, instead being calculated with complicated algorithms that require a seed as starting value (For more detail, see  http://en.wikipedia.org/wiki/Random_seed).
Normally the maps in Factorio have no limits. They are only limited by the size of your computers memory. Which is quite big. If a tile is one square meter, and you have 8 GiB free memory you can discover an area about the size of the state of Lichtenstein. :) (quite raw estimation!)


But you can also generate maps with limited width and height.
So even with the same map-exchange string but a different seed maps can change dramatically, or appear very similar. It's up to chance. In order to get a true copy of a world, giving the map exchange string and allowing the string to fill out the seed is important.


Note, that you can also limit only the width or only the height, so you can generate "stripes" of land. There are players, that love to play maps with a height of only 20 tiles or less.
==== Map exchange string ====


Note also, that everything around the map-limits is just water. You can place a [[Pump]] at the edge of a map and it will suck water out of nothing.
A map exchange string generally looks like this:


===Map seed / Map Exchange String===
  >>>eNpjYBBg0GdgYGBm5mFJzk/MYWZm4UrOLyhILdLNL0plZmTmTC4q
Map Seed: random number generator seed
  TUnVzc/MYWFmZktJLU4tKmEGqkrJBNNcqXmpuZW6SYnFqUAea3pRYnE
  xkMGRWZSfBzKBEai0ODEvBSRZXJKfB1TFyFpSlJoKUsVdWpSYl1maC7
  aKhZmBMcvcibmhRY4BhP/XMxj8/w/CQNYFoBNBGORSBkagAAywJudkp
  qUxMCg4gjAjI2O1yDr3h1VT7Bkh8noOUMYHqEjEbqjIg1YoI2I1lNFx
  GMpwmA9j1MMY/Q6MxmDw2R7BgNhVAjQZagmHA4IBkWwBSTIy9r7duuD
  7sQt2jH9Wfrzkm5Rgz5gpG+orUPreDijJDtTAyAQnZs0EgZ0wHzDAzH
  xgD5W6ac949gwIvLFnZAXpEAERDhZA4oA3MHgE+ICsBT1AQkGGAeY0O
  5gxIg6MaWDwDeaTxzDGZXt0f6g4MNqADJcDESdABNhCuMsYocxIB4iE
  JEIWqNWIAdn6FITnTsJsPIxkNZobVGBuMHHA4gU0ERWkgOcC2ZMCJ14
  wwx0BDMEL7DAeMG6ZGRDgg/3WD0/SAKZ2kr0=<<<


Map Exchange String: All settings for the map creation (Map Seed, settings for resources, settings for size, etc.)
The map exchange string can be used to share all map generation settings between different players. The player can paste the string (using {{Keybinding|ctrl|V}}) into the map exchange string field and the game will set the generation settings to the settings saved in the string, resulting in a complete copy of the map when generated.


====Map Seed====
The map exchange string can be retrieved from save files by going into the load game screen, selecting the desired map, clicking the Map Exchange String button in the lower left corner and copying the string from the window that pops up.
This is the starting value for the random number generator, that Factorio uses for anything in the game (Random number in Factorio and on computers in generally aren't really random, they are calculated with complicated algorithmns


So even with the same map-exchange string, but different map seed the map could look quite differently.
For a technical description of the map exchange string, see [[map exchange string format]].


====Map Exchange String====
=== Resource and terrain settings ===
A string, that looks for example like so:
==== Frequency ====
>>>AAALABAABgADAwYAAAAEAAAAY29hbAMDAgoAAABjb3BwZXItb3Jl
AwMCCQAAAGNydWRlLW9pbAMDAgoAAABlbmVteS1iYXNlAwMCCAAAAGl
yb24tb3JlAwMCBQAAAHN0b25lAwMCORcrDUQ7AACMCwAAAAAAAAAAAA
ADAFR8w0Q=<<<


=====Where can I use this string?=====
For resources, frequency determines the frequency of ore/oil patches. The higher the frequency, the more patches can be found in a given area. Although the ore patches are of a smaller size, a higher frequency still results in more ore tiles being generated.
It can be used in the map-generator: there is an extra field where you can paste this string into. (Control-V under windows)


=====Where can I get this string from?=====
Frequency modifies the area of each deposit and the number of deposits. If resource frequency is increased, each of the deposits is smaller and has less resources in total (because it covers less area) and deposits are very common. If resource frequency is decreased, the deposits are larger but more rare.
When you load a game or map. There is a big button in the load-requester in the left border. You can mark it and it can then be directly copied into your clipboard (Control-C under windows).


==Generation==
Terrain, including enemy bases and trees, is affected in the same way: The higher the frequency, the more terrain "blobs"/nest clusters/forests can be found in a given area, while their sizes decrease with higher frequency.
The map generator (world generator) is based on modificated [http://en.m.wikipedia.org/wiki/Perlin_noise Perlin noise algorithm].
A [[Types/AutoplaceSpecification#Noise|more detailed description]] is in the API docu.


[http://www.factorioforums.com/forum/viewtopic.php?f=18&t=8016&p=63691#p63561 Article, which describes the generation].
Cliffs are affected in a similar way: The higher the frequency, the more cliffs can be found. However, the overall cliff area size increases with higher frequency, while the cliff "lines" are broken up more often, meaning that higher frequencies result in many big cliff blobs composed of short cliff "lines".


==Generating when exploring==
==== Size ====
The map is normally endless (if not defined with limits). However the whole map isn't generated from start. A new [[Chunk]] of map is generated, when explored. This means you come to the current visible borders and then the needed chunks are generated. Or you placed some [[Radar]].
For resources, the size setting adjusts the size of generated ore/oil patches.


==See also==
It's as simple as it seems — Small size would means small ore/oil patches, large means large ore/oil patches, thus increasing the resource count in a given area. Note that ore/oil patch size is also affected by frequency.
* [http://www.factorioforums.com/forum/viewtopic.php?f=5&t=7331 The Map Generator hates your guts, or dude where is my coal?]
 
* [http://www.factorioforums.com/forum/viewtopic.php?f=6&t=7924&p=63517#p63517 Some technically info]
<!-- A note on documenting bugs here: Normally this is should not be done. However, these bugs have existed for longer than half a year, and are expected to be fixed in 0.17 at the earliest. Since they have a big impact, the behaviour must be documented. So, I am taking the freedom to overrule the style guide in this case. -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - <span style="color:#FF0000">Admin</span> 19:30, 6 June 2018 (UTC)
* [http://www.factorioforums.com/forum/viewtopic.php?f=6&t=8624&p=69156#p69156 Temperature based biome-model] (how trees are placed)
-->[https://forums.factorio.com/55178 Due to a bug], enemy bases are currently not affected by the size setting. Their size can only be changed by changing their frequency.
* [http://www.factorioforums.com/forum/viewtopic.php?f=6&t=1593 Thread about definition of map map exchange string/seed]
 
The other terrain types, including water and trees, are affected the same way as resources.
 
[https://forums.factorio.com/54664 Due to a bug], the effect of the size setting on cliffs cannot be reliably predicted. Any size setting above small may lead to cliffs spawning in the starting area. Big and very big size seem to always spawn cliffs everywhere, while medium size and below may not spawn any cliffs.
 
The following table shows how the frequency and size settings affects the generation of ore patches. For more detail, open the images in a new tab.
 
{| class="wikitable"
|+Generation of iron patches on different frequency and size settings
!Frequency \ Size
!Very small
!Small
!Medium
!Big
!Very big
 
|-
!Very low
|[[File:Iron_freq_very_low_size_very_small.png|frameless|150x150px]]
|[[File:Iron_freq_very_low_size_small.png|frameless|150x150px]]
|[[File:Iron_freq_very_low_size_medium.png|frameless|150x150px]]
|[[File:Iron_freq_very_low_size_big.png|frameless|150x150px]]
|[[File:Iron_freq_very_low_size_very_big.png|frameless|150x150px]]
 
|-
!Low
|[[File:Iron_freq_low_size_very_small.png|frameless|150x150px]]
|[[File:Iron_freq_low_size_small.png|frameless|150x150px]]
|[[File:Iron_freq_low_size_medium.png|frameless|150x150px]]
|[[File:Iron_freq_low_size_big.png|frameless|150x150px]]
|[[File:Iron_freq_low_size_very_big.png|frameless|150x150px]]
 
|-
!Normal
|[[File:Iron_freq_normal_size_very_small.png|frameless|150x150px]]
|[[File:Iron_freq_normal_size_small.png|frameless|150x150px]]
|[[File:Iron_freq_normal_size_medium.png|frameless|150x150px]]
|[[File:Iron_freq_normal_size_big.png|frameless|150x150px]]
|[[File:Iron_freq_normal_size_very_big.png|frameless|150x150px]]
 
|-
!High
|[[File:Iron_freq_high_size_very_small.png|frameless|150x150px]]
|[[File:Iron_freq_high_size_small.png|frameless|150x150px]]
|[[File:Iron_freq_high_size_medium.png|frameless|150x150px]]
|[[File:Iron_freq_high_size_big.png|frameless|150x150px]]
|[[File:Iron_freq_high_size_very_big.png|frameless|150x150px]]
 
|-
!Very high
|[[File:Iron_freq_very_high_size_very_small.png|frameless|150x150px]]
|[[File:Iron_freq_very_high_size_small.png|frameless|150x150px]]
|[[File:Iron_freq_very_high_size_medium.png|frameless|150x150px]]
|[[File:Iron_freq_very_high_size_big.png|frameless|150x150px]]
|[[File:Iron_freq_very_high_size_very_big.png|frameless|150x150px]]
 
|}
 
===== Starting area =====
 
The starting are is a special area around the central coordinates of the map which has different ore, water and enemy generation, from the rest of the map. Generally, this results in at least one confirmed ore source of [[coal]], [[iron ore]], [[copper ore]], and [[stone]], always results in a water source, and always removes biter nests from spawning for an area around spawn. [[Uranium ore]] and [[crude oil]] should not spawn in the starting area. Cliffs should not spawn in the starting area[https://www.factorio.com/blog/post/fff-219], but due to [https://forums.factorio.com/54664 a bug] they may spawn there. The size of the starting area is adjusted by changing the size setting.
 
{| class="wikitable"
|+World generations on different starting area settings
!Very small
!Small
!Medium
!Big
!Very big
 
|-
|[[File:Starting_area_very_small.png|frameless|150x150px]]
|[[File:Starting_area_small.png|frameless|150x150px]]
|[[File:Starting_area_medium.png|frameless|150x150px]]
|[[File:Starting_area_big.png|frameless|150x150px]]
|[[File:Starting_area_very_big.png|frameless|150x150px]]
|}
 
==== Richness ====
 
This defines the actual content of every ore patch and oil field. The higher the richness, the more ore or oil each resource tile contains. Resource field richness increases by distance.
 
For [[tree]]s, the richness setting changes the density of their leaves. The higher the richness, the higher their leaf density, the more pollution they absorb.[https://forums.factorio.com/viewtopic.php?p=366015#p366015]
 
For enemy bases, the richness setting does not have an effect.[https://www.reddit.com/r/factorio/comments/8pjscm/friday_facts_246_the_gui_update_part_3/e0bttnp/]
 
{| class="wikitable"
|+Resources in ore patches on different richness settings
!Very poor
!Poor
!Regular
!Rich
!Very rich
 
|-
|[[File:Iron_richness_very_poor.png]]
|[[File:Iron_richness_poor.png]]
|[[File:Iron_richness_regular.png]]
|[[File:Iron_richness_good.png]]
|[[File:Iron_richness_very_good.png]]
 
|}
 
=== Advanced settings ===
These settings do not affect world generation, instead they allow to change some constants related to the map in general.
 
==== Pollution ====
These settings allow to enable/disable [[pollution]] and further adjust it when keeping it enabled.
 
{| class="wikitable"
|-
! Setting !! Description
|-
| Diffusion ratio || The amount of pollution diffused into neighboring chunks per second.
|-
| Dissipation rate || Controls how fast pollution dissipates naturally.
|-
| Minimum to damage trees || Any pollution above this amount starts to damage trees.
|-
| Absorbed per damaged tree || The amount of pollution absorbed by a tree when it is damaged by pollution.
|}
 
==== Evolution ====
These settings allow to enable/disable [[evolution]] and further adjust it when keeping it enabled.
 
{| class="wikitable"
|-
! Setting !! Description
|-
| Time factor || Controls how fast evolution increases over time.
|-
| Destroy factor || Controls how fast evolution increases due to destroying enemy spawners.
|-
| Pollution factor  || Controls how fast evolution increases due to producing pollution.
|}
 
==== Enemy expansion ====
These settings allow to enable/disable [[Enemies#Expansions|enemy expansion]] and further adjust it when keeping it enabled.
 
{| class="wikitable"
|-
! Setting !! Description
|-
| Maximum expansion distance || The maximum distance enemies will look to expand from other enemy bases.
|-
| Minimum group size || The minimum size of an enemy expansion party modified by the current evolution level.
|-
| Maximum group size || The maximum size of an enemy expansion party modified by the current evolution level.
|-
| Minimum cooldown || The minimum time between enemy expansions being sent out.
|-
| Maximum cooldown || The maximum time between enemy expansions being sent out.
|}
 
==== Recipes/Technology ====
This setting allows to change the [[Crafting#Recipe difficulties|recipe]]/technology difficulty and multiply the technology cost.
 
Currently, setting the technology difficulty does not have an effect in vanilla.
 
== Mechanics ==
=== Resource and terrain generation ===
The map generator (world generator) is based on a modified [http://en.wikipedia.org/wiki/Perlin_noise Perlin noise algorithm].
A [http://lua-api.factorio.com/latest/Concepts.html#AutoplaceSpecification more detailed description] can be found in the API documentation.
 
From the [https://forums.factorio.com/viewtopic.php?f=18&t=8016&p=63691#p63561 article which describes the generation]:
: [[File:Factorio-Perlin-Noise.png]]
Top: Normal settings, Middle: The same, but with higher '''frequency''' (note the same curve, but more condensed shape), Down: Same as top, but higher level = increased '''size'''.
 
The blue wavy line is an internal noise function, black line is a "level" that is used to determine resource placement, red lines are actual placed resources. The high frequency refers mainly to the noise function. Increasing the frequency increases count of resource fields and decreases their size and distance between them. This mechanism is used all through the map generation in factorio, with some adjustments. The map generator works tile by tile, so the resources are placed on a tile x if f(x) > 0. The amount of resources on the tile is given by f(x) * richness.
 
=== Chunks ===
 
A map is endless by default, though its size can be limited by height and width — see above. Because it is technically endless, the whole map is not generated from the start. Instead, a new [[chunk]] of the map is generated only when needed, similar to other procedurally generated world games.
 
==== Invisible chunks (fog of war) ====
 
Outside of the visible chunk area, an invisible area of about 3 chunks wide is generated as a preloading mechanism. Enemies may be located inside these invisible chunks and can attack the player from there, while [[artillery turret]]s and [[artillery wagon|wagon]]s may automatically shoot enemy bases in these chunks if they are within their automatic range. Invisible chunks are also generated if pollution is generated heavily; the game generates (invisible) chunks as it needs to spread the pollution into the area.
 
==== Charting (removing fog of war) ====
 
As long as a chunk is invisible, the part of the players map stays black. This changes when a chunk is [[Radar#Charting|charted]], which means when it is "touched" by a radar. This can be either the player's internal radar, which is always available and continually charts chunks around the player, or the [[radar]] entity. If a far-away and thus ungenerated chunk is charted, it will be generated, together with the above-mentioned invisible 3 chunk radius of map around it.
 
==== Maximum map size and used memory ====
 
The map size is limited to 2,000 x 2,000 kilometers; internally, this is a square 2,000,000 tiles on a side, with an area of 4,000,000,000,000 (4 trillion) square tiles (assuming 1 tile = 1 meter on a side yields 2,000 x 2,000 km = 4 million square km). In real-world terms, this is between the sizes of India and Australia (or about 40% the area of the United States, or over 10 times the area of Germany). It would take around 200 [[game-second|game-minutes]] (ca 3.3 hours real time) to reach that border from the center when riding a [[locomotive|train]] fueled with [[rocket fuel|rocket]] or [[nuclear fuel]]. This makes the world essentially endless for practical purposes.
 
Because chunks are only generated in and close around the area revealed by radar, it is possible to reach that border without overloading your computer, as the size of the map in computer memory is dependent only on chunks actually generated. If only a narrow stripe of land is explored to far away, this remains manageable.
 
The generated chunks are fully mapped and stored in the player's RAM, which is the practical limiting factor of exploration.
<!-- COMMENT (invisible): This last paragraph could have an example. I'm sure it's not cut-and-dried, but some ballpark figure for basic orientation like "if you have less than X GB of memory, you will have problems running maps where more than Y tiles on a side is explored". I never ran into the problem so I don't know the numbers. - Misacek01 -->
 
== History ==
 
{{History|0.16.0|
* Added cliffs.
* New terrains and new terrain generation.
* Trees can now be configured in the generate-map GUI.
* Terrain can be configured in the generate map GUI.
* Biters scale less with distance and there are generally less biters.
* No uranium as a starting resource also no uranium is ever generated near the starting area, you need to go look for it.
}}
 
{{History|0.15.0|
* Extended map generator settings to include an advanced section.
* Added map generator presets.
* The map seed is used to generate unique maps instead of just shifting the starting position.
}}
 
{{History|0.13.7|
* Map size is now limited to 2000 km by 2000 km with a black bar rather than crashing when reaching this distance.
}}
 
{{History|0.13.0|
* Map generator algorithm changed, further resource field now have greater richness.
}}
 
== See also ==
 
* [https://forums.factorio.com/viewtopic.php?f=6&t=7924&p=63517#p63517 Some technical info]
* [https://forums.factorio.com/viewtopic.php?f=6&t=8624&p=69156#p69156 Temperature based biome-model] (how trees are placed)

Revision as of 14:23, 8 June 2018

An example how the world generator might create a new map: Default settings with map seed 123456789

World generation is the procedure by which the in game landscape is generated. In short: a number of settings, editable at the start of a new world, define what that world will look like. This can dramatically alter gameplay — a new player is advised to start with the default settings before deciding to change their world.

Map generation presets

Overview of the map generation screen

A preset may be chosen instead of manually configuring the generation.

Default

Normal settings.

All terrain and resource settings set to regular/normal/medium.

Advanced settings

All settings are set to their defaults:

Pollution Default Evolution Default
Absorbed per damaged tree 500 Enabled Yes
Diffusion ratio 2% Time factor 0.00000400
Dissipation rate 1 Destroy factor 0.00200000
Enabled Yes Pollution factor 0.00001500
Minimum damage to trees 3500
Enemy expansion Default Recipes/Technology Default
Enabled Yes Recipe difficulty Normal
Maximum expansion distance 7 Technology difficulty Normal
Minimum group size 5 Technology price multiplier 1
Maximum group size 20
Minimum cooldown (Minutes) 4
Maximum cooldown (Minutes) 60

Rich resources

Resources patches have a larger richness, so you don't have to expand far.

Difference from default: Resources have very good richness instead of regular.

Marathon

Recipes and technologies are more expensive.

Difference from default: Expensive recipes and technology, technology price multiplier 4.

Death world

Biters are more dangerous and evolve faster.

Difference from default: Very high frequency and size enemy bases, small starting area, enemy evolution time factor and pollution factor are both set to 0.00002.

Death world marathon

Recipes and technologies are expensive and biters are dangerous and plentiful. Only select this if you are a Factorio veteran.

Combines "Marathon" and "Death world".

Rail world

Resource patches are large and spread far apart, to encourage train systems. Biters won't create any new bases or re-expand into cleared territory.

Difference from default: Coal, copper ore, iron ore, and stone are set to very low frequency and big size instead of normal/medium. Uranium ore and crude oil are set to low frequency and high size. Water has a very low frequency and a big size. The evolution time factor is set to 0.000002 and enemy expansion is disabled.

Manual configuration

Basic settings

Peaceful mode

The enemies don't begin fights, only responding if the player hits them.

Enable replay

Main article: Replay system

Record all the actions that the player(s) perform during the game, so that they can later be played back as essentially a timelapse of the save file.

Map-width and -height

If the player limits the width and/or height they may generate maps with finite resources and area. Another option is to make the world infinite in only one axis, this is commonly referred to as a ribbon world.

Map seed

This is the starting value for the random number generator that Factorio uses for generating the world based on the generation settings. Know that 'random number' is really a misnomer in Factorio and on computers in general, as they aren't really random, instead being calculated with complicated algorithms that require a seed as starting value (For more detail, see http://en.wikipedia.org/wiki/Random_seed).

So even with the same map-exchange string but a different seed maps can change dramatically, or appear very similar. It's up to chance. In order to get a true copy of a world, giving the map exchange string and allowing the string to fill out the seed is important.

Map exchange string

A map exchange string generally looks like this:

  >>>eNpjYBBg0GdgYGBm5mFJzk/MYWZm4UrOLyhILdLNL0plZmTmTC4q
  TUnVzc/MYWFmZktJLU4tKmEGqkrJBNNcqXmpuZW6SYnFqUAea3pRYnE
  xkMGRWZSfBzKBEai0ODEvBSRZXJKfB1TFyFpSlJoKUsVdWpSYl1maC7
  aKhZmBMcvcibmhRY4BhP/XMxj8/w/CQNYFoBNBGORSBkagAAywJudkp
  qUxMCg4gjAjI2O1yDr3h1VT7Bkh8noOUMYHqEjEbqjIg1YoI2I1lNFx
  GMpwmA9j1MMY/Q6MxmDw2R7BgNhVAjQZagmHA4IBkWwBSTIy9r7duuD
  7sQt2jH9Wfrzkm5Rgz5gpG+orUPreDijJDtTAyAQnZs0EgZ0wHzDAzH
  xgD5W6ac949gwIvLFnZAXpEAERDhZA4oA3MHgE+ICsBT1AQkGGAeY0O
  5gxIg6MaWDwDeaTxzDGZXt0f6g4MNqADJcDESdABNhCuMsYocxIB4iE
  JEIWqNWIAdn6FITnTsJsPIxkNZobVGBuMHHA4gU0ERWkgOcC2ZMCJ14
  wwx0BDMEL7DAeMG6ZGRDgg/3WD0/SAKZ2kr0=<<<

The map exchange string can be used to share all map generation settings between different players. The player can paste the string (using CTRL + V) into the map exchange string field and the game will set the generation settings to the settings saved in the string, resulting in a complete copy of the map when generated.

The map exchange string can be retrieved from save files by going into the load game screen, selecting the desired map, clicking the Map Exchange String button in the lower left corner and copying the string from the window that pops up.

For a technical description of the map exchange string, see map exchange string format.

Resource and terrain settings

Frequency

For resources, frequency determines the frequency of ore/oil patches. The higher the frequency, the more patches can be found in a given area. Although the ore patches are of a smaller size, a higher frequency still results in more ore tiles being generated.

Frequency modifies the area of each deposit and the number of deposits. If resource frequency is increased, each of the deposits is smaller and has less resources in total (because it covers less area) and deposits are very common. If resource frequency is decreased, the deposits are larger but more rare.

Terrain, including enemy bases and trees, is affected in the same way: The higher the frequency, the more terrain "blobs"/nest clusters/forests can be found in a given area, while their sizes decrease with higher frequency.

Cliffs are affected in a similar way: The higher the frequency, the more cliffs can be found. However, the overall cliff area size increases with higher frequency, while the cliff "lines" are broken up more often, meaning that higher frequencies result in many big cliff blobs composed of short cliff "lines".

Size

For resources, the size setting adjusts the size of generated ore/oil patches.

It's as simple as it seems — Small size would means small ore/oil patches, large means large ore/oil patches, thus increasing the resource count in a given area. Note that ore/oil patch size is also affected by frequency.

Due to a bug, enemy bases are currently not affected by the size setting. Their size can only be changed by changing their frequency.

The other terrain types, including water and trees, are affected the same way as resources.

Due to a bug, the effect of the size setting on cliffs cannot be reliably predicted. Any size setting above small may lead to cliffs spawning in the starting area. Big and very big size seem to always spawn cliffs everywhere, while medium size and below may not spawn any cliffs.

The following table shows how the frequency and size settings affects the generation of ore patches. For more detail, open the images in a new tab.

Generation of iron patches on different frequency and size settings
Frequency \ Size Very small Small Medium Big Very big
Very low Iron freq very low size very small.png Iron freq very low size small.png Iron freq very low size medium.png Iron freq very low size big.png Iron freq very low size very big.png
Low Iron freq low size very small.png Iron freq low size small.png Iron freq low size medium.png Iron freq low size big.png Iron freq low size very big.png
Normal Iron freq normal size very small.png Iron freq normal size small.png Iron freq normal size medium.png Iron freq normal size big.png Iron freq normal size very big.png
High Iron freq high size very small.png Iron freq high size small.png Iron freq high size medium.png Iron freq high size big.png Iron freq high size very big.png
Very high Iron freq very high size very small.png Iron freq very high size small.png Iron freq very high size medium.png Iron freq very high size big.png Iron freq very high size very big.png
Starting area

The starting are is a special area around the central coordinates of the map which has different ore, water and enemy generation, from the rest of the map. Generally, this results in at least one confirmed ore source of coal, iron ore, copper ore, and stone, always results in a water source, and always removes biter nests from spawning for an area around spawn. Uranium ore and crude oil should not spawn in the starting area. Cliffs should not spawn in the starting area[1], but due to a bug they may spawn there. The size of the starting area is adjusted by changing the size setting.

World generations on different starting area settings
Very small Small Medium Big Very big
Starting area very small.png Starting area small.png Starting area medium.png Starting area big.png Starting area very big.png

Richness

This defines the actual content of every ore patch and oil field. The higher the richness, the more ore or oil each resource tile contains. Resource field richness increases by distance.

For trees, the richness setting changes the density of their leaves. The higher the richness, the higher their leaf density, the more pollution they absorb.[2]

For enemy bases, the richness setting does not have an effect.[3]

Resources in ore patches on different richness settings
Very poor Poor Regular Rich Very rich
Iron richness very poor.png Iron richness poor.png Iron richness regular.png Iron richness good.png Iron richness very good.png

Advanced settings

These settings do not affect world generation, instead they allow to change some constants related to the map in general.

Pollution

These settings allow to enable/disable pollution and further adjust it when keeping it enabled.

Setting Description
Diffusion ratio The amount of pollution diffused into neighboring chunks per second.
Dissipation rate Controls how fast pollution dissipates naturally.
Minimum to damage trees Any pollution above this amount starts to damage trees.
Absorbed per damaged tree The amount of pollution absorbed by a tree when it is damaged by pollution.

Evolution

These settings allow to enable/disable evolution and further adjust it when keeping it enabled.

Setting Description
Time factor Controls how fast evolution increases over time.
Destroy factor Controls how fast evolution increases due to destroying enemy spawners.
Pollution factor Controls how fast evolution increases due to producing pollution.

Enemy expansion

These settings allow to enable/disable enemy expansion and further adjust it when keeping it enabled.

Setting Description
Maximum expansion distance The maximum distance enemies will look to expand from other enemy bases.
Minimum group size The minimum size of an enemy expansion party modified by the current evolution level.
Maximum group size The maximum size of an enemy expansion party modified by the current evolution level.
Minimum cooldown The minimum time between enemy expansions being sent out.
Maximum cooldown The maximum time between enemy expansions being sent out.

Recipes/Technology

This setting allows to change the recipe/technology difficulty and multiply the technology cost.

Currently, setting the technology difficulty does not have an effect in vanilla.

Mechanics

Resource and terrain generation

The map generator (world generator) is based on a modified Perlin noise algorithm. A more detailed description can be found in the API documentation.

From the article which describes the generation:

Factorio-Perlin-Noise.png

Top: Normal settings, Middle: The same, but with higher frequency (note the same curve, but more condensed shape), Down: Same as top, but higher level = increased size.

The blue wavy line is an internal noise function, black line is a "level" that is used to determine resource placement, red lines are actual placed resources. The high frequency refers mainly to the noise function. Increasing the frequency increases count of resource fields and decreases their size and distance between them. This mechanism is used all through the map generation in factorio, with some adjustments. The map generator works tile by tile, so the resources are placed on a tile x if f(x) > 0. The amount of resources on the tile is given by f(x) * richness.

Chunks

A map is endless by default, though its size can be limited by height and width — see above. Because it is technically endless, the whole map is not generated from the start. Instead, a new chunk of the map is generated only when needed, similar to other procedurally generated world games.

Invisible chunks (fog of war)

Outside of the visible chunk area, an invisible area of about 3 chunks wide is generated as a preloading mechanism. Enemies may be located inside these invisible chunks and can attack the player from there, while artillery turrets and wagons may automatically shoot enemy bases in these chunks if they are within their automatic range. Invisible chunks are also generated if pollution is generated heavily; the game generates (invisible) chunks as it needs to spread the pollution into the area.

Charting (removing fog of war)

As long as a chunk is invisible, the part of the players map stays black. This changes when a chunk is charted, which means when it is "touched" by a radar. This can be either the player's internal radar, which is always available and continually charts chunks around the player, or the radar entity. If a far-away and thus ungenerated chunk is charted, it will be generated, together with the above-mentioned invisible 3 chunk radius of map around it.

Maximum map size and used memory

The map size is limited to 2,000 x 2,000 kilometers; internally, this is a square 2,000,000 tiles on a side, with an area of 4,000,000,000,000 (4 trillion) square tiles (assuming 1 tile = 1 meter on a side yields 2,000 x 2,000 km = 4 million square km). In real-world terms, this is between the sizes of India and Australia (or about 40% the area of the United States, or over 10 times the area of Germany). It would take around 200 game-minutes (ca 3.3 hours real time) to reach that border from the center when riding a train fueled with rocket or nuclear fuel. This makes the world essentially endless for practical purposes.

Because chunks are only generated in and close around the area revealed by radar, it is possible to reach that border without overloading your computer, as the size of the map in computer memory is dependent only on chunks actually generated. If only a narrow stripe of land is explored to far away, this remains manageable.

The generated chunks are fully mapped and stored in the player's RAM, which is the practical limiting factor of exploration.

History

  • 0.16.0:
    • Added cliffs.
    • New terrains and new terrain generation.
    • Trees can now be configured in the generate-map GUI.
    • Terrain can be configured in the generate map GUI.
    • Biters scale less with distance and there are generally less biters.
    • No uranium as a starting resource also no uranium is ever generated near the starting area, you need to go look for it.
  • 0.15.0:
    • Extended map generator settings to include an advanced section.
    • Added map generator presets.
    • The map seed is used to generate unique maps instead of just shifting the starting position.
  • 0.13.7:
    • Map size is now limited to 2000 km by 2000 km with a black bar rather than crashing when reaching this distance.
  • 0.13.0:
    • Map generator algorithm changed, further resource field now have greater richness.

See also