This is a library to parse Starbound's file formats, SBBF02 and SBVJ01,which are used to store worlds, player characters, assets, etc.
Feel free to contribute either via submitting pull requests or writingup issues with suggestions and/or bugs.
Repairing broken worlds (.fail files)
Note: It's always better to back up your
.world
files atregular intervals. This tool is only meant to be a last resort if youlost your world completely. It might only be able to recover parts ofa world, and if the metadata is corrupt, your world might not workproperly in the future.To repair a failed world, try to run this command to see if it works:
If that works, then you can overwrite the new world file that Starboundcreated (after your world failed) with
repaired.world
.If it fails to load the metadata section, then you can have the repairscript pull in the metadata from another world. It's highly recommendedthat you only use either another
.fail
file of the same world, or thenewly created .world
file that Starbound creates when a world fails.Starbound's 2 Year Anniversary! Today is a special day for the team here, as it marks Starbound’s (official) 2 Year Anniversary since 1.0 and the game’s full release on Steam. Since then we’ve had a few major updates (woo Mechs!) and are looking ahead to the future of Starbound, including the upcoming Xbox One release. Starbound's 2 Year Anniversary! Today is a special day for the team here, as it marks Starbound’s (official) 2 Year Anniversary since 1.0 and the game’s full release on Steam. Since then we’ve had a few major updates (woo Mechs!) and are looking ahead to the future of Starbound, including the upcoming Xbox One release.
Here's how:
Using the command line interface
The command line interface will let you inspect various Starboundfiles.
Getting metadata from world or player files
Use the
--get-value
option to retrieve a metadata value. Example:Another example for getting the name of a player:
Inspecting Starbound packages
Starbound packages are essentially sets of packed (but uncompressed)files. Here's how to get the contents of a file in a .pak package:
You can also get the list of the files in a .pak file:
Using the Python package
The easiest way to get started with the package is to use the helperfunction
open_file
:The
open_file
function will look at the file extension and choose theappropriate file format as well as parse additional metadata about thatfile type. To be more specific, you can use the file type classes:Extracting .pak
files
You can use the
export.py
script to extract all the files in a .pak
(or .modpak
) file.Example:
Getting world data
If you want information about a region in a world (planet or ship), youcan use the
region.py
script. For example, here's how to pretty printthe tiles in a region:Outputs something like this:
If you don't provide X and Y coordinates after the path, it willdefault to the region that the spawn point is in.
You can also output specific tile values (instead of the foreground)using
--value-index
(or -v
):Outputs something like this:
And here's how to print the entities in a region: