Custom command calling 2 different functions

I currently have a custom command that runs my current level using love2d.
The library im using expects the level to be in lua format not xml.

Would it be possible in the command to run the Tiled’s Export functionality (with default params)? Or is it possible for me to script this in someway?


As far as I’m aware that’s currently not possible with tiled. However you can write a batch file, and then call that with the custom command. In the batch file you can first let tiled export the map (see for the command line arguments) and after that you can call your game.


Even in the development version with scripting support, I don’t think this use-case is supported right now. While you can trigger the export from a script, you can’t currently trigger custom commands. That’s definitely something I’ll want to cover before the Tiled 1.3 release, so thanks for bringing it up!

In the meantime, @EJlol’s suggestion should do the trick!

Cheers @EJlol that sounds fine to me.

@bjorn youre a hard worker man, keep it up! If I could code well outside of python I’d offer to help :slight_smile: