scripted_gui = {
	despotates_rivalry_decision_ui = {
		context_type = decision_category
		window_name = "zvz_karta_despotatov_ui_window"

	# ПОКА ОТКЛЮЧЕНО, ВЛИЯТЕТ НА СКОРОСТЬ	
#		triggers = {	
#			zvz_zts_podavit_button_click_enabled = {
#				check_variable = { global.ZTS_separatism > 1 }			
#				political_power_daily > 0.3			
#				not = {
#					has_decision = zvz_minus_1_zgf_separ
#					has_decision = zvz_minus_1_zge_separ
#					has_decision = zvz_minus_1_zgh_separ
#				}	
#			}
#			zvz_zgf_podavit_button_click_enabled = {
#				check_variable = { global.ZGF_separatism > 1 }			
#				political_power_daily > 0.3			
#				not = {
#					has_decision = zvz_minus_1_zts_separ
#					has_decision = zvz_minus_1_zge_separ
#					has_decision = zvz_minus_1_zgh_separ
#				}	
#			}
#			zvz_zge_podavit_button_click_enabled = {
#				check_variable = { global.ZGE_separatism > 1 }			
#				political_power_daily > 0.3			
#				not = {
#					has_decision = zvz_minus_1_zts_separ
#					has_decision = zvz_minus_1_zgf_separ
#					has_decision = zvz_minus_1_zgh_separ
#				}	
#			}
#			zvz_zgh_podavit_button_click_enabled = {
#				check_variable = { global.ZGH_separatism > 1 }			
#				political_power_daily > 0.3			
#				not = {
#					has_decision = zvz_minus_1_zts_separ
#					has_decision = zvz_minus_1_zgf_separ
#					has_decision = zvz_minus_1_zge_separ
#				}
#			}
#		}
#
#		effects = {
#			zvz_zts_podavit_button_click = {
#				activate_decision = zvz_minus_1_zts_separ
#			}
#			zvz_zgf_podavit_button_click = {
#				activate_decision = zvz_minus_1_zgf_separ
#			}
#			zvz_zge_podavit_button_click = {
#				activate_decision = zvz_minus_1_zge_separ
#			}
#			zvz_zgh_podavit_button_click = {
#				activate_decision = zvz_minus_1_zgh_separ
#			}
#		}
	}



	zvz_kreditovanie_rivalry_decision_ui = {
		context_type = decision_category
		window_name = "zvz_kreditovanie_rivalry_ui_window"	
		triggers = {
			zvz_fond_dobavit_10_button_click_enabled = {								
				check_variable = { zvz_fond_kreditov < 1000 }				
				has_political_power > 24
			}
			
			zvz_fond_ubavit_10_button_click_enabled = {							
				check_variable = { zvz_fond_kreditov > 9 }				
			}
		}
		effects = {
			zvz_fond_dobavit_10_button_click = {
				add_political_power = -25
				custom_effect_tooltip = zvz_10_deneg_add
				add_to_variable = { zvz_fond_kreditov = 10 }
				clamp_variable = {
					var = zvz_fond_kreditov
					min = 0
					max = 1000
				}
			}
			zvz_fond_ubavit_10_button_click = {
				subtract_from_variable = { zvz_fond_kreditov = 10 }
				clamp_variable = {
					var = zvz_fond_kreditov
					min = 0
					max = 1000
				}
				add_political_power = 17
			}
		}
		ai_enabled = {
#			always = yes
			tag = ZVZ
		}
		ai_test_interval = 24
#		ai_test_interval = 60
		ai_test_variance = 0.1
		ai_check = {
			check_variable = { zvz_fond_kreditov < 350 }	
		}
		ai_weights = {
			zvz_fond_dobavit_10_button_click = {
				ai_will_do = {
					factor = 0
					modifier = {
						check_variable = { zvz_fond_kreditov < 350 }
						add = 150
					}
				}
			}
			
			zvz_fond_ubavit_10_button_click = {
				ai_will_do = {
					factor = 0
				}
			}
		}
	}
}

