title_decisions={
	hs_add_proclaim = {		
		ai_check_interval = 48
		only_playable = yes
		
		from_potential = {
			has_ambition = obj_be_top_producer
		}
		potential = {
			OR = {
				title = k_765pro
				title = k_346pro
				title = k_ynmbcollage
				title = k_hanasaka
				title = k_ENTUM
				title = k_hololive
				title = k_2434
				title = k_udp8
			}
			owner = {
				NOT = {
					character = from
				}
			}
		}
		allow = {
			always = yes
		}
		effect = {
			add_claim = FROM
			FROM = {
				wealth = -500
				prestige = -200
				piety = -150
			}
		}
		ai_will_do = {
			factor = 1
		}
    }
	hs_getpro = {		
		ai = no		
		from_potential = {
			#has_ambition = obj_be_top_producer
			
		}
		potential = {
			owner = {
				is_ruler = no
				NOT = {num_of_count_titles_in_realm = 1}
			}
			OR = {
				title = k_765pro
				title = k_346pro
				title = k_ynmbcollage
				title = k_hanasaka
				title = k_ENTUM
				title = k_hololive
				title = k_2434
				title = k_udp8
			}
			owner = {
				NOT = {
					character = from
				}
			}
		}
		allow = {
			FROM = {
				prestige = 6000
				higher_tier_than = DUKE	
			}
		}
		effect = {
			FROM = {grant_title = ROOT}
			FROM ={
				scaled_wealth = {
					value = -2
					min = -800
					max = -5000
				}
			}
			FROM = {
				prestige = 500
				piety = -300
			}
		}
		ai_will_do = {
			factor = 1
		}
    }
}
decisions = {
	hsorganize_idolpro = {
		only_playable = yes
		only_independent = yes
		is_high_prio = yes
		ai_check_interval = 36
		
		potential = {		
			higher_tier_than = DUKE		
			rebel = no
			prisoner = no
			is_adult = yes
			is_incapable = no
			OR = {
				k_765pro ={has_holder = no}
				k_346pro ={has_holder = no}
				k_ynmbcollage ={has_holder = no}
				k_hanasaka ={has_holder = no}
				k_ENTUM ={has_holder = no}
				k_hololive ={has_holder = no}
				k_2434 ={has_holder = no}
				k_udp8 ={has_holder = no}		
			} 
			hs_hasidolpro_trigger = no
			NOT = {any_vassal = {hs_hasidolpro_trigger = yes}}
			has_global_flag = hs_idoltimes_found
			NOT = {has_character_flag = hsorganize_idolpro_flag}
		}
		allow = {
			realm_size = 50
			prestige = 3000
			wealth = 1000
			piety = 0
		}
		effect = {
			wealth = -1000
			prestige = -500
			set_character_flag = hsorganize_idolpro_flag
			#piety = -500
			character_event = {id = ylcharevt.050}
		}
		ai_will_do = {
			factor = 1
		}
	}
}
decisions = {
	hs_emplyidol = {
		ai_check_interval = 60 #check only once every 24 months.
		only_playable = yes
		potential = {
			hs_hasidolpro_trigger = yes	
			is_adult = yes
			is_inaccessible_trigger = no
			is_incapable = no
			NOT = { has_character_modifier = hs_idolemply }
		}
		allow = {
			prisoner = no
			prestige = 1000
			NOT = {hs_max_idolnum_trigger = yes}
		}
		effect = {	 	
			if = {
				limit = {
					NOT = {
						OR = {
							any_owned_bloodline = {
								has_bloodline_flag = bloodline_idolproducer	
							}
							ai = yes
						}
					}
				}
				piety = -30
				wealth = -200
				prestige = -100		
			}

			#if = {
			#	limit = {
			#		OR = {
			#			any_courtier_or_vassal  = {					
			#				hs_can_emply_specidol_trigger = yes				
			#			}
			#			hs_can_emply_specidol_trigger = yes
			#		}					
			#	}
			#	hidden_effect = {hs_emply_specidol_effect = yes	}				
			#}	
			hidden_effect = {				
				hs_emply_specidol_effect = yes			
			}			
			
			if = {
				limit = {
					ROOT = {ai = no}
				}
				new_character = {character_event = {id = yl_summon.11}}
			}	
			
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
		}
	}
	hs_holdbiglive = {
		ai_check_interval = 120 #check only once every 120 months.
		only_playable = yes
		
		potential = {
			hs_hasidolpro_trigger = yes	
			is_adult = yes
			is_inaccessible_trigger = no
			is_incapable = no
			NOT = { has_character_modifier = hs_heldbiglive }
		}
		allow = {
			prisoner = no
			custom_tooltip = {
				text = hs_holdbiglive_tooltip
				any_courtier_or_vassal  = { 
					has_minor_title = title_topidol
					count = 3 
				} 
			}
			any_courtier_or_vassal  = { 
				has_minor_title = title_producer
			} 
			war = no
		}
		effect = {					
			scaled_wealth = {
				value = -1
				min = -2000
				max = -10000
			}
			narrative_event  = { id = yl_summon.5 days = 60 }
			add_character_modifier = {name = hs_heldbiglive years = 30 hidden = yes }
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
		}
	}
}
targetted_decisions = {
	yl_idol_practise= {	
		filter = home_court_including_me
		ai_target_filter = home_court_including_me
		ai_check_interval = 6
		#is_high_prio = yes
		only_playable = yes
		
		from_potential = {
			age = 10
			prisoner = no
			#NOT = {
			#	has_character_modifier = in_seclusion
			#}
			OR = {
				de_facto_liege = ROOT 
				character = ROOT
			}
		}
		potential = {
			#has_minor_title = title_topidol 
			is_incapable = no
			trait = hs_idol		
			NOT = { has_character_modifier = hs_idol_practised }
			#is_landed = no
		}
		allow = {
			age = 10
			in_command = no
			NOR = {
				check_variable = {which = "hs_idol_exp" value = 60}
				trait = travelling
				trait = pregnant
				prisoner = yes
			}
			FROM = {wealth = 0}
		}
		effect = {			
			FROM = {wealth = -2}
			ROOT = {								
				hs_idol_practise_effect = yes		
			}
		}
		ai_will_do = {
			factor = 1
		}
	}
	yl_idol_longtime_practise= {	
		filter = home_court_including_me
		ai_target_filter = home_court_including_me
		ai_check_interval = 24
		#is_high_prio = yes
		only_playable = yes
		
		from_potential = {
			age = 12
			prisoner = no
			#NOT = {
			#	has_character_modifier = in_seclusion
			#}
			hs_hasidolpro_trigger = yes		
			OR = {
				de_facto_liege = ROOT 
				character = ROOT
			}
		}
		potential = {
			#has_minor_title = title_topidol 
			trait = hs_idol
			prisoner = no
			is_incapable = no
			NOT = { has_character_modifier = hs_idol_practised }
			NOR = {
				check_variable = {which = "hs_idol_exp" value = 55}
				trait = travelling
				trait = pregnant
				#has_character_modifier = in_seclusion
			}
			#is_landed = no
		}
		allow = {
			age = 12
			in_command = no
			FROM = {wealth = 0}
		}
		effect = {			
			FROM = {
				scaled_wealth = {
					value = -0.03
					min = -50
					max = -450
				}	
			}
			ROOT = {								
				add_trait = travelling
				hidden_effect = {
					hs_idol_practise_effect = yes
					hs_idol_practise_effect = yes
				}
				character_event = {
					id = hstls.113 months = 4
				}		
			}
		}
		ai_will_do = {
			factor = 1
		}
	}
	yl_idol_propagate= {	
		filter = home_court
		ai_target_filter = home_court
		ai_check_interval = 12
		is_high_prio = yes
		only_playable = yes
		
		from_potential = {
			age = 16
			prisoner = no
			NOT = {
				has_character_modifier = in_seclusion
			}			
		}
		potential = {
			trait = hs_idol
			prisoner = no	
			is_incapable = no			
			NOT = { has_character_modifier = hs_idol_propagated }
			NOT = {
				has_character_modifier = in_seclusion
			}
			NOT = {
				check_variable = {which = "hs_idol_popularity" value = 90}
			}
			host = {character = FROM}
			#is_landed = no
		}
		allow = {
			age = 10
			in_command = no
			#FROM = { de_facto_liege = ROOT }			
		}
		effect = {
			FROM = { 
				scaled_wealth = {
					value = -0.1
					min = -75
					max = -500
				}	
			}
			hidden_tooltip = {
				ROOT = {
					add_character_modifier = {
						name = hs_idol_propagated
						months = 16 hidden = yes
					}				
				}
			}
			ROOT = {
				character_event = { id = ylcharevt.110 days = 5 }
			}
		}
		ai_will_do = {
			factor = 1
		}
	}
	yl_holdlive= {	
		filter = home_court_including_me
		ai_target_filter = home_court_including_me
		ai_check_interval = 48
		is_high_prio = yes
		only_playable = yes
		
		from_potential = {
			#has_global_flag = hs_idoltimes_found
			#hs_hasidolpro_trigger = yes
			#age = 16
			
			prisoner = no
			NOT = {
				has_character_modifier = in_seclusion
			}
		}
		potential = {
			#has_minor_title = title_topidol 
			
			trait = hs_idol
			is_incapable = no
			prisoner = no
			NOT = { has_character_modifier = hs_heldlive }
			NOR = {
				trait = pregnant
				trait = travelling
				has_character_modifier = in_seclusion
			}
			
			#is_landed = no
		}
		allow = {
			age = 12
			in_command = no	
		}
		effect = {
			FROM = { 
				scaled_wealth = {
					value = -0.1
					min = -50
					max = -300
				}	
			}
			ROOT = {
				if = {
					limit = {
						check_variable = {which = "hs_idol_popularity" value = 90} 
					}
					add_character_modifier = {
						name = hs_heldlive
						months = 20
					}
				}
				else_if = {
					limit = {
						check_variable = {which = "hs_idol_popularity" value = 60} 
					}
					add_character_modifier = {
						name = hs_heldlive
						months = 25
					}
				}
				else = {
					add_character_modifier = {
						name = hs_heldlive
						months = 30
					}
				}
				hs_idol_practise_effect = yes		
				add_character_modifier = {
					name = hs_liveongoing
					months = 2
					hidden = yes
				}
				character_event = { id = ylcharevt.060 months = 2 }
			}
		}
		ai_will_do = {
			factor = 1
		}
	}
	yl_idoldebut = {	
		only_playable = yes
		filter = home_court_including_me
		ai_target_filter = home_court_including_me
		#is_high_prio = yes
		ai_check_interval = 24
		from_potential = {
			age = 16
			hs_hasidolpro_trigger = yes			
			prisoner = no
			NOT = {
				has_character_modifier = in_seclusion
			}
		}
		potential = {
			prisoner = no
			is_married = no
			is_female = yes
			hs_is_injured_trigger = no
			NOT = {
				OR = {
					is_incapable = yes
					trait = imbecile
					trait = hs_idol
				}
			}
			NOT = { has_character_flag = hs_idol_gradud }
			#trait = fair
		}
		allow = {
			FROM = {prestige = 3000}
			#is_landed = no
			age = 12
			age < 24
			FROM = {
				NOT = {hs_max_idolnum_trigger = yes}
			}
			
		}
		effect = {
			if = {
				limit = {
					FROM = {
						NOT = {
							any_owned_bloodline = {
								has_bloodline_flag = bloodline_idolproducer	
							}
						}
					}
				}
				FROM = {
					prestige = -200
					wealth = -200
				}	
			}			
			add_trait = hs_idol		
			hidden_effect = {
				will_not_marry_effect = yes
				change_variable = {
					which = global_2D_idoltimes_value
					value = 1
				}
				if = {
					limit = {
						NOR = {
							check_variable = {which = "hs_idol_popularity" value = 1}
							check_variable = {which = "hs_idol_exp" value = 1}
						}
					}
					change_variable = { which = hs_idol_popularity value = 5 }
					random_list = { 
						2 = {change_variable = { which = hs_idol_exp value = 25 }}
						4 = {change_variable = { which = hs_idol_exp value = 15 }}
						5 = {change_variable = { which = hs_idol_exp value = 10 }}
						10 = {change_variable = { which = hs_idol_exp value = 5 }}
					}
						
					hs_check_idoltype_effect = yes
				}
				if = {
					limit = {
						mother = {
							OR = {
								#check_variable = {which = "hs_idol_popularity" value = 30}
								check_variable = {which = "hs_idol_exp" value = 30}
							}
						}
					}
					change_variable = { which = hs_idol_popularity value = 5 }
					random_list = { 
						2 = {change_variable = { which = hs_idol_exp value = 10 }}
						4 = {change_variable = { which = hs_idol_exp value = 5 }}
						5 = {change_variable = { which = hs_idol_exp value = 3 }}
						10 = {change_variable = { which = hs_idol_exp value = 2 }}
					}				
					hs_check_idoltype_effect = yes
				}
				if = {
					limit = {
						mother = {
							OR = {
								check_variable = {which = "hs_idol_popularity" value = 50}
								#check_variable = {which = "hs_idol_exp" value = 30}
							}
						}
					}
					change_variable = { which = hs_idol_popularity value = 15 }
					random_list = { 
						2 = {change_variable = { which = hs_idol_exp value = 5 }}
						4 = {change_variable = { which = hs_idol_exp value = 3 }}
						5 = {change_variable = { which = hs_idol_exp value = 2 }}
						10 = {change_variable = { which = hs_idol_exp value = 1 }}
					}				
					hs_check_idoltype_effect = yes
				}				
			}
			
		}
		ai_will_do = {
			factor = 1
		}
	}
	yl_idolgradu = {	
		filter = self
		ai_target_filter = self
		ai_check_interval = 48
		
		potential = {
			is_adult = yes
			is_female = yes
			trait = hs_idol
			NOT = {
				has_character_modifier = hs_liveongoing
			}
		}
		allow = {
			trait = hs_idol
		}
		effect = {
			liege = {character_event = {id = ylcharevt.065}}
			#remove_trait = hs_idol
			#clr_character_flag = hs_is_a_idol
			#remove_trait = cannot_marry
			#remove_character_modifier = will_not_marry
			#if = {
			#	limit = {
			#		has_ambition = obj_be_idolmaster
			#	}
			#	cancel_ambition = yes
			#}
			#if = {
			#	limit = {
			#		OR = {						
			#			check_variable = {which = "hs_idol_popularity" value = 30}
			#			liege = {
			#				ai = no
			#			}
			#		}
			#	}
			#	any_player = {character_event = {id = yl_summon.4}}
			#}	
			#set_character_flag = hs_idol_gradud
		}
		ai_will_do = {
			factor = 0.35			
			modifier = {
				factor = 1.3
				check_variable = { which = "hs_idol_live_holdcount" value = 15 }
			}
			modifier = {
				factor = 1.3
				check_variable = { which = "hs_idol_live_holdcount" value = 30 }
			}
			modifier = {
				factor = 1.3
				check_variable = { which = "hs_idol_live_holdcount" value = 50 }
			}
			modifier = {
				factor = 1.3
				wealth = 2000
			}
			modifier = {
				factor = 1.3
				wealth = 3000
			}
			modifier = {
				factor = 1.5
				wealth = 5000
			}
			modifier = {
				factor = 3
				is_married = yes
			}
			modifier = {
				factor = 1.5
				has_lover = yes
			}
			modifier = {
				factor = 5
				hs_is_injured_trigger = yes
			}
			modifier = {
				factor = 1.5
				practical_age = 60
			}
			modifier = {
				factor = 1.5
				practical_age = 50
			}
			modifier = {
				factor = 1.5
				practical_age = 45
			}
			modifier = {
				factor = 1.5
				practical_age = 40
			}
			modifier = {
				factor = 1.5
				practical_age = 35
			}
			modifier = {
				factor = 1.5
				practical_age = 30
			}
			modifier = {
				factor = 0.6
				practical_age < 25
			}
			modifier = {
				factor = 0.25
				practical_age < 20
			}
			modifier = {
				factor = 3
				trait = stressed
			}
			modifier = {
				factor = 5
				trait = depressed
			}
			modifier = {
				factor = 0.5
				trait = fair
			}
			modifier = {
				factor = 0.5
				trait = ambitious
			}
			modifier = {
				factor = 0.7
				trait = hs_trait_shouzhao
			}
			modifier = {
				factor = 0.7
				has_character_flag = hs_setidol
			}
			modifier = {
				factor = 1.6
				has_children = yes
			}
			modifier = {
				factor = 0.8
				check_variable = {which = "hs_idol_exp" value = 30}
			}
			modifier = {
				factor = 0.8
				check_variable = {which = "hs_idol_exp" value = 60}
			}
			modifier = {
				factor = 0.7
				check_variable = {which = "hs_idol_popularity" value = 30}
			}
			modifier = {
				factor = 0.7
				check_variable = {which = "hs_idol_popularity" value = 60}
			}
			modifier = {
				factor = 0.7
				check_variable = {which = "hs_idol_popularity" value = 90}
			}
			modifier = {
				factor = 1.3
				has_lover = yes
			}
		}
	}

}