Page 1 of 1
Creating an map and/or minimap overlay
Posted: Wed Mar 06, 2019 5:23 pm
by Impatient
Is it possible to create an additional map and/or minimap overlay?
Re: Creating an map and/or minimap overlay
Posted: Wed Mar 06, 2019 5:33 pm
by SyncViews
There is a "minimap" LuaGuiElement type that might work for your use.
https://lua-api.factorio.com/latest/Lua ... lement.add
Re: Creating an map and/or minimap overlay
Posted: Sat Mar 09, 2019 8:11 pm
by Impatient
Thanks for your answer. I think the minimap gui element is a minimap that can be displayed in a custom gui window. So in a fantasy mod eg clicking on the helicopter opens a window with a minimap in it, where the player can select the destination.
Well, i found this text: it says " "minimap": A minimap preview similar to the normal player minimap."
I wonder if it also can be used to change what is displayed in the minimap. But it does not look promissing.
Re: Creating an map and/or minimap overlay
Posted: Sat Mar 09, 2019 11:47 pm
by SyncViews
Well the docs show you can set the position/surface, zoom, etc. for it.
on_gui_click does not contain a position though, the devs would need to enhance it if you wanted to determine the clicked map coordinates.
I used a "selection-tool" item to do unit control in some personal/testing stuff. That gives you a tool with click&drag + shift-click&drag at least which can be used in the main view or zoomed in map (M) like the blueprint tool etc. Straight clicking works as well, but you can't disable the "drag" feature so I took the mid point when needed.
https://wiki.factorio.com/Prototype/SelectionTool
Re: Creating an map and/or minimap overlay
Posted: Mon Mar 11, 2019 9:44 pm
by Impatient
What I am looking for is to display an overlay. Eg. a mod assigns a value to each tile on the map. Eg height. Then I would like to display a color gradient overlay on the map/minimap which illustrates the height. Do you know if that can be achieved?