Tiled is exporting tileset as file instead of JSON

(Ruben Labruyere) #1

Hi there!

For a project of mine I used to export Tiled maps as JSON files. This really works nice but recently I updated Tiled finding out this changed. Somehow someone thought it would be a good idea to change the JSON structure. Now tilesets are saved as seperate files (why even do this in the first place?) and the element inside the JSON file will link to this file. This “feauture” is screwing up my entire project because it depends heaviliy on the precious JSON structure. Is there way to revert this?

With kind regards,

(Marcel) #2

I think this only happens when the tileset is external, which is now the default when you add new tilesets. When you embed the tileset, which you can do by clicking one of the icons in the right-bottom corner, the tileset and its terrains etc. should return to the map json.

(Thorbjørn Lindeijer) #3

It’s generally beneficial to use external files for the tilesets, since it means you do not have to repeat yourself when creating multiple maps using the same tileset. Not only does the tileset store the parameters for cutting up the image, but it also potentially stores custom properties, terrain definitions, tile collision shapes and tile animations. Before Tiled 1.0, it was very cumbersome to work with tilesets that included a lot of such meta-information because they could not be edited unless they were embedded in the map.

Note that external tilesets have been supported since a very long time, it’s only become the default for new tilesets in Tiled 1.0 because they can finally be edited. However, in the New Tileset dialog, there is an “Embed in map” checkbox, which you can use to create a new tileset embedded in the current map. To embed existing external tilesets in the map, you can use the buttons pointed out by @M4rw (they’re below the tileset view).