Skip to content

Commit 629036f

Browse files
authored
SPA - Rework expected sol a bit (#77)
Expectation growth is no longer exponential Revert literacy expectation increase Bump upper strata base expectation More tweaks. Are they good? I sure hope so fix save compat
1 parent 71e3ce2 commit 629036f

File tree

3 files changed

+42
-242
lines changed

3 files changed

+42
-242
lines changed

Soft Pop Adjustments/common/scripted_effects/MoG_refresh_sol_modifiers.txt

Lines changed: 40 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ refresh_expected_sol_modifier = {
1212
set_local_variable = {
1313
name = national_weight
1414
value = {
15-
value = 0.05
15+
value = 0.15
1616
add = {
17-
value = 0.35
17+
value = 0.45
1818
multiply = literacy_rate
1919
}
2020
}
@@ -51,9 +51,9 @@ refresh_expected_sol_modifier = {
5151
# scale - How much of average SOL does this strata expect
5252
# literacy_factor - How much impact does literacy have. Pulls expectations upwards towards the average
5353
scope:sol_calc_target_state = {
54-
refresh_strata_expected_sol_modifier = { strata = lower scale = 0.5 literacy_factor = 0.8 }
55-
refresh_strata_expected_sol_modifier = { strata = middle scale = 1 literacy_factor = 0.4 }
56-
refresh_strata_expected_sol_modifier = { strata = upper scale = 2 literacy_factor = 0 }
54+
refresh_strata_expected_sol_modifier = { strata = lower scale = -10 literacy_factor = 0.5 }
55+
refresh_strata_expected_sol_modifier = { strata = middle scale = 0 literacy_factor = 0 }
56+
refresh_strata_expected_sol_modifier = { strata = upper scale = 11.5 literacy_factor = 0 }
5757
}
5858
#}
5959
}
@@ -64,6 +64,21 @@ refresh_strata_expected_sol_modifier = {
6464
remove_modifier = mog_$strata$_strata_expected_sol_from_average
6565
}
6666

67+
save_temporary_scope_value_as = {
68+
name = scale
69+
value = {
70+
value = $scale$
71+
# Pull expectations towards average sol based on literacy
72+
multiply = {
73+
value = 1
74+
subtract = {
75+
value = $literacy_factor$
76+
multiply = literacy_rate
77+
}
78+
}
79+
}
80+
}
81+
6782
save_temporary_scope_value_as = {
6883
name = base_expectation
6984
value = {
@@ -76,60 +91,44 @@ refresh_strata_expected_sol_modifier = {
7691
name = scaled_average_sol
7792
value = {
7893
value = scope:weighted_average_sol
79-
multiply = $scale$
94+
add = scope:scale
8095
}
8196
}
8297

83-
save_temporary_scope_value_as = {
84-
name = expected_sol_from_average
85-
value = {
98+
set_local_variable = {
99+
name = expectation_modifier
100+
value = {
86101
if = { # Below base expectation, slope towards base strata expectation, rather than zero
87102
limit = {
88103
scope:scaled_average_sol < scope:base_expectation
89104
}
90105
value = owner.modifier:state_$strata$_strata_expected_sol_add
91106
add = {
92-
value = scope:average_expected_sol_from_literacy
93-
multiply = $scale$
94-
divide = scope:base_expectation
95-
multiply = scope:weighted_average_sol
107+
value = scope:weighted_average_sol
108+
multiply = scope:average_expected_sol_from_literacy
109+
divide = {
110+
value = owner.modifier:state_$strata$_strata_expected_sol_add
111+
subtract = scope:scale
112+
add = scope:average_expected_sol_from_literacy
113+
}
96114
}
97115
}
98116
else = {
99117
value = scope:scaled_average_sol
100-
101-
# Scale slope down slightly to keep average expectations below median sol
102-
subtract = scope:base_expectation
103-
multiply = 0.8
104-
add = scope:base_expectation
105118
}
106-
}
107-
}
108-
109-
set_local_variable = {
110-
name = expectation_modifier
111-
value = {
112-
value = scope:expected_sol_from_average
113119

114-
if = { # Pull expectations upwards towards average sol based on literacy
115-
limit = {
116-
scope:expected_sol_from_average < scope:weighted_average_sol
117-
}
118-
multiply = {
119-
value = 1
120-
subtract = {
121-
value = $literacy_factor$
122-
multiply = literacy_rate
123-
}
124-
}
125-
add = {
126-
value = scope:weighted_average_sol
127-
multiply = $literacy_factor$
128-
multiply = literacy_rate
129-
}
120+
# If the average is not starving, the floor can be a little higher
121+
min = {
122+
value = scope:weighted_average_sol
123+
subtract = 5 # define:NPops|SOL_STARVING_THRESHOLD
124+
divide = 2
125+
add = owner.modifier:state_$strata$_strata_expected_sol_add
130126
}
131127

132128
# Don't double count base expectations in the modifier
129+
# This also removes the *average* effect of expected sol from literacy
130+
# - a highly literate pop surrounded by low literacy pops will have raised expectations
131+
# - a low literacy pop surronded by highly litereate pops will have lowered expectations
133132
subtract = scope:base_expectation
134133
}
135134
}

Soft Pop Adjustments/common/static_modifiers/MoG_SPA_static_modifiers.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,6 @@ mog_upper_strata_expected_sol_from_average = {
3333

3434
mog_spa_base_sol_from_literacy = {
3535
icon = "gfx/interface/icons/generic_icons/sol_icon.dds"
36-
state_expected_sol_from_literacy = 5 # Calibrated on the base modifier being 5 -> for total = 10.
36+
state_upper_strata_expected_sol_add = 6.52670 # Calibrated on the base modifier being 15 -> for total = 21.52670. (11.52670 above middle class = 3x middle class income)
37+
#state_expected_sol_from_literacy = 5 # Calibrated on the base modifier being 5 -> for total = 10.
3738
}

Soft Pop Adjustments/common/technology/technologies/MoG_SPA_society.txt

Lines changed: 0 additions & 200 deletions
This file was deleted.

0 commit comments

Comments
 (0)