aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-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