From 595e7dd8adeb4117883dd42f10d0513c25e8da8d Mon Sep 17 00:00:00 2001 From: Azgaar Date: Wed, 25 Aug 2021 16:13:02 +0300 Subject: [PATCH] Updated Data model (markdown) --- Data-model.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Data-model.md b/Data-model.md index a99b480..8efacca 100644 --- a/Data-model.md +++ b/Data-model.md @@ -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 \ No newline at end of file +## Notes +## nameBases \ No newline at end of file