How do I embed the tilesets

First question here, and I couldn’t find the answer to my question: How do I embed the tilesets into the tmx-files?

Kind regards,

1 Like

If you mean how to turn the use of an external tileset into an embedded tileset, you can do this using the small, somewhat confusingly named button “Import Tileset” below the tileset view:

But even though I do that, it still refers to a filename inside the tmx-file - I would assume that I got to see a Base64 or likewise representation of the tileset :slight_smile:

So you meant how to embed the actual image file in the TMX file. Right now you can’t do this using Tiled, and I’m somewhat reluctant to add it (though it could be a nice export feature).

The feature is technically supported by the TMX format and Tiled is able to edit maps with embedded images, but you’d currently have to use some kind of script to set your maps up like that (or do it manually, of course). I believe for example the Python tmxlib supports this.

Ok, thanks for the info. Would be good to have this documented, perhaps in the TMX map format page or in the introduction section (in case I just missed it there). Would be nice to have this feature because it would make distributing maps much easier. But again, it comes down to the format of the tmx.

In this case, the TMX format supports it because the Java version of Tiled supports it, but the feature was never added to the Qt version of Tiled. Just like the support for having tile layers that don’t fill the entire map. Both are features that could come back in the current version of Tiled in some way of course.

I’ll see about adding a note to the TMX format documentation.

I’ve added a note about embedded image data to the documentation now, and updated it to Tiled 0.17 while I was at it:

https://github.com/bjorn/tiled/commit/fb1839b41d4797c87e5bb7183209c044fe244714