Cave

A cave is a subterranean environment characterized by minerals, ores, minerals, and hostile entities. As the player descend deeper into the cave, he will encounter an increased abundance of ores and hostile entities.

## Find a cave

### Cave entrance

All planets contain at least one cave. To enter the cave, the player needs to locate the cave entrance and perform a right-click on it. The design of the cave entrance varies based on the cave variant. The image below illustrates a typical solutional cave entrance.

### Number of caves per planet

The number of caves generated on a planet depends on its type and characteristics. For instance, solutional caves tend to appear on planets with wet terrain, such as temperate or island planets, while deep caves are more common on hot locations like desertic or volcanic planets. The probabilities for each type of cave appearing on different planet types are outlined in the table below:

## Generation

### Architecture

Caves typically span approximately 100 x 100 tiles, with the tile height ranging from coordinates 0 at the surface down to -100 at the deepest point. The entities and resources found in a cave vary depending on the player's depth. The deeper player goes towards the bottom of the screen, the deeper he is in the cave. It becomes more rewarding to mine deeper as resources become more abundant, but it also means that hostile entities are more common. It is easier for the player to stay at the top of the cave as it is generally safer, however he won't be able to find the most precious minerals.

The image below illustrates an example of biomes in a deep cave. The quantity of lava and irradiated tiles is higher at the bottom of the cave, and this trend holds for minerals and entities as well.

### Minerals

The primary purpose of caves is to gather all minerals and ores inside. Caves are the optimal locations for finding them. However, the likelihood of mineral appearance depends on the cave variant, so it is crucial to choose the appropriate cave based on the specific mineral or ore the player wants to extract. The table below indicates which ores and minerals can be found in each cave.

  Iron | Yes
  Copper | Yes
  Serpentinite | No
  Radium | No

### Entities

Caves are populated by different types of entities that depend on the type of cave. In general, all caves are populated by rats and some flies. Rock shelter caves are home to many spiders that hide among the stone piles. Solutional caves may contain caterpillars in wet areas. However, the most dangerous cave is the deep cave, which is inhabited by draugrs. If the player manages to eliminate all these entities, there's still a chance for them to respawn if the cave remains dark enough.

## Variants

There are three cave variants: solutional, rock shelter, and deep.

### Solutional cave

These caves are typically found in moist environments and are characterized by their damp conditions. Comprising mainly sand and water, these caves also contain stalagmites and clay formations. Solutional caves often host a variety of minerals, including coal, iron and copper. They also contain more cobwebs compared to other caves.

### Rock shelter cave

These caves are primarily composed of stone and coal, with minerals being relatively scarce. They are an excellent source of stone and also feature numerous marble and basalt piles in deeper sections. Spiders are frequently encountered in these caves.

### Deep cave

This is the most perilous type of cave but also offers the most valuable minerals. These caves feature lava lakes and a multitude of aggressive entities. While some minerals like marble and coal are absent, this is the exclusive location to find serpentinite and radium.