How can I access custom file formats (like "xyz.savedata") in an exported game project?

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

When I export my game, none of the files that are in custom data formats are being noticed by the exported project. (Like *.creature or *.hazards)

Each custom file is a single string: a dictionary that was created via var_to_str. I used FileAccess.WRITE and FileAccess.READ to create and load these when testing.

Is there something I am missing about how to make these custom files export properly, or be used outside the editor?

Any help is greatly appreciated.

:bust_in_silhouette: Reply From: jgodfrey

You can include “non-resource” files in an export by adding the necessary file extensions to the export dialog. Specifically, in the Export dialog:

  • Select the Resources tab
  • Add your file extensions to the Filters to export non-resource files/folders section

Thank you sir! That was a very simple fix to include them.

Is there a similarly easy solution for being able to access these files?

ResourceLoader wants Objects like *.tres — and I am not even sure what kind of Object my files are.

jerryjrowe | 2023-05-16 10:27