aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/simulation/calculations.yaml25
1 files changed, 16 insertions, 9 deletions
diff --git a/docs/simulation/calculations.yaml b/docs/simulation/calculations.yaml
index 4c1bbb9..931c254 100644
--- a/docs/simulation/calculations.yaml
+++ b/docs/simulation/calculations.yaml
@@ -79,15 +79,13 @@ Military:
else if location is core: 1
else: defines.military.POP_MIN_SIZE_FOR_REGIMENT_NONCORE_MULTIPLIER
Reinforcing:
- Regiment reinforcements:
+ Regiment reinforcements promille:
formula:
if regiment is full strength: 0
- else: 5 * round(base regiment reinforcements * supply factor * reinforcements multiplier / 5)
- base regiment reinforcements:
- formula: 1000 * max_strength * regiment 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.
- regiment reinforce rate:
+ else: min(trunc(regiment reinforce rate * supply factor * reinforcements multiplier * 1000), 1000)
+ unit type strength: as defined in /units/<unit>.txt
+ 1000: strength is defined in thousands of soldiers. Reinforcements per army uses the number of soldiers.
+ regiment reinforce rate:
if regiment is mobilised: 0.5
else if pop is too small for a single regiment: 0.5
else if pop supports too many regiments: Maximum regiments per soldier POP / number of supported regiments
@@ -111,9 +109,18 @@ Military:
else:
formula: x^(1+i)
x: received supply
- i: 0 based index of regiment's backing pop
- 5 * round(... /5): round to multiple of 5
+ i: 0 based index of regiment's backing pop
+ trunc(... * 1000): Truncated to 1/1000th.
+ min(..., 1000): Capped at max strength.
+ Regiment reinforcements:
+ formula: trunc(unit type strength * Regiment reinforcements promille)
+ unit type strength: as defined in /units/<unit>.txt
+ trunc(unit type strength * ...): Truncated to integers in the case unit type strength isn't an integer already.
Reinforcements per army (tooltip): sum of Regiment reinforcements
+ Regiment experience after reinforcing:
+ formula: xp before reinforcing / (1 + trunc(Regiment reinforcements promille / 3) / 1000)
+ trunc(... / 3): Hardcoded.
+ / 1000: to counter promille.
Regiment experience gain per day of combat:
formula: d6 * defines.military.EXP_GAIN_DIV * (1 + sum of experience gain modifiers) + unexplained
d6: random integer (inclusive) 1-6