Skip to main content

File Types

Argon supports various file types, here is how they are transformed into Roblox instances!

Overview

File TypeFile Name
Folderany directory
Server Script*.server.lua / *.server.luau
Client Script*.client.lua / *.client.luau
Module Script*.lua / *.luau
XML Model*.rbxmx
Binary Model*.rbxm
JSON Model*.model.json
JSON Module*.json
TOML Module*.toml
MessagePack Module*.msgpack
Plain Text*.txt
Localization Table*.csv
Project*.project.json
Data File*.data.json / .data.json

Instances with Children

All mentioned file types can contain children. To do so you have to create a folder with the desired name and add .src or init file with the suffix based on the desired file type inside that folder. The only exceptions are: Project whose immediate children are ignored and Data File which is used to describe instance. Here are some examples:

Instance + Children

FilesystemRoblox

(Instance + Data) + Children

FilesystemRoblox

Instance + (Children + Data)

FilesystemRoblox
danger

Only one .src / init file and one .data / init.meta can be present in the same folder!

Folder

Any directory on the filesystem will turn into a Folder instance with the same name. It is possible for a directory to contain certain files that change what the directory turns into described above.

Scripts

Files with lua or luau extensions are transformed into the corresponding Roblox script instances:

  • Any file ending in .server.lua(u) will turn into a Script instance
  • Any file ending in .client.lua(u) will turn into a LocalScript instance
  • Any other .lua(u) file will turn into a ModuleScript instance
tip

You can disable scripts by adding --disable comment at the very beginning of the script source without needing to create special Data File only for this property!

note

If the project has legacyScripts setting disabled:

  • .server.lua(u) will turn into a Script with a Server run context
  • .client.lua(u) will turn into a Script with a Local run context

Roblox Models

Both binary (rbxm) and XML (rbxmx) models generated by Roblox Studio and other tools are supported. They get seamlessly integrated with the project tree.

Property type support chart

Type support chart loading...

JSON Model

File ending with .model.json is used to describe multiple instances in a single file or to conveniently describe single but more complex one like Part. Example JSON model named Coin.model.json:

{
"ClassName": "Part",
"Properties": {
"Size": [2, 2, 2]
}
"Children": [
{
"Name": "Input",
"ClassName": "ClickDetector",
},
{
"Name": "Send",
"ClassName": "RemoteEvent"
}
]
}

Would be turned into these instances:

JSON Module

Any file with the json extension that is not a JSON Model, Project File, or a Data File will be turned into a ModuleScript that returns a table representing the same structure as the JSON file. Example JSON file:

{
"string": "abc",
"bool": true,
"array": [1, 2, 3],
"object": {
"int": 1337,
"float": 4.2
}
}

Would become a ModuleScript with the following Source:

return {
["string"] = "abc",
["bool"] = true,
["array"] = {1, 2, 3},
["object"] = {
["int"] = 1337,
["float"] = 4.2,
}
}

JSON files are a great way to store bulk data (e.g. asset IDs) in a human-readable format.

TOML Module

Any file with the toml extension will be turned into a ModuleScript that returns a table representing the same structure as the TOML file. Example TOML file:

string = "abc"
bool = true
array = [1, 2, 3]

[object]
int = 1337
float = 4.2

Would become a ModuleScript with the following Source:

return {
["string"] = "abc",
["bool"] = true,
["array"] = {1, 2, 3},
["object"] = {
["int"] = 1337,
["float"] = 4.2,
}
}

Due to the easy to read and edit format of TOML, it can be convenient to use them as configuration files.

warning

There is a single limitation for TOML files: DateTime values are converted into string ones because Luau does not have a good representation of this data type.

MessagePack Module

Any file with the msgpack extension will be turned into a ModuleScript that returns a table representing the same structure as the original file. MessagePack is a binary format so it's fast and small but it's not human-readable. It is great for storing large amounts of data that don't need to be edited by hand.

Plain Text

Any file with the txt extension is transformed into a StringValue instance with its Value property set. Example:

Hello world!

Localization Table

Any file with the csv extension is transformed into a LocalizationTable instance. You should follow this Roblox format:

Key,Source,Context,Example,pl
Wow,Wow!,,An expression of surprise,Łał!

Project

File ending with .project.json is considered project which describes how the underlying instance tree should look like and how files should be processed along the way. You can learn about its format on the Project page.

If a directory contains a file named default.project.json, the contents of the project file will be used instead.

danger

Projects that are intended to be included inside other projects should describe models, not places!

Data File

File ending with .data.json is considered data file which can specify:

  • className: Sets the ClassName of a containing Folder instance
  • properties: A map of properties to apply on the instance
  • keepUnknowns: Whether children that Argon doesn't know about should be deleted

This page is based on Rojo's Sync Details as Argon processes files in a very similar way.