StarDB for Java

A port of StarDB to Java to read Starbound's database files.

License

License

MIT
Categories

Categories

Net
GroupId

GroupId

net.krazyweb
ArtifactId

ArtifactId

stardb4j
Last Version

Last Version

1.1.2
Release Date

Release Date

Type

Type

jar
Description

Description

StarDB for Java
A port of StarDB to Java to read Starbound's database files.
Project URL

Project URL

https://github.com/KrazyTheFox/StarDB-for-Java
Source Code Management

Source Code Management

https://github.com/KrazyTheFox/StarDB-for-Java

Download stardb4j

How to add to project

<!-- https://jarcasting.com/artifacts/net.krazyweb/stardb4j/ -->
<dependency>
    <groupId>net.krazyweb</groupId>
    <artifactId>stardb4j</artifactId>
    <version>1.1.2</version>
</dependency>
// https://jarcasting.com/artifacts/net.krazyweb/stardb4j/
implementation 'net.krazyweb:stardb4j:1.1.2'
// https://jarcasting.com/artifacts/net.krazyweb/stardb4j/
implementation ("net.krazyweb:stardb4j:1.1.2")
'net.krazyweb:stardb4j:jar:1.1.2'
<dependency org="net.krazyweb" name="stardb4j" rev="1.1.2">
  <artifact name="stardb4j" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.krazyweb', module='stardb4j', version='1.1.2')
)
libraryDependencies += "net.krazyweb" % "stardb4j" % "1.1.2"
[net.krazyweb/stardb4j "1.1.2"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

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!

Versions

Version
1.1.2
1.1.1
1.1.0
1.0