aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author wvpm <24685035+wvpm@users.noreply.github.com>2024-01-10 22:58:02 +0100
committer GitHub <noreply@github.com>2024-01-10 22:58:02 +0100
commit0dd0be8e6037fd38c19940f0a82220ce603dd0ed (patch)
tree8ee50eea0a1c7fc949158afe0bbb2ca176ccd7c8
parente6c62c148924767bcc798b27af580bf9f18f724d (diff)
parent5d3a577e1bc893bf62255a2edc21a4e77dab5fe9 (diff)
Merge pull request #188 from OpenVicProject/reinforcements_calculation
Reinforcements calculation
-rw-r--r--docs/simulation/calculations.yaml29
1 files changed, 28 insertions, 1 deletions
diff --git a/docs/simulation/calculations.yaml b/docs/simulation/calculations.yaml
index 11bf049..ab8dd30 100644
--- a/docs/simulation/calculations.yaml
+++ b/docs/simulation/calculations.yaml
@@ -92,4 +92,31 @@ POPs:
owners: total size of owner POPs in state
workers: number of employed workers in RGO
max(0.5: Hardcoded minimum of half the RGO income.
- 2*: Hardcoded value. \ No newline at end of file
+ 2*: Hardcoded value.
+Military:
+ Reinforcements per army:
+ formula: 5 * round(supply factor * sum of unit reinforcements * REINFORCE_SPEED * local reinforce rate * (1 + reinforce_rate) * (1 + reinforce_speed) / 5)
+ supply factor:
+ if unit received all its supplies: 1
+ else: complex graph, see https://www.desmos.com/calculator/gu1zpo01qz
+ unit reinforcements: 1000 * max_strength * unit reinforce rate
+ max_strength: as defined in /units/<unit>.txt
+ 1000: (max_)strength is defined in thousands of soldiers. Reinforcements per army uses the number of soldiers.
+ unit reinforce rate:
+ if unit is mobilised: 0.5
+ else if pop is too small for a single unit: 0.5
+ else if pop supports too many units: number of units it can support / number of supported units
+ else: 1
+ REINFORCE_SPEED: defines.military.REINFORCE_SPEED
+ local reinforce rate:
+ if location owner == army owner: 2
+ else if army is exiled: 0
+ else if location is uncolonised: 0
+ else if location controller is hostile:
+ if location neighbours a province controlled by an ally in this war: 0.5
+ else if location is coastal & not blockaded: 0.25
+ else: 0.1
+ else: 1
+ reinforce_rate: sum of reinforce_rate modifiers from tech
+ reinforce_speed: sum of reinforce_speed modifiers on country
+ 5 * round(... /5): round to multiple of 5 \ No newline at end of file