mapeditor / tiled

Flexible level editor
https://www.mapeditor.org/
Other
11.16k stars 1.76k forks source link

Automap Output not Saving in XML #3816

Open deplicator opened 1 year ago

deplicator commented 1 year ago

Describe the bug Automap appears to apply correctly in Tiled, but saving does not update XML.

I don't recall this being a problem before, apologies if this issue exists (couldn't find anything).

To Reproduce Steps to reproduce the behavior:

  1. A simple project with two tilesets, a single automap rule, and a test map
  2. Setup input layer in test map
  3. Hit Ctrl+M, save map
  4. View XML doesn't not show the output tileset tag and the output layer data is all 0's

Expected behavior The XML should have the output tileset reference and the layer data be filled in with numbers where approriate.

Media Image taken before running automap rules: image

Image after running automap rules and saving (note the output data layer is all 0's): image

Reloading tiled shows what is reflected in the XML file (the output layer is there but empty). image

Specifications:

eishiya commented 1 year ago

Are the output tiles in a different tileset, or are they in the same tileset as the input tiles? It sounds like maybe Automapping is adding the tiles to the layer(s), but not adding their tileset to the map, which causes the tiles to not be saved correctly.

If that's the case, you can at least avoid the issue by manually adding the tileset to the map (e.g. by manually painting a tile from it in the map and then erasing it).

deplicator commented 1 year ago

I think it is rooted in being different tilesets, if I click around on the tabs in the tileset window and save again it will update. It's a work around, but still a bug 😄