Skip to content

A Go package for dealing with Roblox files.

License

Notifications You must be signed in to change notification settings

RobloxAPI/rbxfile

Repository files navigation

GoDoc

rbxfile

The rbxfile package handles the decoding, encoding, and manipulation of Roblox instance data structures.

This package can be used to manipulate Roblox instance trees outside of the Roblox client. Such data structures begin with a Root struct. A Root contains a list of child Instances, which in turn contain more child Instances, and so on, forming a tree of Instances. These Instances can be accessed and manipulated using an API similar to that of Roblox.

Each Instance also has a set of "properties". Each property has a specific value of a certain type. Every available type implements the Value interface, and is prefixed with "Value".

Root structures can be decoded from and encoded to various formats, including Roblox's native file formats. The two sub-packages rbxl and rbxlx provide formats for Roblox's binary and XML formats. Root structures can also be encoded and decoded with the json package.

Besides decoding from a format, root structures can also be created manually. The best way to do this is through the declare sub-package, which provides an easy way to generate root structures.

Related

The implementation of the binary file format is based largely on the RobloxFileSpec document, a reverse-engineered specification by Gregory Comer.

Other projects that involve decoding and encoding Roblox files: