External editor or extension?

Hello,

I am using a Tiled for some time and while it is great tool it can’t cover all the specifics of the games that use it, which I fully understand.

My question is if it would be possible to:

  • When selecting an object in Object layer to have an additional button or context menu item, simply anything…
  • Once button (or menu item) is pressed the Tiled will open an external editor (e.g. exe file in Windows) and pass to it a data (it can be e.g. item identifier via command line argument)
  • Once work in external editor will be done it will pass the data back
  • Data will be appended as base64 string to the object property

Might be my requirement is naive and there are better ways how to do that - I am open to ANY suggestion.

I have seen that Tiled Scripting API, so it might not be necessary to open the external editor, if the new window can be opened in Tiled (with UI somehow done in TypeScript with Qt?? or in other way) - here I am little worried that there could be limitations when it comes to UI elements it can display…

I will appreciate any advice or suggestion. Might be there is someone who faced similar challenge?

Thanks a lot!!

If you need to run an external program, you could write a script using the Process scripting API (search on the link you posted). If the program itself creates a window then it should still open, but that’s not Qt rendering your window, Tiled is just spawning your program.

Depending on what the program needs to do and if you have written it already, you may be able to just write a script and have your GUI be a Dialog from the scripting API. But if you definitely need an external program, then the Process API is the way to go.