namespace = IDEOLOGYWAR

character_event = {
    id = IDEOLOGYWAR.1
    desc = EVTDESCIDEOLOGYWAR.1
	picture = GFX_book_carolingian_script_cm
	title = EVTTITLEIDEOLOGYWAR.1
	
	trigger = {
		any_war = { using_cb = just_war }
		NOR = {
			has_character_flag = choose_intern_governor
			has_character_flag = chose_extern_governor
		}
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	option = {
		name = EVTOPTAIDEOLOGYWAR.1
		ai_chance = {
			factor = 60
			modifier = {
				factor = 75
				trait = kind
			}
			modifier = {
				factor = 75
				trait = charitable
			}
		}
		set_character_flag = chose_extern_governor
	}	
	
	option = {
		name = EVTOPTBIDEOLOGYWAR.1
		ai_chance = {
			factor = 40
			modifier = {
				factor = 55
				trait = ambitious
			}
			modifier = {
				factor = 75
				trait = proud
			}
		}
		set_character_flag = choose_intern_governor
	}	
}

letter_event = {
    id = IDEOLOGYWAR.2
    desc = EVTDESCIDEOLOGYWAR.2
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTAIDEOLOGYWAR.2
		ai_chance = {
			factor = 80
			modifier = {
				factor = 85
				trait = humble
			}
			modifier = {
				factor = 85
				trait = temperate
			}
			modifier = {
				factor = 70
				trait = ambitious
			}
			modifier = {
				factor = 60
				trait = proud
			}
		}
		hidden_tooltip = { FROMFROM = { letter_event = { id = IDEOLOGYWAR.3 days = 4 }}}
	}	
	
	option = {
		name = EVTOPTBIDEOLOGYWAR.2
		ai_chance = {
			factor = 20
			modifier = {
				factor = 40
				trait = proud
			}
			modifier = {
				factor = 30
				trait = ambitious
			}
			modifier = {
				factor = 15
				trait = humble
			}
			modifier = {
				factor = 15
				trait = temperate
			}
		}
		hidden_tooltip = { FROMFROM = { letter_event = { id = IDEOLOGYWAR.4 days = 4 }}}
	}	
}

letter_event = {
    id = IDEOLOGYWAR.3
    desc = EVTDESCIDEOLOGYWAR.3
	
	is_triggered_only = yes	
	
	option = {
		name = OK
		ROOT = {
			wealth = -100 
			prestige = -150
			set_character_flag = recently_supported_revolution
		}
		FROMFROM = {
			spawn_unit = {
				province = FROMFROM 
				home = FROMFROM
				owner = FROMFROM
				scaled_by_biggest_garrison = 0.5
				troops = {
					archers = { 6 6 }
					light_cavalry = { 4 4 }
					light_infantry = { 7 7 }
					heavy_infantry = { 4 4 }
				}
				disband_on_peace = yes
				attrition = 1.0
			}
			create_character = {
				random_traits = yes
				dynasty = random
				religion = FROMFROM
				culture = ROOT
				female = no
				age = 29
				attributes = {
					martial = 6
				}
				trait = skilled_tactician
				trait = ambitious
			}
			opinion = {
				modifier = supported_my_revolution
				who = ROOT
				years = 5
			}
		}
	}	
}

letter_event = {
    id = IDEOLOGYWAR.4
    desc = EVTDESCIDEOLOGYWAR.4
	
	is_triggered_only = yes
	
	option = {
		name = OK
		ROOT = {
			opinion = {
				modifier = refused_revolution_help
				who = FROMFROM
				years = 5
			}
		}
	}	
}

character_event = {
    id = IDEOLOGYWAR.5
    
	hide_window = yes
	
	trigger = {
		has_character_flag = recently_supported_revolution
	}
	
	mean_time_to_happen = {
		years = 5
	}
	
	effect = {
		clr_character_flag = recently_supported_revolution
	}
}