Updated Resources: spread functions (markdown)

Azgaar 2021-05-10 22:36:00 +03:00
parent a08c3c3f2c
commit 04473d118c

@ -7,7 +7,7 @@ Technically spread models are expressions evaluated for each cell to return `tru
The options are limited to a number of build-in functions. These functions make models syntax easier to read and write:
* `random(number)`: percentage of true, e.g. `50` will return true in 50% of cases
* `nth(number)`: true for each nth cell only, e.g. `nth(2)` skips 50% of cells, `nth(5)` skips 80% of cells
* `nth(number)`: true for each only n-th cell: 1st, 2nd, 3rd and so on. For example `nth(2)` skips 1/2 (50%) of cells and `nth(5)` skips 4/5 (80%) of cells.
* `habitable()`: true if biome habitability is greater than 0
* `habitability()`: check against biome habitability. Always true for habitability `>=100`, false for `0`, skips 50% of cells if habitability is `50` and so on
* `elevation()`: check against cell's height - the higher cell is, the greater chance is. If you need resource to be more frequent in lower elevation areas, than just negate the function: `!elevation()`
@ -16,7 +16,7 @@ The options are limited to a number of build-in functions. These functions make
* `maxHeight(number)`: true if cell height <= number
* `minTemp(number)`: true if cell temperature (in Celsius) >= number
* `maxTemp(number)`: true if cell temperature <= number
* `shore(ringId, ringId, ...)`: check against cell distance to shore, where `1` is land next to water (coastline cells), `2` - next land ring, `-1` - water cells next to land (shallow water), `-2, -3, ...` - next water rings, `0` - value not assigned, usually values are assigned only for first 2 land rings, so other land cells have zero value
* `shore(ringId, ringId, ...)`: check against distance to the closest shoreline. `1` is land cells next to water (coastline), `2` - next land ring, `-1` - water cells next to land (shallow water), `-2, -3, ...` - deeper water cells
* `type(string, string, ...)`: check against cell type. Types of all water cells connected to map border is `ocean`, lake types are `freshwater`, `salt`, `sinkhole`, `frozen`, `lava` and `dry`. Land types are defined not so clear, so I don't recommend to use them. In any case land types are `continent`, `island`, `isle` and `lake_island`
* `river()`: true if there is a river in the cell