Verse Code Style Guide doesn't cover File Naming?

So, I’ve been looking through the Verse style guide here:

And I find that I don’t really have a good answer as to how to name my files. I’m building in a file-per-device structure, which conflicts with the Digests provided by Epic. I also have an issue in that I can’t really use any kind of directory structure with my devices. Moving them out of the root directory seems to break everything. Anyone have a hint on how to do this or is it simply not supported?

Hi @Nooberling :

There was a bug that caused creative devices defined in Verse submodules not to show up in the Content Browser. This has been fixed internally and will be made available in an upcoming release.

As an aside, the Verse digests aren’t meant to be an example of how you should structure your .verse files; they are provided more as a reference of the APIs currently available. You can think of them as similar to a combined set of C++ header files. We still encourage you to organize your project in a way that makes sense for your project; it doesn’t need to adhere to the “everything in one .verse file” approach that the digests take, as we have bespoke tooling to generate those digests internally.

Is that even possible? As far as I remember from the tests I run at some point, Verse wants to interpret every folder as another (sub-)module. This does not play along with the previous statement of yours.

.../Content/Foo/Bar/MyScript.verse

I possibly only want Foo to be an actual module, but Bar just a folder for some organization and file grouping.


One thing I failed to achieve was to move all verse scripts into a folder structure one level deeper to not mix them with other game related files. Furthermore to split those files into smaller submodules. The goal here was to convert those sub-modules into standalone git repositories and pull those into the same folder structure into projects that needs to share the same code bases.

I really hope that the mentioned bug fix will possibly make things easier. Please provide an exhaustive list of bug fixes or new features with the release notes, or otherwise we will never known when critical bug fixes potentially landed. Thank you. :slight_smile:

When I search for “Submodule,” on Google via

site:dev.epicgames.com verse submodule

I get literally one page. Verse Explorer User Interface

I try not to complain, but it seems not particularly well documented that the directory structure and compilation have intertwined variables. If there’s good documentation publicly available - either on this site or on another - it would be nice if said site was well crawled. Anyways.

Sorry for the really late reply here:

I possibly only want Foo to be an actual module, but Bar just a folder for some organization and file grouping.

Currently, all directories on-disk are treated as implicit Verse modules. In your case, are you saying that you’d like to be able to access, say, a module m1 defined in /Content/Foo/Bar/TestScript.verse by using Foo.m1, rather than Foo.Bar.m1? We currently disallow this since you could introduce ambiguity fairly easily if you then had /Content/Foo/Bar and /Content/Foo/Baz folders, each with the same TestScript.verse that defines the same m1 module - we’d like to know more about your specific use case.

I try not to complain, but it seems not particularly well documented that the directory structure and compilation have intertwined variables. If there’s good documentation publicly available - either on this site or on another - it would be nice if said site was well crawled. Anyways.

A bit late, but there is a tiny blurb about this in the documentation:

When you create a subfolder in a Verse project, a module is automatically created for that folder. For example, if base_module was defined in a folder module_folder, then module_folder would have its own module that contains base_module.

We definitely need to improve the search-ability of the documentation in general, though.