﻿a4cm_found_kingdom_decision = {
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_found_kingdom.dds"
	}
	decision_group_type = major
	ai_check_interval = 0

	desc = found_kingdom_decision_desc
	selection_tooltip = found_kingdom_decision_tooltip
	confirm_text = found_kingdom_decision_confirm

	is_shown = {
		is_ai = no
		highest_held_title_tier = tier_duchy
		is_landed_or_landless_administrative = yes
		has_character_flag = daddy_pika_cheat_menu
		has_character_flag = govt_menu
	}

	is_valid = {
		prestige_level >= 1
		OR = { # also allow vassal kingdoms
			is_independent_ruler = yes
			trigger_if = {
				limit = {
					is_independent_ruler = yes
				}
				custom_tooltip = {
					text = found_tiny_kingdom_decision_vassal_tt
					always = no
				}
			}
			trigger_else = {
				liege = { # check for their direct liege, not their top_liege
					highest_held_title_tier = tier_empire
				}
			}
		}
		any_held_title = { # not actually needed; player localization
			count >= 1
			tier = tier_duchy
		}
	}

	is_valid_showing_failures_only = {
		is_available_adult = yes
		is_at_war = no
	}

	effect = {
		a4cm_create_custom_kingdom_effect = yes
	}

	ai_potential = {
		always = no
	}

	ai_will_do = {
		base = 0
	}
}

a4cm_found_empire_decision = {
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_dynasty_house.dds"
	}
	decision_group_type = major
	ai_check_interval = 0

	desc = found_empire_decision_desc
	selection_tooltip = found_empire_decision_tooltip
	confirm_text = found_empire_decision_confirm

	is_shown = {
		is_ai = no
		highest_held_title_tier = tier_kingdom
		is_landed_or_landless_administrative = yes
		has_character_flag = daddy_pika_cheat_menu
		has_character_flag = govt_menu
	}

	is_valid = {
		prestige_level >= 1
		is_independent_ruler = yes
		any_held_title = { # not actually needed; player localization
			count >= 1
			tier = tier_kingdom
		}

		# base game triggers
		trigger_if = {
			limit = {
				exists = struggle:iberian_struggle
				# only display the condition for people from relevant faiths and cultures
				struggle:iberian_struggle = {
					OR = {
						is_culture_involved_in_struggle = root.culture
						is_faith_involved_in_struggle = root.faith
					}
				}
				# and living nearby
				any_realm_county = {
 					title_province = {
 						OR = {
 							geographical_region = ghw_region_north_africa
 							geographical_region = world_europe_west
 							geographical_region = world_europe_south
					 	}
 					}
 				}
			}
			custom_description = {
				text = found_empire_decision_not_part_of_iberian_struggle
				NOT = {
					any_character_struggle = {
						is_struggle_type = iberian_struggle
					}
				}
			}
		}

		rule_title_creation_imperial_power_projection_title_creation_trigger = yes
	}

	is_valid_showing_failures_only = {
		is_available_adult = yes
		is_at_war = no
	}

	effect = {
		create_custom_empire_effect = yes
		gain_heroic_legend_seed_tooltip_effect = yes
		hidden_effect = { legend_seed_new_title_effect = yes }
	}

	ai_potential = {
		always = no
	}

	ai_will_do = {
		base = 0
	}
}

a4cm_found_empire_admin_decision = {
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_dynasty_house.dds"
	}
	decision_group_type = major
	ai_check_interval = 0

	desc = found_empire_decision_desc
	selection_tooltip = found_empire_decision_tooltip
	confirm_text = found_empire_decision_confirm

	is_shown = {
		limit = { requires_dlc_flag = roads_to_power }
		is_ai = no
		highest_held_title_tier = tier_kingdom
		is_landed_or_landless_administrative = yes
		has_character_flag = daddy_pika_cheat_menu
		has_character_flag = govt_menu
	}

	is_valid = {
		prestige_level >= 1
		is_independent_ruler = yes
		any_held_title = { # not actually needed; player localization
			count >= 1
			tier = tier_kingdom
		}

		# base game triggers
		trigger_if = {
			limit = {
				exists = struggle:iberian_struggle
				# only display the condition for people from relevant faiths and cultures
				struggle:iberian_struggle = {
					OR = {
						is_culture_involved_in_struggle = root.culture
						is_faith_involved_in_struggle = root.faith
					}
				}
				# and living nearby
				any_realm_county = {
 					title_province = {
 						OR = {
 							geographical_region = ghw_region_north_africa
 							geographical_region = world_europe_west
 							geographical_region = world_europe_south
					 	}
 					}
 				}
			}
			custom_description = {
				text = found_empire_decision_not_part_of_iberian_struggle
				NOT = {
					any_character_struggle = {
						is_struggle_type = iberian_struggle
					}
				}
			}
		}

		rule_title_creation_imperial_power_projection_title_creation_trigger = yes
	}

	is_valid_showing_failures_only = {
		is_available_adult = yes
		is_at_war = no
	}

	effect = {
		create_custom_empire_effect = yes
		gain_heroic_legend_seed_tooltip_effect = yes
		hidden_effect = { legend_seed_new_title_effect = yes }
		if = {
			limit = { NOT = { government = administrative_government } }			
			convert_to_administrative_from_feudalism_effect = yes
		}
	}

	ai_potential = {
		always = no
	}

	ai_will_do = {
		base = 0
	}
}

change_government_administrative = {
    picture = {
	    reference = "gfx/interface/illustrations/decisions/cheat_tab.dds"
	}

    title = change_govt_feudal
    desc = change_govt_desc
    selection_tooltip = change_govt_tt
    confirm_text = CONFIRM_OKAY
	
	decision_group_type = debug

    is_shown = {
		limit = { requires_dlc_flag = roads_to_power }
		NOR = {
			government_has_flag = government_is_landless_adventurer
			government_has_flag = government_is_administrative
		}
		primary_title = {
			tier >= tier_kingdom
		}
		has_character_flag = daddy_pika_cheat_menu
		has_character_flag = govt_menu
    }

    effect = {
		convert_to_administrative_from_feudalism_effect = yes
    }
	ai_check_interval = 0

    ai_will_do = 0
}

change_government_feudal = {
    picture = {
	    reference = "gfx/interface/illustrations/decisions/cheat_tab.dds"
	}

    title = change_govt_feudal
    desc = change_govt_desc
    selection_tooltip = change_govt_tt
    confirm_text = CONFIRM_OKAY
	
	decision_group_type = debug

    is_shown = {
		NOR = {
			government_has_flag = government_is_feudal
			government_has_flag = government_is_landless_adventurer
			government_has_flag = government_is_administrative
		}
		has_character_flag = daddy_pika_cheat_menu
		has_character_flag = govt_menu
    }

    effect = {
		change_government = feudal_government
		every_vassal_or_below = {
			limit = { NOT = { government_has_flag = theocracy_government government_has_flag = government_is_republic } }
			change_government = feudal_government
		}
    }
	ai_check_interval = 0

    ai_will_do = 0
}

change_government_clan = {
    picture = {
	    reference = "gfx/interface/illustrations/decisions/cheat_tab.dds"
	}

    title = change_govt_clan
    desc = change_govt_desc
    selection_tooltip = change_govt_tt
    confirm_text = CONFIRM_OKAY
	
	decision_group_type = debug

    is_shown = {
		NOR = {
			government_has_flag = government_is_clan
			government_has_flag = government_is_landless_adventurer
			government_has_flag = government_is_administrative
		}
		has_character_flag = daddy_pika_cheat_menu
		has_character_flag = govt_menu
    }

    effect = {
		change_government = clan_government
		every_vassal_or_below = {
			limit = { NOT = { government_has_flag = theocracy_government government_has_flag = government_is_republic } }
			change_government = clan_government
		}
    }
	ai_check_interval = 0

    ai_will_do = 0
}

change_government_tribal = {
    picture = {
	    reference = "gfx/interface/illustrations/decisions/cheat_tab.dds"
	}

    title = change_govt_tribe
    desc = change_govt_desc
    selection_tooltip = change_govt_tt
    confirm_text = CONFIRM_OKAY
	
	decision_group_type = debug

    is_shown = {
		NOR = {
			government_has_flag = government_is_tribal
			government_has_flag = government_is_landless_adventurer
			government_has_flag = government_is_administrative
		}
		has_character_flag = daddy_pika_cheat_menu
		has_character_flag = govt_menu
    }

    effect = {
		change_government = tribal_government
		every_vassal_or_below = {
			limit = { NOT = { government_has_flag = theocracy_government government_has_flag = government_is_republic } }
			change_government = tribal_government
		}
    }
	ai_check_interval = 0

    ai_will_do = 0
}

change_succession_single = {
    picture = {
	    reference = "gfx/interface/illustrations/decisions/cheat_tab.dds"
	}

    title = change_suc_old
    desc = change_suc_desc
    selection_tooltip = change_suc_tt
    confirm_text = CONFIRM_OKAY
	
	decision_group_type = debug

    is_shown = {
	    NOR = {
			government_has_flag = theocracy_government
			government_has_flag = government_is_republic
			government_has_flag = government_is_mercenary
			government_has_flag = government_is_tribal
			government_has_flag = government_is_clan
			government_has_flag = government_is_landless_adventurer
			government_has_flag = government_is_administrative
		}
		has_character_flag = daddy_pika_cheat_menu
		has_character_flag = govt_menu
    }

    effect = {
		add_realm_law_skip_effects = single_heir_succession_law
    }
	ai_check_interval = 0

    ai_will_do = 0
}

change_succession_single_youngest = {
    picture = {
	    reference = "gfx/interface/illustrations/decisions/cheat_tab.dds"
	}

    title = change_suc_young
    desc = change_suc_desc
    selection_tooltip = change_suc_tt
    confirm_text = CONFIRM_OKAY
	
	decision_group_type = debug

    is_shown = {
	    NOR = {
			government_has_flag = theocracy_government
			government_has_flag = government_is_republic
			government_has_flag = government_is_mercenary
			government_has_flag = government_is_tribal
			government_has_flag = government_is_clan
			government_has_flag = government_is_landless_adventurer
			government_has_flag = government_is_administrative
		}
		has_character_flag = daddy_pika_cheat_menu
		has_character_flag = govt_menu
    }

    effect = {
		add_realm_law_skip_effects = single_heir_succession_law_youngest
    }
	ai_check_interval = 0

    ai_will_do = 0
}

convert_religion = {
	picture = {
	    reference = "gfx/interface/illustrations/decisions/cheat_tab.dds"
	}
	
	title = conv_realm_religion_tt
    desc = convert_realm_desc
    selection_tooltip = are_you_sure_tt
    confirm_text = "CONFIRM_OKAY"
	
	decision_group_type = debug

	is_shown = {
		has_character_flag = daddy_pika_cheat_menu
		has_character_flag = govt_menu
		NOT = {	government_has_flag = government_is_landless_adventurer }
	}

	effect = {
		every_realm_county = {
			limit = {}
			set_county_faith = root.faith
		}
		every_vassal_or_below = {
			limit = {}
			set_character_faith_with_conversion = root.faith
		}
	}

	ai_check_interval = 0
}

convert_culture = {
	picture = {
	    reference = "gfx/interface/illustrations/decisions/cheat_tab.dds"
	}
	
	title = conv_realm_culture_tt
    desc = convert_realm_desc
    selection_tooltip = are_you_sure_tt
    confirm_text = "CONFIRM_OKAY"
	
	decision_group_type = debug

	is_shown = {
		has_character_flag = daddy_pika_cheat_menu
		has_character_flag = govt_menu
		NOT = {	government_has_flag = government_is_landless_adventurer }
	}

	effect = {
		every_realm_county = {
			limit = {}
			set_county_culture = root.culture
		}
		every_vassal_or_below = {
			limit = {}
			set_culture = root.culture
		}
	}

	ai_check_interval = 0
}

realm_control = {
	picture = {
	    reference = "gfx/interface/illustrations/decisions/cheat_tab.dds"
	}
	title = max_realm_control_TT
    desc = max_realm_desc
    selection_tooltip = are_you_sure_tt
    confirm_text = "CONFIRM_OKAY"
	
	decision_group_type = debug

	is_shown = {
		has_character_flag = daddy_pika_cheat_menu
		has_character_flag = govt_menu
		NOT = {	government_has_flag = government_is_landless_adventurer }
	}

	effect = {
		every_realm_county = {
			limit = {}
			change_county_control = 100
		}
	}

	ai_check_interval = 0
}

realm_development = {
	picture = {
	    reference = "gfx/interface/illustrations/decisions/cheat_tab.dds"
	}
	title = max_realm_development_TT
    desc = max_realm_desc
    selection_tooltip = are_you_sure_tt
    confirm_text = "CONFIRM_OKAY"
	
	decision_group_type = debug

	is_shown = {
		has_character_flag = daddy_pika_cheat_menu
		has_character_flag = govt_menu
		NOT = {	government_has_flag = government_is_landless_adventurer }
	}

	effect = {
		every_realm_county = {
			limit = {}
			change_development_level = 100
		}
	}

	ai_check_interval = 0
}