From d903162db418870e519da7759f423f24bba59901 Mon Sep 17 00:00:00 2001 From: ClarkeCode Date: Sun, 12 Mar 2023 04:01:33 -0400 Subject: Initial description of Province schema --- docs/simulation/provinces.md | 58 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 docs/simulation/provinces.md (limited to 'docs/simulation') 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 + + } +``` + + +## 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 -- cgit v1.2.3-56-ga3b1