Consolidate multiple tilesets?

(bob) #1

I have a problem where my maps are using tiles from several of duplicate tilesets – I opened maps from my last game and modified them for my new game. I didn’t notice that it had multiples of the same tileset until too late. Is there any way to delete the duplicates – and tell it to use just one tileset?

(Thorbjørn Lindeijer) #2

Within Tiled there is unfortunately no way to do this. However, it should be possible to edit your map file in a text editor and simply change the path used to refer to the tilesets to the one you want the map to use. You’ll end up with the same tileset being mentioned several times in the map file (with different “firstgid” values), but that should go away when you load and save the map in Tiled.

Note that I didn’t try this, so be sure to have backups and let me know if it works!

(bob) #3

Okay, thanks. I don’t think that works – the maps already used the exact same name. I think I had tried that before at some point. But I was able to resolve the issue by removing the second reference in the file. When I loaded the map, then I could just go through and replace the tiles wherever a red square with an x appeared.

(Thorbjørn Lindeijer) #4

I didn’t mean the name, I was talking about the file path (the source attribute).

That of course works, but it could be a lot more effort.

(bob) #5

Yes I was also talking about the path. Luckily I did not have many tiles which used the duplicate, so it wasn’t a big deal.