Stage#

*Config object requires the ‘biome-provider-pipeline-v2’ addon to use

Types#

Different types of Stage provide different behaviours and may have additional parameters for configuring that behavior.

The type is specified by setting the type parameter to the name of the type. If the same name is used by two different addons, you can prefix the name with ADDON_NAME: to specify which one to use.

A list of available types for Stage are listed below:


FRACTAL_EXPAND#

Reduces the fidelity of prior stages while also adding extra ‘fuzzy-ness’.

This is done by spacing out each PipelineBiome then filling the empty space randomly with a nearby pipeline biome:

Given a 2x2 grid of pipeline biomes:

a

b

c

d

Applying an expander would result in a 3x3 grid like so:

a

a or b

b

a or c

a or b or c or d

b or d

c

c or d

d

sampler NoiseSampler - Used to randomly determine which pipeline biome should be chosen.

The output of the noise sampler is expected to be evenly distributed across [-1, 1]. Usually just a basic WHITE_NOISE noise sampler will suffice for this.

EXAMPLE

stages:
  - type: FRACTAL_EXPAND
    sampler:
      type: WHITE_NOISE

SMOOTH#

Smooths out noisy borders between PipelineBiomes.

Given a PipelineBiome labelled x and its adjacent pipeline biomes labelled like so:

a

b

x

c

d

  • If a = d and b = c, x will randomly be replaced with either a or c.

  • Otherwise if only a = d then x will be replaced with a.

  • Otherwise if only b = c then x will be replaced with b.

  • Otherwise x will remain unchanged.

sampler NoiseSampler - Used to randomly determine which pipeline biome should be chosen.

The output of the noise sampler is expected to be evenly distributed across [-1, 1]. Usually just a basic WHITE_NOISE noise sampler will suffice for this.

EXAMPLE

stages:
  - type: SMOOTH
    sampler:
      type: WHITE_NOISE

REPLACE#

Replaces any PipelineBiomes containing the configured Tag with a weighted list of pipeline biomes distributed according to a NoiseSampler.

from Tag - Pipeline biomes containing this tag will be replaced.

sampler NoiseSampler - The noise sampler used to distribute pipeline biomes.

to WeightedList<PipelineBiome> - The pipeline biomes that the from tag will be replaced with.

EXAMPLE

stages:
  # Replaces plains biomes randomly with forest and plains
  - type: REPLACE
    from: PLAINS
    to:
      - FOREST: 1
      - PLAINS: 2
    sampler:
      type: WHITE_NOISE

REPLACE_LIST#

Same as the REPLACE stage, but takes an additional mapping of PipelineBiomes to weighted lists of pipeline biomes. This is convenient for combining multiple consecutive REPLACE stages that use the same noise sampler into one stage.

default-from Tag - The default tag a pipeline biome must contain to be replaced.

default-to WeightedList<PipelineBiome> - The list of pipeline biomes to replace any matches of the default tag with.

sampler NoiseSampler - The noise sampler used to distribute pipeline biomes.

to Map<PipelineBiome, WeightedList<PipelineBiome>> - An additional set of mappings from pipeline biomes to weighted lists of pipeline biomes.

Note

Replacement mappings are from pipeline biomes, not tags!

EXAMPLE

stages:
  # Replaces biomes tagged with USE_SPECIAL_BIOME to the SPECIAL biome, as well as
  # FOREST to SPECIAL_FOREST and PLAINS to SPECIAL_PLAINS.
  - type: REPLACE_LIST
    default-from: USE_SPECIAL_BIOME
    default-to:
      - SELF: 5 # The 'SELF' pipeline biome replaces the target with itself
      - SPECIAL: 1
    to:
      FOREST:
        - SELF: 5
        - SPECIAL_FOREST: 1
      PLAINS:
        - SELF: 5
        - SPECIAL_PLAINS: 1
    sampler:
      type: WHITE_NOISE

BORDER#

Replaces pipeline biomes matching a tag with a weighted list of pipeline biomes distributed according to a NoiseSampler only if they are bordering any pipeline biome matching another tag.

from Tag - The tag bordering pipeline biomes must contain for a pipeline biome to be replaced.

replace Tag - The tag a pipeline biome must contain in order to be replaced.

sampler NoiseSampler - The noise sampler used to distribute pipeline biomes.

to WeightedList<PipelineBiome> - The list of pipeline biomes to replace with.

EXAMPLE

stages:
  # Replaces biomes tagged with LAND bordering OCEAN with BEACH
  - type: BORDER
    replace: LAND
    from: OCEAN
    to: BEACH # Weighted lists of single items can be defined like this
    sampler:
      type: CONSTANT # Since there's only a single item we can just use CONSTANT

BORDER_LIST#

Same as the BORDER stage, but takes an additional mapping of PipelineBiomes to weighted lists of pipeline biomes. This is convenient for combining multiple consecutive BORDER stages that use the same noise sampler into one stage.

default-replace Tag - The default tag a pipeline biome must contain in order to be replaced.

default-to WeightedList<PipelineBiome> - The default list of pipeline biomes to replace pipeline biomes containing the default replace tag with.

from Tag - The tag bordering pipeline biomes must contain for a pipeline biome to be replaced.

replace Map<PipelineBiome, WeightedList<PipelineBiome>> - An additional set of mappings from pipeline biomes to weighted lists of pipeline biomes.

Note

Replacement mappings are from pipeline biomes, not tags!

sampler NoiseSampler - The noise sampler used to distribute pipeline biomes.

EXAMPLE

stages:
  # Replaces biomes tagged with LAND bordering OCEAN with BEACH
  # With special handling for JUNGLE to be replaced with JUNGLE_BEACH
  # and MUSHROOM_PLAINS with MUSHROOM_BEACH
  - type: BORDER
    default-replace: LAND
    from: OCEAN
    default-to: BEACH # Weighted lists of single items can be defined like this
    replace:
      JUNGLE: JUNGLE_BEACH
      MUSHROOM_PLAINS: MUSHROOM_BEACH
    sampler:
      type: CONSTANT # Since there's only a single item in each mapping we can just use CONSTANT

Uses#

This object is used in one place: