scripted_gui = { agri_statistics = { window_name = "agri_statistics_GUI" context_type = decision_category effects = { # MAIN MENU BUTTONS agriculture_refresh_click = { AGRI_update_math_variables = yes } AGRI_banked_change_click = { if = { limit = { check_variable = { AGRI_banked_changes_basic > 0 } } set_country_flag = { flag = agriculture_allocation_drift_basic days = 60 value = 1 } } else_if = { limit = { check_variable = { AGRI_banked_changes_cash > 0 } } set_country_flag = { flag = agriculture_allocation_drift_cash days = 60 value = 1 } } AGRI_monthly_changes_math = yes add_political_power = AGRI_pp_cost AGRI_clear_banked_variables = yes AGRI_update_math_variables = yes set_variable = { AGRI_pp_check = 0 } } AGRI_reset_banked_change_click = { AGRI_clear_banked_variables = yes AGRI_update_math_variables = yes set_variable = { AGRI_pp_check = 0 } } # BASIC CROP CHANGES (positive delta shifts land toward basic, cash gets the inverse) basic_crop_allocation_button_click = { set_temp_variable = { AGRI_bank_delta = 0.01 } AGRI_bank_basic_change = yes } basic_crop_allocation_button_right_click = { set_temp_variable = { AGRI_bank_delta = -0.01 } AGRI_bank_basic_change = yes } basic_crop_allocation_button_control_click = { set_temp_variable = { AGRI_bank_delta = 0.05 } AGRI_bank_basic_change = yes } basic_crop_allocation_button_control_right_click = { set_temp_variable = { AGRI_bank_delta = -0.05 } AGRI_bank_basic_change = yes } basic_crop_allocation_button_shift_click = { set_temp_variable = { AGRI_bank_delta = 0.1 } AGRI_bank_basic_change = yes } basic_crop_allocation_button_shift_right_click = { set_temp_variable = { AGRI_bank_delta = -0.1 } AGRI_bank_basic_change = yes } # CASH CROP CHANGES (positive delta shifts land toward cash, basic gets the inverse) cash_crop_allocation_button_click = { set_temp_variable = { AGRI_bank_delta = 0.01 } AGRI_bank_cash_change = yes } cash_crop_allocation_button_right_click = { set_temp_variable = { AGRI_bank_delta = -0.01 } AGRI_bank_cash_change = yes } cash_crop_allocation_button_control_click = { set_temp_variable = { AGRI_bank_delta = 0.05 } AGRI_bank_cash_change = yes } cash_crop_allocation_button_control_right_click = { set_temp_variable = { AGRI_bank_delta = -0.05 } AGRI_bank_cash_change = yes } cash_crop_allocation_button_shift_click = { set_temp_variable = { AGRI_bank_delta = 0.1 } AGRI_bank_cash_change = yes } cash_crop_allocation_button_shift_right_click = { set_temp_variable = { AGRI_bank_delta = -0.1 } AGRI_bank_cash_change = yes } } triggers = { # MAIN MENU AGRI_banked_change_click_enabled = { has_political_power > AGRI_pp_check AGRI_basic_conditions_for_scripted_gui = yes } # BASIC CHANGES basic_crop_allocation_button_click_enabled = { AGRI_basic_conditions_for_scripted_gui = yes AGRI_basic_crops_not_full_allocation = yes } basic_crop_allocation_button_right_click_enabled = { AGRI_basic_conditions_for_scripted_gui = yes AGRI_has_basic_banked_changes = yes } basic_crop_allocation_button_control_click_enabled = { AGRI_basic_conditions_for_scripted_gui = yes AGRI_basic_crops_not_full_allocation = yes } basic_crop_allocation_button_control_right_click_enabled = { AGRI_basic_conditions_for_scripted_gui = yes AGRI_has_basic_banked_changes = yes } basic_crop_allocation_button_shift_click_enabled = { AGRI_basic_conditions_for_scripted_gui = yes AGRI_basic_crops_not_full_allocation = yes } basic_crop_allocation_button_shift_right_click_enabled = { AGRI_basic_conditions_for_scripted_gui = yes AGRI_has_basic_banked_changes = yes } # CASH CHANGES cash_crop_allocation_button_click_enabled = { AGRI_basic_conditions_for_scripted_gui = yes AGRI_cash_crops_not_full_allocation = yes } cash_crop_allocation_button_right_click_enabled = { AGRI_basic_conditions_for_scripted_gui = yes AGRI_has_cash_banked_changes = yes } cash_crop_allocation_button_control_click_enabled = { AGRI_basic_conditions_for_scripted_gui = yes AGRI_cash_crops_not_full_allocation = yes } cash_crop_allocation_button_control_right_click_enabled = { AGRI_basic_conditions_for_scripted_gui = yes AGRI_has_cash_banked_changes = yes } cash_crop_allocation_button_shift_click_enabled = { AGRI_basic_conditions_for_scripted_gui = yes AGRI_cash_crops_not_full_allocation = yes } cash_crop_allocation_button_shift_right_click_enabled = { AGRI_basic_conditions_for_scripted_gui = yes AGRI_has_cash_banked_changes = yes } } } }