#Fictitiously created the ancestor of Yel ü Dashi to connect the genealogy of the Liao Dynasty
liao_1 = { #unnamed ancestor of Yelü Dashi
	name= "Tiande" # ficitious
	dynasty=1045082
	religion="tengri_pagan"
	culture=khitan
	father=liao_8
	932.1.1 = {
		birth = yes
	}
	1001.1.1 = { 
		death = yes
	}
}
liao_2 = { #unnamed ancestor of Yelü Dashi
	name= "Qinde"  # ficitious
	dynasty=1045082
	religion="tengri_pagan"
	culture=khitan
	father=liao_1
	963.1.1 = {
		birth = yes
	}
	1021.1.1 = {
		death = yes
	}
}
liao_3 = { #unnamed ancestor of Yelü Dashi
	name= "Yingtian"  # ficitious
	dynasty=1045082
	religion=mahayana
	culture=khitan
	father=liao_2
	990.1.1 = {
		birth = yes
	}
	1041.1.1 = {
		death = yes
	}
}
liao_4 = { #unnamed ancestor of Yelü Dashi
	name= "Zuqian" # ficitious
	dynasty=1045082
	religion=mahayana
	culture=khitan
	father=liao_3
	1015.1.1 = {
		birth = yes
	}
	1075.1.1 = {
		death = yes
	}
}
liao_5 = { # grandfather of Yelü Dashi. 嗣元皇帝. 
	name= "Cong" # ficitious
	dynasty=1045082
	religion=mahayana
	culture=khitan
	father=liao_4
	1041.1.1 = {
		birth = yes
	}
	1091.1.1 = {
		death = yes
	}
}

liao_6 = { #unnamed ancestor of Yelü Dashi
	name= "Cheng" # ficitious
	dynasty=1045082
	religion=mahayana
	culture=khitan
	father=liao_5
	1061.1.1 = {
		birth = yes
	}
	1105.1.1 = {
		death = yes
	}
}

liao_7 = { 
	name= "Lihu"  #李胡
	dynasty=1045082
	religion=mahayana
	culture=khitan
	father=194325
	911.1.1 = {
		birth = yes
	}
	960.1.1 = {
		death = yes
	}
}

liao_8 = { 
	name= "Liao_Yaliguo" #雅里果
	dynasty=1045082
	religion=mahayana
	culture=khitan
	father=194325
	913.1.1 = {
		birth = yes
	}
	936.1.1 = {
		death = yes
	}
}

liao_9 = { 
	name= "Louguo" #娄国
	dynasty=1045082
	religion=mahayana
	culture=khitan
	father=194327
	920.1.1 = {
		birth = yes
	}
	952.1.1 = {
		death = yes
	}
}

liao_Dongdan_2 = { 
	name= "Shao" #稍
	dynasty=1045082
	religion=mahayana
	culture=khitan
	father=194327
	927.1.1 = {
		birth = yes
	}
	990.1.1 = {
		death = yes
	}
}

liao_Dongdan_3 = { 
	name= "Liuyin" #留隐
	dynasty=1045082
	religion=mahayana
	culture=khitan
	father=194327
	929.1.1 = {
		birth = yes
	}
	983.1.1 = {
		death = yes
	}
}

liao_Dongdan_4 = { 
	name= "Tuanyin" #团隐
	dynasty=1045082
	religion=mahayana
	culture=khitan
	father=194327
	929.1.1 = {
		birth = yes
	}
	952.1.1 = {
		death = yes
	}
}

liao_10 = { 
	name= "Liao_Xiyin" #喜隐
	dynasty=1045082
	religion=mahayana
	culture=khitan
	father=liao_7
	932.1.1 = {
		birth = yes
	}
	981.1.1 = {
		death = yes
	}
}

liao_11 = { 
	name= "Liao_Liulishou" #留里寿
	dynasty=1045082
	religion=mahayana
	culture=khitan
	father=liao_10
	952.1.1 = {
		birth = yes
	}
	981.1.1 = {
		death = yes
	}
}

liao_12 = { 
	name= "Wan" #宛
	dynasty=1045082
	religion=mahayana
	culture=khitan
	father=liao_7
	934.1.1 = {
		birth = yes
	}
	969.1.1 = {
		death = yes
	}
}

liao_13 = { 
	name= "Fo_baonu" #佛宝奴
	dynasty=1045082
	religion=mahayana
	culture=khitan
	father=194331
	989.1.1 = {
		birth = yes
	}
	990.1.1 = {
		death = yes
	}
}

liao_14 = { 
	name= "Zongwon" #宗元
	dynasty=1045082
	religion=mahayana
	culture=khitan
	father=194331
	1018.1.1 = {
		birth = yes
	}
	1038.1.1 = {
		death = yes
	}
}

liao_15 = { 
	name= "Shusi" #属思
	dynasty=1045082
	religion=mahayana
	culture=khitan
	father=194331
	1017.1.1 = {
		birth = yes
	}
	1024.1.1 = {
		death = yes
	}
}

liao_16 = { 
	name= "Chongyuan" #重元
	dynasty=1045082
	religion=mahayana
	culture=khitan
	father=194331
	1021.1.1 = {
		birth = yes
	}
	1063.1.1 = {
		death = yes
	}
}

liao_17 = { 
	name= "Nielugu" #涅鲁古
	dynasty=1045082
	religion=mahayana
	culture=khitan
	father=liao_16
	1041.1.1 = {
		birth = yes
	}
	1063.1.1 = {
		death = yes
	}
}

liao_18 = { 
	name= "Zong_xun" #宗训
	dynasty=1045082
	religion=mahayana
	culture=khitan
	father=194331
	995.1.1 = {
		birth = yes
	}
	1038.1.1 = {
		death = yes
	}
}

liao_19 = { 
	name= "Zongwei" #宗伟
	dynasty=1045082
	religion=mahayana
	culture=khitan
	father=194331
	996.1.1 = {
		birth = yes
	}
	1022.1.1 = {
		death = yes
	}
}

liao_20 = { 
	name= "Zongyuan" #宗愿
	dynasty=1045082
	religion=mahayana
	culture=khitan
	father=194331
	1008.1.1 = {
		birth = yes
	}
	1050.1.1 = {
	    effect = {
		set_relation_friend = { reason = friend_generic_history target = character:194333}
	}	
}
	1072.1.1 = {
		death = yes
	}
}

liao_21 = { 
	name= "Zongjian" #宗简
	dynasty=1045082
	religion=mahayana
	culture=khitan
	father=194331
	1005.1.1 = {
		birth = yes
	}
	1050.1.1 = {
		death = yes
	}
}

liao_22 = { 
	name= "Baoxinnu" #宝信奴
	dynasty=1045082
	religion=mahayana
	culture=khitan
	father=194332
	1035.1.1 = {
		birth = yes
	}
	1036.1.1 = {
		death = yes
	}
}

liao_23 = { 
	name= "Liao_Heluwo" #和鲁斡
	dynasty=1045082
	religion=mahayana
	culture=khitan
	father=194332
	1041.1.1 = {
		birth = yes
	}
	1110.1.1 = {
		death = yes
	}
}

liao_24 = { 
	name= "Alian" #阿琏
	dynasty=1045082
	religion=mahayana
	culture=khitan
	father=194332
	1045.1.1 = {
		birth = yes
	}
	1087.1.1 = {
		death = yes
	}
}

liao_25 = { 
	name= "Chun" #淳 北辽建立者
	dynasty=1045082
	religion=mahayana
	culture=khitan
	father=liao_23
	1063.1.1 = {
		birth = yes
	}
	1122.1.1 = {
		death = yes
	}
}

liao_26 = { 
	name= "A_sa" #阿撒
	dynasty=1045082
	religion=mahayana
	culture=khitan
	father=liao_25
	1088.1.1 = {
		birth = yes
	}
	1126.1.1 = {
		death = yes
	}
}

liao_27 = { 
	name= "Hongyong" #弘用
	dynasty=1045082
	religion=mahayana
	culture=khitan
	father=liao_20
	1054.1.1 = {
		birth = yes
	}
	1086.1.1 = {
		death = yes
	}
}



188905 = {
	name="YelU_-Dashi"
	 # Qarakhitai, possibly of the Liao dynasty or just a general
	religion=mahayana
	culture=khitan
    dynasty=1045082
	father=liao_6
	1087.1.1={
		birth=yes
	}
	1130.1.1={
		add_spouse=188906
	}
	1143.1.1={
		death=yes
	}
}

188906 = {
	name="Tabuyan"
	dynasty=214010
	female=yes
	religion=mahayana
	culture=khitan

	1110.1.1={
		birth=yes
	}
	1160.1.1={
		death=yes
	}
}

188907 = {
	name="Yilie" # or Renzong
	dynasty=1045082 # Qarakhitai
	religion=mahayana
	culture=khitan
	father=188905
	mother=188906

	1134.1.1={
		birth=yes
	}
	1163.1.1={
		death=yes
	}
}

188908 = {
	name="Pusuwan"
	female=yes
	dynasty=1045082 # Qarakhitai
	religion=mahayana
	culture=khitan
	father=188905
	mother=188906

	1140.1.1={
		birth=yes
	}
	1160.1.1={
		add_spouse = 188910
	}
	1177.1.1={
		death=yes
	}
}

188909 = {
	name="Wolila"
	dynasty=214010
	religion=mahayana
	culture=khitan
	stewardship = 6
	trait = education_martial_3
	trait = ambitious
	trait = callous
	1116.1.1 = {
		birth=yes
	}
	1206.1.1 = {
		death=yes
	}
}

188910 = {
	name="Duolubu"
	dynasty=214010
	religion=mahayana
	culture=khitan
	father=188909

	1139.1.1={
		birth=yes
	}
	1190.1.1={
		death=yes
	}
}

188911 = {
	name="Puguzhi"
	dynasty=214010
	religion=mahayana
	culture=khitan
	father=188909
	1142.1.1={
		birth=yes
	}
	1177.1.1={
		death = {
			death_reason = death_execution
			killer = 188909
		}
	}
}

188912 = {
	name="Zhilugu"
	dynasty=1045082
	stewardship = 8
	religion=mahayana
	culture=khitan
	trait = education_intrigue_3
	trait = callous
	trait = stubborn
	father=188907
	1153.1.1={
		birth=yes
	}
	1213.1.1={
		death=yes
	}
}

188913 = {
	name="Sokhatai" # name made up
	female=yes
	dynasty=214009
	religion=mahayana
	culture=khitan
	father=188912

	1190.1.1={
		birth=yes
	}
	1218.1.1={
		death=yes
	}
}
194325 = {
	name="Abaoji"  # Taizu
	dynasty=1045082 # Liao Dynasty
	religion="mahayana"
	culture=khitan
	872.6.6 = {
		birth = yes
	}
	926.9.6 = {
		death = yes
	}
}
194326 = {  # Taizong
	name="Deguang"
	dynasty=1045082 # Liao Dynasty
	religion="mahayana"
	culture=khitan
	father=194325
	902.11.25 = {
		birth = yes
	}
	947.5.15 = {
		death = yes
	}
}
194327 = {
	name="Bei" #King of Dongdan
	dynasty=1045082 # Liao Dynasty
	religion="mahayana"
	culture=khitan
	father=194325
	899.6.6 = {
		birth = yes
	}
	937.1.7 = {
		death = yes
	}
}
194328 = {
	name="Ruan"  # Shizong
	dynasty=1045082 # Liao Dynasty
	religion="mahayana"
	culture=khitan
	father=194327
	919.1.29 = {
		birth = yes
	}
	951.10.7 = {
		death = yes
	}
}
194329 = {
	name="Jing"  # Muzong
	dynasty=1045082 # Liao Dynasty
	religion="mahayana"
	culture=khitan
	father=194326
	trait=drunkard
	trait=lustful
	trait=lifestyle_reveler
	931.9.19 = {
		birth = yes
	}
	969.3.12 = {
		death = yes
	}
}
194330 = {
	name="Xian"  # Jingzong
	dynasty=1045082 # Liao Dynasty
	religion="mahayana"
	culture=khitan
	father=194328
	948.9.1 = {
		birth = yes
	}
	982.10.13 = {
		death = yes
	}
}
194331 = {
	name="Longxu"  # Shengzong
	dynasty=1045082 # Liao Dynasty
	religion="mahayana"
	culture=khitan
	father=194330
	972.1.16 = {
		birth = yes
	}
	1031.6.25 = {
		death = yes
	}
}
194332 = {
	name="Zongzhen"  # Xingzong
	dynasty=1045082 # Liao Dynasty
	religion="mahayana"
	culture=khitan
	father=194331
	1016.4.3 = {
		birth = yes
	}
	1055.8.28 = {
		death = yes
	}
}
194333 = {
	name="Hongji"  # Daozong
	dynasty=1045082 # Liao Dynasty
	religion="mahayana"
	culture=khitan
	father=194332
	1032.9.14 = {
		birth = yes
	}
	1101.2.12 = {
		death = yes
	}
}
194401 = {
	name="Jun"
	dynasty=1045082 # Liao Dynasty
	religion="mahayana"
	culture=khitan
	father=194333
	mother=194402
	1057.5.5 = {
		birth = yes
	}
	1077.6.6 = {
		death = yes
	}
}
194402 = {
	name="Xuan_Yi"
	female=yes
	#dynasty=1045082 # Liao Dynasty
	religion="mahayana"
	culture=khitan
	1040.5.5 = {
		birth = yes
	}
	1075.6.6 = {
		death = yes
	}
}
194334 = {
	name="Yanxi"  # Tianzuo
	dynasty=1045082 # Liao Dynasty
	religion="mahayana"
	culture=khitan
	father=194401
	1075.6.5 = {
		birth = yes
	}
	1128.6.6 = {
		death = yes
	}
}
217176 = {
	name = "Dashi" # fictional
	dynasty = 1051111 # Yuzhi
	religion = mahayana
	culture = khitan
	1014.5.9 = {
		birth = yes
	}
	1031.4.19 = {
		add_spouse = 217177
	}
	1065.9.12 = {
		death = yes
	}
}
217177 = {
	name = "Dianni" # fictional
	religion = mahayana
	culture = khitan
	female = yes
	1012.11.4 = {
		birth = yes
	}
	1059.6.12 = {
		death = yes
	}
}
217178 = {
	name = "Yilie" # fictional
	dynasty = 1051111 # Yuzhi
	religion = mahayana
	culture = khitan
	father = 217176
	mother = 217177
	1033.6.10 = {
		birth = yes
	}
	1092.5.12 = {
		death = yes
	}
}
217179 = {
	name = "ShulU_-Ping" # fictional
	dynasty = 1051111 # Yuzhi
	religion = mahayana
	culture = khitan
	father = 217176
	mother = 217177
	female = yes
	1038.3.3 = {
		birth = yes
	}
	1099.8.26 = {
		death = yes
	}
}
217180 = {
	name = "Zongzhen" # fictional
	dynasty = 1051111 # Yuzhi
	religion = mahayana
	culture = khitan
	father = 217176
	mother = 217177
	1042.12.22 = {
		birth = yes
	}
	1120.2.9 = {
		death = yes
	}
}
217181 = {
	name = "Wenshunu" # fictional
	dynasty = 1051112 # Wanyan
	religion = mahayana
	culture = khitan
	1006.5.24 = {
		birth = yes
	}
	1031.6.10 = {
		add_spouse = 217182
	}
	1052.10.7 = {
		death = yes
	}
}
217182 = {
	name = "Pusuwan" # fictional
	religion = mahayana
	culture = khitan
	female = yes
	1014.5.16 = {
		birth = yes
	}
	1079.3.19 = {
		death = yes
	}
}
217183 = {
	name = "Cuiba" # fictional
	dynasty = 1051112 # Wanyan
	religion = mahayana
	culture = khitan
	female = yes
	father = 217181
	mother = 217182
	1035.6.10 = {
		birth = yes
	}
	1103.7.11 = {
		death = yes
	}
}
217184 = {
	name = "Yingtian" # fictional
	dynasty = 1051112 # Wanyan
	religion = mahayana
	culture = khitan
	female = yes
	father = 217181
	mother = 217182
	1041.11.27 = {
		birth = yes
	}
	1109.10.14 = {
		death = yes
	}
}
217185 = {
	name = "Gou_er" # fictional
	dynasty = 1051112 # Wanyan
	religion = tengri_pagan
	culture = khitan
	father = 217181
	mother = 217182
	1039.2.12 = {
		birth = yes
	}
	1093.2.17 = {
		death = yes
	}
}
166795 = {
	name="Tiande"
	dynasty=1045087
	religion="mahayana"
	culture="khitan"
	730.1.1={
		birth=yes
	}
	789.1.1={
		death=yes
	}
}

217335 = {
	name = Dashi # fictional
	dynasty = 1051111 # Yuzhi
	religion = mahayana
	culture = khitan
	father = 217178
	
	1068.4.17 = {
		birth = yes
	}
	
	1110.6.5 = {
		death = yes
	}
}

217336 = {
	name = Yanxi # fictional
	dynasty = 1051111 # Yuzhi
	religion = mahayana
	culture = khitan
	father = 217335
	
	1094.10.5 = {
		birth = yes
	}
	
	1131.4.16 = {
		death = yes
	}
}

217337 = {
	name = "Duolubu" # fictional
	dynasty = 1051112 # Wanyan
	religion = tengri_pagan
	culture = khitan
	father = 217185
	1062.2.4 = {
		birth = yes
	}
	1093.2.17 = {
		religion = mahayana
	}
	1106.6.8 = {
		death = yes
	}
}

217338 = {
	name = "Tiande" # fictional
	dynasty = 1051112 # Wanyan
	religion = mahayana
	culture = khitan
	father = 217337
	
	1089.11.17 = {
		birth = yes
	}
	
	1130.5.10 = {
		death = yes
	}
}

248238 = {
	name="Cim_Timur"
	dynasty=1059033
	religion=mahayana
	culture=khitan

	trait=education_stewardship_2
	1190.1.1={
		birth=yes
	}
	1221.1.1 = {
		employer=125520
	}
	1236.1.1={
		death=yes
	}
}

93899 = {
	name="Ketuyu"
	dynasty=214009
	religion="mahayana"
	culture="khitan"
	father=188912
	1180.1.1 = { birth="1180.1.1" }
	1213.1.1 = { name="Baraq_Hajib" religion="ashari" dynasty=7337 }
	1235.1.1 = { death="1235.1.1" }
}

#Qutlugh-Khanids of Persia
93259 = {
	name="Qutb_ad-Din_Muhammad"
	dynasty=7337
	religion="ashari"
	culture="khitan"
	father=93258
	1200.1.1 = { birth="1200.1.1" }
	1257.1.1 = { death="1257.1.1" }
}
93260 = {
	name="Rukh_ad-Din_Hoja_al-Hakk"
	dynasty=7337
	religion="ashari"
	culture="khitan"
	father=93258
	1201.1.1 = { birth="1201.1.1" }
	1252.1.1 = { death="1252.1.1" }
}
93261 = {
	name="Muzzafar_ad-Din"
	dynasty=7337
	religion="ashari"
	culture="khitan"
	father=93259
	1250.1.1 = { birth="1250.1.1" }
	1291.7.1 = { death="1291.7.1" }
}
93262 = {
	name="Turkan_Hatun"
	female=yes
	dynasty=7337
	religion="ashari"
	culture="khitan"
	father=93261
	1240.1.1 = { birth="1240.1.1" }
	1283.1.1 = { death="1283.1.1" }
}
93263 = {
	name="Djalal_ad-Din_Abu_l-Muzzafar"
	dynasty=7337
	religion="ashari"
	culture="khitan"
	father=93259
	1255.1.1 = { birth="1255.1.1" }
	1294.8.21 = { death="1294.8.21" }
}
93264 = {
	name="Safvat_ad-Din_Padishah_Hatun"
	female=yes
	dynasty=7337
	religion="ashari"
	culture="khitan"
	father=93259
	1256.1.1 = { birth="1256.1.1" }
	1295.1.1 = { death="1295.1.1" }
}
93265 = {
	name="Yuluq_Shah"
	dynasty=7337
	religion="ashari"
	culture="khitan"
	father=93263
	1282.1.1 = { birth="1282.1.1" }
	1296.1.1 = { death="1296.1.1" }
}
93266 = {
	name="Muzzafar_ad-Din"
	dynasty=7337
	religion="ashari"
	culture="khitan"
	father=93263
	1283.1.1 = { birth="1283.1.1" }
	1304.1.1 = { death="1304.1.1" }
}
93267 = {
	name="Qutb_ad-Din"
	dynasty=7337
	religion="ashari"
	culture="khitan"
	father=93263
	1284.1.1 = { birth="1284.1.1" }
	1308.1.1 = { death="1308.1.1" }
}
258100 = {
	name="Zhulie"
	dynasty=1100022
	religion="nestorian"
	culture="khitan"
	1039.1.1={
		birth=yes
	}
	1087.1.1={
		death=yes
	}
}
258101 = {
	name="Qinde"
	dynasty=1100023
	religion="mahayana"
	culture="khitan"
	1033.1.1={
		birth=yes
	}
	1087.1.1={
		death=yes
	}
}
