Skip to content

TinyWolfGirl/StarDB-for-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StarDB for Java

A port of the Python library for manipulating Starbound database files to Java. The code is loosely based on yuedb, which is written by one of the Starbound developers and is what the DB code in the game is based on as well.

Currently StarDB only supports read operations, but write operations may be added in the future.

Now available through the Maven Central Repository! Just add the following to your pom.xml:

<dependency>
    <groupId>net.krazyweb</groupId>
    <artifactId>stardb4j</artifactId>
    <version>1.1.2</version>
</dependency>

Usage

First, open the database file:

AssetDatabase db = AssetDatabase.open("D:/Games/Steam/steamapps/common/Starbound/assets/packed.pak");

Alternatively, use a Path:

AssetDatabase db = AssetDatabase.open(Paths.get("D:/Games/Steam/steamapps/common/Starbound/assets/packed.pak"));

You can then grab individual assets from the database as byte arrays:

System.out.println(new String(db.getAsset("/player.config")));

You can also get a List of each file in the database as well as all broken files:

System.out.println(db.getBrokenFileList()); //This currently returns an empty set, as there are no known bugs preventing reading data.
System.out.println(db.getFileList());

Current Issues

No known bugs!

About

A port of the Python library (StarDB) for manipulating Starbound database files to Java.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages