Create .rblx file on a backend server and modify a script

I believe with mongodb you can give each value a key. So like 3745747 - placeid or something. You could maybe do like Name - ID

Exactly what you’re describing is possible, the problem is it might not be actually what you want.

If you save the place file as .rbxlx, you get a human-readable and uncompressed roblox place file, with all scripts, instances etc. spelled out clearly. You can then modify any scripts in the place file.
The annoying part is getting that change back into the game - you have to publish the place. At this point, you have to log into your account with the server, which leaves your account wide open to being stolen if your node server isn’t secure enough.

For “changing a string”, that’s way overkill.
Make a http request to your server. Your server should return the string that the game should use. Then do whatever you wanted with that string.
The script never changes, the script just queries the server first to know what the string should be.

Edit: You can get by without a node server if you store the string in a datastore and change that.
If getting that string involves querying Roblox APIs that httpservice won’t let you touch, such as if you want a group’s name or something, that’s when you would use a node.js server.

1 Like

What apis would I use to covert the .rbxlx file to a .rblx?

A .rblxlx file is already a valid place file and is accepted if you decide to publish it.
The reason why you’d need to convert a place to .rbxlx is because the .rbxl file format hasn’t been fully reverse engineered yet.

And no, there is no API for that. Absolutely none at all.
You have to either open the place in Studio and convert it between the formats, or publish the .rbxlx.

I just used this Rbxlx - A .rbxlx file parser for NodeJS and I managed to change the string. But since it is now parsed, how do I like reput it back into a normal .rbxlx file?

There is a library by @Maximum_ADHD written in C# which helps you deal with Roblox place files GitHub - MaximumADHD/Roblox-File-Format: A C# library designed to make it easy to create and manipulate files in Roblox's model/place file format..
It is not written in JS however you could translate it to JavaScript.

Also you could make a reverse parser with the source code of the parser you are using but that would be a bit complicated.

Also you probably should store the parsed version on your server and just compile it to a .rbxlx file instead of parsing the file multiple times and then compiling.

2 Likes

What‘s this? Wait, we really can use local servers?

The logistics of doing so might be a bit painful.

My implementation is mostly based on this spec, with additional features reverse engineered manually.

3 Likes

You can do this easily I know this is late but this should help you!

this is the backend code!

let rbxlxFile = fs.readFileSync("rbxlxFILEHERE").toString("utf-8")
                    rbxlxFile = rbxlxFile.replace("STRINGYOUWANTOREPLACE", "THEREPLACE")


                    

if you are using a discord bot (Which I am assuming) you can do this!

interaction.reply({
                        
                        files: [{name: `FILENAME.rbxlx`, attachment: Buffer.from(rbxlxFile, "utf-8")}]
                    })

ps: also make sure its a rbxlx and not a rblx

i suggest pming OP instead of bumping the topic 1 year later

thank you for having common sense unlike me

1 Like

you are not alone i don’t have common sense either