Routing Rules
Learn how Rogen routes files using File Names, Marker Files, and Folder Names.
Rogen uses naming rules to send files into correct Roblox service containers like ServerScriptService or StarterPlayerScripts.
There are 3 primary ways to route code: Folder Names, File Names, and Marker Files.
Folder Names
Name a folder after a routing keyword (server, client, shared) or a specific Roblox service, and all files inside it inherit that destination.
- Naming a folder
clientsends files toStarterPlayerScripts. - Naming a folder
ReplicatedFirstmaps exactly to that service.
Rogen will consume these folders and strip them from the final path but not its contents.
File Names (Affixes)
To route a specific file differently than its parent folder, use a routing prefix or suffix like so:
CombatClient.luauroutes toStarterPlayerScripts.Combat_Server.luauroutes toServerScriptService.Combat-ReplicatedFirst.tsroutes toReplicatedFirst.
The formatting is as follows:
- Use separators like dots, hyphens, underscores or plusses (
.,-,_,+). - Prepend or append keywords using CamelCase or PascalCase.
Moreover, the routing keywords are stripped from the final script name.
Marker Files
Place an empty file named after a service (like .server or .client) inside a directory.
This routes the entire folder to that service.
Unlike folder names, marker files preserve the original folder name in the final tree.
The Deepest Rule Wins
When multiple rules apply to a single path, Rogen always prioritizes the deepest specific routing rule. File names represent the final level in any path. Because of this, file name routing always overrides folder routing.
Default Fallback
If no routing rule is applied anywhere in a file's path, Rogen automatically
places it in ReplicatedStorage.