QtCraft API C++ classes QML types Handbook

QcCoastalTowerSettings Struct

Coastal towers of the terrain generator ("coastalTowers" in worldgen/terrain.json, decision E-605): a tower from structure data on land at or a little above sea level with ocean near it, standing on a foundation down to the ground. More...

Header: #include <common/content/worldgen/QcCoastalTowerDefinition.h>

Public Variables

int attempts
double chance
int clearance
int coastDistance
bool enabled
QString foundation
int gridStep
int maxFoundation
int maxRise
int maxSlope
int minDistance
int oceanDepth
int regionSize
QList<QcWeightedStructureName> structures

Static Public Members

const int maxDistance
const int maxRegionSize

Detailed Description

At most one per square region of regionSize blocks, with chance; the tower lies wholly inside its region. Server side only.

Member Variable Documentation

int QcCoastalTowerSettings::attempts

Sites checked fully per region (land near the sea found on a grid of gridStep blocks).

double QcCoastalTowerSettings::chance

Chance that a region gets a tower ("chance", 0 to 1).

int QcCoastalTowerSettings::clearance

Blocks kept free of villages and mine shaft entrances around the tower.

int QcCoastalTowerSettings::coastDistance

Ocean within coastDistance blocks of the tower's edge: a column of the sea (land factor below one half) whose ground lies at least oceanDepth blocks below the water's surface.

bool QcCoastalTowerSettings::enabled

No "coastalTowers" object, or "enabled": false: none.

QString QcCoastalTowerSettings::foundation

The block under the tower down to the ground, at most maxFoundation blocks deep.

int QcCoastalTowerSettings::gridStep

Spacing in blocks of the grid on which land near the sea is searched ("gridStep").

const int QcCoastalTowerSettings::maxDistance

Largest accepted coastDistance and clearance.

int QcCoastalTowerSettings::maxFoundation

Deepest foundation in blocks below the tower's floor ("maxFoundation").

const int QcCoastalTowerSettings::maxRegionSize

Largest accepted regionSize.

int QcCoastalTowerSettings::maxRise

The ground's top under the tower lies from sea level up to maxRise blocks above it, and its highest and lowest columns differ by at most maxSlope.

int QcCoastalTowerSettings::maxSlope

Largest height difference in blocks between the highest and lowest ground column under the tower ("maxSlope").

int QcCoastalTowerSettings::minDistance

Towers of neighbouring regions stand at least this many blocks apart (centre to centre); of two that would come closer, the one of the region with the lower priority is left out (decision E-857). 0: no limit.

int QcCoastalTowerSettings::oceanDepth

Depth in blocks of the ground below the water's surface for a column to count as ocean ("oceanDepth").

int QcCoastalTowerSettings::regionSize

Side of the square region in blocks that holds at most one tower ("regionSize", 48 to maxRegionSize).

QList<QcWeightedStructureName> QcCoastalTowerSettings::structures

Tower structures picked by weight ("structures"); at least one is required.