aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
author ClarkeCode <clarke.john.robert@gmail.com>2023-03-12 09:01:33 +0100
committer ClarkeCode <clarke.john.robert@gmail.com>2023-03-12 09:01:33 +0100
commitd903162db418870e519da7759f423f24bba59901 (patch)
tree3de4cfa9f54ce217489ae1e172485645be66e3ac /docs
parent516e6eac2731c3458d8742ee245d961b24d9cc25 (diff)
Initial description of Province schema
Diffstat (limited to 'docs')
-rw-r--r--docs/simulation/provinces.md58
1 files changed, 58 insertions, 0 deletions
diff --git a/docs/simulation/provinces.md b/docs/simulation/provinces.md
new file mode 100644
index 0000000..014735c
--- /dev/null
+++ b/docs/simulation/provinces.md
@@ -0,0 +1,58 @@
+# OpenVic2 Provinces
+
+## OpenVic2 Structure
+
+```mermaid
+classDiagram
+ class Province {
+ Int64 id
+ string provinceName
+ string tradeGood
+ Int64 lifeRating
+ bool hasLegalSlavery
+ Int64 fortLevel
+ Int64 navalBaseLevel
+ Int64 railroadLevel
+
+ }
+```
+<!-- The following attributes will need to be added when Nations are added
+ NationId owningNation
+ NationId controllingNation
+ NationId[] coreNations
+-->
+
+## Dataloading
+The `provinces.json` file shall look like:
+```json
+{
+ "provinces": [
+ ...
+ ],
+
+ "regions": [
+ {"id": "", "name": "", "provinceIds": [...]},
+ ...
+ ],
+
+ "continents": [
+ {"id": "", "name": "", "provinceIds": [...]},
+ ...
+ ]
+}
+```
+Where the `"provinces"` array contains valid province JSON objects which conform to the following key-value pairs:
+| Key | type | Required? | Default Value |
+|--|--|--|--|
+| id | int | required | N/A |
+| provinceName | string | required | N/A |
+| tradeGood | string | optional | "no_good" |
+| lifeRating | int | optional | 0 |
+| hasLegalSlavery | bool | optional | false |
+| fortLevel | int | optional | 0 |
+| navalBaseLevel | int | optional | 0 |
+| railroadLevel | int | optional | 0 |
+
+### Notes on values
+- The values of `fortLevel`, `navalBaseLevel`, and `railroadLevel` may not be negative
+- The value of `tradeGood` may only be a Good Identifier string as defined in [goods.md](goods.md) or `"no_good"` \ No newline at end of file