The script creates a screenshot of a new generated map in the script-output directory. The current format is netpbm ppm and can be converted to jpeg or png, if the netpbm is installed. To do this after the generation, just uncomment the commands in ./map-gen.sh.
Since the game does not provide a function to generate a screenshot of the map (at least I do not found one), I implemented it myself in lua. Therefore there are currently no nests and trees on the map.
To use it you do the following:
- download the headless server from https://www.factorio.com/download-headless/experimental
- unpack it somewhere
- download the attached script
- unpack the content in the directory of the headless server, this will overwrite data/base/scenarios/freeplay/control.lua
- open a terminal and change into the directory of the headless server
- run ./map-gen.sh
- Profit!
Code: Select all
# generating map...
# starting server...
# request the chunk generation
# 205 of 1024 chunks generated
# 308 of 1024 chunks generated
# 410 of 1024 chunks generated
# 512 of 1024 chunks generated
# 615 of 1024 chunks generated
# 717 of 1024 chunks generated
# 820 of 1024 chunks generated
# 871 of 1024 chunks generated
# 973 of 1024 chunks generated
# all chunks generated
# map generated: ./script-output/seed_1841311017-terrain_normal-water_normal.ppm