diff --git a/Data-model.md b/Data-model.md index 3572761..f2fd8ef 100644 --- a/Data-model.md +++ b/Data-model.md @@ -100,13 +100,13 @@ 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: +Cultures (races, language zones) 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 +* `center`: `number` - cell id of culture center (initial cell) * `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 @@ -118,7 +118,7 @@ Cultures data is stored as an array of objects with strict element order. Elemen * `removed`: `boolean` - `true` if culture is removed ## Burgs -Burgs (settlements) data is stored as an array of objects with strict element order. Element 0 is an empty object. Object structure: +Burgs (settlements) data is stored as an array of objects with strict element order. Element 0 is an empty object. If burg is removed, the element in not getting removed, but instead a `removed` attribute is added. 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 @@ -126,7 +126,7 @@ Burgs (settlements) data is stored as an array of objects with strict element or * `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) +* `feature`: `number` - burg feature id (id of a 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 @@ -141,6 +141,31 @@ Burgs (settlements) data is stored as an array of objects with strict element or * `removed`: `boolean` - `true` if burg is removed ## States +States (countries) data is stored as an array of objects with strict element order. Element 0 is reserved for `neutrals`. If state is removed, the element in not getting removed, but instead a `removed` attribute is added. Object structure: +* `i`: `number` - state id, always equal to the array index +* `name`: `string` - short (proper) form of the state name +* `form`: `string` - state form type. Available types are `Monarchy`, `Republic`, `Theocracy`, `Union`, and `Anarchy` +* `formName`: `string` - string form name, used to get state `fullName` +* `fullName`: `string` - full state name. Combination of the proper name and state `formName` +* `color`: `string` - state color in hex (e.g. `#45ff12`) or link to hatching pattern (e.g. `url(#hatch7)`) +* `center`: `number` - cell id of state center (initial cell) +* `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) +* `culture`: `number` - state culture id (equals to initial cell culture) +* `type`: `string` - state type, see [culture types](https://github.com/Azgaar/Fantasy-Map-Generator/wiki/Culture types) +* `expansionism`: `number` - state expansionism modifier. Used mainly during state generation to spread states not uniformly +* `area`: `number` - state area in pixels +* `burgs`: `number` - number of burgs within the state +* `cells`: `number` - number of cells within the state +* `rural`: `number` - rural (non-burg) population of state cells. In population points +* `urban`: `number` - urban (burg) population of state cells. In population points +* `neighbors`: `number[]` - ids of neighboring (bordering by land) states +* `provinces`: `number[]` - ids of state provinces +* `diplomacy`: `string[]` - diplomatic relations status for all states. 'x' for self and neutrals. Element 0 (neutrals) `diplomacy` is used differently and contains wars story as `string[][]` +* `campaigns`: `object[]` - wars the state participated in. The was is defined as `start`: `number` (year), `end`: `number` (year), `name`: `string` +* `alert`: `number` - state war alert, see [military forces page](https://github.com/Azgaar/Fantasy-Map-Generator/wiki/Military-Forces) +* `military`: `object[]` - list of state regiments, see [military forces page](https://github.com/Azgaar/Fantasy-Map-Generator/wiki/Military-Forces) +* `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 + ## Provinces ## Religions ## Rivers