Rojo With Models (and also Continuous Deployment)

Goal:

My goal is to convert my workflow completely to Rojo where I can push my changes from VS Code to a Github master branch that will use Github Actions to run a script which uses the Rojo Upload command to publish the place automatically for me. So basically I want the game’s entire update process to be automated.

Issues:

  • Model files, currently if you want to upload model files using Rojo they need to be converted to .rbxmx files and put into the project hierarchy. Doing this manually would obviously not be automated, so I ended up stumbling across Remodel which can convert all your models automatically for you. This brings me to my next issue…

  • It turns out that somewhere in those two processes of Rojo Upload and Remodel, any UnionOperation in the game gets corrupted, and so the map looks like it has a bunch of holes and invisible parts in it. I could convert all the unions to MeshParts, however this would be a fairly long and tedious process.

  • Another side issue I came across with Remodel is the .readPlaceAsset() API throwing an error, if you know anything about this, please let me know…

local game = remodel.readPlaceAsset("5154240477")
local Models = game.ReplicatedStorage.Assets
remodel.createDirAll("Temporary")

for _, model in ipairs(Models:GetChildren()) do
  remodel.writeModelFile(model, "Temporary/" .. model.Name .. ".rbxmx")
end

Ideal Result:

  1. Make changes in VS Code
  2. Push and merge changes to master branch in Github
  3. Github Action triggers deployment script
  4. Deployment script looks something like this…
remodel run LoadLevelModels.lua -- This loads all Level's current models into the Rojo project
remodel run LoadLobbyModels.lua -- This loads all Lobby's current models into the Rojo project

rojo upload Level/Level.project.json -- Publish Level place to Roblox
rojo upload Lobby/Lobby.project.json -- Publish Lobby place to Roblox

Does anyone have any recommendations or things that could help me in this process?

3 Likes

Sorry for pulling this topic back up, but I am having the same issues with setting up rojo and VSCode. Ideally I would have everything of my game stored on the file system: code, models, decals, etc. (and on github), but I have no idea how I would convert my existing project with all it’s models and scripts and everything else to the filesystem. Any help is greatly appreciated!

This topic isn’t really about the conversion of a roblox file to rojo, but rather the automation of that process in order to create an automatic deployment.

That being said, this will likely help you in converting your project file… GitHub - rojo-rbx/rbxlx-to-rojo: Tool to one time convert Roblox places to Rojo projects

That program only converts the scripts of an rbxlx file to lua files. I got rojo syncing scripts to studio, but I wondered if it would be possible to also convert models and put them on the filesystem/github.

You need to store models as .rbxmx files inside of your rojo project which as far as I have found can’t be automated and must be done manually. For something like a map you would want to store it as one big file. Sadly this would need to be exported and updated every time you make any changes.

Okay, thanks. Then I think I’m going to keep only syncing scripts. Doing this for every model would take way to long. Thanks for your reply!