Updated Data model (markdown)

Azgaar 2021-08-25 16:13:02 +03:00
parent 7d4bf82e33
commit 595e7dd8ad

@ -44,6 +44,7 @@ Both `grid` and `pack` objects include data representing voronoi diagrams and th
* * `pack.vertices.v`: `number[][]` - indexes of vertices adjacent to each vertex. Most vertices have 3 neighboring vertices, bordering vertices has only 2, while the third is still added to the data as `-1`
## Features data
Features represent separate locked areas like islands, lakes and oceans.
### Grid object
* `grid.features`: `object[]` - array containing objects for all enclosed entities of original graph: islands, lakes and oceans. Feature object structure:
@ -97,8 +98,19 @@ World data is mainly stored in typed arrays within `cells` object in both `grid`
# Secondary pack data
Secondary data available as a part of the `pack` object.
## Features
## Cultures
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
## States
## Provinces
@ -109,5 +121,5 @@ Secondary data available as a part of the `pack` object.
# Secondary global data
Secondary data exposed to global.
## Biomes
## Notes
## Notes
## nameBases