Project Alice
Loading...
Searching...
No Matches
economy.hpp File Reference
#include "container_types.hpp"
#include "dcon_generated.hpp"
Include dependency graph for economy.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  economy::building_information
 
struct  economy::global_economy_state
 
struct  economy::rgo_workers_breakdown
 
struct  economy::construction_status
 
struct  economy::new_factory
 
struct  economy::upgraded_factory
 

Namespaces

namespace  economy
 

Enumerations

enum  economy::commodity_production_type { economy::primary , economy::derivative , economy::both }
 
enum class  economy::worker_effect : uint8_t { economy::none = 0 , economy::input , economy::output , economy::throughput }
 

Functions

std::string_view economy::province_building_type_get_name (economy::province_building_type v)
 
std::string_view economy::province_building_type_get_level_text (economy::province_building_type v)
 
float economy::get_artisan_distribution_slow (sys::state &state, dcon::nation_id n, dcon::commodity_id c)
 
template<typename T >
auto economy::desired_needs_spending (sys::state const &state, T pop_indices)
 
constexpr dcon::commodity_id economy::money (0)
 
void economy::presimulate (sys::state &state)
 
float economy::commodity_daily_production_amount (sys::state &state, dcon::commodity_id c)
 
float economy::rgo_effective_size (sys::state const &state, dcon::nation_id n, dcon::province_id p, dcon::commodity_id c)
 
float economy::rgo_total_effective_size (sys::state &state, dcon::nation_id n, dcon::province_id p)
 
float economy::rgo_total_employment (sys::state &state, dcon::nation_id n, dcon::province_id p)
 
float economy::rgo_full_production_quantity (sys::state const &state, dcon::nation_id n, dcon::province_id p, dcon::commodity_id c)
 
float economy::rgo_max_employment (sys::state &state, dcon::nation_id n, dcon::province_id p, dcon::commodity_id c)
 
float economy::rgo_total_max_employment (sys::state &state, dcon::nation_id n, dcon::province_id p)
 
float economy::subsistence_max_pseudoemployment (sys::state &state, dcon::nation_id n, dcon::province_id p)
 
float economy::factory_max_employment (sys::state const &state, dcon::factory_id f)
 
bool economy::has_factory (sys::state const &state, dcon::state_instance_id si)
 
bool economy::has_building (sys::state const &state, dcon::state_instance_id si, dcon::factory_type_id fac)
 
bool economy::is_bankrupt_debtor_to (sys::state &state, dcon::nation_id debt_holder, dcon::nation_id debtor)
 
void economy::populate_effective_prices (sys::state &state, dcon::nation_id n)
 
float economy::factory_min_input_available (sys::state &state, dcon::nation_id n, dcon::factory_type_fat_id fac_type)
 
float economy::factory_input_total_cost (sys::state &state, dcon::nation_id n, dcon::factory_type_fat_id fac_type)
 
float economy::factory_min_e_input_available (sys::state &state, dcon::nation_id n, dcon::factory_type_fat_id fac_type)
 
float economy::factory_e_input_total_cost (sys::state &state, dcon::nation_id n, dcon::factory_type_fat_id fac_type)
 
float economy::factory_input_multiplier (sys::state &state, dcon::factory_fat_id fac, dcon::nation_id n, dcon::province_id p, dcon::state_instance_id s)
 
float economy::factory_throughput_multiplier (sys::state &state, dcon::factory_type_fat_id fac_type, dcon::nation_id n, dcon::province_id p, dcon::state_instance_id s)
 
float economy::factory_output_multiplier (sys::state &state, dcon::factory_fat_id fac, dcon::nation_id n, dcon::province_id p)
 
float economy::factory_max_production_scale (sys::state &state, dcon::factory_fat_id fac, float mobilization_impact, bool occupied)
 
float economy::factory_desired_raw_profit (dcon::factory_fat_id fac, float spendings)
 
float economy::factory_total_employment (sys::state const &state, dcon::factory_id f)
 
float economy::factory_primary_employment (sys::state const &state, dcon::factory_id f)
 
float economy::factory_secondary_employment (sys::state const &state, dcon::factory_id f)
 
int32_t economy::factory_priority (sys::state const &state, dcon::factory_id f)
 
void economy::set_factory_priority (sys::state &state, dcon::factory_id f, int32_t priority)
 
bool economy::factory_is_profitable (sys::state const &state, dcon::factory_id f)
 
bool economy::nation_is_constructing_factories (sys::state &state, dcon::nation_id n)
 
bool economy::nation_has_closed_factories (sys::state &state, dcon::nation_id n)
 
void economy::initialize (sys::state &state)
 
void economy::regenerate_unsaved_values (sys::state &state)
 
float economy::pop_min_wage_factor (sys::state &state, dcon::nation_id n)
 
float economy::pop_farmer_min_wage (sys::state &state, dcon::nation_id n, float min_wage_factor)
 
float economy::pop_laborer_min_wage (sys::state &state, dcon::nation_id n, float min_wage_factor)
 
float economy::pop_factory_min_wage (sys::state &state, dcon::nation_id n, float min_wage_factor)
 
rgo_workers_breakdown economy::rgo_relevant_population (sys::state &state, dcon::province_id p, dcon::nation_id n)
 
float economy::rgo_desired_worker_norm_profit (sys::state &state, dcon::province_id p, dcon::nation_id n, float min_wage, float total_relevant_population)
 
float economy::rgo_expected_worker_norm_profit (sys::state &state, dcon::province_id p, dcon::nation_id n, dcon::commodity_id c)
 
float economy::factory_type_output_cost (sys::state &state, dcon::nation_id n, dcon::factory_type_id factory_type)
 
float economy::factory_type_input_cost (sys::state &state, dcon::nation_id n, dcon::factory_type_id factory_type)
 
float economy::factory_type_build_cost (sys::state &state, dcon::nation_id n, dcon::factory_type_id factory_type)
 
void economy::update_rgo_employment (sys::state &state)
 
void economy::update_factory_employment (sys::state &state)
 
void economy::daily_update (sys::state &state, bool initiate_buildings)
 
void economy::resolve_constructions (sys::state &state)
 
float economy::base_artisan_profit (sys::state &state, dcon::nation_id n, dcon::commodity_id c)
 
float economy::artisan_scale_limit (sys::state &state, dcon::nation_id n, dcon::commodity_id c)
 
float economy::stockpile_commodity_daily_increase (sys::state &state, dcon::commodity_id c, dcon::nation_id n)
 
float economy::global_market_commodity_daily_increase (sys::state &state, dcon::commodity_id c)
 
float economy::government_consumption (sys::state &state, dcon::nation_id n, dcon::commodity_id c)
 
float economy::nation_factory_consumption (sys::state &state, dcon::nation_id n, dcon::commodity_id c)
 
float economy::nation_pop_consumption (sys::state &state, dcon::nation_id n, dcon::commodity_id c)
 
float economy::nation_total_imports (sys::state &state, dcon::nation_id n)
 
float economy::pop_income (sys::state &state, dcon::pop_id p)
 
float economy::estimate_gold_income (sys::state &state, dcon::nation_id n)
 
float economy::estimate_tariff_income (sys::state &state, dcon::nation_id n)
 
float economy::estimate_social_spending (sys::state &state, dcon::nation_id n)
 
float economy::estimate_pop_payouts_by_income_type (sys::state &state, dcon::nation_id n, culture::income_type in)
 
float economy::estimate_tax_income_by_strata (sys::state &state, dcon::nation_id n, culture::pop_strata ps)
 
float economy::estimate_subsidy_spending (sys::state &state, dcon::nation_id n)
 
float economy::estimate_diplomatic_balance (sys::state &state, dcon::nation_id n)
 
float economy::estimate_domestic_investment (sys::state &state, dcon::nation_id n)
 
float economy::estimate_land_spending (sys::state &state, dcon::nation_id n)
 
float economy::estimate_naval_spending (sys::state &state, dcon::nation_id n)
 
float economy::estimate_construction_spending (sys::state &state, dcon::nation_id n)
 
float economy::estimate_war_subsidies_spending (sys::state &state, dcon::nation_id n)
 
float economy::estimate_reparations_spending (sys::state &state, dcon::nation_id n)
 
float economy::estimate_war_subsidies_income (sys::state &state, dcon::nation_id n)
 
float economy::estimate_reparations_income (sys::state &state, dcon::nation_id n)
 
float economy::estimate_overseas_penalty_spending (sys::state &state, dcon::nation_id n)
 
float economy::estimate_stockpile_filling_spending (sys::state &state, dcon::nation_id n)
 
float economy::estimate_war_subsidies (sys::state &state, dcon::nation_id n)
 
float economy::estimate_daily_income (sys::state &state, dcon::nation_id n)
 
construction_status economy::province_building_construction (sys::state &state, dcon::province_id p, province_building_type t)
 
construction_status economy::factory_upgrade (sys::state &state, dcon::factory_id f)
 
bool economy::state_contains_constructed_factory (sys::state &state, dcon::state_instance_id s, dcon::factory_type_id ft)
 
bool economy::state_contains_factory (sys::state &state, dcon::state_instance_id s, dcon::factory_type_id ft)
 
int32_t economy::state_factory_count (sys::state &state, dcon::state_instance_id sid, dcon::nation_id n)
 
float economy::unit_construction_progress (sys::state &state, dcon::province_land_construction_id c)
 
float economy::unit_construction_progress (sys::state &state, dcon::province_naval_construction_id c)
 
void economy::try_add_factory_to_state (sys::state &state, dcon::state_instance_id s, dcon::factory_type_id t)
 
void economy::bound_budget_settings (sys::state &state, dcon::nation_id n)
 
int32_t economy::most_recent_price_record_index (sys::state &state)
 
int32_t economy::previous_price_record_index (sys::state &state)
 
int32_t economy::most_recent_gdp_record_index (sys::state &state)
 
int32_t economy::previous_gdp_record_index (sys::state &state)
 
float economy::gdp_adjusted (sys::state &state, dcon::nation_id n)
 
void economy::prune_factories (sys::state &state)
 
void economy::go_bankrupt (sys::state &state, dcon::nation_id n)
 
dcon::modifier_id economy::get_province_selector_modifier (sys::state &state)
 
dcon::modifier_id economy::get_province_immigrator_modifier (sys::state &state)
 
bool economy::can_take_loans (sys::state &state, dcon::nation_id n)
 
float economy::interest_payment (sys::state &state, dcon::nation_id n)
 
float economy::max_loan (sys::state &state, dcon::nation_id n)
 
commodity_production_type economy::get_commodity_production_type (sys::state &state, dcon::commodity_id c)
 

Variables

constexpr float economy::subsistence_factor = 15.0f
 
constexpr float economy::subsistence_score_life = 30.0f
 
constexpr float economy::subsistence_score_everyday = 50.0f
 
constexpr float economy::subsistence_score_luxury = 80.0f
 
constexpr float economy::subsistence_score_total = subsistence_score_life + subsistence_score_everyday + subsistence_score_luxury
 
constexpr float economy::production_scale_delta = 0.1f
 
constexpr float economy::factory_closed_threshold = 0.0001f
 
constexpr uint32_t economy::price_history_length = 256
 
constexpr uint32_t economy::gdp_history_length = 128
 
constexpr float economy::rgo_owners_cut = 0.05f