|Created:||3 years ago|
|Latest Version:||0.18.2 (7 days ago)|
|Factorio version:||0.14 - 0.18|
A mod for factorio that changes the map into a real-world map.
Note that it only changes the terrain, and not the spawning of resources. This is on my list of things to do, so maybe in the future!
You can get this mod here: https://mods.factorio.com/mods/TheOddler/factorio-world
- Simply start a new game
- Your world settings will be ignored, and the terrain replaced by the earth!
Use the ingame mod settings to set:
- Map scale: Can be anything between 0.01 and infinite
- 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
- Use large map: If set to true the mod will use a more detailed map
- This will use about 4 times the memory I think
- Safe zone size: All water within this zone will be turned into dirt
Generating your own maps
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 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.
Require Python libraries
- 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:
convert.pychange the settings at the top of the file
image_file: the name of the image to use (to be placed next to the
resize_width: the size you want the final map to be (can be set to
Noneif 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 the
- Copy the created lua files (
World_small.lua) into the mod's root folder
- Run the game and start a new game