> For the complete documentation index, see [llms.txt](https://create-deep-seas.gitbook.io/create-deep-seas-wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://create-deep-seas.gitbook.io/create-deep-seas-wiki/deep-seas/mechanics/diving-and-surfacing.md).

# Diving and surfacing

A submarine does not float or sink on its own weight. Its depth is driven by its ballast: the more sea water in the tanks, the faster it goes down.

## The ballast

The ballast is every [Submarine Ballast Tank](/create-deep-seas-wiki/deep-seas/diving/ballast-tank.md) on the submarine. Each tank holds 8 buckets of water. The submarine reacts to the fill level of the whole ballast:

| Ballast   | What the submarine does |
| --------- | ----------------------- |
| Empty     | climbs at full speed    |
| Half full | holds its depth         |
| Full      | dives at full speed     |

Anything in between gives a speed in between. A ballast at 75% dives at half speed, one at 25% climbs at half speed. Close to the surface the climb slows down so the submarine does not jump out of the water.

Water gets in and out through a [Ballast Vent](/create-deep-seas-wiki/deep-seas/diving/ballast-vent.md) touching the sea, moved by a pump. Pull from the vent to fill, push into it to empty.

## How many tanks?

Each tank can drive about **75 blocks** of submarine (`ballastLiftPerTank`, in Sable mass units, roughly one per block). The lift adds up, so a 600 block submarine wants around 8 tanks. With too few tanks the submarine still moves, just slowly, and a heavy one may not climb at all.

{% hint style="danger" %}
**Use as few Ballast Tanks as possible, and as many Pump Controllers as you can, on a fast shaft (256 RPM).** Every tank is 8 more buckets to pump in and out. Too many tanks with too few or slow pumps, and the submarine takes ages to dive and to climb back up.
{% endhint %}

Two server options tune the ballast: `ballastForceMultiplier` makes it stronger or weaker, and `ballastVerticalSpeed` sets the top dive and climb speed.

## Staying level

Submerged submarines slowly right themselves back to level on pitch and roll, the way a real hull does when its buoyancy sits above its weight. Turning left and right is left completely free.

A submarine with a clear long axis also gets keel drag: it does not slide sideways, it carves its turns and moves where its bow points. Square hulls, with no obvious front, do not get it.

{% hint style="success" %}
**Details to look for**

* A moving submarine cuts through kelp and seagrass: the plants in its path are torn out, with a few bubbles.
* Fish and other sea creatures in its way are pushed aside. Above about 20 blocks per second, they get rammed and hurt.
* From inside a dry submarine, the sea outside keeps its murky underwater fog, so you still feel deep under water. It works with Distant Horizons too.
  {% endhint %}

## Letting the computer do it

Filling and draining by hand works, but holding an exact depth is fiddly. With an [Onboard Computer](/create-deep-seas-wiki/deep-seas/diving/onboard-computer.md) and [Pump Controllers](/create-deep-seas-wiki/deep-seas/diving/pump-controller.md) on board, you type a depth and a speed on the screen and the computer fills, drains and holds the ballast for you. It measures how fast your pumps really are and starts braking just early enough to stop on the target.

On a big submarine the Pump Controllers push harder: each one is sized for about 10 tanks, and past that its flow goes up so any submarine swings its ballast in about the same time as a small one, around 16 seconds from half to empty at 256 RPM. The cog still turns at the speed of its shaft and the stress cost does not change.

## Boats are different

Ships at the surface without an oxygen system float on the air in their holds, not on ballast. [Floaters](/create-deep-seas-wiki/deep-seas/cables-and-tools/floater.md) give extra lift to boats and rafts. See [Boats](/create-deep-seas-wiki/high-seas/mechanics/boats.md).
