mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-18 18:11:24 +01:00
Updated Resources: spread functions (markdown)
parent
657d8b6368
commit
1c48c3cb4f
1 changed files with 27 additions and 26 deletions
|
|
@ -25,32 +25,33 @@ However the function is limited to a number of build-in functions. These functio
|
|||
Let's say we want a resource to be generated in hot and highly elevated areas. If altitude is medium, let it also be allowed, but pretty rarely. The model will be something like `minTemp(15) && (minHeight(70) || minHeight(40) && nth(5))`.
|
||||
|
||||
# Built-in models
|
||||
* `Deciduous_forests: i => [6, 7, 8].includes(cells.biome[i]),`
|
||||
* `Any_forest: i => [5, 6, 7, 8, 9].includes(cells.biome[i]),`
|
||||
* `Temperate_and_boreal_forests: i => [6, 8, 9].includes(cells.biome[i]),`
|
||||
* `Hills: i => cells.h[i] >= 40 || (cells.h[i] >= 30 && !(i % 10)),`
|
||||
* `Mountains: i => cells.h[i] >= 60 || (cells.h[i] >= 40 && !(i % 10)),`
|
||||
* `Mountains_and_wetlands: i => cells.h[i] >= 60 || (cells.biome[i] === 12 && !(i % 8)),`
|
||||
* `Headwaters: i => cells.h[i] >= 40 && cells.r[i],`
|
||||
* `Biome_habitability: i => chance(biomesData.habitability[cells.biome[i]]),`
|
||||
* `Marine_and_rivers: i => (cells.t[i] < 0 && ["ocean", "freshwater", "salt"].includes(group(i))) || (cells.t[i] > 0 && cells.t[i] < 3 && cells.r[i]),`
|
||||
* `Pastures_and_temperate_forest: i => chance(100 - cells.h[i]) && chance([0, 0, 0, 100, 100, 20, 80, 0, 0, 0, 0, 0, 0][cells.biome[i]]),`
|
||||
* `Tropical_forests: i => [5, 7].includes(cells.biome[i]),`
|
||||
* `Arid_land_and_salt_lakes: i => chance([0, 80, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10][cells.biome[i]]) || group(i) === "salt" || group(i) === "dry",`
|
||||
* `Deserts: i => cells.biome[i] === 1 || cells.biome[i] === 2,`
|
||||
* `Grassland_and_cold_desert: i => cells.biome[i] === 3 || (!(i % 4) && cells.biome[i] === 2),`
|
||||
* `Hot_biomes: i => [1, 3, 5, 7].includes(cells.biome[i]),`
|
||||
* `Hot_desert_and_tropical_forest: i => [1, 7].includes(cells.biome[i]),`
|
||||
* `Tropical_rainforest: i => cells.biome[i] === 7,`
|
||||
* `Tropical_waters: i => cells.t[i] === -1 && temp(i) >= 18,`
|
||||
* `Hilly_tropical_rainforest: i => cells.h[i] >= 40 && cells.biome[i] === 7,`
|
||||
* `Subtropical_waters: i => cells.t[i] === -1 && temp(i) >= 14,`
|
||||
* `Habitable_biome_or_marine: i => biomesData.habitability[cells.biome[i]] || cells.t[i] === -1,`
|
||||
* `Foresty_seashore: i => cells.t[i] === 1 && [6, 7, 8, 9].includes(cells.biome[i]),`
|
||||
* `Boreal_forests: i => chance([0, 0, 0, 0, 0, 0, 20, 0, 20, 100, 50, 0, 10][cells.biome[i]]),`
|
||||
* `Less_habitable_seashore: i => cells.t[i] === 1 && chance([0, 50, 30, 30, 20, 10, 10, 20, 10, 20, 10, 0, 5][cells.biome[i]]),`
|
||||
* `Less_habitable_biomes: i => chance([5, 80, 30, 10, 20, 5, 5, 5, 5, 30, 90, 0, 5][cells.biome[i]]),`
|
||||
* `Arctic_waters: i => cells.t[i] < 0 && temp(i) < 8`
|
||||
* Deciduous_forests: `biome(6, 7, 8)`
|
||||
* Any_forest: `biome(5, 6, 7, 8, 9)`
|
||||
* Temperate_and_boreal_forests: `biome(6, 8, 9)`
|
||||
* Hills: `minHeight(40) || (minHeight(30) && nth(10))`
|
||||
* Mountains: `minHeight(60) || (minHeight(40) && nth(10))`
|
||||
* Mountains_and_wetlands: `minHeight(60) || (biome(12) && nth(8))`
|
||||
* Headwaters: `river() && minHeight(40)`
|
||||
* Biome_habitability: `habitability()`
|
||||
* Marine_and_rivers: `type("ocean", "freshwater", "salt") || (river() && shore(1, 2))`
|
||||
* Pastures_and_temperate_forest: `(biome(3, 4) && !elevation()) || (biome(6) && random(70)) || (biome(5) && nth(5))`
|
||||
* Tropical_forests: `biome(5, 7)`
|
||||
* Arid_land_and_salt_lakes: `type("salt", "dry") || (biome(1, 2) && random(70)) || (biome(12) && nth(10))`
|
||||
* Hot_desert: `biome(1)`
|
||||
* Deserts: `biome(1, 2)`
|
||||
* Grassland_and_cold_desert: `biome(3) || (biome(2) && nth(4))`
|
||||
* Hot_biomes: `biome(1, 3, 5, 7)`
|
||||
* Hot_desert_and_tropical_forest: `biome(1, 7)`
|
||||
* Tropical_rainforest: `biome(7)`
|
||||
* Tropical_waters: `shore(-1) && minTemp(18)`
|
||||
* Hilly_tropical_rainforest: `minHeight(40) && biome(7)`
|
||||
* Subtropical_waters: `shore(-1) && minTemp(14)`
|
||||
* Habitable_biome_or_marine: `shore(-1) || habitable()`
|
||||
* Foresty_seashore: `shore(1) && biome(6, 7, 8, 9)`
|
||||
* Boreal_forests: `biome(9) || (biome(10) && nth(2)) || (biome(6, 8) && nth(5)) || (biome(12) && nth(10))`
|
||||
* Less_habitable_seashore: `shore(1) && habitable() && !habitability()`
|
||||
* Less_habitable_biomes: `habitable() && !habitability()`
|
||||
* Arctic_waters: `biome(0) && maxTemp(7)`
|
||||
|
||||
# Biomes ids
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue