diff --git a/docs/.vitepress/config.mjs b/docs/.vitepress/config.mjs index 424915d..03690d9 100644 --- a/docs/.vitepress/config.mjs +++ b/docs/.vitepress/config.mjs @@ -71,8 +71,7 @@ export default defineConfig({ collapsed: false, items: [ { text: 'Supported Files', link: '/lync/project-format/files/supported-files' }, - { text: 'Script Directives', link: '/lync/project-format/files/script-directives' }, - { text: 'Init Scripts', link: '/lync/project-format/files/init-scripts' }, + { text: 'Scripts', link: '/lync/project-format/files/scripts' }, { text: 'Meta Files', link: '/lync/project-format/files/meta-files' }, { text: 'JSON Models', link: '/lync/project-format/files/json-models' }, { text: 'Excel Tables', link: '/lync/project-format/files/excel-tables' } diff --git a/docs/lync/getting-started/installation.md b/docs/lync/getting-started/installation.md index 176fd75..c8bf4b2 100644 --- a/docs/lync/getting-started/installation.md +++ b/docs/lync/getting-started/installation.md @@ -26,5 +26,5 @@ This feature is disabled by default. * To enable auto updates, run `LYNC CONFIG` and set `AutoUpdate` to `true`. * To change the update repository, run `LYNC CONFIG` and modify `AutoUpdate_Repo`. -## Lune Dependency for Building to File -[Lune](https://lune-org.github.io/docs/getting-started/1-installation) must be installed for building to file. You must specify the path to your Lune installation in the config file. To do this, run `LYNC CONFIG` and modify `Path_Lune`. +## Lune Dependency +[Lune](https://lune-org.github.io/docs/getting-started/1-installation) must be installed for building to file in `OPEN` and `BUILD` modes. You must specify the path to your Lune installation in the config file. To do this, run `LYNC CONFIG` and modify `Path_Lune`. diff --git a/docs/lync/index.md b/docs/lync/index.md index 1ff55f2..ff0efae 100644 --- a/docs/lync/index.md +++ b/docs/lync/index.md @@ -50,7 +50,7 @@ Lync uses Roblox plugin API to sync content. Similar file sync tools rely on par ::: tip DISCLAIMER Does not apply to `OPEN` and `BUILD` modes, which rely on [Lune](https://lune-org.github.io/docs) to build a place file. -See [getting-started/installation](/lync/getting-started/installation#lune-dependency-for-building-to-file). +See [getting-started/installation#lune-dependency](/lync/getting-started/installation#lune-dependency). ::: ### Open Source diff --git a/docs/lync/project-format/files/excel-tables.md b/docs/lync/project-format/files/excel-tables.md index 07b1118..12fdde1 100644 --- a/docs/lync/project-format/files/excel-tables.md +++ b/docs/lync/project-format/files/excel-tables.md @@ -1,4 +1,4 @@ -# Excel Tables ::: danger UNFINISHED This documentation is unfinished. ::: +# Excel Tables diff --git a/docs/lync/project-format/files/init-scripts.md b/docs/lync/project-format/files/init-scripts.md deleted file mode 100644 index ef0146e..0000000 --- a/docs/lync/project-format/files/init-scripts.md +++ /dev/null @@ -1,4 +0,0 @@ -# Init Scripts -::: danger UNFINISHED -This documentation is unfinished. -::: diff --git a/docs/lync/project-format/files/json-models.md b/docs/lync/project-format/files/json-models.md index c618911..9945da7 100644 --- a/docs/lync/project-format/files/json-models.md +++ b/docs/lync/project-format/files/json-models.md @@ -1,4 +1,6 @@ -# JSON Models ::: danger UNFINISHED This documentation is unfinished. ::: +# JSON Models + +## Syntax diff --git a/docs/lync/project-format/files/meta-files.md b/docs/lync/project-format/files/meta-files.md index 0bdee45..e934487 100644 --- a/docs/lync/project-format/files/meta-files.md +++ b/docs/lync/project-format/files/meta-files.md @@ -1,4 +1,35 @@ # Meta Files -::: danger UNFINISHED -This documentation is unfinished. -::: +Meta Files attach additional data to a file or directory. + +They are used in scenarios where it would be desirable to change the properties of something which otherwise cannot be changed from the filesystem. + +## Syntax + +### File Name +- `*.Meta.JSON` - For files. +- `Init.Meta.JSON` - For directories. + +### Keys +- string `className` - Changes the ClassName. Usable only with directories. +- table `properties` - A map of properties to set on the Instance. + +## Examples +The most common use case is changing the ClassName of a Folder. + +If your project has a directory and you want to change its ClassName, you will create a `Init.Meta.JSON` inside it with: +```json +{ + "className": "Configuration" +} +``` + +Another use case is changing the properties of a Model (`RBXM`/`RBXMX`). Because the file is encoded, it cannot have its properties changed directly. + +If your project has `foo.RBXM` (which contains a single Part) and you want to make it a different color, you will create a `foo.Meta.JSON` next to it with: +```json +{ + "properties": { + "Color": [ "Color3.fromRGB(82, 132, 145)" ] + } +} +``` diff --git a/docs/lync/project-format/files/script-directives.md b/docs/lync/project-format/files/scripts.md similarity index 62% rename from docs/lync/project-format/files/script-directives.md rename to docs/lync/project-format/files/scripts.md index 8408908..a897317 100644 --- a/docs/lync/project-format/files/script-directives.md +++ b/docs/lync/project-format/files/scripts.md @@ -1,5 +1,8 @@ -# Script Directives -Add Script Directives to the top of your script to control its [RunContext](https://create.roblox.com/docs/reference/engine/enums/RunContext) or to disable it. +# Scripts +Scripts can be formatted in a few different ways to change their representation in Roblox. + +## Script Directives +Add Directives to the top of your script to change its ClassName, control its [RunContext](https://create.roblox.com/docs/reference/engine/enums/RunContext), or to disable it. ::: info Script Directives | Directive | ClassName | RunContext | Behavior | |-|-|-|-| @@ -10,3 +13,8 @@ Add Script Directives to the top of your script to control its [RunContext](http | `--@localscript` `--@script:localscript` | [LocalScript](https://create.roblox.com/docs/reference/engine/classes/LocalScript) | - | Runs in legacy script containers dependent on the type of script. | | `--@disabled` | - | - | Determines whether the script will run or not. | ::: + +## Init Scripts +Any file ending in `Init.LUA` or `{parent directory's name}.Init.LUA` will change its parent directory to a script with the contents of the file. + +Like all directories, contents inside the parent directory will be parented to the script. diff --git a/docs/lync/project-format/files/supported-files.md b/docs/lync/project-format/files/supported-files.md index 73aa738..4f0c3f4 100644 --- a/docs/lync/project-format/files/supported-files.md +++ b/docs/lync/project-format/files/supported-files.md @@ -4,7 +4,7 @@ Different file types are synced into the place in different forms. All forms of Roblox content can be stored on the filesystem and synced. ::: info Supported Files -| Concept | File Extension | Roblox ClassName | +| Concept | File Extension | ClassName | |-|-|-| | Folders | any directory | [Folder](https://create.roblox.com/docs/reference/engine/classes/Folder) | Scripts | `LUA`/`LUAU` | [LuaSourceContainer](https://create.roblox.com/docs/reference/engine/classes/LuaSourceContainer) * | @@ -19,7 +19,7 @@ All forms of Roblox content can be stored on the filesystem and synced. | JSON Models | `*.Model.JSON` | Varies | | Excel Tables | `*.Excel.JSON` | [ModuleScript](https://create.roblox.com/docs/reference/engine/classes/ModuleScript) | -\* Can be [ModuleScript](https://create.roblox.com/docs/reference/engine/classes/ModuleScript), [Script](https://create.roblox.com/docs/reference/engine/classes/Script), or [LocalScript](https://create.roblox.com/docs/reference/engine/classes/LocalScript) depending on the script run context directive. +\* Can be [ModuleScript](https://create.roblox.com/docs/reference/engine/classes/ModuleScript), [Script](https://create.roblox.com/docs/reference/engine/classes/Script), or [LocalScript](https://create.roblox.com/docs/reference/engine/classes/LocalScript) depending on the Directives present. -See [project-format/files/script-directives](/lync/project-format/files/script-directives). +See [project-format/files/scripts#script-directives](/lync/project-format/files/scripts#script-directives). ::: diff --git a/docs/lync/project-format/project-file/automated-downloads.md b/docs/lync/project-format/project-file/automated-downloads.md index 473cf82..0c3dff0 100644 --- a/docs/lync/project-format/project-file/automated-downloads.md +++ b/docs/lync/project-format/project-file/automated-downloads.md @@ -1,4 +1,4 @@ -# Automated Downloads ::: danger UNFINISHED This documentation is unfinished. ::: +# Automated Downloads diff --git a/docs/lync/project-format/project-file/automated-jobs.md b/docs/lync/project-format/project-file/automated-jobs.md index 84bd271..0ca9884 100644 --- a/docs/lync/project-format/project-file/automated-jobs.md +++ b/docs/lync/project-format/project-file/automated-jobs.md @@ -1,4 +1,4 @@ -# Automated Jobs ::: danger UNFINISHED This documentation is unfinished. ::: +# Automated Jobs diff --git a/docs/lync/project-format/project-file/packages.md b/docs/lync/project-format/project-file/packages.md index e509aeb..6c02c9b 100644 --- a/docs/lync/project-format/project-file/packages.md +++ b/docs/lync/project-format/project-file/packages.md @@ -1,7 +1,7 @@ -# Packages ::: danger UNFINISHED This documentation is unfinished. ::: +# Packages ::: tip Complex expressions in property fields may not be supported by other tools, so when releasing packages made with Lync, avoid using math, non constructor functions, and Enums. diff --git a/docs/lync/project-format/project-file/project-file-syntax.md b/docs/lync/project-format/project-file/project-file-syntax.md index 5905e9a..04c17dd 100644 --- a/docs/lync/project-format/project-file/project-file-syntax.md +++ b/docs/lync/project-format/project-file/project-file-syntax.md @@ -1,4 +1,4 @@ -# Project File Syntax ::: danger UNFINISHED This documentation is unfinished. ::: +# Project File Syntax diff --git a/docs/lync/project-format/sourcemap.md b/docs/lync/project-format/sourcemap.md index 5c46446..ccae9c6 100644 --- a/docs/lync/project-format/sourcemap.md +++ b/docs/lync/project-format/sourcemap.md @@ -1,4 +1,4 @@ -# Sourcemap ::: danger UNFINISHED This documentation is unfinished. ::: +# Sourcemap