Updated Data model (markdown)

Azgaar 2021-08-25 16:46:19 +03:00
parent 3f625f775e
commit 7ae4b34442

@ -110,7 +110,7 @@ Cultures data is stored as an array of objects with strict element order. Elemen
* `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)
* `type`: `string` - culture type, see [culture types](https://github.com/Azgaar/Fantasy-Map-Generator/wiki/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
@ -118,18 +118,27 @@ Cultures data is stored as an array of objects with strict element order. Elemen
* `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
* `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
Burgs (settlements) data is stored as an array of objects with strict element order. Element 0 is an empty object. Object structure:
* `i`: `number` - burg id, always equal to the array index
* `name`: `string` - burg name
* `cell`: `number` - burg cell id. One cell can have only one burg
* `x`: `number` - x axis coordinate, rounded to two decimals
* `y`: `number` - y axis coordinate, rounded to two decimals
* `culture`: `number` - burg culture id
* `state`: `number` - burg state id
* `feature`: `number` - burg feature id (id of an landmass)
* `population`: `number` - burg population in population points
* `type`: `string` - burg type, see [culture types](https://github.com/Azgaar/Fantasy-Map-Generator/wiki/Culture types)
* `coa`: `object | string` - emblem object, data model is the same as in [Armoria](https://github.com/Azgaar/Armoria) and covered in [API documentation](https://github.com/Azgaar/armoria-api#readme). If emblem is loaded by user, then the value is `custom` and cannot be displayed in Armoria
* `capital`: `number` - `1` if burg is a capital, `0` if not (each state has only 1 capital)
* `port`: `number` - if burg is not a port, then `0`, otherwise feature id of the water body the burg stands on
* `citadel`: `number` - `1` if burg has a castle, `0` if not. Used for MFCG
* `plaza`: `number` - `1` if burg has a marketplace, `0` if not. Used for MFCG
* `shanty`: `number` - `1` if burg has a shanty town, `0` if not. Used for MFCG
* `temple`: `number` - `1` if burg has a temple, `0` if not. Used for MFCG
* `walls`: `number` - `1` if burg has walls, `0` if not. Used for MFCG
* `lock`: `boolean` - `true` if burg is locked (not affected by regeneration)
* `removed`: `boolean` - `true` if burg is removed
## States
## Provinces