Questions about import/export plugin #3150
-
Hi, I have written an import/export plugin for the PICO-8 fantasy console cartridge format, which happens to work pretty well so far, and I have a few questions and remarks.
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
That's great to hear! The Python plugin was mostly contributed by @stt so I've just highlighted him as well. :-)
I'll try to include a solution to this in Tiled 1.4.
Can you describe your scenario in a bit more detail? There is
Hmm, why are you storing the whole file there? Since this file is already on disk, wouldn't it suffice to read in the file before writing to it? Though of course, that won't work when you save under a different file name. I guess supporting hidden properties would be a pretty good solution. Btw, really nice to see PICO-8 files supported by Tiled! |
Beta Was this translation helpful? Give feedback.
-
I've added a link back here in the https://github.com/mapeditor/tiled-extensions README. |
Beta Was this translation helpful? Give feedback.
-
I would need that for two features:
Yes, reloading the file from disk would break “Save as…”. Also it feels a bit risky in general, I can imagine a lot of scenarios where the original file disappears, or is modified by source control, or may get corrupt… I think it’s safer if Tiled knows exactly how to recreate the file. |
Beta Was this translation helpful? Give feedback.
-
Tiled 1.5 added support for creating images to the JS API, and @samhocevar has subsequently ported the tiled-pico8 plugin to JS.
I think this can now be done using
At the moment there are not yet any "read only" or "hidden" properties. Since introducing such a field is not trivial, I guess for this use case, it might be interesting to just support "binary data" as custom property, which would automatically not be editable in the UI. It would also remove the need for conversion to a string. |
Beta Was this translation helpful? Give feedback.
Tiled 1.5 added support for creating images to the JS API, and @samhocevar has subsequently ported the tiled-pico8 plugin to JS.
I think this can now be done using
Tile.setImage
.At the moment there are not yet any "read only" o…