aboutsummaryrefslogtreecommitdiff
path: root/docs/simulation/calculations.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'docs/simulation/calculations.yaml')
-rw-r--r--docs/simulation/calculations.yaml60
1 files changed, 54 insertions, 6 deletions
diff --git a/docs/simulation/calculations.yaml b/docs/simulation/calculations.yaml
index e9de17a..96c045a 100644
--- a/docs/simulation/calculations.yaml
+++ b/docs/simulation/calculations.yaml
@@ -51,7 +51,44 @@ Economy:
formula: MGQ * GOLD_TO_CASH_RATE
MGQ: Money good quanity = total production of goods with money = yes
GOLD_TO_CASH_RATE: defines.country.GOLD_TO_CASH_RATE
+ Overseas maintenance:
+ See: https://github.com/schombert/Project-Alice/blob/b7889a9c302feed851c039f1a98d73b75be3215a/docs/rules.md#overseas-penalty
Production:
+ Resource gathering operation:
+ base workforce: defined in common/production_types.txt as workforce
+ rgo size:
+ formula: floor(1.5 * ceil(n_workers_in_state / (base workforce * (1 + terrain rgo size modifier)))
+ n_workers_in_state: Total size of POPs in state where POP type is in employees (common/production_types.txt).
+ note: Calculated when starting a new game.
+ Output:
+ formula: base output * rgo size * (1 + overseas penalty) * throughput from workers * (1 + throughput modifier) * (1 + output from workers) * (1 + output modifier)
+ base output: defined in common/production_types.txt
+ overseas penalty:
+ if province is 'overseas': overseas penalty (see economy > budget > overseas maintenance)
+ else: 0
+ workforce:
+ formula: base workforce * rgo size * (1 + rgo size modifier)
+ base workforce: Defined in common/production_types.txt as workforce.
+ rgo size modifier: sum of rgo size modifiers + sum of farm size modifiers (if farm=yes) + sum of mine size modifiers (if mine=yes)
+ job portion of workforce:
+ formula: employees with job / workforce
+ employees with job: Number of POPs employed with the job. Job being an entry in employees in common/production_types.txt.
+ effect from job:
+ formula:
+ if effect_multiplier == 1: effect_multiplier * employees with job / workforce
+ else: effect_multiplier * min(employees with job / workforce, amount)
+ effect_multiplier: defined in common/production_types.txt as part of employees (default 1)
+ amount: defined in common/production_types.txt (default 1)
+ throughput from workers: sum of effect from job for each job with `effect = throughput`
+ output from workers: sum of effect from job for each job with `effect = output`
+ throughput modifier: sum of throughput modifiers (including from owner job)
+ output modifier: sum of output modifiers (including from owner job)
+ modifier from owner job:
+ formula: effect_multiplier * n_owners_in_state / n_pops_in_state
+ effect_multiplier: defined in common/production_types.txt as part of owner (default 1)
+ n_owners_in_state: total size of owner POPs in state
+ n_pops_in_state: total size of all POPs in state
+ note: included in throughput or output modifier
Human resource management:
Vacancies: max employees - employees count
Maximum employees hired per day:
@@ -68,6 +105,17 @@ Economy:
absolute minimum: 50 (hardcoded value)
relative minimum: floor(defines.economy.EMPLOYMENT_HIRE_LOWEST * employees count)
Military:
+ Mobilisation:
+ Mobilised regiment limit:
+ formula: max(MIN_MOBILIZE_LIMIT, regular regiment count) * (1 + mobilization_impact)
+ MIN_MOBILIZE_LIMIT: defines.country.MIN_MOBILIZE_LIMIT
+ regular regiment count: number of deployed non-mobilised regiments
+ mobilization_impact: sum of mobilization_impact modifiers
+ Mobilisation throughput effect:
+ formula: -1 * mobilisation_size * mobilisation_economy_impact
+ -1: mobilisation reduces throughput for RGOs and factories
+ mobilisation_size: sum of mobilisation_size modifiers
+ mobilisation_economy_impact: sum of mobilisation_economy_impact modifiers
Maximum regiments per soldier POP:
if POP size < defines.military.POP_MIN_SIZE_FOR_REGIMENT: 0
else:
@@ -109,7 +157,7 @@ Military:
else:
formula: x^(1+i)
x: received supply
- i: 0 based index of regiment in the army
+ i: 0-based index of regiment in the army
trunc(... * 1000): Truncated to 1/1000th.
min(..., 1000): Capped at max strength.
Regiment reinforcements:
@@ -165,10 +213,10 @@ POPs:
RGO wages:
Owners:
if minimum worker wages > normal worker wage:
- formula: (RGO income - total worker income) * owner POP size / n_owners * (1 - effective tax)
+ formula: (RGO income - total worker income) * owner POP size / n_owners_in_state * (1 - effective tax)
else:
- formula: RGO income * min(0.5, 2 * n_owners / n_workers) * owner POP size / n_owners * (1 - effective tax)
- n_owners: total size of owner POPs in state
+ formula: RGO income * min(0.5, 2 * n_owners_in_state / n_workers) * owner POP size / n_owners_in_state * (1 - effective tax)
+ n_owners_in_state: total size of owner POPs in state
n_workers: number of employed workers in RGO
min(0.5: Hardcoded maximum of half the RGO income.
2 *: Hardcoded value.
@@ -178,8 +226,8 @@ POPs:
if minimum wage > normal wage:
formula: min(minimum wage, RGO income * employed workers in POP / total non-slave employed workers) * (1 - effective tax)
else:
- formula: RGO income * max(0.5, 1 - 2 * n_owners / n_workers) * employed workers in POP / total non-slave employed workers * (1 - effective tax)
- n_owners: total size of owner POPs in state
+ formula: RGO income * max(0.5, 1 - 2 * n_owners_in_state / n_workers) * employed workers in POP / total non-slave employed workers * (1 - effective tax)
+ n_owners_in_state: total size of owner POPs in state
n_workers: number of employed workers in RGO
max(0.5: Hardcoded minimum of half the RGO income.
2 *: Hardcoded value.