Skip to content

Starbases

A starbase is where fleets dock, cargo is stored, and crafting happens. The SDK splits it in two, and knowing which half you want saves confusion.

  • The starbase itself — where it is, what level it is — is shared infrastructure and belongs to world.
  • Your state at that starbase — your cargo, your escrowed ships, your upgrades — is yours, and lives here.
const bases = await character.starbases.all();

Or directly, when you know the system:

const base = await sage.starbases.forCharacterAtSystem(
characterAddress,
systemAddress,
);

A character can have state at many starbases, or none. A character who has never docked anywhere returns an empty array, which is a valid answer rather than a failed read.

Cargo. What you have stored there, as StarbaseCargoInventory. This is distinct from what a fleet is carrying — cargo moves between the two, and reading one tells you nothing about the other.

Escrowed ships. Ships you own that are held at the starbase rather than assigned to a fleet.

Respawn state. Where destroyed ships come back.

Upgrades in progress. Starbase upgrades take real time, so an upgrade is a process with a lifecycle rather than an instant change:

const upgrades = await base.upgrades.all();

Starbase cargo and fleet cargo are different accounts. Loading a fleet does not change what the starbase holds, and vice versa. If you are tracking totals, you need both.

A starbase you have never used has no player state. The starbase exists in the world; your state at it does not. That is why the read can legitimately come back empty.

Upgrade timing is derived. Completion times come from the process state plus the Game account’s definitions, not from a stored timestamp you can read directly.

  • starbases — every export in this entry
  • world — the starbase as shared infrastructure
  • crafting — what happens at a starbase’s habs