Change Default Map Generation to Perlin (#7856)

* Changes

* Slight adjustment to MainMenuScreen

* Make default waterThreshold for Default to be -0.05

* blip

* blip

* Rename cellular automata to Smoothed Random
This commit is contained in:
itanasi
2022-10-22 10:11:55 -07:00
committed by GitHub
parent 984e91a73e
commit c39aca7a31
5 changed files with 13 additions and 10 deletions

View File

@ -350,7 +350,7 @@ Custom =
Map Generation Type =
Default =
Pangaea =
Perlin =
Smoothed Random =
Continents =
Four Corners =
Archipelago =

View File

@ -118,7 +118,7 @@ class MainMenuScreen: BaseScreen(), RecreateOnResize {
shape = MapShape.rectangular
mapSize = MapSizeNew(mapWidth.toInt() + 1, mapHeight.toInt() + 1)
type = MapType.default
waterThreshold = -0.055f // Gives the same level as when waterThreshold was unused in MapType.default
waterThreshold = -0.1f // mainly land, gets about 30% water
modifyForEasterEgg()
})

View File

@ -128,15 +128,15 @@ object MapShape : IsPartOfGameInfoSerialization {
}
object MapType : IsPartOfGameInfoSerialization {
const val default = "Default"
const val pangaea = "Pangaea"
const val continents = "Continents"
const val fourCorners = "Four Corners"
const val perlin = "Perlin"
const val archipelago = "Archipelago"
const val innerSea = "Inner Sea"
// Cellular automata
const val default = "Default"
// Cellular automata style
const val smoothedRandom = "Smoothed Random"
// Non-generated maps
const val custom = "Custom"
@ -178,7 +178,7 @@ class MapParameters : IsPartOfGameInfoSerialization {
var vegetationRichness = 0.4f
var rareFeaturesRichness = 0.05f
var resourceRichness = 0.1f
var waterThreshold = 0f
var waterThreshold = 0.0f
/** Shifts temperature (after random, latitude and temperatureExtremeness).
* For seasonal main menu background only, not user-accessible, thus transient and not cloned. */
@ -221,7 +221,10 @@ class MapParameters : IsPartOfGameInfoSerialization {
vegetationRichness = 0.4f
rareFeaturesRichness = 0.05f
resourceRichness = 0.1f
waterThreshold = 0f
waterThreshold = if (type == MapType.smoothedRandom)
-0.05f // make world about 55% land
else
0f
}
fun getArea() = when {

View File

@ -42,9 +42,9 @@ class MapLandmassGenerator(val ruleset: Ruleset, val randomness: MapGenerationRa
MapType.innerSea -> createInnerSea(tileMap)
MapType.continents -> createTwoContinents(tileMap)
MapType.fourCorners -> createFourCorners(tileMap)
MapType.perlin -> createPerlin(tileMap)
MapType.smoothedRandom -> generateLandCellularAutomata(tileMap)
MapType.archipelago -> createArchipelago(tileMap)
MapType.default -> generateLandCellularAutomata(tileMap)
MapType.default -> createPerlin(tileMap)
}
}

View File

@ -96,7 +96,7 @@ class MapParametersTable(
MapType.pangaea,
MapType.continents,
MapType.fourCorners,
MapType.perlin,
MapType.smoothedRandom,
MapType.archipelago,
MapType.innerSea,
if (forMapEditor) MapType.empty else null