obj_be_top_producer = {
	type = character
	potential = {
		has_global_flag = hs_idoltimes_found
		age = 16
		NOR = {
			any_owned_bloodline = {
				has_bloodline_flag = bloodline_idolproducer	
			}
			has_global_flag = hs_idoltimes_end
		}
		calc_true_if = {
			amount = 4
			k_765pro ={has_holder = yes}
			k_346pro ={has_holder = yes}
			k_ynmbcollage ={has_holder = yes}
			k_hanasaka ={has_holder = yes}
			k_ENTUM ={has_holder = yes}
			k_hololive ={has_holder = yes}
			k_2434 ={has_holder = yes}
			k_udp8 ={has_holder = yes}
		}
	}
	allow = {
		ai = no
		hs_hasidolpro_trigger = yes
		is_incapable = no		
		NOT = { trait = content }
	}
	chance = {
		factor = 5
	}
	success = {
		custom_tooltip = {
			text = be_top_producer_tooltip
			calc_true_if = {
			  amount = 4
				has_landed_title = k_765pro
				has_landed_title = k_346pro
				has_landed_title = k_ynmbcollage
				has_landed_title = k_hanasaka
				has_landed_title = k_ENTUM
				has_landed_title = k_hololive
				has_landed_title = k_2434
				has_landed_title = k_udp8
				has_landed_title = d_umamusu
				any_vassal  = { 
					has_landed_title = k_765pro
				}
				any_vassal  = { 
					has_landed_title = k_346pro
				}
				any_vassal  = { 
					has_landed_title = k_ynmbcollage
				}
				any_vassal  = { 
					has_landed_title = k_hanasaka
				}
				any_vassal  = { 
					has_landed_title = k_ENTUM
				}
				any_vassal  = { 
					has_landed_title = k_hololive
				}
				any_vassal  = { 
					has_landed_title = k_2434
				}
				any_vassal  = { 
					has_landed_title = k_udp8
				}
				any_vassal  = { 
					has_landed_title = d_umamusu
				}
			}
		}
	}
	abort = {
		hs_hasidolpro_trigger = no
	}
	abort_effect = {
		prestige = -200
	}
	effect = {
		prestige = 2000
		wealth = 5000
		create_bloodline = {
			type = hs_bloodlines_producer 
		}
		set_global_flag = hs_idoltimes_end
	}
}
obj_be_magician_h = {
	type = character
	potential = {
		age = 16
		OR = {
			trait = hs_magician 
			trait = hs_magician_l 
		}
		NOR = {
			trait = hs_magician_h 
		}
	}
	allow = {
		is_incapable = no		
		NOT = { trait = content }
	}
	chance = {
		factor = 10
		modifier = {
			factor = 0.1
			trait = hs_magician_l
		}
		modifier = {
			factor = 0.05
			practical_age = 40
		}
		modifier = {
			factor = 0.1
			practical_age = 50
		}
		modifier = {
			factor = 0.3
			NOT = {
				learning = 20
			}
		}
		modifier = {
			factor = 0.5
			NOT = {
				learning = 25
			}
		}
	}
	success = {
		trait = hs_magician_h
	}
	abort = {
		is_incapable = yes
	}
	abort_effect = {
		prestige = -50
	}
	effect = {
		prestige = 3000
		health = 1.5
		change_martial = 3
		remove_trait = stressed
	}
}
obj_be_idolmaster = {
	type = character
	potential = {
		age = 16
		trait = hs_idol
		OR = {
			check_variable = {which = "hs_idol_exp" value = 30}
			check_variable = {which = "hs_idol_popularity" value = 45}
		}
		NOR = {
			has_character_flag = hs_obj_be_idolmaster_successed
			has_character_modifier = hs_idollevel_6
			check_variable = {which = "hs_idol_exp" value = 50}
			check_variable = {which = "hs_idol_popularity" value = 75}
		}
	}
	allow = {
		is_incapable = no		
		trait = hs_idol
		NOT = { trait = content }
	}
	chance = {
		factor = 0.5
		modifier = {
			factor = 1.5
			check_variable = {which = "hs_idol_exp" value = 30}
		}
		modifier = {
			factor = 1.5
			check_variable = {which = "hs_idol_popularity" value = 45}
		}
		modifier = {
			factor = 1.2
			check_variable = {which = "hs_idol_exp" value = 45}
		}
		modifier = {
			factor = 1.2
			check_variable = {which = "hs_idol_popularity" value = 60}
		}
	}
	success = {
		has_character_modifier = hs_idollevel_6
	}
	abort = {
		is_incapable = yes
		NOT = {
			trait = hs_idol
		}
	}
	abort_effect = {
		prestige = -50
	}
	effect = {
		prestige = 500
		change_variable = { which = "hs_idol_exp" value = 3 }
		change_variable = { which = "hs_idol_popularity" value = 10 }
		set_character_flag = hs_obj_be_idolmaster_successed
		change_diplomacy = 2
	}
}
obj_hs_have_a_remains = {
	type = character
	potential = {
		age = 16
		NOT = {
			any_artifact = {
				has_artifact_flag = hs_flag_saintremains 
			}
		}
		OR ={
			ai = no
			is_landed = yes
		}
		higher_tier_than = COUNT
		NOT = {
			OR = {
				trait = incapable
				trait = imbecile
			}
		}
		NOT = {hs_summoned_allhero_trigger = yes}
	}
	allow = {
		is_incapable = no		
	}
	chance = {
		factor = 5
	}
	success = {
		custom_tooltip = {
			text = hs_has_remains_tooltip
			any_artifact = {
				has_artifact_flag = hs_flag_saintremains 
			}
		}
	}
	abort = {
		is_incapable = yes
	}
	abort_effect = {
		prestige = -100
	}
	effect = {
		
	}
}