LuaRendering.draw_on_map

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 4096
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: Hand Crank Generator, Screenshot Hotkey 2.0, /sudo
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: 63
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: 143
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: 586
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: 1317
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!

Post Reply

Return to “Modding interface requests”

Who is online

Users browsing this forum: No registered users