
ITA_power_balance = {
	initial_value = 0.35
	left_side = ITA_grand_council_side	
	right_side = ITA_mussolini_side	
	decision_category = ITA_balance_of_power_category

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

		}
		on_deactivate = {
			
		}
	}

	### Grand Council
	side = {
		id = ITA_grand_council_side	
		icon = GFX_bop_ITA_grand_council_side

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

		range = {
			id = ITA_grand_council_medium_control_range
			min = -0.6
			max = -0.3
			modifier = {
				political_advisor_cost_factor = -0.15
				offensive_war_stability_factor = -0.1
				war_support_factor = -0.05
			}
			on_activate = {
				custom_effect_tooltip = ITA_bop_cap_for_colonies_impact_tt
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = ITA_grand_council_high_control_range
			min = -0.9
			max = -0.6
			modifier = {
				political_advisor_cost_factor = -0.2
				offensive_war_stability_factor = -0.15
				stability_factor = -0.1
				war_support_factor = -0.1
			}
			on_activate = {
				#Depose the Duce or whoever is in charge because the dude sucks at it
				if = {
					limit = {
						NOT = {
							has_country_leader = {
								character = ITA_grand_council
								ruling_only = yes
							}
						}
						OR = {
						NOT = {
						has_completed_focus = ITA_crush_opposition 
						has_global_flag = greater_italy_flag
						has_global_flag = form_roman_empire_flag
						}
						}
					}
						country_event = BBA_italy_council_deposes_duce.1
					}
				}
			on_deactivate = {
				
			}
		}

		range = {
			id = ITA_grand_council_total_control_range
			min = -1
			max = -0.9
			modifier = {
				political_advisor_cost_factor = -0.25
				offensive_war_stability_factor = -0.2
				stability_factor = -0.15
				war_support_factor = -0.15
			}
			on_activate = {
				if = {
					limit = {
						NOT = {
						OR = { has_completed_focus = ITA_crush_opposition 
						has_completed_focus = ITA_capo_supremo}
						}
					}

				every_country = {
				limit = {
				OR = {is_ai = no}
				tag = ROOT
				}
				news_event = {id = AOI_news.7}
				}
				country_event = BBA_italy_civil_war.1
				}
			}
			on_deactivate = {
				
			}
		}
	}

	### Mussolini
	side = {
		id = ITA_mussolini_side	
		icon = GFX_bop_ITA_mussolini_side

		range = {
			id = ITA_mussolini_low_control_range
			min = 0.1
			max = 0.3
			modifier = {
				political_power_factor = 0.05
				war_support_factor = 0.01
				stability_factor = 0.01
			}
			on_activate = {
				if = {
					limit = {
						NOT = {
							has_country_leader = {
								character = ITA_benito_mussolini
							}
						}
					}
					promote_character = {
						character = ITA_benito_mussolini
						ideology = fascism
					}
				}
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = ITA_mussolini_medium_control_range
			min = 0.3
			max = 0.6
			modifier = {
				political_power_factor = 0.07
				war_support_factor = 0.02
				stability_factor = 0.02
			}
			on_activate = {
				
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = ITA_mussolini_high_control_range
			min = 0.6
			max = 0.9
			modifier = {
				political_power_factor = 0.1
				war_support_factor = 0.03
				stability_factor = 0.03
				experience_gain_army = -0.05
				experience_gain_air = -0.05
				experience_gain_navy = -0.05
			}
			on_activate = {
				
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = ITA_mussolini_total_control_range
			min = 0.9
			max = 1
			modifier = {
				political_power_factor = 0.15
				war_support_factor = 0.05
				stability_factor = 0.05
				experience_gain_army = -0.05
				experience_gain_air = -0.05
				experience_gain_navy = -0.05
			}
			on_activate = {
				set_power_balance_gfx = {
					id = ITA_power_balance
					side = ITA_mussolini_side
					gfx = GFX_bop_ITA_mussolini_improved_side
				}
			}
			on_deactivate = {
				set_power_balance_gfx = {
					id = ITA_power_balance
					side = ITA_mussolini_side
					gfx = GFX_bop_ITA_mussolini_side
				}
			}
		}
	}

	### Balbo
	side = {
		id = ITA_balbo_side	
		icon = GFX_bop_ITA_balbo_side

		range = {
			id = ITA_balbo_low_control_range
			min = 0.1
			max = 0.3
			modifier = {
				experience_gain_army = 0.05 #Good
				experience_gain_air = 0.05 #Good
			}
			on_activate = {
				if = {
					limit = {
						NOT = {
							has_country_leader = {
								character = ITA_italo_balbo
							}
						}
					}
					promote_character = {
						character = ITA_italo_balbo
						ideology = fascism
					}
				}
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = ITA_balbo_medium_control_range
			min = 0.3
			max = 0.6
			modifier = {
				experience_gain_army = 0.05 #Good
				experience_gain_air = 0.05 #Good
				industrial_capacity_factory = 0.05 #Good
				production_speed_buildings_factor = -0.05 #Bad
			}
			on_activate = {
				
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = ITA_balbo_high_control_range
			min = 0.6
			max = 0.9
			modifier = {
				experience_gain_army = 0.1 #Good
				experience_gain_air = 0.1 #Good
				industrial_capacity_factory = 0.1 #Good
				production_speed_buildings_factor = -0.05 #Bad
			}
			on_activate = {
				
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = ITA_balbo_total_control_range
			min = 0.9
			max = 1
			modifier = {
				experience_gain_army = 0.1 #Good
				experience_gain_air = 0.1 #Good
				industrial_capacity_factory = 0.1 #Good
				production_lack_of_resource_penalty_factor = -0.15 #Good
				production_speed_buildings_factor = -0.05 #Bad
				consumer_goods_factor = 0.05 #Bad
			}
			on_activate = {
				set_power_balance_gfx = {
					id = ITA_power_balance
					side = ITA_balbo_side
					gfx = GFX_bop_ITA_balbo_improved_side
				}
			}
			on_deactivate = {
				set_power_balance_gfx = {
					id = ITA_power_balance
					side = ITA_balbo_side
					gfx = GFX_bop_ITA_balbo_side
				}
			}
		}
	}

	### Grandi
	side = {
		id = ITA_grandi_side
		icon = GFX_bop_ITA_grandi_side

		range = {
			id = ITA_grandi_low_control_range
			min = 0.1
			max = 0.3
			modifier = {
				trade_laws_cost_factor = -0.1 #Good
				mobilization_laws_cost_factor = -0.1 #Good
				economy_cost_factor = -0.1 #Good
			}
			on_activate = {
				if = {
					limit = {
						NOT = {
							has_country_leader = {
								character = ITA_dino_grandi
							}
						}
					}
					promote_character = {
						character = ITA_dino_grandi
						ideology = fascism
					}
				}
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = ITA_grandi_medium_control_range
			min = 0.3
			max = 0.6
			modifier = {
				trade_laws_cost_factor = -0.15 #Good
				mobilization_laws_cost_factor = -0.15 #Good
				economy_cost_factor = -0.15 #Good
				equipment_conversion_speed = -0.03 #Bad
				production_speed_buildings_factor = 0.05 #Good
			}
			on_activate = {
				
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = ITA_grandi_high_control_range
			min = 0.6
			max = 0.9
			modifier = {
				trade_laws_cost_factor = -0.20 #Good
				mobilization_laws_cost_factor = -0.20 #Good
				economy_cost_factor = -0.20 #Good
				equipment_conversion_speed = -0.05 #Bad
				production_speed_buildings_factor = 0.075 #Good
			}
			on_activate = {
				
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = ITA_grandi_total_control_range
			min = 0.9
			max = 1
			modifier = {
				trade_laws_cost_factor = -0.3 #Good
				mobilization_laws_cost_factor = -0.3 #Good
				economy_cost_factor = -0.3 #Good
				equipment_conversion_speed = -0.05 #Bad
				production_speed_buildings_factor = 0.1 #Good
				training_time_factor = 0.05 #Bad
			}
			on_activate = {
				set_power_balance_gfx = {
					id = ITA_power_balance
					side = ITA_grandi_side
					gfx = GFX_bop_ITA_grandi_improved_side
				}
			}
			on_deactivate = {
				set_power_balance_gfx = {
					id = ITA_power_balance
					side = ITA_grandi_side
					gfx = GFX_bop_ITA_grandi_side
				}
			}
		}
	}

	### King Vittorio
	side = {
		id = ITA_king_side
		icon = GFX_bop_ITA_king_vittorio_side

		range = {
			id = ITA_king_low_control_range
			min = 0.1
			max = 0.3
			modifier = {
				stability_factor = 0.01
				experience_gain_army = 0.02
				max_surrender_limit_offset = 0.02
			}
			on_activate = {
				if = {
					limit = {
						NOT = {
							has_country_leader = {
								character = ITA_vittorio_emanuele_iii
							}
						}
					}
					if = {
						limit = {
							has_completed_focus = ITA_christian_democracy
						}
						promote_character = {
							character = ITA_alcide_de_gasperi
							ideology = democratic
						}
					}
					else_if = {
						limit = {
							has_completed_focus = ITA_democratic_king
						}
						promote_character = {
							character = ITA_vittorio_emanuele_iii
							ideology = democratic
						}
					}
					else = {
						promote_character = {
							character = ITA_vittorio_emanuele_iii
							ideology = neutrality
						}
					}
					hidden_effect = {
						ITA_grand_council = {
							set_character_name = ITA_grand_council
						}
					}
				}
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = ITA_king_medium_control_range
			min = 0.3
			max = 0.6
			modifier = {
				stability_factor = 0.02
				experience_gain_army = 0.04
				max_surrender_limit_offset = 0.04
				political_power_factor = -0.05
			}
			on_activate = {
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = ITA_king_high_control_range
			min = 0.6
			max = 0.9
			modifier = {
				stability_factor = 0.03
				experience_gain_army = 0.06
				max_surrender_limit_offset = 0.06
				political_power_factor = -0.1
				drift_defence_factor = 0.1
				annex_cost_factor = -0.05
			}
			on_activate = {
				if = {
					limit = {
						has_character = ITA_vittorio_emanuele_iii
						NOT = {
							has_country_leader = {
								character = ITA_vittorio_emanuele_iii
								ruling_only = yes
							}
						}
						OR = {
							has_government = neutrality
							has_government = fascism
						}
					}
					ITA_vittorio_emanuele_iii = { promote_character = yes }
					ITA_add_king_vittorio_emanuele_back_as_idea = yes
				}
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = ITA_king_total_control_range
			min = 0.9
			max = 1
			modifier = {
				stability_factor = 0.05
				experience_gain_army = 0.08
				max_surrender_limit_offset = 0.08
				political_power_factor = -0.15
				drift_defence_factor = 0.2
				annex_cost_factor = -0.1
			}
			on_activate = {
				set_power_balance_gfx = {
					id = ITA_power_balance
					side = ITA_king_side
					gfx = GFX_bop_ITA_king_vittorio_improved_side
				}
			}
			on_deactivate = {
				set_power_balance_gfx = {
					id = ITA_power_balance
					side = ITA_king_side
					gfx = GFX_bop_ITA_king_vittorio_side
				}
			}
		}
	}

	### King Umberto
	side = {
		id = ITA_king_umberto_side
		icon = GFX_bop_ITA_king_umberto_side

		range = {
			id = ITA_king_umberto_low_control_range
			min = 0.1
			max = 0.3
			modifier = {
				stability_factor = 0.01
				experience_gain_army = 0.02
				max_surrender_limit_offset = 0.02
			}
			on_activate = {
				if = {
					limit = {
						NOT = {
							has_country_leader = {
								character = ITA_prince_umberto
							}
						}
					}
					promote_character = {
						character = ITA_prince_umberto
						ideology = neutrality
					}
				}
				hidden_effect = {
					ITA_grand_council = {
						set_character_name = ITA_grand_council
					}
				}
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = ITA_king_umberto_medium_control_range
			min = 0.3
			max = 0.6
			modifier = {
				stability_factor = 0.02
				experience_gain_army = 0.04
				max_surrender_limit_offset = 0.04
				political_power_factor = -0.05
			}
			on_activate = {
				
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = ITA_king_umberto_high_control_range
			min = 0.6
			max = 0.9
			modifier = {
				stability_factor = 0.03
				experience_gain_army = 0.06
				max_surrender_limit_offset = 0.06
				political_power_factor = -0.1
				drift_defence_factor = 0.1
				annex_cost_factor = -0.05
			}
			on_activate = {
				if = {
					limit = {
						has_character = ITA_prince_umberto
						NOT = {
							has_country_leader = {
								character = ITA_prince_umberto
								ruling_only = yes
							}
						}
						OR = {
							has_government = neutrality
							has_government = fascism
						}
					}
					ITA_promote_umberto_to_country_leader = yes
				}
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = ITA_king_umberto_total_control_range
			min = 0.9
			max = 1
			modifier = {
				stability_factor = 0.05
				experience_gain_army = 0.08
				max_surrender_limit_offset = 0.08
				political_power_factor = -0.15
				drift_defence_factor = 0.2
				annex_cost_factor = -0.1
			}
			on_activate = {
				set_power_balance_gfx = {
					id = ITA_power_balance
					side = ITA_king_umberto_side
					gfx = GFX_bop_ITA_king_umberto_improved_side
				}
			}
			on_deactivate = {
				set_power_balance_gfx = {
					id = ITA_power_balance
					side = ITA_king_umberto_side
					gfx = GFX_bop_ITA_king_umberto_side
				}
			}
		}
	}

	### Communist
	side = {
		id = ITA_communism_side
		icon = GFX_bop_ITA_communism_side

		range = {
			id = ITA_communism_low_control_range
			min = -0.3
			max = -0.1
			modifier = {
				communism_drift = 0.01
				mobilization_speed = 0.03
				decryption_factor = 0.02
				non_core_manpower = 0.02
			}
			on_activate = {
				
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = ITA_communism_medium_control_range
			min = -0.6
			max = -0.3
			modifier = {
				communism_drift = 0.02
				mobilization_speed = 0.06
				decryption_factor = 0.04
				non_core_manpower = 0.04
			}
			on_activate = {
				
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = ITA_communism_high_control_range
			min = -0.9
			max = -0.6
			modifier = {
				communism_drift = 0.03
				mobilization_speed = 0.09
				decryption_factor = 0.06
				non_core_manpower = 0.06
				supply_node_range = 0.05
			}
			on_activate = {
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = ITA_communism_total_control_range
			min = -1
			max = -0.9
			modifier = {
				communism_drift = 0.04
				decryption_factor = 0.1
				non_core_manpower = 0.1
				supply_node_range = 0.1
			}
			on_activate = {
				set_power_balance_gfx = {
					id = ITA_power_balance
					side = ITA_communism_side
					gfx = GFX_bop_ITA_communism_improved_side
				}
			}
			on_deactivate = {
				set_power_balance_gfx = {
					id = ITA_power_balance
					side = ITA_communism_side
					gfx = GFX_bop_ITA_communism_side
				}
			}
		}
	}

	### Democratic
	side = {
		id = ITA_democratic_side
		icon = GFX_bop_ITA_democratic_side

		range = {
			id = ITA_democratic_low_control_range
			min = 0.1
			max = 0.3
			modifier = {
				democratic_drift = 0.01
				civil_war_involvement_tension = -0.02
				guarantee_tension = -0.02
				puppet_cost_factor = -0.3
			}
			on_activate = {
				
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = ITA_democratic_medium_control_range
			min = 0.3
			max = 0.6
			modifier = {
				democratic_drift = 0.02
				civil_war_involvement_tension = -0.04
				guarantee_tension = -0.04
				puppet_cost_factor = -0.6
			}
			on_activate = {
				
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = ITA_democratic_high_control_range
			min = 0.6
			max = 0.9
			modifier = {
				democratic_drift = 0.03
				civil_war_involvement_tension = -0.06
				guarantee_tension = -0.06
				puppet_cost_factor = -0.9
				starting_compliance = 0.1
			}
			on_activate = {
				
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = ITA_democratic_total_control_range
			min = 0.9
			max = 1
			modifier = {
				democratic_drift = 0.04
				civil_war_involvement_tension = -0.1
				guarantee_tension = -0.1
				puppet_cost_factor = -0.15
				starting_compliance = 0.2
			}
			on_activate = {
				set_power_balance_gfx = {
					id = ITA_power_balance
					side = ITA_democratic_side
					gfx = GFX_bop_ITA_democratic_improved_side
				}
			}
			on_deactivate = {
				set_power_balance_gfx = {
					id = ITA_power_balance
					side = ITA_democratic_side
					gfx = GFX_bop_ITA_democratic_side
				}
			}
		}
	}

	### Pope
	side = {
		id = ITA_pope_side	
		icon = GFX_bop_ITA_pope_side

		range = {
			id = ITA_pope_low_control_range
			min = -0.3
			max = -0.1
			modifier = {
				stability_factor = 0.02
				political_power_factor = 0.02
				neutrality_drift = 0.02
				war_support_factor = -0.05
				offensive_war_stability_factor = -0.1
				political_advisor_cost_factor = 0.05
			}
			on_activate = {
				
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = ITA_pope_medium_control_range
			min = -0.6
			max = -0.3
			modifier = {
				stability_factor = 0.04
				political_power_factor = 0.04
				neutrality_drift = 0.04
				war_support_factor = -0.05
				offensive_war_stability_factor = -0.1
				political_advisor_cost_factor = 0.1
			}
			on_activate = {
				
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = ITA_pope_high_control_range
			min = -0.9
			max = -0.6
			modifier = {
				stability_factor = 0.06
				political_power_factor = 0.06
				neutrality_drift = 0.06
				enemy_justify_war_goal_time = 0.15
				war_support_factor = -0.05
				offensive_war_stability_factor = -0.1
				political_advisor_cost_factor = 0.15
			}
			on_activate = {
				#Depose whoever is in charge because it's Pope time
				if = {
					limit = {
						NOT = {
							has_country_leader = {
								character = ITA_papa_pio_xi
								ruling_only = yes
							}
							has_country_leader = {
								character = ITA_papa_pio_xii
								ruling_only = yes
							}
						}
					}
					country_event = BBA_italy_interaction_events.38
				}
			}
			on_deactivate = {
				
			}
		}

		range = {
			id = ITA_pope_total_control_range
			min = -1
			max = -0.9
			modifier = {
				stability_factor = 0.1
				political_power_factor = 0.1
				neutrality_drift = 0.1
				enemy_justify_war_goal_time = 0.25
				generate_wargoal_tension_against = -0.5
				political_advisor_cost_factor = 0.15
			}
			on_activate = {
				set_power_balance_gfx = {
					id = ITA_power_balance
					side = ITA_pope_side
					gfx = GFX_bop_ITA_pope_improved_side
				}
			}
			on_deactivate = {
				set_power_balance_gfx = {
					id = ITA_power_balance
					side = ITA_pope_side
					gfx = GFX_bop_ITA_pope_side
				}
			}
		}
	}
}

