From 8a33982e543b7fb8c09be90ebadb33fe7f99b52f Mon Sep 17 00:00:00 2001 From: hop311 Date: Sat, 23 Dec 2023 18:26:05 +0000 Subject: Fixed TGC compatibility + misc cleanup --- src/openvic-simulation/dataloader/Dataloader.cpp | 25 ++++--- src/openvic-simulation/economy/Good.cpp | 6 ++ .../history/DiplomaticHistory.cpp | 8 +- src/openvic-simulation/interface/GFX.cpp | 16 +++- src/openvic-simulation/interface/GFX.hpp | 20 ++++- src/openvic-simulation/interface/GUI.cpp | 6 +- src/openvic-simulation/interface/GUI.hpp | 3 +- src/openvic-simulation/map/Map.cpp | 2 +- src/openvic-simulation/military/Unit.cpp | 4 +- src/openvic-simulation/misc/Decision.cpp | 25 +++---- src/openvic-simulation/misc/Decision.hpp | 10 +-- src/openvic-simulation/misc/Event.cpp | 16 ++-- src/openvic-simulation/misc/Event.hpp | 9 ++- src/openvic-simulation/misc/Modifier.cpp | 86 +++++++++++++--------- 14 files changed, 145 insertions(+), 91 deletions(-) (limited to 'src/openvic-simulation') diff --git a/src/openvic-simulation/dataloader/Dataloader.cpp b/src/openvic-simulation/dataloader/Dataloader.cpp index abaaf8b..82f86c6 100644 --- a/src/openvic-simulation/dataloader/Dataloader.cpp +++ b/src/openvic-simulation/dataloader/Dataloader.cpp @@ -779,18 +779,6 @@ bool Dataloader::load_defines(GameManager& game_manager) const { Logger::error("Failed to load issues!"); ret = false; } - if (!game_manager.get_politics_manager().load_national_foci_file( - game_manager.get_pop_manager(), game_manager.get_economy_manager().get_good_manager(), game_manager.get_modifier_manager(), parse_defines(lookup_file(national_foci_file)).get_file_node() - )) { - Logger::error("Failed to load national foci!"); - ret = false; - } - if (!game_manager.get_politics_manager().get_national_value_manager().load_national_values_file( - game_manager.get_modifier_manager(), parse_defines(lookup_file(national_values_file)).get_file_node() - )) { - Logger::error("Failed to load national values!"); - ret = false; - } if (!game_manager.get_economy_manager().load_production_types_file(game_manager.get_pop_manager(), parse_defines(lookup_file(production_types_file)).get_file_node() )) { @@ -810,6 +798,19 @@ bool Dataloader::load_defines(GameManager& game_manager) const { if (!_load_technologies(game_manager)) { ret = false; } + if (!game_manager.get_politics_manager().load_national_foci_file( + game_manager.get_pop_manager(), game_manager.get_economy_manager().get_good_manager(), + game_manager.get_modifier_manager(), parse_defines(lookup_file(national_foci_file)).get_file_node() + )) { + Logger::error("Failed to load national foci!"); + ret = false; + } + if (!game_manager.get_politics_manager().get_national_value_manager().load_national_values_file( + game_manager.get_modifier_manager(), parse_defines(lookup_file(national_values_file)).get_file_node() + )) { + Logger::error("Failed to load national values!"); + ret = false; + } if (!game_manager.get_crime_manager().load_crime_modifiers( game_manager.get_modifier_manager(), parse_defines(lookup_file(crime_modifiers_file)).get_file_node() )) { diff --git a/src/openvic-simulation/economy/Good.cpp b/src/openvic-simulation/economy/Good.cpp index 44b896b..5940df2 100644 --- a/src/openvic-simulation/economy/Good.cpp +++ b/src/openvic-simulation/economy/Good.cpp @@ -106,9 +106,15 @@ bool GoodManager::generate_modifiers(ModifierManager& modifier_manager) const { } }; + good_modifier("artisan_goods_input"); + good_modifier("artisan_goods_output"); + good_modifier("artisan_goods_throughput"); + good_modifier("factory_goods_input"); good_modifier("factory_goods_output"); good_modifier("factory_goods_throughput"); + good_modifier("rgo_goods_input"); good_modifier("rgo_goods_output"); + good_modifier("rgo_goods_throughput"); good_modifier("rgo_size"); return ret; diff --git a/src/openvic-simulation/history/DiplomaticHistory.cpp b/src/openvic-simulation/history/DiplomaticHistory.cpp index ce55001..9fd6060 100644 --- a/src/openvic-simulation/history/DiplomaticHistory.cpp +++ b/src/openvic-simulation/history/DiplomaticHistory.cpp @@ -186,8 +186,8 @@ bool DiplomaticHistoryManager::load_war_history_file(GameManager const& game_man } if (participant_to_remove == nullptr) { - Logger::error("In history of war ", name, " at date ", current_date.to_string(), ": Attempted to remove attacking country ", country.get_identifier(), " which was not present!"); - return false; + Logger::warning("In history of war ", name, " at date ", current_date.to_string(), ": Attempted to remove attacking country ", country.get_identifier(), " which was not present!"); + return true; } participant_to_remove->exited.emplace(current_date); @@ -204,8 +204,8 @@ bool DiplomaticHistoryManager::load_war_history_file(GameManager const& game_man } if (participant_to_remove == nullptr) { - Logger::error("In history of war ", name, " at date ", current_date.to_string(), ": Attempted to remove attacking country ", country.get_identifier(), " which was not present!"); - return false; + Logger::warning("In history of war ", name, " at date ", current_date.to_string(), ": Attempted to remove attacking country ", country.get_identifier(), " which was not present!"); + return true; } participant_to_remove->exited.emplace(current_date); diff --git a/src/openvic-simulation/interface/GFX.cpp b/src/openvic-simulation/interface/GFX.cpp index 927b832..f9ae56b 100644 --- a/src/openvic-simulation/interface/GFX.cpp +++ b/src/openvic-simulation/interface/GFX.cpp @@ -15,9 +15,9 @@ node_callback_t Sprite::expect_sprite(callback_t&&> call "LineChartType", ZERO_OR_MORE, _expect_instance(callback), "textSpriteType", ZERO_OR_MORE, _expect_instance(callback), "maskedShieldType", ZERO_OR_MORE, _expect_instance(callback), + "tileSpriteType", ZERO_OR_MORE, _expect_instance(callback), // TODO - add the rest of the sprite types "corneredTileSpriteType", ZERO_OR_MORE, success_callback, - "tileSpriteType", ZERO_OR_MORE, success_callback, "BarChartType", ZERO_OR_MORE, success_callback, "scrollingSprite", ZERO_OR_MORE, success_callback ); @@ -42,6 +42,20 @@ bool TextureSprite::_fill_key_map(key_map_t& key_map) { return ret; } +TileTextureSprite::TileTextureSprite() : texture_file {}, size {} {} + +bool TileTextureSprite::_fill_key_map(key_map_t& key_map) { + bool ret = Sprite::_fill_key_map(key_map); + ret &= add_key_map_entries(key_map, + "texturefile", ZERO_OR_ONE, expect_string(assign_variable_callback_string(texture_file)), + "size", ZERO_OR_ONE, expect_ivec2(assign_variable_callback(size)), + + "norefcount", ZERO_OR_ONE, success_callback, + "loadType", ZERO_OR_ONE, success_callback + ); + return ret; +} + ProgressBar::ProgressBar() : back_colour {}, progress_colour {} {} bool ProgressBar::_fill_key_map(key_map_t& key_map) { diff --git a/src/openvic-simulation/interface/GFX.hpp b/src/openvic-simulation/interface/GFX.hpp index ff27613..c7523b3 100644 --- a/src/openvic-simulation/interface/GFX.hpp +++ b/src/openvic-simulation/interface/GFX.hpp @@ -45,7 +45,7 @@ namespace OpenVic::GFX { std::string PROPERTY(texture_file); frame_t PROPERTY(no_of_frames); - // TODO - norefcount, effectFile, allwaystransparent + // TODO - effectFile, allwaystransparent protected: TextureSprite(); @@ -59,6 +59,24 @@ namespace OpenVic::GFX { OV_DETAIL_GET_TYPE }; + class TileTextureSprite final : public Sprite { + friend std::unique_ptr std::make_unique(); + + std::string PROPERTY(texture_file); + ivec2_t PROPERTY(size); + + protected: + TileTextureSprite(); + + bool _fill_key_map(NodeTools::key_map_t& key_map) override; + + public: + TileTextureSprite(TileTextureSprite&&) = default; + virtual ~TileTextureSprite() = default; + + OV_DETAIL_GET_TYPE + }; + class ProgressBar final : public Sprite { friend std::unique_ptr std::make_unique(); diff --git a/src/openvic-simulation/interface/GUI.cpp b/src/openvic-simulation/interface/GUI.cpp index 244909e..23a577c 100644 --- a/src/openvic-simulation/interface/GUI.cpp +++ b/src/openvic-simulation/interface/GUI.cpp @@ -93,7 +93,9 @@ bool BaseButton::_fill_key_map(NodeTools::key_map_t& key_map, UIManager const& u bool ret = Element::_fill_key_map(key_map, ui_manager); // look up sprite registry for texture sprite with name... ret &= add_key_map_entries(key_map, - "quadTextureSprite", ONE_EXACTLY, + "quadTextureSprite", ZERO_OR_ONE, + expect_string(ui_manager.expect_sprite_str(assign_variable_callback_pointer(sprite)), true), + "spriteType", ZERO_OR_ONE, expect_string(ui_manager.expect_sprite_str(assign_variable_callback_pointer(sprite)), true), "shortcut", ZERO_OR_ONE, success_callback // TODO - load and use shortcuts (how to integrate with custom keybinds?) ); @@ -160,7 +162,7 @@ bool OverlappingElementsBox::_fill_key_map(NodeTools::key_map_t& key_map, UIMana bool ret = AlignedElement::_fill_key_map(key_map, ui_manager); ret &= add_key_map_entries(key_map, "size", ONE_EXACTLY, expect_fvec2(assign_variable_callback(size)), - "spacing", ONE_EXACTLY, success_callback + "spacing", ONE_EXACTLY, expect_fixed_point(assign_variable_callback(spacing)) ); return ret; } diff --git a/src/openvic-simulation/interface/GUI.hpp b/src/openvic-simulation/interface/GUI.hpp index 47bd57d..d658adf 100644 --- a/src/openvic-simulation/interface/GUI.hpp +++ b/src/openvic-simulation/interface/GUI.hpp @@ -196,8 +196,7 @@ namespace OpenVic::GUI { friend std::unique_ptr std::make_unique(); fvec2_t PROPERTY(size); - - // TODO - spacing + fixed_point_t PROPERTY(spacing); protected: OverlappingElementsBox(); diff --git a/src/openvic-simulation/map/Map.cpp b/src/openvic-simulation/map/Map.cpp index ec4691d..99108e4 100644 --- a/src/openvic-simulation/map/Map.cpp +++ b/src/openvic-simulation/map/Map.cpp @@ -27,7 +27,7 @@ Mapmode::base_stripe_t Mapmode::get_base_stripe_colours(Map const& map, Province Map::Map() : width { 0 }, height { 0 }, max_provinces { Province::MAX_INDEX }, selected_province_index { Province::NULL_INDEX }, - highest_province_population { 0 }, total_map_population { 0 } {} + highest_province_population { 0 }, total_map_population { 0 } {} bool Map::add_province(std::string_view identifier, colour_t colour) { if (provinces.size() >= max_provinces) { diff --git a/src/openvic-simulation/military/Unit.cpp b/src/openvic-simulation/military/Unit.cpp index 98fe392..0862741 100644 --- a/src/openvic-simulation/military/Unit.cpp +++ b/src/openvic-simulation/military/Unit.cpp @@ -204,6 +204,8 @@ bool UnitManager::generate_modifiers(ModifierManager& modifier_manager) const { ret &= modifier_manager.register_complex_modifier(identifier); + stat_modifier("_attack", true, RAW_DECIMAL); + stat_modifier("_defence", true, RAW_DECIMAL); stat_modifier("_default_organisation", true, RAW_DECIMAL); stat_modifier("_maximum_speed", true, RAW_DECIMAL); stat_modifier("_build_time", false, INT); @@ -212,8 +214,6 @@ bool UnitManager::generate_modifiers(ModifierManager& modifier_manager) const { switch (type) { case Unit::type_t::LAND: stat_modifier("_reconnaissance", true, RAW_DECIMAL); - stat_modifier("_attack", true, RAW_DECIMAL); - stat_modifier("_defence", true, RAW_DECIMAL); stat_modifier("_discipline", true, PROPORTION_DECIMAL); stat_modifier("_support", true, PROPORTION_DECIMAL); stat_modifier("_maneuver", true, INT); diff --git a/src/openvic-simulation/misc/Decision.cpp b/src/openvic-simulation/misc/Decision.cpp index f1f2b6c..d50a16a 100644 --- a/src/openvic-simulation/misc/Decision.cpp +++ b/src/openvic-simulation/misc/Decision.cpp @@ -4,18 +4,16 @@ using namespace OpenVic; using namespace OpenVic::NodeTools; Decision::Decision( - std::string_view new_identifier, bool new_alert, bool new_news, - std::string_view new_news_title, std::string_view new_news_desc_long, - std::string_view new_news_desc_medium, std::string_view new_news_desc_short, + std::string_view new_identifier, bool new_alert, bool new_news, std::string_view new_news_title, + std::string_view new_news_desc_long, std::string_view new_news_desc_medium, std::string_view new_news_desc_short, std::string_view new_picture ) : HasIdentifier { new_identifier }, alert { new_alert }, news { new_news }, news_title { new_news_title }, news_desc_long { new_news_desc_long }, news_desc_medium { new_news_desc_medium }, news_desc_short { new_news_desc_short }, picture { new_picture } {} bool DecisionManager::add_decision( - std::string_view identifier, bool alert, bool news, std::string_view news_title, - std::string_view news_desc_long, std::string_view news_desc_medium, - std::string_view news_desc_short, std::string_view picture + std::string_view identifier, bool alert, bool news, std::string_view news_title, std::string_view news_desc_long, + std::string_view news_desc_medium, std::string_view news_desc_short, std::string_view picture ) { if (identifier.empty()) { Logger::error("Invalid decision identifier - empty!"); @@ -35,14 +33,7 @@ bool DecisionManager::add_decision( } return decisions.add_item({ - identifier, - alert, - news, - news_title, - news_desc_long, - news_desc_medium, - news_desc_short, - picture + identifier, alert, news, news_title, news_desc_long, news_desc_medium, news_desc_short, picture }, duplicate_warning_callback); } @@ -65,9 +56,11 @@ bool DecisionManager::load_decision_file(ast::NodeCPtr root) { "effect", ONE_EXACTLY, success_callback, //TODO "ai_will_do", ZERO_OR_ONE, success_callback //TODO )(node); - ret &= add_decision(identifier, alert, news, news_title, news_desc_long, news_desc_medium, news_desc_short, picture); + ret &= add_decision( + identifier, alert, news, news_title, news_desc_long, news_desc_medium, news_desc_short, picture + ); return ret; } ) )(root); -} \ No newline at end of file +} diff --git a/src/openvic-simulation/misc/Decision.hpp b/src/openvic-simulation/misc/Decision.hpp index 452512d..32141fe 100644 --- a/src/openvic-simulation/misc/Decision.hpp +++ b/src/openvic-simulation/misc/Decision.hpp @@ -18,9 +18,8 @@ namespace OpenVic { const std::string PROPERTY(picture); Decision( - std::string_view new_identifier, bool new_alert, bool new_news, - std::string_view new_news_title, std::string_view new_news_desc_long, - std::string_view new_news_desc_medium, std::string_view new_news_desc_short, + std::string_view new_identifier, bool new_alert, bool new_news, std::string_view new_news_title, + std::string_view new_news_desc_long, std::string_view new_news_desc_medium, std::string_view new_news_desc_short, std::string_view new_picture ); @@ -34,9 +33,8 @@ namespace OpenVic { public: bool add_decision( - std::string_view identifier, bool alert, bool news, std::string_view news_title, - std::string_view news_desc_long, std::string_view news_desc_medium, - std::string_view news_desc_short, std::string_view picture + std::string_view identifier, bool alert, bool news, std::string_view news_title, std::string_view news_desc_long, + std::string_view news_desc_medium, std::string_view news_desc_short, std::string_view picture ); bool load_decision_file(ast::NodeCPtr root); diff --git a/src/openvic-simulation/misc/Event.cpp b/src/openvic-simulation/misc/Event.cpp index b7046af..4507de4 100644 --- a/src/openvic-simulation/misc/Event.cpp +++ b/src/openvic-simulation/misc/Event.cpp @@ -20,7 +20,7 @@ Event::Event( news_desc_long { new_news_desc_long }, news_desc_medium { new_news_desc_medium }, news_desc_short { new_news_desc_short }, election { new_election }, election_issue_group { new_election_issue_group }, options { std::move(new_options) } {} -OnAction::OnAction(std::string_view new_identifier, weight_map_t new_weighted_events) +OnAction::OnAction(std::string_view new_identifier, weight_map_t&& new_weighted_events) : HasIdentifier { new_identifier }, weighted_events { std::move(new_weighted_events) } {} bool EventManager::register_event( @@ -72,7 +72,7 @@ bool EventManager::register_event( }, duplicate_warning_callback); } -bool EventManager::add_on_action(std::string_view identifier, OnAction::weight_map_t weighted_events) { +bool EventManager::add_on_action(std::string_view identifier, OnAction::weight_map_t&& weighted_events) { if (identifier.empty()) { Logger::error("Invalid decision identifier - empty!"); return false; @@ -149,8 +149,6 @@ bool EventManager::load_on_action_file(ast::NodeCPtr root) { bool ret = expect_dictionary([this](std::string_view identifier, ast::NodeCPtr node) -> bool { OnAction::weight_map_t weighted_events; bool ret = expect_dictionary([this, &identifier, &weighted_events](std::string_view weight_str, ast::NodeCPtr event_node) -> bool { - Event const* event = nullptr; - bool ret = false; uint64_t weight = StringUtils::string_to_uint64(weight_str, &ret); if (!ret) { @@ -158,12 +156,18 @@ bool EventManager::load_on_action_file(ast::NodeCPtr root) { return ret; } + Event const* event = nullptr; ret &= expect_event_identifier(assign_variable_callback_pointer(event))(event_node); if (event != nullptr) { ret &= weighted_events.emplace(event, weight).second; - } else Logger::warning("Non-existing event ", event->get_identifier(), " loaded on action ", identifier, "with weight", weight, "!"); - + } else { + Logger::warning( + "Non-existing event ", event->get_identifier(), " loaded on action ", identifier, "with weight", + weight, "!" + ); + } + return ret; } )(node); diff --git a/src/openvic-simulation/misc/Event.hpp b/src/openvic-simulation/misc/Event.hpp index a518f78..71957c4 100644 --- a/src/openvic-simulation/misc/Event.hpp +++ b/src/openvic-simulation/misc/Event.hpp @@ -65,13 +65,14 @@ namespace OpenVic { struct OnAction : HasIdentifier { friend struct EventManager; - using weight_map_t = std::map; + + using weight_map_t = std::map; private: weight_map_t PROPERTY(weighted_events); - OnAction(std::string_view new_identifier, weight_map_t new_weighted_events); - + OnAction(std::string_view new_identifier, weight_map_t&& new_weighted_events); + public: OnAction(OnAction&&) = default; }; @@ -90,7 +91,7 @@ namespace OpenVic { std::vector&& options ); - bool add_on_action(std::string_view identifier, OnAction::weight_map_t new_weighted_events); + bool add_on_action(std::string_view identifier, OnAction::weight_map_t&& new_weighted_events); bool load_event_file(IssueManager const& issue_manager, ast::NodeCPtr root); bool load_on_action_file(ast::NodeCPtr root); diff --git a/src/openvic-simulation/misc/Modifier.cpp b/src/openvic-simulation/misc/Modifier.cpp index 40698e5..f22a2cc 100644 --- a/src/openvic-simulation/misc/Modifier.cpp +++ b/src/openvic-simulation/misc/Modifier.cpp @@ -100,12 +100,21 @@ bool ModifierManager::setup_modifier_effects() { using enum ModifierEffect::format_t; /* Country Modifier Effects */ + ret &= add_modifier_effect("administrative_efficiency", true); ret &= add_modifier_effect("administrative_efficiency_modifier", true); ret &= add_modifier_effect("badboy", false, RAW_DECIMAL); + ret &= add_modifier_effect("cb_creation_speed", true); //seemingly works the same way as cb_generation_speed_modifier ret &= add_modifier_effect("cb_generation_speed_modifier", true); + ret &= add_modifier_effect("colonial_life_rating", false, INT); + ret &= add_modifier_effect("colonial_migration", true); + ret &= add_modifier_effect("colonial_points", true, INT); + ret &= add_modifier_effect("colonial_prestige", true); ret &= add_modifier_effect("core_pop_consciousness_modifier", false, RAW_DECIMAL); ret &= add_modifier_effect("core_pop_militancy_modifier", false, RAW_DECIMAL); + ret &= add_modifier_effect("dig_in_cap", true, INT); + ret &= add_modifier_effect("diplomatic_points", true); ret &= add_modifier_effect("diplomatic_points_modifier", true); + ret &= add_modifier_effect("education_efficiency", true); ret &= add_modifier_effect("education_efficiency_modifier", true); ret &= add_modifier_effect("factory_cost", false); ret &= add_modifier_effect("factory_input", false); @@ -115,23 +124,32 @@ bool ModifierManager::setup_modifier_effects() { ret &= add_modifier_effect("global_assimilation_rate", true); ret &= add_modifier_effect("global_immigrant_attract", true); ret &= add_modifier_effect("global_pop_consciousness_modifier", false, RAW_DECIMAL); + ret &= add_modifier_effect("global_pop_growth", true); ret &= add_modifier_effect("global_pop_militancy_modifier", false, RAW_DECIMAL); ret &= add_modifier_effect("global_population_growth", true); ret &= add_modifier_effect("goods_demand", false); ret &= add_modifier_effect("import_cost", false); + ret &= add_modifier_effect("increase_research", true); + ret &= add_modifier_effect("influence", true); ret &= add_modifier_effect("influence_modifier", true); ret &= add_modifier_effect("issue_change_speed", true); + ret &= add_modifier_effect("land_attack_modifier", true); + ret &= add_modifier_effect("land_attrition", false); + ret &= add_modifier_effect("land_defense_modifier", true); ret &= add_modifier_effect("land_organisation", true); ret &= add_modifier_effect("land_unit_start_experience", true, RAW_DECIMAL); ret &= add_modifier_effect("leadership", true, RAW_DECIMAL); ret &= add_modifier_effect("leadership_modifier", true); + ret &= add_modifier_effect("literacy_con_impact", false); ret &= add_modifier_effect("loan_interest", false); ret &= add_modifier_effect("max_loan_modifier", true); ret &= add_modifier_effect("max_military_spending", true); + ret &= add_modifier_effect("max_national_focus", true, INT); ret &= add_modifier_effect("max_social_spending", true); ret &= add_modifier_effect("max_tariff", true); ret &= add_modifier_effect("max_tax", true); ret &= add_modifier_effect("max_war_exhaustion", true, PERCENTAGE_DECIMAL); + ret &= add_modifier_effect("military_tactics", true); ret &= add_modifier_effect("min_military_spending", true); ret &= add_modifier_effect("min_social_spending", true); ret &= add_modifier_effect("min_tariff", true); @@ -139,76 +157,73 @@ bool ModifierManager::setup_modifier_effects() { ret &= add_modifier_effect("mobilisation_economy_impact", false); ret &= add_modifier_effect("mobilisation_impact", false); ret &= add_modifier_effect("mobilisation_size", true); + ret &= add_modifier_effect("mobilization_economy_impact", false); + ret &= add_modifier_effect("mobilization_impact", false); + ret &= add_modifier_effect("mobilization_size", true); + ret &= add_modifier_effect("naval_attack_modifier", true); + ret &= add_modifier_effect("naval_attrition", false); + ret &= add_modifier_effect("naval_defense_modifier", true); ret &= add_modifier_effect("naval_organisation", true); ret &= add_modifier_effect("naval_unit_start_experience", true, RAW_DECIMAL); ret &= add_modifier_effect("non_accepted_pop_consciousness_modifier", false, RAW_DECIMAL); ret &= add_modifier_effect("non_accepted_pop_militancy_modifier", false, RAW_DECIMAL); ret &= add_modifier_effect("org_regain", true); + ret &= add_modifier_effect("pension_level", true); + ret &= add_modifier_effect("permanent_prestige", true, RAW_DECIMAL); + ret &= add_modifier_effect("plurality", true, PERCENTAGE_DECIMAL); ret &= add_modifier_effect("political_reform_desire", false); + ret &= add_modifier_effect("pop_growth", true); ret &= add_modifier_effect("prestige", true, RAW_DECIMAL); + ret &= add_modifier_effect("regular_experience_level", true, RAW_DECIMAL); + ret &= add_modifier_effect("reinforce_rate", true); ret &= add_modifier_effect("research_points", true, RAW_DECIMAL); ret &= add_modifier_effect("research_points_modifier", true); ret &= add_modifier_effect("research_points_on_conquer", true); ret &= add_modifier_effect("rgo_output", true); ret &= add_modifier_effect("RGO_output", true); + ret &= add_modifier_effect("rgo_size", true); + ret &= add_modifier_effect("RGO_size", true); ret &= add_modifier_effect("rgo_throughput", true); ret &= add_modifier_effect("RGO_throughput", true); ret &= add_modifier_effect("ruling_party_support", true); + ret &= add_modifier_effect("shared_prestige", true, RAW_DECIMAL); ret &= add_modifier_effect("social_reform_desire", false); + ret &= add_modifier_effect("soldier_to_pop_loss", true); + ret &= add_modifier_effect("seperatism", false); // paradox typo ret &= add_modifier_effect("supply_consumption", false); + ret &= add_modifier_effect("supply_range", true); + ret &= add_modifier_effect("suppression_points_modifier", true); + ret &= add_modifier_effect("tariff_efficiency_modifier", true); + ret &= add_modifier_effect("tax_eff", true); ret &= add_modifier_effect("tax_efficiency", true); + ret &= add_modifier_effect("unit_recruitment_time", false); ret &= add_modifier_effect("unit_start_experience", true, RAW_DECIMAL); ret &= add_modifier_effect("war_exhaustion", false); - ret &= add_modifier_effect("reinforce_rate", true); - ret &= add_modifier_effect("colonial_migration", true); - ret &= add_modifier_effect("supply_range", true); - ret &= add_modifier_effect("colonial_points", true, INT); - ret &= add_modifier_effect("diplomatic_points", true); - ret &= add_modifier_effect("cb_creation_speed", true); //seemingly works the same way as cb_generation_speed_modifier - ret &= add_modifier_effect("education_efficiency", true); - ret &= add_modifier_effect("increase_research", true); - ret &= add_modifier_effect("influence", true); - ret &= add_modifier_effect("administrative_efficiency", true); - ret &= add_modifier_effect("tax_eff", true); - ret &= add_modifier_effect("military_tactics", true); - ret &= add_modifier_effect("dig_in_cap", true, INT); - ret &= add_modifier_effect("max_national_focus", true, INT); - ret &= add_modifier_effect("regular_experience_level", true, RAW_DECIMAL); - ret &= add_modifier_effect("land_attrition", false); - ret &= add_modifier_effect("naval_attrition", false); - ret &= add_modifier_effect("permanent_prestige", true, RAW_DECIMAL); - ret &= add_modifier_effect("shared_prestige", true, RAW_DECIMAL); - ret &= add_modifier_effect("colonial_prestige", true); - ret &= add_modifier_effect("soldier_to_pop_loss", true); - ret &= add_modifier_effect("pop_growth", true); - ret &= add_modifier_effect("plurality", true, PERCENTAGE_DECIMAL); - ret &= add_modifier_effect("suppression_points_modifier", true); - ret &= add_modifier_effect("colonial_life_rating", false, INT); - ret &= add_modifier_effect("seperatism", false); //paradox typo /* Province Modifier Effects */ ret &= add_modifier_effect("assimilation_rate", true); ret &= add_modifier_effect("boost_strongest_party", false); + ret &= add_modifier_effect("farm_rgo_eff", true); + ret &= add_modifier_effect("farm_RGO_eff", true); + ret &= add_modifier_effect("farm_rgo_size", true); + ret &= add_modifier_effect("farm_RGO_size", true); + ret &= add_modifier_effect("flashpoint_tension", false); ret &= add_modifier_effect("immigrant_attract", true); ret &= add_modifier_effect("immigrant_push", false); ret &= add_modifier_effect("life_rating", true); + ret &= add_modifier_effect("local_artisan_input", true); + ret &= add_modifier_effect("local_artisan_output", true); + ret &= add_modifier_effect("local_artisan_throughput", true); ret &= add_modifier_effect("local_factory_input", true); ret &= add_modifier_effect("local_factory_output", true); ret &= add_modifier_effect("local_factory_throughput", true); ret &= add_modifier_effect("local_repair", true); ret &= add_modifier_effect("local_rgo_output", true); ret &= add_modifier_effect("local_RGO_output", true); + ret &= add_modifier_effect("local_rgo_throughput", true); ret &= add_modifier_effect("local_RGO_throughput", true); ret &= add_modifier_effect("local_ruling_party_support", true); ret &= add_modifier_effect("local_ship_build", false); - ret &= add_modifier_effect("pop_consciousness_modifier", false, RAW_DECIMAL); - ret &= add_modifier_effect("pop_militancy_modifier", false, RAW_DECIMAL); - ret &= add_modifier_effect("population_growth", true); - ret &= add_modifier_effect("flashpoint_tension", false); - ret &= add_modifier_effect("farm_rgo_eff", true); - ret &= add_modifier_effect("farm_RGO_eff", true); - ret &= add_modifier_effect("farm_rgo_size", true); - ret &= add_modifier_effect("farm_RGO_size", true); ret &= add_modifier_effect("max_attrition", false, RAW_DECIMAL); ret &= add_modifier_effect("mine_rgo_eff", true); ret &= add_modifier_effect("mine_RGO_eff", true); @@ -216,6 +231,9 @@ bool ModifierManager::setup_modifier_effects() { ret &= add_modifier_effect("mine_RGO_size", true); ret &= add_modifier_effect("movement_cost", false); ret &= add_modifier_effect("number_of_voters", false); + ret &= add_modifier_effect("pop_consciousness_modifier", false, RAW_DECIMAL); + ret &= add_modifier_effect("pop_militancy_modifier", false, RAW_DECIMAL); + ret &= add_modifier_effect("population_growth", true); ret &= add_modifier_effect("railroads", true); // capitalist likelihood for railroads vs factories ret &= add_modifier_effect("supply_limit", true, RAW_DECIMAL); -- cgit v1.2.3-56-ga3b1