From 3f625f775e66cb6a55df937908da709fbf99097e Mon Sep 17 00:00:00 2001 From: Azgaar Date: Wed, 25 Aug 2021 16:29:30 +0300 Subject: [PATCH] Updated Data model (markdown) --- Data-model.md | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/Data-model.md b/Data-model.md index 8efacca..b24ad2c 100644 --- a/Data-model.md +++ b/Data-model.md @@ -86,7 +86,7 @@ World data is mainly stored in typed arrays within `cells` object in both `grid` * `pack.cells.province`: `number[]` - cells province index. `Uint16Array` * `pack.cells.religion`: `number[]` - cells religion index. `Uint16Array` * `pack.cells.area`: `number[]` - cells area in pixels. `Uint16Array` -* `pack.cells.pop`: `number[]` - cells population. `Float32Array`, not rounded to not lose population of high population rate +* `pack.cells.pop`: `number[]` - cells population in population points (1 point = 1000 people by default). `Float32Array`, not rounded to not lose population of high population rate * `pack.cells.r`: `number[]` - cells river index. `Uint16Array` * `pack.cells.fl`: `number[]` - cells flux amount. Defines how much water flow through the cell. Use to get rivers data and score cells. `Uint16Array` * `pack.cells.conf`: `number[]` - cells flux amount in confluences. Confluences are cells where rivers meet each other. `Uint16Array` @@ -100,6 +100,24 @@ World data is mainly stored in typed arrays within `cells` object in both `grid` Secondary data available as a part of the `pack` object. ## Cultures +Cultures data is stored as an array of objects with strict element order. Element 0 is reserved by the _wildlands_ culture. If culture is removed, the element in not getting removed, but instead a `removed` attribute is added. Object structure: +* `i`: `number` - culture id, always equal to the array index +* `base`: `number` - _nameBase_ id, name base is used for names generation +* `name`: `string` - culture name +* `origin`: `number` - origin culture id. Used to render cultures tree to show cultures evolution +* `shield`: `string` - shield type. Used for emblems rendering +* `center`: `number` - cell id of culture center +* `code`: `string` - culture name abbreviation. Used to render cultures tree +* `color`: `string` - culture color in hex (e.g. `#45ff12`) or link to hatching pattern (e.g. `url(#hatch7)`) +* `expansionism`: `number` - culture expansionism modifier. Used mainly during cultures generation to spread cultures not uniformly +* `type`: `string` - culture type, see [culture types](#culture types) +* `area`: `number` - culture area in pixels +* `cells`: `number` - number of cells assigned to culture +* `rural`: `number` - rural (non-burg) population of cells assigned to culture. In population points +* `urban`: `number` - urban (burg) population of cells assigned to culture. In population points +* `removed`: `boolean` - `true` if culture is removed + +## Burgs Cultures data is stored as an array of objects with strict element order. Element 0 is reserved by the _wildlands_ culture. Object structure: * `i`: `number` - culture id, always equal to the array index * `base`: `number` - _nameBase_ id, name base is used for names generation @@ -111,7 +129,8 @@ Cultures data is stored as an array of objects with strict element order. Elemen * `color`: `string` - culture color in hex (e.g. `#45ff12`) or link to hatching pattern (e.g. `url(#hatch7)`) * `expansionism`: `number` - culture expansionism modifier. Used mainly during cultures generation to spread cultures not uniformly -## Burgs + + ## States ## Provinces ## Religions