Page 1 of 2

LuaRendering support for (mini-)map

Posted: Fri Jun 07, 2019 7:43 am
by eduran
I would like the ability to draw shapes on the map, similar to what LuaRendering does for the normal view. Maybe via a draw_on_map flag specified at creation.

Why? To show info overlays on the map, for example average train speed on rails as color-coded lines.

LuaRendering.draw_on_map

Posted: Tue Oct 08, 2019 12:35 pm
by eradicator
What?
The ability to draw stuff onto the map instead of into the world.

Why
Currently all script interaction with the map is limited to LuaCustomChartTag, which is shared by the whole force and therefore can't be used to features that need player-specific visibility.

Examples
  • Extra (chunk) overlays for mod specific content (wind, radiation, crust thickness).
  • "Ore finder" that lets player search for ore patches (i.e. by drawing a polygon over them).
  • Collaborative marking tools that allow players to draw lines/circles/squares onto the map.

Re: LuaRendering.draw_on_map

Posted: Thu Oct 24, 2019 6:15 pm
by captain828
+1

I actually could use this for something I'm working on.

Pretty sure this is already in the engine as the Artillery targeting remote draws on the map AND the ground + all the mapview overlays that draw on the map.
A draw_on_map bool (default: false) on all the LuaRendering calls should be sufficient.

Re: LuaRendering.draw_on_map

Posted: Fri Dec 20, 2019 11:40 pm
by kizrak
+1

Because it looks like LuaForce.add_chart_tag to non-charted location won't be implemented, I could maybe use something like this as an alternative...

Re: LuaRendering.draw_on_map

Posted: Mon May 11, 2020 12:27 pm
by moon69
I would use this instead of (or in addition to) chart tags to combine symbols and shapes at runtime rather than hard code them in numerous sprites.

Currently I only need 12 sprites to display required combinations, but adding one extra symbol would require ~60 sprites!

I think it would also be cool to highlight areas of the map.

Re: LuaRendering.draw_on_map

Posted: Wed Jun 03, 2020 10:35 pm
by slippycheeze
I'm here to advocate because I wanted "Chunk Boundaries Light" to draw the bounds on the map, as well as the world. :)

Re: LuaRendering.draw_on_map

Posted: Sat Aug 01, 2020 12:41 pm
by Qon
I want my mod ChunkyChunks to be able to draw grids on the map so they are visible before zoom-to-world. Would be great together with the new blueprint placement from zoomed out map and blueprint snapping to absolute coordinates!

Re: LuaRendering.draw_on_map

Posted: Sun Aug 30, 2020 11:33 am
by Xorimuth
+1 I'd like to be able to draw spidertron waypoint markers on the map alongside the autopilot_destination marker from the base game which is drawn on the map: https://mods.factorio.com/mod/SpidertronWaypoints

Re: LuaRendering.draw_on_map

Posted: Sun Aug 30, 2020 1:05 pm
by xaen
+1 I'm here to advocate to see mods be able to use this.

Re: LuaRendering.draw_on_map

Posted: Sat Sep 26, 2020 12:36 am
by raiguard
Here to give my enthusiastic +1.

Re: LuaRendering.draw_on_map

Posted: Fri Oct 09, 2020 10:45 am
by coffee_fiend
Yeah I give this a serious +10000000000 also

So I have a situation where I have a grid on the normal display/ground and use that to help decide where to turn a train while laying tracks with FARL.
It has a cruise mode so I don't have to hold W down to keep moving...
So in order to deal with possible obstacles before I turn I often switch to the full map to watch where I am
but unfortunately this doesn't have the grid on it that I have otherwise.
So I end up swapping back and forth between the map to get a zoomed our view and then out of the map just see where on the grid I actually am at.

It would great if they could add that same grid to the map so I only had to swap out of the map when I got to the right location or just before an obstacle.

Re: LuaRendering.draw_on_map

Posted: Thu Oct 15, 2020 4:14 am
by Dominiquini
+1

Re: LuaRendering.draw_on_map

Posted: Sun Nov 01, 2020 1:13 pm
by Deadlock989
+1. I would like to simulate something not a million miles away from a train stop label, without having a train stop, or using chart tags (which can be messed with).

Re: LuaRendering.draw_on_map

Posted: Fri Feb 19, 2021 10:34 pm
by namelessclone
+9001
Displaying custom grids from Qon's ChunkyChunks mod on the map would be extremely beneficial now that we can blueprint-build from the map.
I believe restricting drawing for mods to in-world surface makes no sense. Please, Wube, make it happen!

Re: LuaRendering.draw_on_map

Posted: Tue Jun 08, 2021 8:38 am
by Stringweasel
+1. I would like to draw my own power lines in map view in my Fluidic Power mod, since I delete all the copper connections.

Re: LuaRendering.draw_on_map

Posted: Sat Apr 30, 2022 12:31 pm
by Xorimuth
I find it interesting that this already works perfectly fine, but only on sections that are not scanned by a radar. Then when you zoom out, it disappears on these sections as well.

Re: LuaRendering.draw_on_map

Posted: Thu Jan 12, 2023 9:53 pm
by kumpu
+1 from me as well, seems very useful.

Re: LuaRendering.draw_on_map

Posted: Sat Jan 21, 2023 7:13 am
by ILLISIS
+1 seems very useful.

Re: LuaRendering.draw_on_map

Posted: Sat Jan 28, 2023 3:16 am
by Dominiquini
+1

Re: LuaRendering.draw_on_map

Posted: Mon Feb 06, 2023 4:34 pm
by SprocketCreations
+1 to this. Would be super useful to draw icons/shapes and text to the map.