Batch export possible?

Hi. I have 32 levels in my game and when I edit my tileset I have to go through them one by one and re-export. It seems like batch exporting might be possible through the command line tool but I’m completely ignorant when it comes to tiled’s CLI and don’t know where to look. Can anyone give me a dumbed down answer?


Tiled can be told to export a single map to another format on the command-line. This should be enough to use in a batch script to export multiple levels. It works as follows:

tiled --export-map [format] <tmx file> <target file>

The [format] part is optional and only needs to be provided if there are multiple plugins enabled that export with the same extension as your target file (by default, this is never the case since Tiled 0.15). If you need the [format] option, note that it broke in Tiled 0.16 (a fix has been made for Tiled 0.16.2). You can use tiled --export-formats to get a list of supported export formats.

Unfortunately, it only supports converting TMX maps currently. I’ll eventually fix it up so that it will support any readable map format as source file.