
UKR_power_balance = {
	initial_value = 0
	left_side = UKR_party_side	
	right_side = UKR_army_side	
	decision_category = UKR_balance_of_power_category

	### Neutral status
	range = {
		id = UKR_balance_range
		min = -0.10
		max = 0.10
		modifier = {
		}
		on_activate = {

		}
		on_deactivate = {
			
		}
	}

	### NatCom party
	side = {
		id = UKR_party_side	
		icon = GFX_bop_UKR_natcom_party_side

		range = {
			id = UKR_party_low_control_range
			min = -0.3
			max = -0.1
			modifier = {
				political_advisor_cost_factor = -0.1
			}
			on_activate = {
				
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = UKR_party_medium_control_range
			min = -0.6
			max = -0.3
			modifier = {
				political_advisor_cost_factor = -0.15
				stability_factor = 0.05
				production_speed_buildings_factor = 0.05
				offensive_war_stability_factor = -0.05
			}
			on_activate = {

			}
			on_deactivate = {
				
			}
		}

		range = {
			id = UKR_party_high_control_range
			min = -0.9
			max = -0.6
			modifier = {
				political_advisor_cost_factor = -0.2
				stability_factor = 0.10
				production_speed_buildings_factor = 0.07
				offensive_war_stability_factor = -0.10
			}
			on_activate = {

			}
			on_deactivate = {
				
			}
		}

		range = {
			id = UKR_party_total_control_range
			min = -1
			max = -0.9
			modifier = {
				political_advisor_cost_factor = -0.25
				stability_factor = 0.15
				production_speed_buildings_factor = 0.10
				offensive_war_stability_factor = -0.15
			}
			on_activate = {
				add_country_leader_trait = despises_army
				set_power_balance_gfx = {
					id = UKR_power_balance
					side = UKR_party_side
					gfx = GFX_bop_UKR_natcom_party_improved_side
				}
			}
			on_deactivate = {
				remove_country_leader_trait = despises_army
				set_power_balance_gfx = {
					id = UKR_power_balance
					side = UKR_party_side
					gfx = GFX_bop_UKR_natcom_party_side
				}
			}
		}
	}

	### NatCom army
	side = {
		id = UKR_army_side	
		icon = GFX_bop_UKR_natcom_army_side

		range = {
			id = UKR_army_low_control_range
			min = 0.1
			max = 0.3
			modifier = {
				high_command_cost_factor = -0.10
			}
			on_activate = {

			}
			on_deactivate = {
				
			}
		}

		range = {
			id = UKR_army_medium_control_range
			min = 0.3
			max = 0.6
			modifier = {
				high_command_cost_factor = -0.15
				war_support_factor = 0.05
				max_command_power_mult = 0.05 
			}
			on_activate = {
				
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = UKR_army_high_control_range
			min = 0.6
			max = 0.9
			modifier = {
				high_command_cost_factor = -0.20
				war_support_factor = 0.10
				experience_gain_army = 0.03
				experience_gain_air = 0.03
				experience_gain_navy = 0.03
				max_command_power_mult = 0.07
			}
			on_activate = {
				
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = UKR_army_total_control_range
			min = 0.9
			max = 1
			modifier = {
				high_command_cost_factor = -0.25
				war_support_factor = 0.15
				experience_gain_army = 0.05
				experience_gain_air = 0.05
				experience_gain_navy = 0.05
				max_command_power_mult = 0.10
			}
			on_activate = {
				add_country_leader_trait = puppet_of_army
				set_power_balance_gfx = {
					id = UKR_power_balance
					side = UKR_army_side
					gfx = GFX_bop_UKR_natcom_army_improved_side
				}
			}
			on_deactivate = {
				remove_country_leader_trait = puppet_of_army
				set_power_balance_gfx = {
					id = UKR_power_balance
					side = UKR_army_side
					gfx = GFX_bop_UKR_natcom_army_side
				}
			}
		}
	}
	# King of Ukraine side
	side = {
		id = UKR_king_side
		icon = GFX_bop_UKR_king_side

		range = {
			id = UKR_king_low_control_range
			min = 0.1
			max = 0.45
			modifier = {
				political_power_factor = -0.05
				war_support_factor = 0.05
				max_surrender_limit_offset = 0.02
				custom_modifier_tooltip = UKR_king_low_control_range_tt
			}
			on_activate = {
			
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = UKR_king_high_control_range
			min = 0.45
			max = 0.8
			modifier = {
				max_surrender_limit_offset = 0.06
				political_power_factor = -0.1
				army_morale_factor = 0.05
				war_support_factor = 0.10
				annex_cost_factor = -0.05
				custom_modifier_tooltip = UKR_king_high_control_range_tt
			}
			on_activate = {

			}
			on_deactivate = {
				
			}
		}

		range = {
			id = UKR_king_total_control_range
			min = 0.8
			max = 1
			modifier = {
				army_morale_factor = 0.07
				war_support_factor = 0.15
				max_surrender_limit_offset = 0.08
				political_power_factor = -0.15
				annex_cost_factor = -0.1
				custom_modifier_tooltip = UKR_king_total_control_range_tt
			}
			on_activate = {
				set_power_balance_gfx = {
					id = UKR_power_balance
					side = UKR_king_side
					gfx = GFX_bop_UKR_king_improved_side
				}
			}
			on_deactivate = {
				set_power_balance_gfx = {
					id = UKR_power_balance
					side = UKR_king_side
					gfx = GFX_bop_UKR_king_side
				}
			}
		}
	}
	# Hetman of Ukraine side
	side = {
		id = UKR_hetman_side
		icon = GFX_bop_UKR_hetman_side

		range = {
			id = UKR_hetman_low_control_range
			min = -0.45
			max = -0.1
			modifier = {
				opinion_gain_monthly_factor = -0.05
				conscription_factor = 0.05
				stability_factor = 0.01
				custom_modifier_tooltip = ukr_hetman_bop_laws_cost1_tt
				hidden_modifier = {
					political_advisor_cost_factor = -0.05
					trade_laws_cost_factor = -0.05
					mobilization_laws_cost_factor = -0.05
					economy_cost_factor = -0.05
					high_command_cost_factor = -0.05
					air_chief_cost_factor = -0.05
					army_chief_cost_factor = -0.05
					navy_chief_cost_factor = -0.05
				}
			}
			on_activate = {
				
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = UKR_hetman_high_control_range
			min = -0.8
			max = -0.45
			modifier = {
				opinion_gain_monthly_factor = -0.10
				conscription_factor = 0.07
				stability_factor = 0.03
				custom_modifier_tooltip = ukr_hetman_bop_laws_cost2_tt
				hidden_modifier = {
					political_advisor_cost_factor = -0.15
					trade_laws_cost_factor = -0.15
					mobilization_laws_cost_factor = -0.15
					economy_cost_factor = -0.15
					high_command_cost_factor = -0.15
					air_chief_cost_factor = -0.15
					army_chief_cost_factor = -0.15
					navy_chief_cost_factor = -0.15
				}
			}
			on_activate = {

			}
			on_deactivate = {
				
			}
		}

		range = {
			id = UKR_hetman_total_control_range
			min = -1
			max = -0.8
			modifier = {
				opinion_gain_monthly_factor = -0.15
				stability_factor = 0.05
				conscription_factor = 0.10
				custom_modifier_tooltip = ukr_hetman_bop_laws_cost3_tt
				hidden_modifier = {
					political_advisor_cost_factor = -0.25
					trade_laws_cost_factor = -0.25
					mobilization_laws_cost_factor = -0.25
					economy_cost_factor = -0.25
					high_command_cost_factor = -0.25
					air_chief_cost_factor = -0.25
					army_chief_cost_factor = -0.25
					navy_chief_cost_factor = -0.25
				}
			}
			on_activate = {
				set_power_balance_gfx = {
					id = UKR_power_balance
					side = UKR_hetman_side
					gfx = GFX_bop_UKR_hetman_improved_side
				}
			}
			on_deactivate = {
				set_power_balance_gfx = {
					id = UKR_power_balance
					side = UKR_hetman_side
					gfx = GFX_bop_UKR_hetman_side
				}
			}
		}
	}
	# Workers side
	side = {
		id = UKR_workers_conditions
		icon = GFX_bop_UKR_workers_conditions

		range = {
			id = UKR_workers_small_concessions_range
			min = -0.5
			max = -0.1
			modifier = {
				stability_factor = 0.03
				war_support_factor = -0.05
			}
			on_activate = {
				
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = UKR_workers_average_concessions_range
			min = -0.9
			max = -0.5
			modifier = {
				stability_factor = 0.05
				war_support_factor = -0.10
			}
			on_activate = {

			}
			on_deactivate = {
				
			}
		}

		range = {
			id = UKR_workers_big_concessions_range
			min = -1
			max = -0.9
			modifier = {
				stability_factor = 0.05
				stability_weekly = 0.001
				war_support_factor = -0.15
			}
			on_activate = {
				set_power_balance_gfx = {
					id = UKR_power_balance
					side = UKR_workers_conditions
					gfx = GFX_bop_UKR_workers_conditions_improved
				}
			}
			on_deactivate = {
				set_power_balance_gfx = {
					id = UKR_power_balance
					side = UKR_workers_conditions
					gfx = GFX_bop_UKR_workers_conditions
				}
			}
		}
	}
	# Industrialists side
	side = {
		id = UKR_interests_of_industrialists
		icon = GFX_bop_UKR_interests_of_industrialists

		range = {
			id = UKR_low_industrial_control_range
			min = 0.1
			max = 0.5
			modifier = {
				industrial_capacity_factory = 0.05
				industrial_capacity_dockyard = 0.05
				economy_cost_factor = -0.10
			}
			on_activate = {
				
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = UKR_medium_industrial_control_range
			min = 0.5
			max = 0.9
			modifier = {
				industrial_capacity_factory = 0.10
				industrial_capacity_dockyard = 0.10
				economy_cost_factor = -0.20
			}
			on_activate = {

			}
			on_deactivate = {
				
			}
		}

		range = {
			id = UKR_total_industrial_control_range
			min = 0.9
			max = 1
			modifier = {
				industrial_capacity_factory = 0.20
				industrial_capacity_dockyard = 0.20
				economy_cost_factor = -0.30
			}
			on_activate = {
				set_power_balance_gfx = {
					id = UKR_power_balance
					side = UKR_interests_of_industrialists
					gfx = GFX_bop_UKR_interests_of_industrialists_improved
				}
				add_ideas = UKR_strikes
			}
			on_deactivate = {
				set_power_balance_gfx = {
					id = UKR_power_balance
					side = UKR_interests_of_industrialists
					gfx = GFX_bop_UKR_interests_of_industrialists
				}
				remove_ideas = UKR_strikes
			}
		}
	}
	# Parliament side
	side = {
		id = UKR_rada_side
		icon = GFX_bop_UKR_rada_side

		range = {
			id = UKR_rada_small_control_range
			min = -0.4
			max = -0.1
			modifier = {
				political_power_factor = 0.05
				political_advisor_cost_factor = -0.1
			}
			on_activate = {
				
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = UKR_rada_medium_control_range
			min = -0.7
			max = -0.4
			modifier = {
				political_power_factor = 0.10
				political_advisor_cost_factor = -0.2
				join_faction_tension = -0.20
				offensive_war_stability_factor = -0.05
			}
			on_activate = {

			}
			on_deactivate = {
				
			}
		}

		range = {
			id = UKR_rada_large_control_range
			min = -0.99
			max = -0.7
			modifier = {
				political_power_factor = 0.15
				political_advisor_cost_factor = -0.3
				offensive_war_stability_factor = -0.1
				join_faction_tension = -0.40
			}
			on_activate = {

			}
			on_deactivate = {
				
			}
		}
		range = {
			id = UKR_rada_full_control_range
			min = -1
			max = -0.99
			modifier = {
				
			}
			on_activate = {
				country_event = ukraine.714
				effect_tooltip = {
					set_politics = { ruling_party = democratic elections_allowed = yes }
					promote_character = UKR_yuriy_tyutyunnyk
					add_ideas = UKR_strong_parliamentarianism
					set_country_flag = UKR_altdem_rada_victory
					clr_country_flag = UKR_altdem_bop_is_available
					remove_power_balance = { id = UKR_power_balance }
					retire_character = UKR_olga_petliura
				}
				custom_effect_tooltip = UKR_rada_full_control_range_tt
				hidden_effect = {
					set_cosmetic_tag = UKR_RADA
				}
			}
			on_deactivate = {
				
			}
		}
	}
	# Junta side
	side = {
		id = UKR_junta_side
		icon = GFX_bop_UKR_natcom_army_side

		range = {
			id = UKR_junta_small_control_range
			min = 0.1
			max = 0.4
			modifier = {
				stability_factor = 0.05
				mobilization_laws_cost_factor = -0.1
				command_power_gain_mult = 0.10
				custom_modifier_tooltip = UKR_junta_small_control_range_tt
			}
			on_activate = {
				
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = UKR_junta_medium_control_range
			min = 0.4
			max = 0.7
			modifier = {
				stability_factor = 0.10
				mobilization_laws_cost_factor = -0.2
				command_power_gain_mult = 0.20
				generate_wargoal_tension = -0.20
				custom_modifier_tooltip = UKR_junta_medium_control_range_tt
			}
			on_activate = {

			}
			on_deactivate = {
				
			}
		}

		range = {
			id = UKR_junta_large_control_range
			min = 0.7
			max = 0.99
			modifier = {
				stability_factor = 0.15
				mobilization_laws_cost_factor = -0.3
				command_power_gain_mult = 0.30
				generate_wargoal_tension = -0.40
				custom_modifier_tooltip = UKR_junta_large_control_range_tt
			}
			on_activate = {
				
			}
			on_deactivate = {
				
			}
		}
		range = {
			id = UKR_junta_full_control_range
			min = 0.99
			max = 1
			modifier = {
				
			}
			on_activate = {
				country_event = ukraine.713
				effect_tooltip = {
					promote_character = UKR_military_junta
					clr_country_flag = UKR_altdem_bop_is_available
					set_country_flag = UKR_altdem_army_victory
					remove_dynamic_modifier = { modifier = UKR_support_in_rada_mod }
					remove_power_balance = { id = UKR_power_balance }
					retire_character = UKR_kost_levytsky
					retire_character = UKR_andriy_livytskyi
					retire_character = UKR_stepan_vytvytskyi
					retire_character = UKR_olga_petliura
					if = {
						limit = { has_idea = UKR_language_question }
						remove_ideas = UKR_language_question
					}
				}
				custom_effect_tooltip = UKR_junta_full_control_range_tt
				hidden_effect = {
					set_cosmetic_tag = UKR_JUNTA
				}
			}
			on_deactivate = {
				
			}
		}
	}
	# Ukrainophilia side
	side = {
		id = UKR_ukrainophilia_side
		icon = GFX_bop_UKR_ukrainophilia

		range = {
			id = UKR_small_ukrainophilia
			min = -0.4
			max = -0.1
			modifier = {
				stability_factor = 0.05
				war_support_factor = 0.05
			}
			on_activate = {
				
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = UKR_medium_ukrainophilia
			min = -0.7
			max = -0.4
			modifier = {
				stability_factor = 0.10
				war_support_factor = 0.10
				conscription_factor = 0.10
			}
			on_activate = {

			}
			on_deactivate = {
				
			}
		}

		range = {
			id = UKR_strong_ukrainophilia
			min = -1
			max = -0.7
			modifier = {
				stability_factor = 0.15
				war_support_factor = 0.15
				conscription_factor = 0.20
				resistance_growth = 0.05
			}
			on_activate = {
				set_power_balance_gfx = {
					id = UKR_power_balance
					side = UKR_ukrainophilia_side
					gfx = GFX_bop_UKR_ukrainophilia_improved
				}
			}
			on_deactivate = {
				set_power_balance_gfx = {
					id = UKR_power_balance
					side = UKR_ukrainophilia_side
					gfx = GFX_bop_UKR_ukrainophilia
				}
			}
		}
	}
	# Moscophilia side
	side = {
		id = UKR_moscophilia_side
		icon = GFX_bop_UKR_moscophilia

		range = {
			id = UKR_small_moscophilia
			min = 0.1
			max = 0.4
			modifier = {
				stability_factor = -0.05
				war_support_factor = -0.05
				custom_modifier_tooltip = UKR_moscophilia_boost_integration_tt
			}
			on_activate = {
				set_variable = { var_ukr_integration_eastslavic_cost = 60 }
				set_variable = { var_ukr_integration_eastslavic_days = 90 }
			}
			on_deactivate = {
				set_variable = { var_ukr_integration_eastslavic_cost = 75 }
				set_variable = { var_ukr_integration_eastslavic_days = 120 }
			}
		}

		range = {
			id = UKR_medium_moscophilia
			min = 0.4
			max = 0.7
			modifier = {
				stability_factor = -0.10
				war_support_factor = -0.10
				non_core_manpower = 0.05
				custom_modifier_tooltip = UKR_moscophilia_boost_integration_tt
			}
			on_activate = {
				set_variable = { var_ukr_integration_eastslavic_cost = 45 }
				set_variable = { var_ukr_integration_eastslavic_days = 60 }
			}
			on_deactivate = {
				set_variable = { var_ukr_integration_eastslavic_cost = 75 }
				set_variable = { var_ukr_integration_eastslavic_days = 120 }
			}
		}

		range = {
			id = UKR_strong_moscophilia
			min = 0.7
			max = 1
			modifier = {
				stability_factor = -0.15
				war_support_factor = -0.15
				non_core_manpower = 0.10
				compliance_gain = 0.02
				custom_modifier_tooltip = UKR_moscophilia_boost_integration_tt
			}
			on_activate = {
				set_power_balance_gfx = {
					id = UKR_power_balance
					side = UKR_moscophilia_side
					gfx = GFX_bop_UKR_moscophilia_improved
				}
				set_variable = { var_ukr_integration_eastslavic_cost = 30 }
				set_variable = { var_ukr_integration_eastslavic_days = 30 }
			}
			on_deactivate = {
				set_power_balance_gfx = {
					id = UKR_power_balance
					side = UKR_moscophilia_side
					gfx = GFX_bop_UKR_moscophilia
				}
				set_variable = { var_ukr_integration_eastslavic_cost = 75 }
				set_variable = { var_ukr_integration_eastslavic_days = 120 }
			}
		}
	}
	# Isolationism side
	side = {
		id = UKR_isolationism_side
		icon = GFX_bop_DEN_welfare_side

		range = {
			id = UKR_medium_isolationism
			min = -0.6
			max = -0.1
			modifier = {
				stability_factor = 0.05
				consumer_goods_factor = -0.05
				mobilization_speed = -0.15
				research_speed_factor = 0.025
				mobilization_laws_cost_factor = 0.15
				economy_cost_factor = 0.15
			}
		}

		range = {
			id = UKR_strong_isolationism
			min = -1
			max = -0.6
			modifier = {
				stability_factor = 0.10
				consumer_goods_factor = -0.10
				mobilization_speed = -0.25
				mobilization_laws_cost_factor = 0.30
				economy_cost_factor = 0.30
				research_speed_factor = 0.05
				resource_trade_cost_bonus_per_factory = 1
			}
			on_activate = {
				set_power_balance_gfx = {
					id = UKR_power_balance
					side = UKR_isolationism_side
					gfx = GFX_bop_DEN_welfare_improved_side
				}
			}
			on_deactivate = {
				set_power_balance_gfx = {
					id = UKR_power_balance
					side = UKR_isolationism_side
					gfx = GFX_bop_DEN_welfare_side
				}
			}
		}
	}
	# Interventionism side
	side = {
		id = UKR_interventionism_side
		icon = GFX_bop_DEN_warfare_side

		range = {
			id = UKR_medium_interventionism
			min = 0.1
			max = 0.6
			modifier = {
				war_support_factor = 0.05
				send_volunteers_tension = -0.15
				guarantee_tension = -0.15
				lend_lease_tension = -0.20
				generate_wargoal_tension = -0.25
				mobilization_laws_cost_factor = -0.10
			}
		}

		range = {
			id = UKR_strong_interventionism
			min = 0.6
			max = 1
			modifier = {
				war_support_factor = 0.10
				send_volunteers_tension = -0.30
				guarantee_tension = -0.25
				lend_lease_tension = -0.40
				generate_wargoal_tension = -0.50
				mobilization_laws_cost_factor = -0.20
			}
			on_activate = {
				set_power_balance_gfx = {
					id = UKR_power_balance
					side = UKR_interventionism_side
					gfx = GFX_bop_DEN_warfare_improved_side
				}
			}
			on_deactivate = {
				set_power_balance_gfx = {
					id = UKR_power_balance
					side = UKR_interventionism_side
					gfx = GFX_bop_DEN_warfare_side
				}
			}
		}
	}
}

