Page 1 of 1

LuaForce.add_chart_tag to non-charted location

Posted: Sun Dec 15, 2019 3:00 am
by kizrak
I would like to make map tags "in the dark". AKA, give user a general direction to go somewhere that they can't see (AKA haven't charted yet).
The documentation for:
https://lua-api.factorio.com/latest/Lua ... _chart_tag
says:
Note: The chunk must be charted for a tag to be valid at that location.
But I would like to be able to make map tags for locations that a force does not have charted. So I can give them map tag hints without showing them the full map view for that location.

Alternatively, I could probably work with map tags staying when a chunk is uncharted for that force, but I would prefer that the force never get to see what is actually there, just what I want to tell them.

Re: LuaForce.add_chart_tag to non-charted location

Posted: Sun Dec 15, 2019 3:36 am
by Rseding91
Chart tags are stored on the chart for a given chunk. That means it's not possible to have one exist without the chart for that chunk existing. It's also not possible to have the tag stick around when the chunk is uncharted.

So, this isn't going to happen since it's impossible with how they currently work.

Re: LuaForce.add_chart_tag to non-charted location

Posted: Sun Dec 15, 2019 1:34 pm
by kizrak
What about renderings? Would it be possible to make LuaRendering visible from far out zoom? Currently, once you zoom out on the map past normal vision (zoom less than 0.364), renderings stop showing up.

Probably a flag to say if the LuaRendering should be visible from far out zoom on map.

For example, with zoom 0.364 you can see renderings in the map view (red Xs):
Zoom with renderings visible
Zoom with renderings visible
factorio_4pHwpFCPdQ.png (625.21 KiB) Viewed 2719 times

But if you zoom out one more tick, they disappear (but map tags are visible in both cases):
Zoomed out too far
Zoomed out too far
factorio_Ckdsd9WWLh.png (147.54 KiB) Viewed 2719 times

Would an optional to keep renderings visible further out on the map view be possible?

Re: LuaForce.add_chart_tag to non-charted location

Posted: Sun Dec 15, 2019 1:38 pm
by kizrak
Rseding91 wrote: Sun Dec 15, 2019 3:36 am Chart tags are stored on the chart for a given chunk. That means it's not possible to have one exist without the chart for that chunk existing. It's also not possible to have the tag stick around when the chunk is uncharted.

So, this isn't going to happen since it's impossible with how they currently work.
Also, after re-reading what you said, I wanted to point out that the map tags would be on Generated chunks, just not Charted (for that force) chunks. I'm not sure if that makes any difference.

So to clarify, I would like a force that doesn't have a chunk charted, but for which that chunk is generated, to be able to have a visible map tag.

Re: LuaForce.add_chart_tag to non-charted location

Posted: Mon Dec 16, 2019 8:12 am
by darkfrei
The mod https://mods.factorio.com/mod/BlackMap hides from forces revealed chunks, but doesn't delete them as the https://mods.factorio.com/mod/DeleteEmptyChunks it does.

Why the force forgot all tags by this hided chunks?

Re: LuaForce.add_chart_tag to non-charted location

Posted: Mon Dec 16, 2019 9:21 am
by eradicator
kizrak wrote: Sun Dec 15, 2019 1:34 pm What about renderings? Would it be possible to make LuaRendering visible from far out zoom?
Already requested this as api feature: viewtopic.php?f=28&t=76539

Re: LuaForce.add_chart_tag to non-charted location

Posted: Mon Dec 16, 2019 6:23 pm
by Rseding91
darkfrei wrote: Mon Dec 16, 2019 8:12 am The mod https://mods.factorio.com/mod/BlackMap hides from forces revealed chunks, but doesn't delete them as the https://mods.factorio.com/mod/DeleteEmptyChunks it does.

Why the force forgot all tags by this hided chunks?
Chunk != Chart

The chunk has the tiles, entities, and other stuff on it.

The chart is the picture for a specific chunk. That mod deletes the chart for the chunk and that deletes the tags on that chart. It doesn't "hide" anything. It just deletes the charts.