Page 1 of 1

Add LuaGameScript::take_map_screenshot

Posted: Sun Apr 05, 2026 11:11 pm
by bencvt
Factorio's map view provides an excellent overview of the game world, but there is no API to take screenshots of it.

This suggestion is to add LuaGameScript::take_map_screenshot (or take_chart_screenshot or take_remote_view_screenshot).

Its parameters could somewhat match the existing LuaGameScript::take_screenshot. Additional parameters (all boolean):

Code: Select all

logistic_networks
electric_networks
turret_coverage
pollution
train_stop_names
player_names
tags
worker_robots
rail_signal_states
recipe_icons
show_pipelines
Irrelevant parameters:

Code: Select all

show_entity_info
hide_clouds
hide_fog
daytime
water_tick
Related threads from many years ago:

Re: Add LuaGameScript::take_map_screenshot

Posted: Mon Apr 06, 2026 4:35 am
by Osmo
There is a more bare-bones version of this in form of https://lua-api.factorio.com/latest/cla ... hunk_chart

Re: Add LuaGameScript::take_map_screenshot

Posted: Mon Apr 06, 2026 5:28 am
by bencvt
Thanks. It's good to know that at least some of the pixel data is available.

However, LuaForce::get_chunk_chart cannot render tags, pipelines, coverage areas, etc. Re-implementing all that rendering code is possible, but it would be a lot of work to mimic the game's behavior.
testing