GR - Procedural Generation

## Profile Editing Guide

The following is a description of all the variables used when editing procgen profiles in the asset manager. Procedural generation is done on 3 levels, the system level, the planet level and the region level.

### Region Profile (.RPRF)

#### General

##### Planet Preference (1 - 8)

8 different planet Id's that can be generated as that race's home planet. These map to the Id's in the .PPRF file

### Planet Profile (.PPRF)

#### General

##### planetProfileName

Designer name for the planet profile, usually of the form [Mesh] [Common Terrain1] [Common Terrain 2] ex:
21406 Light Forest Dense Forest
This has no effect on generation

#### Terrain

##### small/medium/large AltitudeWeight

Weights for the 3 separate noise layers. All between 0 - 1 and should add up to 1. How each layer contributes to terrain generation is determined by a weighted average. For ex:

*smallAltitudeWeight = 0.7, mediumAltitudeWeight 0.15, largeAltitudeWeight= 0.15*

The small noiseLayer will contribute heavily to the overall look of the planet

typical values are: *smallAltitudeWeight = 0.05, mediumAltitudeWeight 0.39, largeAltitudeWeight= 0.56*

##### small/medium/large AltitudeGridSize

Grid size associated with their respective noise layers. Smaller grid size means less change/distance, and so the result is less detailed.

typical values are: *smallAltitudeGridSize = 128, mediumAltitudeGridSize = 16, largeAltitudeGridSize = 4*

##### seaLevel

If the final altitude of a hex is below sea level, the tile is considered ocean terrain. If the hex is surrounded by hexes that aren’t below sea level, the tile is considered lake terrain. A higher sea level means more oceans & lakes and vice-versa.

Sea level is usually between -0.3 and 0.3

##### small/large HumidityWeight

Sets the extent to which the small and large noise layers affect the humidity of the terrain, they should add up to 1.

They both range from 0.3 to 0.6

##### small/large HumidityGridSize

Set the amount of detail each layer has when it comes to humidity (similar to altitudeGridSize).

2 pairs are generally seen:
smallHumidityGridSize = 128, largeHumidityGridSize = 8
smallHumidityGridSize = 256, largeHumidityGridSize = 4

##### terrainSet

The terrain set is a mapping of which terrain types and which themes apply to a planet.
this is represented with a single 2 digit number where the 10's digit represents the terrain type and the 1's digit represents the terrain theme.

The terrain type is mapped as such

Terrain Type
 1
 2
 3
 4
 5

Themes are colors for the terrain, they have an Id, color and description

Terrain Theme
 1
 2

For example, a terrainSet of 32 has a terrain type of 3: Desert and a terrain theme of 2:Moon

##### humidityThreshold (1 - 3) and altitudeThreshold (1 - 5)

Changes terrain generated on a hex based on its altitude and humidity, this varies with the terrain Type and occasionally with temperature. any hex with an altitude < sea level will be set to a Lake Terrain. If no condition on the appropriate table is met, the hex will be filled with a Plains terrain type

Terrain Type = Earth

Terrain Type = Ice

Terrain Type = Desert

Terrain Type = Jungle

Terrain Type = Moon

Terrain Type = Titan

#### Resources

##### resourceGridSize

The size of a collection of resources when found on a map.

typical value is 16 for all planet profiles

##### Resource (agriculture, rubber, timber, oil, coal, ore, uranium, hydroPower)

The amount of the corresponding resource that will be found on a planet. Between 0 - 1.

On the profiles it's usually between 0.5 - 0.8 for resources that can be found. This relationship is non-linear, so some checking is required

#### Flags

##### noPoles

A setting that allows land to reach the poles of the planet, causing fewer oceans and more lakes

##### frozen

Reduces the temperature of each hex on the planet to its minimum. (negates tempLatitudeWeight and tempAltitudeWeight

##### scorched

Increases the temperature of each hex on the planet to its maximum. (negates tempLatitudeWeight and tempAltitudeWeight

#### Meta

##### meshPreference (1 - 8)

8 Id's to Meshes that can be used to represent the planet, these are the SR5ID's found in the DEFAULT.UNIT file in the &&UNITS section

##### OrbitalMin / OrbitalMax

Controls the position of the planet in the system, is a range between 0 and 1, 0 being the sun and 1 being the edge of the system. Ex:

If the orbital min is 0.45 and the orbital max is 0.55, the planet can only be generated roughly in the middle of the system.