Skip to content

Commit 9520c12

Browse files
minor adjustments
1 parent 351988a commit 9520c12

File tree

5 files changed

+16
-17
lines changed

5 files changed

+16
-17
lines changed

assets/localisation/en-US/alice.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1310,7 +1310,7 @@ ledger_ppp_gdp_per_capita;GDP(PPP) per 1m people
13101310
ledger_inflation_adjusted_gdp;GDP(inflation-adjusted)
13111311
ledger_inflation_adjusted_gdp_per_capita;GDP(inflation-adjusted) per 1m people
13121312
ledger_standard_of_living;Standard of Living
1313-
alice_ledger_header_gdp_history;GDP(PPP) over time
1313+
alice_ledger_header_gdp_history;GDP(inflation-adjusted) over time
13141314
alice_countryalert_colonialgood_start;You can colonize $region$
13151315
alice_overseas_mil_description;Overseas militancy
13161316
alice_armygroup_go_to_selection;Add/remove units

src/economy/construction.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,7 @@ void emulate_construction_demand(sys::state& state, dcon::nation_id n) {
11701170
// simulate spending on construction of units
11711171
// useful to help the game start with some production of artillery and small arms
11721172

1173-
float income_to_build_units = 10'000.f;
1173+
float income_to_build_units = 1'000.f;
11741174

11751175
if(state.world.nation_get_owned_province_count(n) == 0) {
11761176
return;
@@ -1232,7 +1232,7 @@ void emulate_construction_demand(sys::state& state, dcon::nation_id n) {
12321232
// simulate spending on construction of factories
12331233
// helps with machine tools and cement
12341234

1235-
float income_to_build_factories = 100'000.f;
1235+
float income_to_build_factories = 1'000.f;
12361236

12371237
state.world.nation_for_each_state_ownership(n, [&](auto soid) {
12381238
auto local_state = state.world.state_ownership_get_state(soid);

src/economy/economy.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ void convert_commodities_into_ingredients(
480480
void presimulate(sys::state& state) {
481481
// economic updates without construction
482482
#ifdef NDEBUG
483-
uint32_t steps = 365;
483+
uint32_t steps = 10;
484484
#else
485485
uint32_t steps = 2;
486486
#endif
@@ -1767,11 +1767,11 @@ void update_pop_consumption(
17671767
is_poor = ve::min(1.f, ve::max(0.f, is_poor + (1.f - current_life) * 2.f));
17681768

17691769
auto life_spending_mod = //ve::fp_vector{ 1.f };
1770-
(savings * state.defines.alice_needs_lf_spend) * (1.f - is_poor) + is_poor;
1770+
(state.defines.alice_needs_lf_spend) * (1.f - is_poor) + is_poor;
17711771
auto everyday_spending_mod =
1772-
(savings * state.defines.alice_needs_ev_spend) * (1.f - is_poor);
1772+
(state.defines.alice_needs_ev_spend) * (1.f - is_poor);
17731773
auto luxury_spending_mod =
1774-
(savings * state.defines.alice_needs_lx_spend) * (1.f - is_poor);
1774+
(state.defines.alice_needs_lx_spend) * (1.f - is_poor);
17751775

17761776
// clamp
17771777
life_spending_mod = ve::max(0.f, ve::min(1.f, life_spending_mod));
@@ -2933,7 +2933,7 @@ void daily_update(sys::state& state, bool presimulation, float presimulation_sta
29332933
);
29342934

29352935
decay = ve::max(decay, 0.95f);
2936-
2936+
29372937
// expand the route slower if goods are not actually bought:
29382938
auto bought_A = state.world.market_get_demand_satisfaction(A, c);
29392939
auto bought_B = state.world.market_get_demand_satisfaction(B, c);
@@ -2943,12 +2943,11 @@ void daily_update(sys::state& state, bool presimulation, float presimulation_sta
29432943
bought_B
29442944
);
29452945
change = ve::select(
2946-
change * current_volume > 0.f, // change and volume are collinear
2947-
change * ve::max(0.01f, (bought - 0.5f) * 2.f),
2946+
change * current_volume >= 0.f, // change and volume are collinear
2947+
change * ve::max(0.0000001f, (bought - 0.5f) * 2.f),
29482948
change
29492949
);
29502950

2951-
29522951
change = ve::select(current_volume > 0.05f,
29532952
ve::min(ve::max(change, max_shrinking), max_expansion),
29542953
ve::select(current_volume < -0.05f,

src/economy/economy.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ inline constexpr float factory_closed_threshold = 0.0001f;
126126
inline constexpr uint32_t price_history_length = 256;
127127
inline constexpr uint32_t gdp_history_length = 128;
128128
inline constexpr float price_speed_mod = 0.001f;
129-
inline constexpr float price_rigging = 0.02f;
129+
inline constexpr float price_rigging = 0.001f;
130130
inline constexpr float production_throughput_multiplier = 2.5f; // for the sake of machine tools
131131

132132
// stockpile related things:
@@ -147,8 +147,8 @@ inline constexpr float trade_distance_covered_by_pair_of_workers_per_unit_of_goo
147147
// profit cuts change distribution of incomes
148148
inline constexpr float aristocrats_greed = 0.1f;
149149
inline constexpr float artisans_greed = 0.001f;
150-
inline constexpr float labor_greed_life = 0.5f;
151-
inline constexpr float labor_greed_everyday = 0.1f;
150+
inline constexpr float labor_greed_life = 0.05f;
151+
inline constexpr float labor_greed_everyday = 0.f;
152152
// inline constexpr float capitalists_greed = 1.f; // for future use
153153

154154
void presimulate(sys::state& state);

src/economy/economy_stats.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ ve::fp_vector market_speculation_budget(
618618
auto capital = state.world.state_instance_get_capital(sid);
619619
auto population = state.world.state_instance_get_demographics(sid, demographics::total);
620620
auto wage = state.world.province_get_labor_price(capital, labor::no_education);
621-
auto local_speculation_budget = wage * population / 100.f;
621+
auto local_speculation_budget = wage * population / 20.f;
622622
return ve::max(0.f, local_speculation_budget);
623623
}
624624
ve::fp_vector ve_market_speculation_budget(
@@ -648,15 +648,15 @@ float stockpile_target_speculation(
648648
dcon::market_id m,
649649
dcon::commodity_id c
650650
) {
651-
return std::max(0.f, market_speculation_budget(state, m, c) / (price(state, m, c) + 1.f) - 0.5f);
651+
return std::max(0.f, market_speculation_budget(state, m, c) / (price(state, m, c) + 0.001f) - 0.5f);
652652
}
653653
template<typename M>
654654
ve::fp_vector stockpile_target_speculation(
655655
sys::state const& state,
656656
M m,
657657
dcon::commodity_id c
658658
) {
659-
return ve::max(0.f, market_speculation_budget(state, m, c) / (ve_price(state, m, c) + 1.f) - 0.5f);
659+
return ve::max(0.f, market_speculation_budget(state, m, c) / (ve_price(state, m, c) + 0.001f) - 0.5f);
660660
}
661661
ve::fp_vector ve_stockpile_target_speculation(
662662
sys::state const& state,

0 commit comments

Comments
 (0)