LuaRendering.draw_on_map
LuaRendering support for (mini-)map
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.
Why? To show info overlays on the map, for example average train speed on rails as color-coded lines.
- eradicator
- Smart Inserter
- Posts: 5207
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
LuaRendering.draw_on_map
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
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.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
-
- Manual Inserter
- Posts: 4
- Joined: Sat Oct 12, 2019 12:13 pm
- Contact:
Re: LuaRendering.draw_on_map
+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.
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
+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...
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
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.
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.
-
- Filter Inserter
- Posts: 587
- Joined: Sun Jun 09, 2019 10:40 pm
- Contact:
Re: LuaRendering.draw_on_map
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
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!
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Re: LuaRendering.draw_on_map
+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
My mods
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Re: LuaRendering.draw_on_map
+1 I'm here to advocate to see mods be able to use this.
-
- Inserter
- Posts: 23
- Joined: Sun Feb 24, 2019 5:54 pm
- Contact:
Re: LuaRendering.draw_on_map
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.
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.
-
- Inserter
- Posts: 25
- Joined: Tue Mar 26, 2019 6:13 pm
- Contact:
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: LuaRendering.draw_on_map
+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).
-
- Manual Inserter
- Posts: 1
- Joined: Fri Feb 19, 2021 10:18 pm
- Contact:
Re: LuaRendering.draw_on_map
+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!
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!
- Stringweasel
- Filter Inserter
- Posts: 417
- Joined: Thu Apr 27, 2017 8:22 pm
- Contact:
Re: LuaRendering.draw_on_map
+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.
Alt-F4 Author | Factorio Modder
My Mods: Hall of Fame | Better Victory Screen | Fluidic Power | Biter Power | Space Spidertron | Spidertron Dock |Weasel's Demolition Derby
Official Contributor to Space Exploration
My Mods: Hall of Fame | Better Victory Screen | Fluidic Power | Biter Power | Space Spidertron | Spidertron Dock |
Official Contributor to Space Exploration
Re: LuaRendering.draw_on_map
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.
- Attachments
-
- Screenshot 2022-04-30 at 13.28.28.png (2.93 MiB) Viewed 6063 times
My mods
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Re: LuaRendering.draw_on_map
+1 from me as well, seems very useful.
Re: LuaRendering.draw_on_map
+1 seems very useful.
-
- Inserter
- Posts: 25
- Joined: Tue Mar 26, 2019 6:13 pm
- Contact:
-
- Burner Inserter
- Posts: 7
- Joined: Thu Dec 29, 2022 8:18 pm
- Contact:
Re: LuaRendering.draw_on_map
+1 to this. Would be super useful to draw icons/shapes and text to the map.