Table of Contents

Class SyntheticTerrain

Namespace
Valheim.Testing
Assembly
Valheim.Testing.dll

Deterministic pseudo-Valheim world: an island with a gaussian hill profile, a mountain ridge, and an optional river channel crossing it. Heights use the same conventions as the game (sea level 30, deep water below 28).

public class SyntheticTerrain : ITerrain
Inheritance
object
SyntheticTerrain
Implements

Fields

FixtureVersion

public const int FixtureVersion = 1

Field Value

int

HasMountain

public bool HasMountain

Field Value

bool

HasRiver

public bool HasRiver

Field Value

bool

IslandPeakHeight

public float IslandPeakHeight

Field Value

float

IslandRadius

public float IslandRadius

Field Value

float

MountainHalfWidth

public float MountainHalfWidth

Field Value

float

MountainHeight

public float MountainHeight

Field Value

float

MountainX

public float MountainX

Field Value

float

RiverHalfWidth

public float RiverHalfWidth

Field Value

float

RiverX

River channel runs roughly north-south near x = RiverX.

public float RiverX

Field Value

float

Methods

GetBiome(float, float)

Returns the declared biome at horizontal x/z.

public TerrainBiome GetBiome(float wx, float wy)

Parameters

wx float
wy float

Returns

TerrainBiome

GetHeight(float, float)

Returns ground height y in metres at horizontal x/z.

public float GetHeight(float wx, float wy)

Parameters

wx float
wy float

Returns

float

GetRiverWeight(float, float, out float, out float)

Returns the declared river weight and width; their interpretation belongs to the consuming mod.

public void GetRiverWeight(float wx, float wy, out float weight, out float width)

Parameters

wx float
wy float
weight float
width float