From 7ae4b344427a8749bfefa5ea238004ea3bd1207e Mon Sep 17 00:00:00 2001 From: Azgaar Date: Wed, 25 Aug 2021 16:46:19 +0300 Subject: [PATCH] Updated Data model (markdown) --- Data-model.md | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/Data-model.md b/Data-model.md index b24ad2c..ad5511f 100644 --- a/Data-model.md +++ b/Data-model.md @@ -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