How to create a file in the shape of a package and other questions

Just like the native files of let’s say Automator or Keynote are packages (i.e. folders containing files that behave like a double-clickable file), I would like to create a file from within my Applescript Studio environment that behaves like that.
Is that possible?
If so, do I need to create a “Applescript Document-Based Application”? If I started off as a “Applescript Application”, how do I convert it into the document-based one?