How do I make an exportable and loadable file for a level editor that supports custom files

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By purplfish

I am currently making a 2d platformer on godot engine with a built in level editor.

The goal is to make it a single file (no need to put stuff in folder) that contains the scene info and custom scenes (probably in form of pkg files). I am making an in game level editor and trying to figure out how to export as such.

Ive tought about exporting and loading tscn but that doesent get custom assets, ive tried to export the whole map as a godot pkg file but that doesent seem to work.

And now im trying to see if I can perhaps make my own filetype to import into godot but I dont see how.

My original plan was to make zip files but unfortunally there isnt an easy way to load zips on the fly and its impossible to directly compress them.

So I’m at a lost and there’s barely any ressource on this. So any help would be greatly appreciated.