A mod for factorio that changes the map into a real-world map. You can choose between 'Atlantic' and 'Pacific' centered.
Note that it only changes the terrain, and not the spawning of resources. This is on the list of things to do, so maybe in the future!
You can get this mod here: https://mods.factorio.com/mods/TheOddler/factorio-world
- Start a new game
- Choose a map layout - Atlantic or Pacific
- Choose a spawn city
- Map and terrain are generated from a map of Earth!
Use the in-game mod settings to set:
- World Map: Atlantic or Pacific. The difference is which is in the center of the world. Detailed uses about 4x memory.
- Map scaling factor: Can be anything between 0.01 and infinite (factors of 6 work well)
- Spawn:
- Pick a location to start, or set to custom
- When set to custom, it'll use the custom spawn x and y coordinates
- Repeat map: If set to false everything after the first iteration will become water
- Safe zone size: All water within this zone will be turned into dirt
This is a list of the regions and cities | found in 'data/spawns.lua':
Continent | Region | City |
---|---|---|
Africa | Mali | Bamako |
Africa | Congo | Katanga |
Africa | Chad | Mongo |
Africa | Egypt | Cairo |
Africa | Morocco | Marrakech |
Asia | China | Beijing |
Asia | China | Kunming |
Asia | Georgia | Tbilisi |
Asia | India | Delhi |
Asia | Saudi Arabia | Riyadh |
Asia | Mongolia | Moron |
Europe | Czech Republic | Prague |
Europe | Russia | Aktobe |
Europe | Russia | Bilibino |
Europe | Russia | Moscow |
Europe | Russia | Omsk |
Europe | Russia | Pechora |
Europe | Russia | Yakutsk |
Europe | Spain | Madrid |
Europe | UK | London |
North America | Canada | Brisay |
North America | Canada | Kapuskasing |
North America | Canada | Saskatoon |
North America | Greenland | Summit Camp |
North America | Mexico | Mexico City |
North America | United States | Boise |
North America | United States | Scranton |
North America | United States | Topeka |
North America | United States | Ungalik |
South America | Brazil | Manaus |
South America | Argentina | Cordoba |
Oceania | Australia | Broome |
Oceania | Australia | Sydney |
The mod reads lua files generated by a converter writen in Python. These files are generated based on an image. Currently I'm using the "Natural Earth II with Shaded Relief, Water, and Drainages" image from Natural Earth.
The 'Pacific' map has been modified to switch the continents and remove Antarctica.
The generator simply iterates over each pixel, and assigns a tile-type to it. The algorithm uses reference colors, and checks which one is closer to encode the types. To compress the data a little I use a scheme where every tile-letter is followed by how many tiles there are of this type of that row. The mod then takes these strings (one for each line of pixels), decompresses it to something it can read very quickly, and assigns the tiles a new type when a chunk is generated.
- Pillow - for processing the images:
pip install Pillow
- tqdm - for fast loading bars:
pip install tqdm
To generate a new lua file and load in into your game you'll have to do a little manual labour:
- In
convert.py
change the settings at the top of the fileimage_file
: the name of the image to use (to be placed next to theconvert.py
file)resize_width
: the size you want the final map to be (can be set toNone
if you just want the same size as the provided image)terrain_codes
: set which colours are what terrains !!DANGER!! If you change these, you'll have to update theterrain_codes
incontrol.lua
as well
- Run
convert.py
- Copy the created lua files (
World_large.lua
andWorld_small.lua
) into the mod's root folder - Run the game and start a new game