# HabitatYield

> Kinbarrow modding reference — content tree `27b3c5d2177d528a`, version `0.2.0+main.aa6bf844a`.

The perishable goods a habitat yields daily, independently for each diet. Each habitat occurs once. A missing good means the land feeds none of that diet.

**Note on syntax:** these files are RON, not JSON. The shapes below are exact,
but punctuation follows RON. Read a real `data/*.ron` file alongside.

## Fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| <a id="field-fodder"></a>`fodder` | `string` | optional | A perishable fodder good, or none where no grazing forage grows. |
| <a id="field-food"></a>`food` | `string` | optional | A perishable good that satisfies hunger, or none where no food is available. |
| <a id="field-habitat"></a>`habitat` | `Habitat` | required | The habitat whose land supplies these goods. `Any` and `Urban` yield neither. |

## Example

`data/tables/habitat_yields.ron` — Original. [Read the full RON file](/modding/latest/examples/tables/habitat_yields.ron).

```ron
// Original habitat ecology: one day's land capacity is yielded for EACH named
// diet. Food includes hunted animals, fish and other edible wild fare; forage
// includes fresh grasses, browse, aquatic plants and subterranean fungi.
// Arctic ice and dry desert support prey but no dependable grazing yield.
// Any and Urban are not productive natural land habitats.
Table(
    source: Original,
    entries: [
        HabitatYield(habitat: Any, food: None, fodder: None),
        HabitatYield(habitat: Arctic, food: Some("game"), fodder: None),
        HabitatYield(habitat: Coastal, food: Some("game"), fodder: Some("forage")),
        HabitatYield(habitat: Desert, food: Some("game"), fodder: None),
        HabitatYield(habitat: Forest, food: Some("game"), fodder: Some("forage")),
        HabitatYield(habitat: Grassland, food: Some("game"), fodder: Some("forage")),
        HabitatYield(habitat: Hill, food: Some("game"), fodder: Some("forage")),
        HabitatYield(habitat: Mountain, food: Some("game"), fodder: Some("forage")),
        HabitatYield(habitat: Swamp, food: Some("game"), fodder: Some("forage")),
        HabitatYield(habitat: Underdark, food: Some("game"), fodder: Some("forage")),
        HabitatYield(habitat: Underwater, food: Some("game"), fodder: Some("forage")),
        HabitatYield(habitat: Urban, food: None, fodder: None),
    ],
)
```

## Nested shapes

<a id="habitat"></a>

### Habitat

A natural habitat a creature lives in, as a monster book lists it. A landscape site draws its tenants from the creatures whose habitats match its ground. `Any` marks creatures found wherever people are, and matches no site.

<a id="habitat--any"></a>

#### Habitat::Any

Record no specific natural habitat; this value alone matches no landscape site.

<a id="habitat--arctic"></a>

#### Habitat::Arctic

Mark the creature as native to cold polar or frozen terrain.

<a id="habitat--coastal"></a>

#### Habitat::Coastal

Match coastal ground, including the site's sea-cave habitat.

<a id="habitat--desert"></a>

#### Habitat::Desert

Mark the creature as native to dry desert terrain.

<a id="habitat--forest"></a>

#### Habitat::Forest

Match wooded ground, including forest hollows.

<a id="habitat--grassland"></a>

#### Habitat::Grassland

Match open grassy ground, including barrow sites.

<a id="habitat--hill"></a>

#### Habitat::Hill

Match hilly ground, including barrow sites.

<a id="habitat--mountain"></a>

#### Habitat::Mountain

Match mountain ground, including mountain caves.

<a id="habitat--swamp"></a>

#### Habitat::Swamp

Mark the creature as native to marshes and wetlands.

<a id="habitat--underdark"></a>

#### Habitat::Underdark

Match subterranean ground, including cave sites.

<a id="habitat--underwater"></a>

#### Habitat::Underwater

Match submerged ground, including sea-cave sites.

<a id="habitat--urban"></a>

#### Habitat::Urban

Mark the creature as native to towns and other built settlements.


