# Custom biome

## Create the file

To create a custom biome, the first command to run is :

```
/scustom biome <biomename>
```

This generates a new file named `<biomename>` located in the `/plugins/Stratos/customization/biome/` folder. In this file, you can edit everything including terrain noise, areas, blocks and decorations for the biome.

## Terrain noise

### Amplitude and frequency

In the context of terrain generation, **frequency** refers to the number of peaks and valleys in a given area, while **amplitude** refers to the height of those peaks and valleys. A terrain with high **frequency** will have many small peaks and valleys, while a terrain with low **frequency** will have fewer, but larger peaks and valleys. **Amplitude**, on the other hand, determines how high or low the peaks and valleys are. A terrain with high **amplitude** will have very tall peaks and deep valleys, while a terrain with low **amplitude** will have smaller peaks and shallower valleys. These two parameters can be adjusted to create different types of terrain, from rugged mountains to rolling hills.

### Define noise and frequency

In Stratos, modify the **terrain\_noise** value to change frequency and amplitude (you can add as many noises as you want to get the desired result)

### Example :

```
terrain_noise:
  - ==: SConfigTerrainNoise
    frequency: 0.2
    amplitude: 0.6
  - ==: SConfigTerrainNoise
    frequency: 0.5
    amplitude: 0.4
```

{% hint style="info" %}
Noises you define here are added together to compute the final terrain
{% endhint %}

## Minimum height

The **minimum\_height** value defines the elevation of the world. Increase it to have to world higher.

## Terrain zones

Terrain zones define the multiple areas you can create in a biome, each area can have its own blocks. The value to modify is **terrain\_zones**.

<figure><img src="https://i.postimg.cc/cHKqGbnG/proxy.png" alt=""><figcaption><p>Multiple areas in Mushroom biome</p></figcaption></figure>

For each area paste a SConfigZone value&#x20;

**Example :**&#x20;

```
  - ==: SConfigZone
    probability: 0.4
    # Sum of materials probabilities must be 1
    materials:
      - ==: SConfigMaterial
        material: GRASS_BLOCK
        probability: 0.3
      - ==: SConfigMaterial
        material: GRAY_WOOL
        probability: 0.4
      - ==: SConfigMaterial
        material: GREEN_WOOL
        probability: 0.3
    decorations:
      - ==: SConfigDecoration
        material: GRASS_BLOCK
        probability: 0.05
      - ==: SConfigDecoration
        material: GREEN_WOOL
        probability: 0.09
```

The **materials** are the blocks placed at the terrain level. The **decorations** are placed one block higher.

## Add your biome into the world configuration

To add the biome you created into the world configuration (either per-world or main configuration), add these lines into the **biomes** property.

```
- ==: SCustomBiome
  biome: <biomename>
  centerX: 0.0
  centerY: 0.0
  lavaRiver: false
  spigotBiome: PLAINS
  tree_probability: 0.8
```

Properties are the same as SBiome with two new properties :&#x20;

* **lavaRiver** : true if you want to have lava rivers in your biome, false otherwise
* **spigotBiome** : the name of the [spigot Biome](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/Biome.html)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://alex-plugins.gitbook.io/stratos/customization/custom-biome.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
