By "function," I meant that the map archive should contain text documents with some kind of narrative text (like in the case of MessageBox), or perhaps, I don't know, just pieces of script, and this text document performs the function, excuse the tautology, of a function.
Almost all game resources are in data/data.pak. Everything you put inside the map will also be added to the resources. The root of the map is the path "/". That is, if something is inside the map in the folder foobar, it will be accessible as "/foobar/...". If the editor doesn't allow you to edit the path somewhere, you can always open map.xdb in a text editor and change the path manually (at your own risk).