Creating an map and/or minimap overlay

Place to get help with not working mods / modding interface.
User avatar
Impatient
Filter Inserter
Filter Inserter
Posts: 884
Joined: Sun Mar 20, 2016 2:51 am
Contact:

Creating an map and/or minimap overlay

Post by Impatient »

Is it possible to create an additional map and/or minimap overlay?
SyncViews
Filter Inserter
Filter Inserter
Posts: 295
Joined: Thu Apr 21, 2016 3:17 pm
Contact:

Re: Creating an map and/or minimap overlay

Post by SyncViews »

There is a "minimap" LuaGuiElement type that might work for your use. https://lua-api.factorio.com/latest/Lua ... lement.add
User avatar
Impatient
Filter Inserter
Filter Inserter
Posts: 884
Joined: Sun Mar 20, 2016 2:51 am
Contact:

Re: Creating an map and/or minimap overlay

Post 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.
SyncViews
Filter Inserter
Filter Inserter
Posts: 295
Joined: Thu Apr 21, 2016 3:17 pm
Contact:

Re: Creating an map and/or minimap overlay

Post 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
User avatar
Impatient
Filter Inserter
Filter Inserter
Posts: 884
Joined: Sun Mar 20, 2016 2:51 am
Contact:

Re: Creating an map and/or minimap overlay

Post 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?
Post Reply

Return to “Modding help”