Workflow with Rojo and scripts inside of tools

Hello,

First of all, I’m kind of new to using Rojo, so if there’s a simple solution to my issue that I simply missed I apologize in advance :slight_smile:

Is there a way to sync tools from StarterPack and the scripts nested inside of them to GitHub through Rojo? I’m currently working on a fork for F3X Build Tools for my experience, but I find myself often having to use the standard script editor inside of Studio when I have to modify things in said tool.

What I thought of so far

From my understanding, I could simply add the path for StarterPack inside of default.project.json , but besides that I don’t really see how I could properly sync the tool with Rojo. Also, doing this might end in StarterPack getting cleared by Rojo (in a similar way to how ReplicatedStorage might get overwritten unless you set it up properly)

Anyone else ever do this before?

rojo is solely used for syncing ur repository to the game, so ur going to use git to communicate between ur repository to the api end point (github in this case)

so u need a github account + git, u use ur github token (username & email) to allow perms for github to pull / push through 2 commands:

git config --global user.name "your name on github"
git config --global user.email "your email on github"

i’ll assume u want to use vs code, but if not, you will have to use terminal to push / pull changes to ur github repository.

to sync tools from starterpack and scripts, u just need to setup ur rojo default.project.json / project json, which is ur repository tree that u need to configure manually. so, where ur services and folders are located in ur repo, u need to route it to a path in roblox explorer. an example:

{
  "name": "myProject",
  "tree": {
    "$className": "DataModel",
    "ReplicatedFirst": {
      "$className": "ReplicatedFirst",
      "$ignoreUnknownInstances": true,
      "$path": "src/ReplicatedFirst"
    },
    "ReplicatedStorage": {
      "$className": "ReplicatedStorage",
      "$ignoreUnknownInstances": true,
      "$path": "src/ReplicatedStorage",
      "Packages": {
        "$path": "Packages"
      },
      "Hooks": {
        "$path": "src/Hooks"
      },
      "Components": {
        "$path": "src/Components"
      }
    },
    "ServerScriptService": {
      "$className": "ServerScriptService",
      "$ignoreUnknownInstances": true,
      "$path": "src/ServerScriptService"
    },
    "ServerStorage": {
      "$className": "ServerStorage",
      "$ignoreUnknownInstances": true,
      "$path": "src/ServerStorage"
    },
    "StarterPlayer": {
      "$className": "StarterPlayer",
      "StarterCharacterScripts": {
        "$className": "StarterCharacterScripts",
        "$ignoreUnknownInstances": true,
        "$path": "src/StarterPlayer/StarterCharacterScripts"
      },
      "StarterPlayerScripts": {
        "$className": "StarterPlayerScripts",
        "$ignoreUnknownInstances": true,
        "$path": "src/StarterPlayer/StarterPlayerScripts"
      },
      "$ignoreUnknownInstances": true
    }
  }
}
1 Like

Thank you for explaining the process properly. I did set up Git through GitHub, I just wasn’t familiar with the proper terms for this ecosystem.

So, basically, there’s no real alternative to setting up the default.project.json manually?

Again, I have 2 main concerns with this:

  1. I’d have to set up StarterPack manually for every change I make during testing, or otherwise I might wake up with everything wiped and restored to a previous version described in said file.

  2. I mainly would like to sync F3X Build Tools, which has around 144 children nested inside of it (this does include some modules such as Roact which I could try to move in ReplicatedStorage, but a lot of these children aren’t really changeable without a lot of modifications to the scripts).

I was mainly looking for a possible solution to automatically sync such an instance with tons of children, if any exist. (Some sort of Roblox Instance to JSON converter)

yeh no problem haha

there is a deprecated software that the rojo devs released, its on the rojo github documentation:

so u just follow the instructions there to get a generated project.json, but would still advise to doublecheck it. it did delete a lot of my work, so it’d be best to do it in a copied version of ur main code

yeh since rojo doesn’t have hot-reload, ur changes during play-test will not reflect unless u copy the changes and apply them after stopping. there is a framework that allows u to hot-reload, but it’s no longer being worked on + it bulks up ur code + it takes a long time to set up

i have no experience with f3x, but if it’s a package, u might have to route it to a different directory like rep-storage, otherwise, u can try to route it where it is from ur project.json

and lastly, it seems that ur trying to sync instances, are u referring to parts and other roblox types? rojo can only sync scripts

1 Like

I did mark this as a solution because it might be useful in other instances. Thank you!

However, ROJO not being able to sync other instances means that F3X is effectively incompatible, as it stores a whole lot of UI elements inside of it. Also, there are a few BindableFunctions and Value objects.

image

There’s also the Handle itself and the Tool instance.

1 Like

hmm, well i think a possible solution for interface objects is to convert it to code, and i dont wanna bring up my favorite interface framework… but it’s really good for what u need here

ReactLua

and u would use a roblox plugin called Codify, which converts it to code. it’s not free

otherwise, u can write up a script that takes each object’s properties and writes a new script / prints them, then u can use that data to generate ur interface when u start the game

1 Like

I did consider trying to convert the tool to make it compatible. It’s using Roact, which to my understanding became kind of obsolete and is now abandoned, so a conversion might be useful for the future anyhow.

However, I am just getting started with Rojo and ReactLua (which you mentioned), so I don’t think I’m ready for such a feat just now.

I’m also not sure if F3X has been abandoned or not, but I do know it’s still pretty relevant to a lot of people. A conversion to a Rojo compatible format and a public repo on GitHub would do wonders to keep this very important (imo) project alive. Maybe something for to do in future…

Apparently it’s not abandoned and there’s an official GitHub repo that still gets updates. I’ll probably try to use that for my own fork anyhow.

1 Like

i see, well u can always scrape their github repo and see what puts together the ui + event handling for just about anything:

roact to reactlua is a pretty easy update, they made documentation on how to get this done. u can also look on youtube

roact is deprecated yet it still works, but the change to reactlua will save u headache from future broken features

1 Like

and i would use AI to convert ur roact to reactlua

1 Like