Regular use
The regular work cycle in a fully managed Rojo project generally involves the following steps:
- Save the place file
- Unpack the place file into different models
- Build or serve the place file with Rojo
- Repeat
With Rostar, this process is the same, but is much simpler to execute.
Extracting instances from a place
To extract models and/or scripts from a place file, the following command is used:
rostar unpack ./Path_To_Place_File.rbxl
or to extract from a place id:
rostar unpack 12345678
If unable to extract from a place id, Remodel might not be able to authenticate properly. In some cases, a REMODEL_AUTH
environment variable might need to be set. For example (on Linux and MacOS):
export REMODEL_AUTH="<Insert Roblox cookie>"; rostar unpack <Place id>
By default, the unpack command generates a folder structure that tries to replicate the structure of the Roblox DataModel. ModuleScripts, LocalScripts, and Scripts are placed in .lua
files (wherever possible), and other instances are placed in rbxm or rbxmx files.
DataModel/
ServerScriptService/
Code/
init.server.lua
someModule.lua
ReplicatedStorage/
Shared/
someModule.lua
ServerStorage/
someModule.lua
Workspace.rbxm
Lighting.rbxm
SoundService.rbxm
...
By using --assets-directory <Folder name>
as an argument to the command, scripts and model files can be in separate directories.
Extracting models only
rostar unpack ./Path_To_Place_File.rbxl --no-lua
If Rostar is only used for extracting models, --no-overwrite-project
should be used as well for preserving the existing script paths. Edits to the project file might be needed if new directories are added. More on this in the Rojo-first workflow article.
Extracting scripts only
rostar unpack ./Path_To_Place_File.rbxl --no-models
Building the place file
The place file can be generated by running:
rostar pack OutputPlaceFile.rbxl
rostar pack
can be run by itself if a file named after the name
property from the project file should be outputted.
This is virtually equivalent to running:
rojo build --output OutputPlaceFile.rbxl
Tips
To run a command every time your place file changes, the nodemon
utility package can be used. After installing it with npm i -g nodemon
, it can be set up so unpacking runs every time the place file changes:
nodemon -w StudioPlace.rbxl --exec rostar unpack StudioPlace.rbxl