How do I make a RBXM parser/reader?

Hello! I want to be able to parse a RBXM into a readable format. Have you ever noticed the crazy letters if you opened a RBXM in notepad? How would I decode those letters. I tried looking this up on google, and came across Roblox Binary Reader By Kat Digital.There are a couple problems with this, however. First problem is that it needs to be a file with headers. I can’t just copy the text in the RBXM and paste it as a string. All I want to do is make a RBXM string into a RBXMX string. Any ideas?

3 Likes

Stravant has a github repository which can read and write to RBXM/RBXL files iirc

2 Likes

It’s much easier to save the files as a .rbxlx and then using a package like xml2js to convert the XML syntax to a JSON

@zachariapopcorn
Yes, saving it as a .rbxlx would be much easier, but there is a problem. I want to use Asset Delivery API to get the rbxm data. Can I somehow use it to get the rbxmx data? Also, xml2js would NOT work because I want to code this RBXM reader in Lua.

@PapaBreadd
Is it made in Lua? If so, I can’t find it.

trying to figure this out aswell but sadly i cant find any results, which is strange because someone shouldve been able to do it by now.

Yeah, I would’ve liked this too.

https://github.com/metatablecat/lxm

This module lets you do this

Also here is unofficial documentation
http://dom.rojo.space/binary.html

I’d suggest taking a look at lune, which contains a library for manipulating roblox place and files (which includes deserialization of rbxm files)

Lune is a luau runtime, for running luau code outside of Roblox, while adding libraries like the task library from roblox, or a file library (that somewhat replaces parts of the os library removed from luau)

1 Like

hey umm ik im late but I found an rbxmreader in one of my old projects
its not made by me but it works pretty well
rbxmreader.rbxm (14.5 KB)