From 80da34efedb17e471ef2da2f2610caca9b8cd8a6 Mon Sep 17 00:00:00 2001 From: Azgaar Date: Sat, 15 Jun 2024 21:57:49 +0200 Subject: [PATCH] Updated Data model (markdown) --- Data-model.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Data-model.md b/Data-model.md index 7c7351b..a437bee 100644 --- a/Data-model.md +++ b/Data-model.md @@ -168,11 +168,25 @@ States (countries) data is stored as an array of objects with strict element ord * `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) +* `military`: `Regiment[]` - list of state regiments, see [military forces page](https://github.com/Azgaar/Fantasy-Map-Generator/wiki/Military-Forces) * `coa`: `object` - 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). The only additional fields are optional `size`: `number`, `x`: `number` and `y`: `number` that controls the emblem position on the map (if it's not default). If emblem is loaded by user, then the value is `{ custom: true }` and cannot be displayed in Armoria * `lock`: `boolean` - `true` if state is locked (not affected by regeneration) * `removed`: `boolean` - `true` if state is removed +### Regiment +* `i`: `number` - regiment id, equals to the array index of regiment in the `state[x].military` array. Not unique, as unique string `regimentStateId-regimentId` is used +* `x`: `number` - regiment x coordinate +* `y`: `number` - regiment y coordinate +* `bx`: `number` - regiment base x coordinate +* `by`: `number` - regiment base y coordinate +* `angle`: `number` - regiment rotation angle degree +* `icon`: `number` - Unicode character to serve as an icon +* `cell`: `number` - original regiment cell id +* `state`: `number` - regiment state id +* `name`: `string` - regiment name +* `n`: `number` - `1` if regiment is a separate unit (like naval units), `0` is not +* `u`: `Record` - regiment content object + ## Provinces Provinces data is stored as an array of objects with strict element order. Element 0 is not used. If religion is removed, the element is not getting removed, but instead a `removed` attribute is added. Object structure: * `i`: `number` - province id, always equal to the array index