Page 1 of 1

Print (simplified) map

Posted: Tue Oct 11, 2022 6:59 pm
by Mskvaer
I've looked through 100+ mod descriptions, but can't find something that is vaugely close to a "print map".

I can use the /screenshot, but that is with all graphic detail and that gets inlegible when trying to print a larger map on one A3. I can't get the map (key M) to print, apart from taking a window-screenshot, but that is with the limited resolution of the screen.

Also in any physical printout the colour scale makes it a bit muddy. I tried using various paint programs to adjust brightness/saturation but it only help a bit.

I am looking for a map printout with very few details - well, like the (M)ap, but where even more features can be toggled on/off before commiting to print.

I've seen a "write your mod" video where it dumps the current state of production to a text file (for inclusion in a monitoring tool for fancy graphs). I fantasize that if I can get a text dump of the map, ie. what is on every XY coordinate, I can make that look pretty in some python or similar (and later do the same in LUA... perhaps)

Thus - executive summary:
Is there a mod that produces a simplified printable map?
For extra credit ;-) Can anyone give me a very very simplified mod that I can expand on

Msquare
(BTW: I am a pure vanilla player, so I don't do mods normally, but neccessity ...)

Re: Print (simplified) map

Posted: Wed Oct 12, 2022 4:39 pm
by Qon
LuaGameScript.take_screenshot doesn't have a map view parameter, and the other function for taking screenshots is take_technology_screenshot() which takes screenshots of your technology (research) screen. So it seems impossible.

Mods (lua commands) can change what you as a player sees to any position/zoom/view type (normal (not position)/zoom to world/map) with LuaPlayer.open_map() and LuaPlayer.zoom_to_world()

Re: Print (simplified) map

Posted: Thu Oct 13, 2022 12:49 am
by DaveMcW
Yes, it's theoretically possible to dump all entities and tiles to a text file.

You could even build an image file inside the mod using a lua png encoder.

Re: Print (simplified) map

Posted: Thu Oct 13, 2022 7:42 pm
by Qon
DaveMcW wrote:
Thu Oct 13, 2022 12:49 am
Yes, it's theoretically possible to dump all entities
Well yeah you can loop through entities (and tiles) of course and do it yourself. To clarify, when I said "impossible" I meant impossible with a single api call that makes Factorio do it for you. Kind of strange that the API doesn't already support map view screenshots. Seems to me that it should be added, having tech screenshot API but not map screenshot API is weird.

Re: Print (simplified) map

Posted: Fri Oct 14, 2022 8:55 pm
by Mskvaer
Thanks for the replies. (especially hint to the luapngencoder)

I only know FORTRAN, Algol, APL, FORTH, C(++), BASIC (from Dortmouth to Visual), Pascal, Prolog, Java, PL/SQL, Python ... well, know and know, dabble in them, so LUA is just nr 42 or so. I started hammering my way through it and the Factorio API. Now as far as listing chunks or tiles to an ASCII file on a /dmpmap command.

My difficulties will be in a new thread under moddinghelp

Re: Print (simplified) map

Posted: Sat Oct 15, 2022 11:09 am
by steinio
This mod was updated today:
https://mods.factorio.com/mod/mapshot

That's what i remembered after i saw your request.