Expanding the dimentions of a tileset for an existing map without it breaking horribly?

Ran into an issue a few days ago that I’ve been unable to resolve.
When I went about building a map I felt that I was missing pieces and wanted to create a bunch of new tiles.
So I jumped into making a couple new ones and saved them in my tileset image.

Tiled then opened a pop up saying something about the tileset changing from 47 lines to 53 (or the like) would you like to change it? Y/N.

I clicked yes, but then the whole map went from done into chaos.

I did expect a few changes as a few of the tiles had actually been moved on the tileset image, but 95% of it should have been ok. It was not.

(Sadly I had only saved an earlier version of the tileset image before the changes and overwritten the tileset image before the expansion of tiles so I could really go back).

Is this something that happens to others or did I just screw up somewhere because it’s supposed to work?
Happy to learn how I’m supposed to do (because I would like to expand again now hehe :smiley: ).

Well, Tiled is of course meant to fix up your map, not make it into chaos. Although it worked for me when I implemented it, you’re not the only one running into problems. According to the following bug, it may be related to some tiles being empty:

I’ve marked this bug as urgent now and will test and hopefully be able to fix this soon.

Just a heads up that this bug was fixed in Tiled 0.16.2.

But, those using the terrain tool should be aware that there is a related issue with the terrain information getting messed up, which isn’t fixed yet. If this affects you be sure to follow this issue:

https://github.com/bjorn/tiled/issues/1315

Noticed another little issue with the tileset image changing.
I think if your map isn’t previously saved the current check doesn’t work.
I’m not sure this is what caused it, but I got the same issue as in the old version today when editing the tileset image on the fly while building a map.

Actually, it seems like it doesn’t work for newly added tilesets, regardless of whether the map is new or not. :confused: Thanks for noticing this issue, I’ll look into it.

1 Like

Fixed that last issue with the following commit: