convert folder (or .zip) to .pyxel file/archive
Hello everybody,
first of all @Danik thank you very much for creating Pyxel Edit. I really enjoy using it and it helps me a lot for my game development

To my question: Is there a way to convert a .zip archive to a .pyxel file/archive?
I know its possible to convert .pyxel archives to .zip archives by simply changing the file extension but I also need it the other way around. Simple renaming didn't do the job and when I try to create an archive with compressing program called WinRar (on Windows) a change the extension to .pyxel I get the following error when opening on Windows:

And on MacOS:


And on MacOS:

I'm asking because I use Pyxel Edit on my desktop PC and from now and then Pixaki on an iPad. So far, there is no way to transfer a file between both programs, which also contains the information of the layers.
Regarding Pixaki I get a similar setup but with a .plist file instead of an .json file. I found a simple python script:
https://sourceforge.net/projects/plist2json/
to convert a .plist to a .json file and vice versa. So my workflow (Pixaki --> Pyxel Edit) is as follows:
- Getting the .pixaki file --> renaming it to .zip
- unpacking the .zip
- convert the invluded .plist file to .json
- pack the folder to a .zip archive
- ??? would like to transfer .zip to .pyxel ???
All the best,
Bredjo
Comments
Are you packing the folder or the content of the folder? if you're doing the former, then that's most likely your problem. I've tried on mac os using "Keka" and I was able to zip the content, change the extension to .pyxel and load the file without issues.
I packed the folder and I'll tried it with packing the content instead after I read your post but it didn't work either. The Error is still the same. But if you say this should work in principle, I will take a closer look into the python script. Thank you very much for your help
That means you could add the .png files and add the corresponding entry in the .json file as a temporary solution. Depending on the number of .png files this is quiet tedious and but than of course you lose all other preferences like your color palette.
If someone is interested, following the code snippet as example you need to add for each .png (layer) to the .json file:
"numLayers": 1,
}
Place this code after the "tileHeight": 360, property and adjust the "numLayers" according to the number of layers/.png files you have)