LuaRendering.draw_on_map

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
eduran
Filter Inserter
Filter Inserter
Posts: 344
Joined: Fri May 09, 2014 2:52 pm
Contact:

LuaRendering support for (mini-)map

Post 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.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

LuaRendering.draw_on_map

Post 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.
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.
captain828
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sat Oct 12, 2019 12:13 pm
Contact:

Re: LuaRendering.draw_on_map

Post 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.
User avatar
kizrak
Long Handed Inserter
Long Handed Inserter
Posts: 77
Joined: Thu Jul 19, 2018 1:27 am
Contact:

Re: LuaRendering.draw_on_map

Post 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...
User avatar
moon69
Fast Inserter
Fast Inserter
Posts: 183
Joined: Sun Sep 18, 2016 6:53 pm
Contact:

Re: LuaRendering.draw_on_map

Post 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.
slippycheeze
Filter Inserter
Filter Inserter
Posts: 587
Joined: Sun Jun 09, 2019 10:40 pm
Contact:

Re: LuaRendering.draw_on_map

Post 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. :)
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: LuaRendering.draw_on_map

Post 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!
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
Xorimuth
Filter Inserter
Filter Inserter
Posts: 708
Joined: Sat Mar 02, 2019 9:39 pm
Contact:

Re: LuaRendering.draw_on_map

Post 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
My mods
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
xaen
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun Aug 30, 2020 1:02 pm
Contact:

Re: LuaRendering.draw_on_map

Post by xaen »

+1 I'm here to advocate to see mods be able to use this.
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 607
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: LuaRendering.draw_on_map

Post by raiguard »

Here to give my enthusiastic +1.
Don't forget, you're here forever.
coffee_fiend
Inserter
Inserter
Posts: 23
Joined: Sun Feb 24, 2019 5:54 pm
Contact:

Re: LuaRendering.draw_on_map

Post 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.
Dominiquini
Inserter
Inserter
Posts: 25
Joined: Tue Mar 26, 2019 6:13 pm
Contact:

Re: LuaRendering.draw_on_map

Post by Dominiquini »

+1
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

Re: LuaRendering.draw_on_map

Post 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).
namelessclone
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Feb 19, 2021 10:18 pm
Contact:

Re: LuaRendering.draw_on_map

Post 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!
User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 419
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: LuaRendering.draw_on_map

Post 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.
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
Xorimuth
Filter Inserter
Filter Inserter
Posts: 708
Joined: Sat Mar 02, 2019 9:39 pm
Contact:

Re: LuaRendering.draw_on_map

Post 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.
Attachments
Screenshot 2022-04-30 at 13.28.28.png
Screenshot 2022-04-30 at 13.28.28.png (2.93 MiB) Viewed 6172 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
User avatar
kumpu
Fast Inserter
Fast Inserter
Posts: 111
Joined: Wed Jun 07, 2017 10:10 am
Contact:

Re: LuaRendering.draw_on_map

Post by kumpu »

+1 from me as well, seems very useful.
ILLISIS
Inserter
Inserter
Posts: 25
Joined: Wed Feb 09, 2022 10:49 am
Contact:

Re: LuaRendering.draw_on_map

Post by ILLISIS »

+1 seems very useful.
Dominiquini
Inserter
Inserter
Posts: 25
Joined: Tue Mar 26, 2019 6:13 pm
Contact:

Re: LuaRendering.draw_on_map

Post by Dominiquini »

+1
SprocketCreations
Burner Inserter
Burner Inserter
Posts: 7
Joined: Thu Dec 29, 2022 8:18 pm
Contact:

Re: LuaRendering.draw_on_map

Post by SprocketCreations »

+1 to this. Would be super useful to draw icons/shapes and text to the map.
Post Reply

Return to “Modding interface requests”