﻿
the_long_night_setup_effect = {

create_character = {
							name = other_name
							gender = male
							culture = culture:frostborn
							faith = faith:cold_gods	
							location = title:e_the_iron_throne.holder.capital_province #change in T&T to somewhere in essos
							age = { 8000 11000 }
							dynasty_house = character:others_thenightking.house
							martial = 25			
							diplomacy = 0
							intrigue = 100
							learning = 65	
							stewardship = 30			
							prowess = 30

							trait = other_trait
							trait = nightking
							trait = spindly		
							trait = intellect_good_3			
							trait = compassionate						
							trait = education_martial_5	
							trait = content
							trait = generous
							trait = giant							
							
							
		
							after_creation = {
								add_character_flag = has_scripted_appearance	
								add_character_flag = ai_immune_to_mental_breaks		
								add_character_flag = immune_to_disease		
								add_character_flag = is_nightking
								add_character_flag = agot_immersion_bannermen_blocker
								if = { limit = { has_game_rule = others_weak_invasion } add_character_modifier = others_weak_modifier }
								if = { limit = { has_game_rule = others_standard_invasion } add_character_modifier = others_standard_modifier }
								if = { limit = { has_game_rule = others_strong_invasion } add_character_modifier = others_strong_modifier }
								if = { limit = { has_game_rule = others_insane_invasion } add_character_modifier = others_insane_modifier }
								
								set_sexuality = asexual
								#add_character_modifier = diplomacy_majesty_4090_no_raiment_modifier
								make_trait_inactive = cool_silver_hair
								make_trait_inactive = blue_eyes
								make_trait_inactive = is_targaryen_3
								give_nickname = nick_the_great_other
								
								
							}

						

							save_scope_as = otherinvader
						}
						
					

		scope:otherinvader = {
			#copy_inheritable_appearance_from = character:others_thenightking
			
			if = { limit = { title:c_the_frigid_rise.holder = { is_ai = yes } } get_title = title:c_the_frigid_rise }
			if = { limit = { title:c_bloodbend.holder = { is_ai = yes } } get_title = title:c_bloodbend }
			if = { limit = { title:c_hoarmarrow.holder = { is_ai = yes } } get_title = title:c_hoarmarrow }
			if = { limit = { title:c_idle_barrens.holder = { is_ai = yes } } get_title = title:c_idle_barrens }
			if = { limit = { title:c_wights_well.holder = { is_ai = yes } } get_title = title:c_wights_well }
			if = { limit = { title:c_axe_camp.holder = { is_ai = yes } } get_title = title:c_axe_camp }
			if = { limit = { title:c_clear_ice_lake.holder = { is_ai = yes } } get_title = title:c_clear_ice_lake }
			if = { limit = { title:c_gerras_dryn.holder = { is_ai = yes } } get_title = title:c_gerras_dryn }
			if = { limit = { title:c_hail_coast.holder = { is_ai = yes } } get_title = title:c_hail_coast }
			if = { limit = { title:c_lhark_vakar.holder = { is_ai = yes } } get_title = title:c_lhark_vakar }
			if = { limit = { title:c_torch_river.holder = { is_ai = yes } } get_title = title:c_torch_river }
			if = { limit = { title:c_ask_vith.holder = { is_ai = yes } } get_title = title:c_ask_vith }
			if = { limit = { title:c_basordryn.holder = { is_ai = yes } } get_title = title:c_basordryn }
			if = { limit = { title:c_roveggs_spine.holder = { is_ai = yes } } get_title = title:c_roveggs_spine }
			if = { limit = { title:c_vurk_ryg.holder = { is_ai = yes } } get_title = title:c_vurk_ryg }
			
			get_title = title:e_others
			
			
			
			if = { limit = { character:Great_Other = { is_alive = yes } }
				create_title_and_vassal_change = {
				type = conquest
				save_scope_as = change
			}
			character:Great_Other = {
				every_sub_realm_title = {
					limit = {
						tier >= tier_county
						#is_noble_family_title = no
						#is_landless_type_title = no
						NOT = { holder ?= scope:otherinvader }
					}
					change_title_holder_include_vassals = {
						holder = scope:otherinvader
						change = scope:change
						take_baronies = no
					}
				}
			}
			resolve_title_and_vassal_change = scope:change
			}
	
			add_prestige = 5000
			add_piety = 5000
			add_gold = 500
	#### Crown
	set_artifact_rarity_illustrious = yes
	create_artifact = {
		name = crown_of_the_great_other_name
		description = crown_of_the_great_other_description
		type = helmet
		visuals = crown_of_true_winter_visuals
		wealth = scope:wealth
		quality = scope:quality
		template = crown_of_true_winter_template
		modifier = crown_of_true_winter_modifier
		save_scope_as = newly_created_artifact
		decaying = no
	}

	scope:newly_created_artifact = {
		set_variable = { name = crown_of_true_winter_artifact value = yes }
		set_variable = { name = historical_unique_artifact value = yes }
	}
 ### Sword
	set_artifact_rarity_illustrious = yes
	create_artifact = {
		name = others_sword
		visuals = others_sword_visuals
		description = other_sword_description
		type = sword
		wealth = scope:wealth
		quality = scope:quality
		template = others_sword_template
		history = {
			type = created_before_history
			date = 50.1.1
		}
		modifier = others_sword_modifier
		save_scope_as = newly_created_artifact
		decaying = yes
	}
	scope:newly_created_artifact = {
		set_variable = { name = historical_unique_artifact value = yes }
		equip_artifact_to_owner = yes
	}
	spawn_army = { 
				men_at_arms = {
					type = other_maa
					stacks = 100
				}
			
				men_at_arms = {
					type = trebuchet
					stacks = 100
				}
				name = wights

			uses_supply = no
			location = capital_province }

#agot_create_artifact_crown_of_true_winter_effect = { OWNER = this }
	
	create_story = {
					type = long_night_story
				}
	

others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes
others_character_male_spawner = yes

others_character_female_spawner = yes
others_character_female_spawner = yes
others_character_female_spawner = yes
others_character_female_spawner = yes
others_character_female_spawner = yes
others_character_female_spawner = yes
others_character_female_spawner = yes
others_character_female_spawner = yes
others_character_female_spawner = yes
others_character_female_spawner = yes
others_character_female_spawner = yes
others_character_female_spawner = yes



}
}






others_character_male_spawner = {  


create_character = {
				name = other_name
				age = { 6000 7000 }
				culture = culture:frostborn
				gender = male
				dynasty_house = house:house_theothers
				faith = faith:cold_gods
				#father = scope:otherinvader
				employer = scope:otherinvader
				random_traits = yes
				trait = other_trait
				trait = spindly
				random_traits_list = {
					education_martial_1 = { weight = { base = 20 } }
					education_martial_2 = { weight = { base = 20 } }
					education_martial_3 = { weight = { base = 45 } }
					education_martial_4 = { weight = { base = 15 } }
				}
				after_creation = {
				
								add_character_flag = agot_immersion_bannermen_blocker
								add_character_flag = ai_immune_to_mental_breaks		
								add_character_flag = immune_to_disease		
								set_sexuality = asexual
								#add_character_modifier = diplomacy_majesty_4090_no_raiment_modifier
								make_trait_inactive = cool_silver_hair
								make_trait_inactive = blue_eyes
					if = {
						limit = { has_trait = dwarf }
						remove_trait = dwarf
					}
					if = {
						limit = { has_trait = clubfooted }
						remove_trait = clubfooted
					}
				}
				
				save_scope_as = otherspawn

			}
			scope:otherspawn = {
			
			
						 ### Sword
	set_artifact_rarity_illustrious = yes
	create_artifact = {
		name = others_sword
		visuals = others_sword_visuals
		description = others_sword_description
		type = sword
		wealth = scope:wealth
		quality = scope:quality
		template = others_sword_template
		history = {
			type = created_before_history
			date = 50.1.1
		}
		modifier = others_sword_modifier
		save_scope_as = newly_created_artifact
		decaying = yes
	}
	scope:newly_created_artifact = {
		set_variable = { name = historical_unique_artifact value = yes }
		equip_artifact_to_owner = yes
	}
					}







}


others_character_female_spawner = {  

create_character = {
				name = other_name
				age = { 6000 7000 }
				culture = culture:frostborn
				gender = female
				dynasty_house = house:house_theothers
				faith = faith:cold_gods
				#father = scope:otherinvader
				employer = scope:otherinvader
				random_traits = yes
				trait = spindly
				trait = other_trait
				trait = witch
				random_traits_list = {
					education_martial_1 = { weight = { base = 20 } }
					education_martial_2 = { weight = { base = 20 } }
					education_martial_3 = { weight = { base = 45 } }
					education_martial_4 = { weight = { base = 15 } }
				}
				random_traits_list = {
					beauty_good_1 = { weight = { base = 40 } }
					beauty_good_2 = { weight = { base = 45 } }
					beauty_good_3 = { weight = { base = 15 } }
				}
				after_creation = {
				
								add_character_flag = agot_immersion_bannermen_blocker
								add_character_flag = ai_immune_to_mental_breaks		
								add_character_flag = immune_to_disease
								make_trait_inactive = cool_silver_hair
								make_trait_inactive = blue_eyes
					if = {
						limit = { has_trait = dwarf }
						remove_trait = dwarf
					}
					if = {
						limit = { has_trait = clubfooted }
						remove_trait = clubfooted
					}
				}
				
				save_scope_as = otherspawn

			}
			scope:otherspawn = {
			
						 ### Sword
	set_artifact_rarity_illustrious = yes
	create_artifact = {
		name = others_sword
		visuals = others_sword_visuals
		description = other_sword_description
		type = sword
		wealth = scope:wealth
		quality = scope:quality
		template = others_sword_template
		history = {
			type = created_before_history
			date = 50.1.1
		}
		modifier = others_sword_modifier
		save_scope_as = newly_created_artifact
		decaying = yes
	}
	scope:newly_created_artifact = {
		set_variable = { name = historical_unique_artifact value = yes }
		equip_artifact_to_owner = yes
	}
					}







}








others_decide_if_invasion_will_happen_effect = {
	if = {
		limit = {
			NOT = { has_global_variable = others_invasion_will_happen }
		}
		set_global_variable = {
			name = others_invasion_will_happen
			value = no
		}
		
		random = {
			chance = {
				value = 0
			
				if = {
					limit = {
						has_game_rule = others_remote_odds_invasion_chance
					}
					add = 25
				}
				if = {
					limit = {
						has_game_rule = others_even_odds_invasion_chance
					}
					add = 50
				}
				if = {
					limit = {
						has_game_rule = others_near_certain_invasion_chance
					}
					add = 75
				}
				if = {
					limit = {
						has_game_rule = others_certain_invasion_chance
					}
					add = 100
				}
			}
			
			set_global_variable = {
				name = others_invasion_will_happen
				value = yes
			}
		}
	}
}






scouring_lands_effect = { 











}



#Scouring

longnight_create_other_for_scouring = {
	create_character = {
		name = other_leader_name
		gender = male
		template = other_template
		save_scope_as = other
		location = scope:target_location
		culture = culture:frostborn
		faith = faith:cold_gods
		dynasty_house = house:house_theothers
	}
	# Set up title so that war can be declared
	create_dynamic_title = {
		tier = duchy
		name = others_duchy_title
	}
	create_title_and_vassal_change = {
		type = created
		save_scope_as = change
		add_claim_on_loss = no
	}
	scope:new_title = {
		set_capital_county = $TARGET$.capital_county
		set_landless_title = yes
		set_destroy_on_succession = yes
		set_delete_on_destroy = yes
		set_no_automatic_claims = yes
		set_definitive_form = yes
		set_can_be_named_after_dynasty = no
		change_title_holder = {
			holder = scope:other
			change = scope:change
		}
	}
	resolve_title_and_vassal_change = scope:change
}
longnight_spawn_army_for_scouring = { # TARGET
	scope:other = {
	
		hidden_effect = { add_gold = 100 }
		start_war = {
			cb = scouring_cb
			target = $TARGET$
			target_title = $TARGET$.primary_title
		}
		set_variable = {
							name = others_army_size
							value = $TARGET$.max_military_strength 
							}
		change_variable = {
							name = others_army_size
							multiply = 1.5
		
		}
						
		
		
		
		if = {
			limit = {exists = scope:target_location }
			spawn_army = {
				name = scouring_army_name
				levies = var:others_army_size
				men_at_arms = {
					type = other_maa
					stacks = 6
				}
				# men_at_arms = {
				# 	type = regiment_northman_crannog_archers
				# 	stacks = 3
				# }
				location = scope:target_location
			}
		}
		else = {
			spawn_army = {
				name = scouring_army_name
				levies = var:others_army_size
				men_at_arms = {
					type = other_maa
					stacks = 6
				}
				# men_at_arms = {
				# 	type = regiment_northman_crannog_archers
				# 	stacks = 3
				# }
				location = $TARGET$.location
			}
		}
	}
}





longnight_reform_nightswatch_effect = {





create_character = {
							#name = "Other"
							gender = male
							culture = culture:northman
							faith = faith:old_gods_south
							age = { 16 45 }
							trait = nightswatch
							save_scope_as = new_lord_commander
						}

scope:new_lord_commander = {
get_title = title:c_castle_black
get_title = title:c_the_nightfort
get_title = title:c_the_shadow_tower
get_title = title:c_eastwatch
get_title = title:d_the_wall
get_title = title:k_the_wall

change_government = nights_watch_government
		add_gold = 500

}





}


destroy_others_kingdom_titles = {

every_held_title = { 
limit = { tier > tier_county }

prev = { destroy_title = prev }
}


}


agot_long_night_iron_throne_reformation_effect = { 



every_ruler = { limit = { 
	AND = { is_independent_ruler = yes 
	this.capital_barony.title_province = { geographical_region = world_westeros_seven_kingdoms }
	is_landed = yes
	}
	}
	
	trigger_event = {
						id = others_maintenance.3
						days = 1
					}
}






}




#if = { limit = { has_game_rule = longnight_iron_throne_reformation_on }	 
#	###Reform 7 Kingdoms
#	
#	if = { limit = { exists = title:e_the_iron_throne.holder }
#	if = { limit = { title:k_the_north.holder = { is_vassal_of = title:e_others.holder } }
#		title:k_the_north.holder = {	trigger_event = {
#						id = others_maintenance.2
#						days = 2
#					}
#					}
#					}
#	if = { limit = { title:k_the_riverlands.holder = { is_vassal_of = title:e_others.holder } }
#		title:k_the_riverlands.holder = {	trigger_event = {
#						id = others_maintenance.2
#						days = 2
#					}
#					}
#					}
#	if = { limit = { title:k_the_vale.holder = { is_vassal_of = title:e_others.holder } }
#		title:k_the_vale.holder = {	trigger_event = {
#						id = others_maintenance.2
#						days = 2
#					}
#					}
#					}
#	if = { limit = { title:k_the_westerlands.holder = { is_vassal_of = title:e_others.holder } }
#		title:k_the_westerlands.holder = {	trigger_event = {
#						id = others_maintenance.2
#						days = 2
#					}
#					}
#					}
#	if = { limit = { title:k_the_crownlands.holder = { is_vassal_of = title:e_others.holder } }
#	title:k_the_crownlands.holder = {	trigger_event = {
#						id = others_maintenance.2
#						days = 2
#					}
#					}
#					}
#	if = { limit = { title:k_the_reach.holder = { is_vassal_of = title:e_others.holder } }
#	title:k_the_reach.holder = {	trigger_event = {
#						id = others_maintenance.2
#						days = 2
#					}
#					}
#					}			
#	if = { limit = { title:k_the_stormlands.holder = { is_vassal_of = title:e_others.holder } }
#	title:k_the_stormlands.holder = {	trigger_event = {
#						id = others_maintenance.2
#						days = 2
#					}
#					}
#					}
#	if = { limit = { title:k_dorne.holder = { is_vassal_of = title:e_others.holder } }
#	title:k_dorne.holder = {	trigger_event = {
#						id = others_maintenance.2
#						days = 2
#					}
#					}
#					}
#	if = { limit = { title:k_the_iron_islands.holder = { is_vassal_of = title:e_others.holder } }
#	title:k_the_iron_islands.holder = {	trigger_event = {
#						id = others_maintenance.2
#						days = 2
#					}
#					}
#					}
#	
#	}
#	}




agot_spawn_adult_ice_dragon_effect = {


	ordered_living_dragon = {
			
			order_by = age
			position = 0
			save_scope_as = oldest_dragon
		}

	





	create_character = {
		name = dragon_skroth
		gender = male 
		culture = culture:dragon
		faith = faith:valyrian
		location = location
		age = scope:oldest_dragon.age
		dynasty_house = house:house_theothers
		trait = immortal
		trait = dragon
		trait = education_dragon_1
		trait = dragon_physique_good_3
		trait = dragon_solitary
		trait = dragon_bloodthirsty
		trait = dragon_voracious
		trait = dragon_defiant


		random_traits = no

		save_scope_as = dragon

		after_creation = {
			set_variable = {
				name = dragon_gender_hidden
				value = 1
			}

			create_story = story_dragon_alive

			# Needed for visuals
			set_variable = {
				name = dragon_age
				value = age
			}

			#Set dragon visual gene ranges here.
			agot_back_apply_dragon_aging_effect = yes
		#Ice Dragon Appearance
			set_variable = {
				name = gene_dragon_primary_color_hue
				value = 0.05
			}
			set_variable = {
				name = gene_dragon_primary_color_value
				value = 0.05
			}

			set_variable = {
				name = gene_dragon_secondary_hue
				value = 0.65
			}
			
			set_variable = {
				name = gene_dragon_secondary_value
				value = 0.35
			}

			set_variable = {
				name = gene_dragon_eye_color_hue
				value = 0.0
			}

			set_variable = {
				name = gene_dragon_eye_color_value
				value = 0.0
			}

			set_variable = {
				name = gene_dragon_horn_color_hue
				value = 0.55
			}
			set_variable = {
				name = gene_dragon_horn_color_value
				value = 0.0
			}

			set_variable = {
				name = gene_dragon_brow_width
				value = 1.0
			}

			set_variable = {
				name = gene_dragon_cheek_width
				value = 0.26
			}

			set_variable = {
				name = gene_dragon_chin_profile
				value = 1.0
			}

			set_variable = {
				name = gene_dragon_crest_depth
				value = 0.59
			}

			set_variable = {
				name = gene_dragon_head_roundness
				value = 0.99
			}

			set_variable = {
				name = gene_dragon_horns_eyebrow_length
				value = 0.31
			}

			set_variable = {
				name = gene_dragon_main_horn_shape_template
				value = 4
			}

			set_variable = {
				name = gene_dragon_main_horn_shape_value
				value = 0.36
			}

			set_variable = {
				name = gene_dragon_jaw_width
				value = 0.47
			}

			set_variable = {
				name = gene_dragon_lower_jaw_height
				value = 0.48
			}

			set_variable = {
				name = gene_dragon_lower_jaw_width
				value = 0.13
			}

			set_variable = {
				name = gene_dragon_old_neck
				value = 0.22
			}

			set_variable = {
				name = gene_dragon_outer_brow_height
				value = 0.18
			}

			set_variable = {
				name = gene_dragon_snout_height
				value = 0.56
			}

			set_variable = {
				name = gene_dragon_snout_length
				value = 0.25
			}

			set_variable = {
				name = gene_dragon_snout_profile
				value = 0.5
			}

			set_variable = {
				name = gene_dragon_snout_width
				value = 0.36
			}

			set_variable = {
				name = gene_dragon_upper_jaw_width
				value = 0.03
			}

			set_variable = {
				name = gene_dragon_center_fin_size
				value = 0.12
			}

			set_variable = {
				name = gene_dragon_back_spike_size
				value = 0.87
			}
			set_variable = {
				name = gene_dragon_horns_eyebrow
				value = 0.5
			}
			set_variable = {
				name = gene_dragon_neck_spike_size
				value = 0.5
			}

			set_variable = {
				name = gene_dragon_side_fin_size
				value = 0.5
			}

			set_variable = {
				name = gene_dragon_snout_end_width
				value = 0.8
			}

			set_variable = {
				name = gene_dragon_neck_length
				value = 0.8
			}

			set_variable = {
				name = gene_dragon_tail_length
				value = 0.8
			}

			set_variable = {
				name = color_grading
				value = flag:darkest
			}
			set_variable = {
				name = color
				value = flag:white
			}

			# Create and pass the variables to the story cycle
			agot_dragon_transfer_vars_to_story_cycle_effect = { DRAGON = scope:dragon }
		}
		
	}
	
	hidden_effect = {
									agot_tame_dragon = {
										TAMER = root.story_owner
										DRAGON = scope:dragon
									}
									
									scope:dragon = { 
									change_dragon_size = {
										VALUE = scope:oldest_dragon.dragon_size
									}
									
									}
								}
}




agot_spawn_adult_skroth_again_effect = { # (History id = dragon_drogon)
	create_character = {
		name = "Skrothmasss"
		gender = male #do you want dragons to immediately die out or do you want eggs
		culture = culture:dragon
		faith = faith:valyrian
		location = location
		age = 50
		mother = character:dragon_dreamfyre
		dynasty = none

		trait = dragon
		trait = dragon_destined
		rait = education_dragon_1
		trait = dragon_physique_good_3
		trait = dragon_solitary
		trait = dragon_bloodthirsty
		trait = dragon_voracious
		trait = dragon_defiant

		

		random_traits = no

		save_scope_as = dragon

		after_creation = {
			set_variable = {
				name = dragon_gender_hidden
				value = 1
			}

			create_story = story_dragon_alive

			# Needed for visuals
			set_variable = {
				name = dragon_age
				value = age
			}

			#Set dragon visual gene ranges here.
			agot_back_apply_dragon_aging_effect = yes

			#Drogon Appearance
			set_variable = {
				name = gene_dragon_primary_color_hue
				value = 0.05
			}
			set_variable = {
				name = gene_dragon_primary_color_value
				value = 0.05
			}

			set_variable = {
				name = gene_dragon_secondary_hue
				value = 1.0
			}

			set_variable = {
				name = gene_dragon_secondary_value
				value = 1.0
			}

			set_variable = {
				name = gene_dragon_eye_color_hue
				value = 0.0
			}

			set_variable = {
				name = gene_dragon_eye_color_value
				value = 0.63
			}

			set_variable = {
				name = gene_dragon_horn_color_hue
				value = 1.0
			}
			set_variable = {
				name = gene_dragon_horn_color_value
				value = 0.88
			}

			set_variable = {
				name = gene_dragon_brow_width
				value = 0.5
			}

			set_variable = {
				name = gene_dragon_cheek_width
				value = 0.5
			}

			set_variable = {
				name = gene_dragon_chin_profile
				value = 0.5
			}

			set_variable = {
				name = gene_dragon_crest_depth
				value = 0.5
			}

			set_variable = {
				name = gene_dragon_head_roundness
				value = 0.5
			}

			set_variable = {
				name = gene_dragon_horns_eyebrow_length
				value = 0.5
			}

			set_variable = {
				name = gene_dragon_main_horn_shape_template
				value = 1
			}

			set_variable = {
				name = gene_dragon_main_horn_shape_value
				value = 0.5
			}

			set_variable = {
				name = gene_dragon_jaw_width
				value = 0.5
			}

			set_variable = {
				name = gene_dragon_lower_jaw_height
				value = 0.5
			}

			set_variable = {
				name = gene_dragon_lower_jaw_width
				value = 0.5
			}

			set_variable = {
				name = gene_dragon_old_neck
				value = 0.5
			}

			set_variable = {
				name = gene_dragon_outer_brow_height
				value = 0.5
			}

			set_variable = {
				name = gene_dragon_snout_height
				value = 0.5
			}

			set_variable = {
				name = gene_dragon_snout_length
				value = 0.5
			}

			set_variable = {
				name = gene_dragon_snout_profile
				value = 0.5
			}

			set_variable = {
				name = gene_dragon_snout_width
				value = 0.5
			}

			set_variable = {
				name = gene_dragon_upper_jaw_width
				value = 0.5
			}

			set_variable = {
				name = gene_dragon_center_fin_size
				value = 0.5
			}

			set_variable = {
				name = gene_dragon_back_spike_size
				value = 0.5
			}
			set_variable = {
				name = gene_dragon_horns_eyebrow
				value = 0.5
			}
			set_variable = {
				name = gene_dragon_neck_spike_size
				value = 0.5
			}

			set_variable = {
				name = gene_dragon_side_fin_size
				value = 0.5
			}

			set_variable = {
				name = gene_dragon_snout_end_width
				value = 0.5
			}

			set_variable = {
				name = gene_dragon_neck_length
				value = 0.5
			}

			set_variable = {
				name = gene_dragon_tail_length
				value = 0.5
			}

			set_variable = {
				name = color_grading
				value = flag:darkest
			}
			set_variable = {
				name = color
				value = flag:black
			}

			# Create and pass the variables to the story cycle
			agot_dragon_transfer_vars_to_story_cycle_effect = { DRAGON = scope:dragon }
		}
	}
}







agot_spawn_adult_skroth_effect = {

	create_character = {
		name = "Skroth"
		gender = male 
		culture = culture:dragon
		faith = faith:valyrian
		location = location
		age = 100
		dynasty_house = house:house_theothers
		trait = dragon
		#trait = immortal
		trait = education_dragon_2
		trait = dragon_destined
		trait = dragon_physique_good_3
		trait = dragon_defiant
		trait = dragon_voracious
		trait = dragon_impulsive

		random_traits = no

		save_scope_as = dragon

		after_creation = {
			set_variable = {
				name = dragon_gender_hidden
				value = 1
			}

			create_story = story_dragon_alive

			# Needed for visuals
			set_variable = {
				name = dragon_age
				value = age
			}

			#Set dragon visual gene ranges here.
			agot_back_apply_dragon_aging_effect = yes

			#Ice Dragon Appearance
			set_variable = {
				name = gene_dragon_primary_color_hue
				value = 1.0
			}
			set_variable = {
				name = gene_dragon_primary_color_value
				value = 0.0
			}

			set_variable = {
				name = gene_dragon_secondary_hue
				value = 1.0
			}
			
			set_variable = {
				name = gene_dragon_secondary_value
				value = 0.0
			}

			set_variable = {
				name = gene_dragon_eye_color_hue
				value = 0.0
			}

			set_variable = {
				name = gene_dragon_eye_color_value
				value = 0.0
			}

			set_variable = {
				name = gene_dragon_horn_color_hue
				value = 0.55
			}
			set_variable = {
				name = gene_dragon_horn_color_value
				value = 0.0
			}

			set_variable = {
				name = gene_dragon_brow_width
				value = 1.0
			}

			set_variable = {
				name = gene_dragon_cheek_width
				value = 0.26
			}

			set_variable = {
				name = gene_dragon_chin_profile
				value = 1.0
			}

			set_variable = {
				name = gene_dragon_crest_depth
				value = 0.59
			}

			set_variable = {
				name = gene_dragon_head_roundness
				value = 0.99
			}

			set_variable = {
				name = gene_dragon_horns_eyebrow_length
				value = 0.31
			}

			set_variable = {
				name = gene_dragon_main_horn_shape_template
				value = 4
			}

			set_variable = {
				name = gene_dragon_main_horn_shape_value
				value = 0.36
			}

			set_variable = {
				name = gene_dragon_jaw_width
				value = 0.47
			}

			set_variable = {
				name = gene_dragon_lower_jaw_height
				value = 0.48
			}

			set_variable = {
				name = gene_dragon_lower_jaw_width
				value = 0.13
			}

			set_variable = {
				name = gene_dragon_old_neck
				value = 0.22
			}

			set_variable = {
				name = gene_dragon_outer_brow_height
				value = 0.18
			}

			set_variable = {
				name = gene_dragon_snout_height
				value = 0.56
			}

			set_variable = {
				name = gene_dragon_snout_length
				value = 0.25
			}

			set_variable = {
				name = gene_dragon_snout_profile
				value = 0.5
			}

			set_variable = {
				name = gene_dragon_snout_width
				value = 0.36
			}

			set_variable = {
				name = gene_dragon_upper_jaw_width
				value = 0.03
			}

			set_variable = {
				name = gene_dragon_center_fin_size
				value = 0.12
			}

			set_variable = {
				name = gene_dragon_back_spike_size
				value = 0.87
			}
			set_variable = {
				name = gene_dragon_horns_eyebrow
				value = 0.5
			}
			set_variable = {
				name = gene_dragon_neck_spike_size
				value = 0.5
			}

			set_variable = {
				name = gene_dragon_side_fin_size
				value = 0.5
			}

			set_variable = {
				name = gene_dragon_snout_end_width
				value = 0.8
			}

			set_variable = {
				name = gene_dragon_neck_length
				value = 0.8
			}

			set_variable = {
				name = gene_dragon_tail_length
				value = 0.8
			}

			#set_variable = {
			#	name = color_grading
			#	value = flag:lightest
			#}
			#set_variable = {
			#	name = color
			#	value = flag:white
			#}

			# Create and pass the variables to the story cycle
			agot_dragon_transfer_vars_to_story_cycle_effect = { DRAGON = scope:dragon }
		}
	}
	
	hidden_effect = {
									agot_tame_dragon = {
										TAMER = root
										DRAGON = scope:dragon
									}
								}
}


