
namespace = Plus

#reserved: Plus.3100 to Plus.3199

#######################################
# COLONIZE EVENTS
# Written by Zeress
#######################################

# Colonize Iceland
character_event = {
	id = Plus.3100
	
	is_triggered_only = yes
	hide_window = yes
	
	immediate = {
		create_character = {
			random_traits = yes
			religion = norse_pagan
			culture = norse
			dynasty = random
			health = 5
			fertility = 0.5
			female = no
		}
		new_character = {
			1 = {
				build_holding = {
				   title = b_reykjavik
				   type = tribal
				   holder = PREV
				}
			}
			c_vestisland = {
				grant_title = PREV
			}
		}
		create_character = {
			random_traits = yes
			religion = norse_pagan
			culture = norse
			dynasty = random
			health = 5
			fertility = 0.5
			female = no
		}
		new_character = {
			2 = {
				build_holding = {
				   title = b_glaumbaer
				   type = tribal
				   holder = PREV
				}
			}
			c_austisland = {
				grant_title = PREV
			}
		}
		create_character = {
			random_traits = yes
			religion = norse_pagan
			culture = norse
			dynasty = random
			health = 5
			fertility = 0.5
			female = no
		}
		new_character = {
			1533 = {
				build_holding = {
				   title = b_saudarkrokur
				   type = tribal
				   holder = PREV
				}
			}
			c_norduland_vestra = {
				grant_title = PREV
			}
		}
		create_character = {
			random_traits = yes
			religion = norse_pagan
			culture = norse
			dynasty = random
			health = 5
			fertility = 0.5
			female = no
		}
		new_character = {
			1534 = {
				build_holding = {
				   title = b_akureyri
				   type = tribal
				   holder = PREV
				}
			}
			c_norduland_eystra = {
				grant_title = PREV
			}
		}
		d_iceland = { de_jure_liege = k_north_sea }
	}
}

# Iceland Discovered
character_event = {
	id = Plus.3101
	desc = "EVTDESC_Plus_3101"
	picture = "GFX_evt_iceland_discovered"
	
	ai = no
	
	trigger = {
		#Plus.3100 does not work consistently enough for inclusion as of Conclave
		#NOT = { has_global_flag = iceland_discovered }
		#year = 850
		always = no
	}
	
	mean_time_to_happen = {
		years = 10
		modifier = {
			factor = 0.5
			year = 860
		}
		modifier = {
			factor = 0.25
			year = 870
		}
	}

	immediate = {
		set_global_flag = iceland_discovered
	}
	
	option = {
		name = "EVTOPTA_Plus_3101" # Interesting
	}
}

# Iceland Colonization Begun
character_event = {
	id = Plus.3102
	desc = "EVTDESC_Plus_3102"
	picture = "GFX_evt_settle_iceland"
	
	ai = no
	
	trigger = {
		#has_global_flag = iceland_discovered
		#NOT = { has_global_flag = iceland_colonization_begun }
		#year = 860
		always = no
	}
	
	mean_time_to_happen = {
		years = 10
		modifier = {
			factor = 0.5
			year = 870
		}
		modifier = {
			factor = 0.25
			year = 880
		}
	}

	immediate = {
		set_global_flag = iceland_colonization_begun
	}
	
	option = {
		name = "EVTOPTA_Plus_3102" # What a tale!
	}
}

# Iceland Colonization Finished
character_event = {
	id = Plus.3103
	desc = "EVTDESC_Plus_3103"
	picture = "GFX_evt_law_rock"
	
	ai = no
	
	trigger = {
		#has_global_flag = iceland_colonization_begun
		#NOT = { has_global_flag = iceland_colonization_complete }
		#year = 920
		always = no
	}
	
	mean_time_to_happen = {
		years = 10
		modifier = {
			factor = 0.5
			year = 930
		}
		modifier = {
			factor = 0.25
			year = 940
		}
	}

	immediate = {
		set_global_flag = iceland_colonization_complete
		hidden_tooltip = { d_miaphysite = { owner = { character_event = { id = Plus.3100 } } } }
	}
	
	option = {
		name = "EVTOPTA_Plus_3103" # They've come a long way
	}
}