From 04473d118c92cb8841de0aad1a50907b5994c082 Mon Sep 17 00:00:00 2001 From: Azgaar Date: Mon, 10 May 2021 22:36:00 +0300 Subject: [PATCH] Updated Resources: spread functions (markdown) --- Resources:-spread-functions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Resources:-spread-functions.md b/Resources:-spread-functions.md index 05ed399..015a04b 100644 --- a/Resources:-spread-functions.md +++ b/Resources:-spread-functions.md @@ -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