Updated Data model (markdown)

Azgaar 2021-08-27 20:03:23 +03:00
parent 5e9b6d1d4d
commit 8d7a49ac4d

@ -168,6 +168,7 @@ States (countries) data is stored as an array of objects with strict element ord
* `removed`: `boolean` - `true` if state is removed
## Provinces
Provinces data is stored as an array of objects with strict element order. Element 0 is not used. If province is removed, the element in not getting removed, but instead a `removed` attribute is added. Object structure:
* `i`: `number` - province id, always equal to the array index
* `name`: `string` - short (proper) form of the province name
* `formName`: `string` - string form name, used to get province `fullName`
@ -185,6 +186,26 @@ States (countries) data is stored as an array of objects with strict element ord
* `removed`: `boolean` - `true` if province is removed
## Religions
Religions data is stored as an array of objects with strict element order. Element 0 is reserved for "No religion". If province is removed, the element in not getting removed, but instead a `removed` attribute is added. Object structure:
* `i`: `number` - religion id, always equal to the array index
* `name`: `string` - religion name
* `type`: `string` - religion type. Available types are `Folk`, `Organized`, `Heresy` and `Cult`
* `form`: `string` - religion form
* `deity`: `string` - religion supreme deity if any
* `color`: `string` - religion color in hex (e.g. `#45ff12`) or link to hatching pattern (e.g. `url(#hatch7)`)
* `code`: `string` - religion name abbreviation. Used to render religions tree
* `origin`: `number` - if of ancestor religion. `0` if religion is folk and doesn't have an ancestor
* `center`: `number` - cell id of religion center (initial cell)
* `culture`: `number` - if of religion original culture
* `pole`: `number[]` - state pole of inaccessibility (visual center) coordinates, see [the concept description](https://blog.mapbox.com/a-new-algorithm-for-finding-a-visual-center-of-a-polygon-7c77e6492fbc?gi=6bd4fcb9ecc1)
* `expansionism`: `number` - religion growth multiplier. Used during religion generation to define competitive size
* `expansion`: `string` - religion expansion type. Can be `culture` so that religion grow only within its culture or `global`
* `area`: `number` - religion area in pixels
* `cells`: `number` - number of cells within the religion
* `rural`: `number` - rural (non-burg) population of religion cells. In population points
* `urban`: `number` - urban (burg) population of state religion. In population points
* `removed`: `boolean` - `true` if religion is removed
## Rivers
## Routes