Documentation: 0.5.0 (source: v0.5.0).
# Crafting habs

> Player-owned production facilities at starbases — buildings, job slots, modifiers, and rent.

Markdown source of https://docs-v0-5-0.atlas-kit-docs.pages.dev/guides/crafting-habs/ — see https://docs-v0-5-0.atlas-kit-docs.pages.dev/ai/ for the full machine-readable surface.

A crafting hab is a player-owned production
facility deployed at a starbase. [Crafting](/guides/crafting/) covers the
recipes and the processes that run; this guide covers the facility itself —
what it is built into, how that setup changes production, and what keeps it
alive.

## Reading habs

Habs hang off their owner:

```ts
const habs = await sage.craftingHabs.byCharacter(characterAddress);
const tiers = habs.map((hab) => hab.definition.tier);
```

`byProfile` and `byStarbasePlayer` exist for the other directions. A hab
snapshot carries its definition (name, tier, slots), its buildings, its state,
its production, and its rent — the whole facility in one read.

> **Runnable example — Read a crafting hab and its buildings.** A character's habs, with each hab's buildings, job slots, and modifiers. Run it in the browser at https://docs-v0-5-0.atlas-kit-docs.pages.dev/guides/crafting-habs/.

## Buildings are the setup

A hab starts as a plot; buildings are what make it produce. Each building in
`hab.buildings` occupies slots, wants crew, and carries its own modifiers —
and the hab's aggregate `modifiers` are what actually apply to production:

```ts
const habs = await sage.craftingHabs.byCharacter(characterAddress);
const setups = habs.map((hab) => ({
  buildings: hab.buildings.map((building) => building.definition.name),
  speed: hab.modifiers.speed.value,
  efficiency: hab.modifiers.efficiency.value,
}));
```

Two habs running the same recipe do not finish at the same time — the setup
decides. `speed`, `efficiency`, `fee`, and `crewCount` are the four dials.

## Capacity is jobs, not space

`hab.availableJobSlots` is the number this facility can still take on. A hab
in the middle of its work answers differently from an idle one, so read it
when scheduling rather than caching it with the definition.

## Rent keeps it standing

Like a [claim stake](/guides/claim-stakes/), a hab occupies land and pays for
it: `rentBalanceRaw` is what remains, `lastRentAtUnixSeconds` is when it was
last settled, and the definition's eviction grace period says how much slack
exists once the balance runs dry.

:::game[Deployments cost rent]
A crafting hab or claim stake is not bought once and owned forever — it
occupies land, and land charges rent. Keeping the balance topped up is part of
running the operation; letting it run dry eventually gets the deployment
evicted, and rebuilding after that takes a respawn. The two systems share this
machinery: habs and stakes are both deployed, built upon, rented, and
reclaimed the same way.
:::

## Gotchas

**A hab in `design` is a plan, not a facility.** Its state carries the
proposed buildings; nothing produces until the design is finalized and the
hab is `active`. The same three-state lifecycle as claim stakes applies:
`design`, `active`, `deactivated`.

**Construction takes time after placement.** `constructionRemainingSeconds`
is live state — a hab can exist, be active, and still be building itself.

**Production is a rate, not a total.** `hab.production` follows the same
pattern as [mining](/guides/mining/): net rates against a clock, with an
inventory and a last-tick time — compute the current amount, do not expect a
stored one.

## Reference

- [`crafting`](/reference/crafting/) — every export in this entry
- [Crafting](/guides/crafting/) — recipes and processes
- [Claim stakes](/guides/claim-stakes/) — the sibling deployment system
- [Council Rank](/guides/council-rank/) — where the right to build comes from
