add tag on map dissapear

Bugs that are actually features.
Post Reply
napouser
Inserter
Inserter
Posts: 46
Joined: Fri Aug 20, 2021 10:30 am
Contact:

add tag on map dissapear

Post by napouser »

adding tags then they stay alive for a while
but after a long time they dissapear
probably due to save dysync?
maybe after many hours of the game being on getting desync? (50+ hours online)

not sure
kinda hard to reproduce will look into it more

User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1507
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: add tag on map dissapear

Post by ptx0 »

napouser wrote:
Tue Dec 28, 2021 5:13 pm
maybe after many hours of the game being on getting desync? (50+ hours online)
are you actually getting desynced?

napouser
Inserter
Inserter
Posts: 46
Joined: Fri Aug 20, 2021 10:30 am
Contact:

Re: add tag on map dissapear

Post by napouser »

bump

this is really annoying
today i discovered all tags gone from the map
again
wtf is triggering deletion of these things

any1 else getting this?

Rseding91
Factorio Staff
Factorio Staff
Posts: 13202
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: add tag on map dissapear

Post by Rseding91 »

Are you playing with mods? Or is it a public multiplayer game?
If you want to get ahold of me I'm almost always on Discord.

napouser
Inserter
Inserter
Posts: 46
Joined: Fri Aug 20, 2021 10:30 am
Contact:

Re: add tag on map dissapear

Post by napouser »

no mods
no multiplayer

sorry for the late answer need to find enable notifications in email


do tags are saved in a different file like blueprints? maybe i moved the save into a different computer or something

Rseding91
Factorio Staff
Factorio Staff
Posts: 13202
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: add tag on map dissapear

Post by Rseding91 »

napouser wrote:
Tue Mar 08, 2022 1:11 am
no mods
no multiplayer

sorry for the late answer need to find enable notifications in email


do tags are saved in a different file like blueprints? maybe i moved the save into a different computer or something
They aren't. Are you using any lua commands?
If you want to get ahold of me I'm almost always on Discord.

napouser
Inserter
Inserter
Posts: 46
Joined: Fri Aug 20, 2021 10:30 am
Contact:

Re: add tag on map dissapear

Post by napouser »

Hmmmmmmm

Maybe thats it. I was using commands to remove pollution and shrink the map. Will do some tests tomorrow

napouser
Inserter
Inserter
Posts: 46
Joined: Fri Aug 20, 2021 10:30 am
Contact:

Re: add tag on map dissapear

Post by napouser »

Rseding91 wrote:
Tue Mar 08, 2022 3:04 am
napouser wrote:
Tue Mar 08, 2022 1:11 am
no mods
no multiplayer

sorry for the late answer need to find enable notifications in email


do tags are saved in a different file like blueprints? maybe i moved the save into a different computer or something
They aren't. Are you using any lua commands?


yeap that was it
if i use the clear map command the tags are all destroyed
is this intended?
:(

Rseding91
Factorio Staff
Factorio Staff
Posts: 13202
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: add tag on map dissapear

Post by Rseding91 »

napouser wrote:
Tue Mar 08, 2022 12:42 pm
yeap that was it
if i use the clear map command the tags are all destroyed
is this intended?
:(
Tags are on the chart per-chunk so if the chunk is deleted the chart for that chunk is also removed and subsequently the tags on that chunk. If you're deleting the chart that will also also delete the tags on the chart.

It all depends what command you are using. It's entirely likely the command is doing more than it needs to and that's why you are having issues. Can you post the command you're using here?
If you want to get ahold of me I'm almost always on Discord.

napouser
Inserter
Inserter
Posts: 46
Joined: Fri Aug 20, 2021 10:30 am
Contact:

Re: add tag on map dissapear

Post by napouser »

Rseding91 wrote:
Tue Mar 08, 2022 4:13 pm
napouser wrote:
Tue Mar 08, 2022 12:42 pm
yeap that was it
if i use the clear map command the tags are all destroyed
is this intended?
:(
Tags are on the chart per-chunk so if the chunk is deleted the chart for that chunk is also removed and subsequently the tags on that chunk. If you're deleting the chart that will also also delete the tags on the chart.

It all depends what command you are using. It's entirely likely the command is doing more than it needs to and that's why you are having issues. Can you post the command you're using here?

I am pretty sure i used the “hide all map command” not the “destroy all hidden chinks” command

Let me find it


####%%%#############

/c local surface = game.player.surface
local force = game.player.force
for chunk in surface.get_chunks() do
force.unchart_chunk({x = chunk.x, y = chunk.y}, surface)
end

##############


So i am using this to hide everything
This hides tags as well. And when the map is revealed after sone hours tags are gone.
Then after 1-2 hours i am using this


#####%%%%%%#######


/c local surface = game.player.surface
local force = game.player.force
for chunk in surface.get_chunks() do
if not force.is_chunk_charted(surface, chunk) then
surface.delete_chunk(chunk)
end
end



#############


So i can remove the extra uselsss map so i can shrink my save from 200mb to 100


I understand that the 2nd command deletes everything so probably deletes the properties of the chunks and the tags accociated with.

But the first command shouldnt trigger such violent aggressive behaviour since its not really that violent command. I mean u just hide the whole map. Nothing really changes below the fog.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13202
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: add tag on map dissapear

Post by Rseding91 »

napouser wrote:
Tue Mar 08, 2022 4:35 pm
I am pretty sure i used the “hide all map command” not the “destroy all hidden chinks” command

####%%%#############

/c local surface = game.player.surface
local force = game.player.force
for chunk in surface.get_chunks() do
force.unchart_chunk({x = chunk.x, y = chunk.y}, surface)
end

##############
This deletes the entire chart and all tags on the chart. It does not "hide" anything: it just deletes them all.
If you want to get ahold of me I'm almost always on Discord.

napouser
Inserter
Inserter
Posts: 46
Joined: Fri Aug 20, 2021 10:30 am
Contact:

Re: add tag on map dissapear

Post by napouser »

Rseding91 wrote:
Tue Mar 08, 2022 5:15 pm
napouser wrote:
Tue Mar 08, 2022 4:35 pm
I am pretty sure i used the “hide all map command” not the “destroy all hidden chinks” command

####%%%#############

/c local surface = game.player.surface
local force = game.player.force
for chunk in surface.get_chunks() do
force.unchart_chunk({x = chunk.x, y = chunk.y}, surface)
end

##############
This deletes the entire chart and all tags on the chart. It does not "hide" anything: it just deletes them all.


Whats the difference between deleting charts and deleting chunks?

Rseding91
Factorio Staff
Factorio Staff
Posts: 13202
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: add tag on map dissapear

Post by Rseding91 »

napouser wrote:
Tue Mar 08, 2022 5:25 pm
Whats the difference between deleting charts and deleting chunks?
Deleting a chunk deletes the tiles and entities on that chunk + the chart. Deleting the chart deletes the image you see on the map and all tags that are on that section of the image.
If you want to get ahold of me I'm almost always on Discord.

Qon
Smart Inserter
Smart Inserter
Posts: 2119
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: add tag on map dissapear

Post by Qon »

Rseding91 wrote:
Tue Mar 08, 2022 5:15 pm
This deletes the entire chart and all tags on the chart. It does not "hide" anything: it just deletes them all.
Would be nice if the behavior was documented. https://lua-api.factorio.com/latest/Lua ... hart_chunk doesn't explain what it does at all, and the term "unchart" isn't defined there. :)

The function add_chart_tag(surface, tag) is defined though and does provide the necessary info:
Adds a custom chart tag to the given surface and returns the new tag or nil if the given position isn't valid for a chart tag.
Note:
The chunk must be charted for a tag to be valid at that location.
But if someone not familiar with all of the API tries to look up the functions used in a command they read, it would be nice if the documentation linked to an explanation of what charting means. I could find it, but I already knew that tags were saved with the charted chunks themselves. I'm not sure how I would find that out from the docs except just reading all of it.

Post Reply

Return to “Not a bug”