﻿namespace = historical_artifacts
# Generation of historical artifacts #
#Historical artifacts generator at game start
historical_artifacts.0023 = {
	scope = none
	hidden = yes
	immediate = {
		# Seeded Court Artifacts
		if = {
			limit = {
				#has_dlc_feature = royal_court
			}
			# All starting courts will have a dynasty banner
			every_character_with_royal_court = {
				save_scope_as = banner_ruler
				# House Banner
				set_variable = banner_from_house
				set_variable = startup_banner
				create_artifact_wall_banner_effect = {
					OWNER = scope:banner_ruler
					CREATOR = scope:banner_ruler
					TARGET = scope:banner_ruler.house
				}
				# Dynasty Banner
				If = {
					limit = {
						OR = {
							this = dynasty.dynast							# Dynasty Head
							any_parent = {
								# Parent landless Dynasty Head
								employer = prev
								dynasty = prev.dynasty
								this = dynasty.dynast
							}
						}
					}
					set_variable = banner_from_dynasty
					set_variable = startup_banner
					create_artifact_wall_banner_effect = {
						OWNER = scope:banner_ruler
						CREATOR = scope:banner_ruler
						TARGET = scope:banner_ruler.dynasty
					}
				}
			}
			# Court Artifacts: Christianity
			while = {
				count = 6
				random_character_with_royal_court = {
					limit = {
						faith.religion = religion:christianity_religion
						NOT = {
							has_character_flag = seeded_relic
						}
					}
					create_artifact_pedestal_christian_relic_effect_hist = {
						OWNER = this
					}
					add_character_flag = {
						flag = seeded_relic
						days = 1
					}
				}
			}
			# Court Artifacts: Islam
			while = {
				count = 6
				random_character_with_royal_court = {
					limit = {
						faith.religion = religion:islam_religion
						NOT = {
							has_character_flag = seeded_relic
						}
					}
					create_artifact_pedestal_islamic_relic_effect_hist = {
						OWNER = this
					}
					add_character_flag = {
						flag = seeded_relic
						days = 1
					}
				}
			}
			# Court Artifacts: Buddhism
			while = {
				count = 6
				random_character_with_royal_court = {
					limit = {
						faith.religion = religion:buddhism_religion
						NOT = {
							has_character_flag = seeded_relic
						}
					}
					create_artifact_pedestal_buddhism_relic_effect_hist = {
						OWNER = this
					}
					add_character_flag = {
						flag = seeded_relic
						days = 1
					}
				}
			}
			# Court Artifacts: Hinduism
			while = {
				count = 2
				random_character_with_royal_court = {
					limit = {
						faith.religion = religion:hinduism_religion
						NOT = {
							has_character_flag = seeded_relic
						}
					}
					create_artifact_pedestal_branch_relic_hinduism_effect = {
						OWNER = this
					}
					add_character_flag = {
						flag = seeded_relic
						days = 1
					}
				}
			}
			# Court Artifacts: Norse Paganism
			faith:norse_pagan = {
				while = {
					count = 2
					random_faith_ruler = {
						limit = {
							highest_held_title_tier >= tier_county
							NOT = {
								has_character_flag = seeded_relic
							}
						}
						create_artifact_pedestal_branch_relic_germanic_effect = {
							OWNER = this
						}
						add_character_flag = {
							flag = seeded_relic
							days = 1
						}
					}
				}
			}
			# Court Artifacts: Roog Sene
			faith:west_african_roog_pagan = {
				random_faith_ruler = {
					limit = {
						highest_held_title_tier >= tier_county
					}
					create_artifact_pedestal_branch_relic_boog_effect = {
						OWNER = this
					}
				}
			}
			# Court Artifacts: Slavic
			faith:slavic_pagan = {
				random_faith_ruler = {
					limit = { highest_held_title_tier >= tier_county }
					create_artifact_pedestal_branch_relic_slavic_effect = { OWNER = this }
				}
			}
			faith:slavic_east = {
				random_faith_ruler = {
					limit = { highest_held_title_tier >= tier_county }
					create_artifact_pedestal_branch_relic_slavic_effect = { OWNER = this }
				}
			}
			faith:slavic_west = {
				random_faith_ruler = {
					limit = { highest_held_title_tier >= tier_county }
					create_artifact_pedestal_branch_relic_slavic_effect = { OWNER = this }
				}
			}
			faith:slavic_south = {
				random_faith_ruler = {
					limit = { highest_held_title_tier >= tier_county }
					create_artifact_pedestal_branch_relic_slavic_effect = { OWNER = this }
				}
			}
		}
		# Mod Artifacts
		## Holy Stuff
		### Necronomicon
		if = {
			limit = {
				current_date > 730.1.1				#Date of creation
				exists = title:c_baghdad.holder
			}
			title:c_baghdad.holder = {
				create_artifact_necronomicon_effect = {
					OWNER = this
				}
			}
		}
		### Holy Hand Granade of Antioch
		if = {
			limit = {
				current_date > 435.1.1				#Date of creation
				exists = title:k_england.holder
			}
			title:k_england.holder = {
				create_artifact_holy_hand_granade_effect = {
					OWNER = this
				}
			}
		}
		### Apron of Jesus
		if = {
			limit = {
				current_date >= 814.1.1				#Louis the Pious gives Benedict of Aniane the three relics from the reliquary treasure of the Palatine Chapel for the Kornelimünster monastery founded in 814.
				exists = title:c_aachen.holder
			}
			title:c_aachen.holder = {
				create_artifact_apron_of_jesus_effect = {
					OWNER = this
				}
			}
		}
		### Bachal Isu
		if = {
			limit = {
				current_date >= 552.1.1				#St. Columban is said to have recovered the bachal isu from Patrick's grave in 552 along with other relics
				exists = title:b_armagh.holder
			}
			title:b_armagh.holder = {
				create_artifact_bachal_isu_effect = {
					OWNER = this
				}
			}
		}
		### Bones of Andrew the Apostle
		if = {
			limit = {
				current_date > 357.1.1				#Emperor Constantius II had the bones brought from Patras to Constantinople in 357.
				exists = title:c_byzantion.holder
			}
			title:c_byzantion.holder = {
				create_artifact_bones_of_andrew_the_apostle_effect = {
					OWNER = this
				}
			}
		}
		### Bones of Bartholomew the Apostle, 867
		if = {
			limit = {
				current_date > 580.1.1				#According to Gregory of Tours, the bones were brought from Mesopotamia to Lipari in 580.
				exists = title:c_messina.holder
			}
			title:c_messina.holder = {
				create_artifact_bones_of_bartholomew_the_apostle_867_effect = {
					OWNER = this
				}
			}
		}
		### Bones of Bartholomew the Apostle, 1066
		if = {
			limit = {
				current_date > 983.1.1				#Otto II has the bones brought from Lipari to Rome.
				exists = title:k_papal_state.holder
			}
			title:k_papal_state.holder = {
				create_artifact_bones_of_bartholomew_the_apostle_1066_effect = {
					OWNER = this
				}
			}
		}
		### Bones of Mary Magdalene
		if = {
			limit = {
				current_date > 882.1.1				#The monk Badilon is said to have brought the relics from Saint-Maximin-la-Sainte-Baume to Vezelay in 882.
				exists = title:c_avalois.holder
			}
			title:c_avalois.holder = {
				create_artifact_bones_of_mary_magdalene_effect = {
					OWNER = this
				}
			}
		}
		### Bones of James, Son of Alphaeus
		if = {
			limit = {
				current_date > 886.1.1				#Pope Stephan V. is said to have carried the relics of Philip and James minor barefoot from the catacombs to the church of Santi Apostoli in 886.
				exists = title:k_papal_state.holder
			}
			title:k_papal_state.holder = {
				create_artifact_bones_of_james_son_of_alphaeus_effect = {
					OWNER = this
				}
			}
		}
		### Bones of James the Great
		if = {
			limit = {
				current_date > 818.1.1				#Alleged discovery of the grave of James the Great.
				exists = title:c_santiago.holder
			}
			title:c_santiago.holder = {
				create_artifact_bones_of_james_the_great_effect = {
					OWNER = this
				}
			}
		}
		### Bones of Jude Thaddeus the Apostle, No. 1
		if = {
			limit = {
				current_date > 638.1.1				#According to Catholic tradition, the bones of Judas Thaddeus were secretly brought to Rome after the Muslim conquest of Babylon. 
				exists = title:c_roma.holder
			}
			title:c_roma.holder = {
				create_artifact_bones_of_jude_thaddeus_the_apostle_effect_1 = {
					OWNER = this
				}
			}
		}
		### Bones of Jude Thaddeus the Apostle, No. 2
		if = {
			limit = {
				current_date > 66.1.1				#According to Armenian tradition, the bones of Judas Thaddeus were discovered by a hermit and brought to the monastery of Saint Thaddeus near Maku.
				exists = title:c_vaspurakan.holder
			}
			title:c_vaspurakan.holder = {
				create_artifact_bones_of_jude_thaddeus_the_apostle_effect_2 = {
					OWNER = this
				}
			}
		}
		### Bones of Lazarus of Bethany
		if = {
			limit = {
				current_date > 898.1.1				#Emperor Leo VI has the bones transferred from Larnaca, Cyprus, to Constantinople.
				exists = title:c_byzantion.holder
			}
			title:c_byzantion.holder = {
				create_artifact_bones_of_lazarus_of_bethany_effect = {
					OWNER = this
				}
			}
		}
		### Bones of Luke the Evangelist
		if = {
			limit = {
				current_date > 357.3.3				#Luke's bones are said to have been transferred from his tomb in Thebes to Constantinople in 357.
				exists = title:c_byzantion.holder
			}
			title:c_byzantion.holder = {
				create_artifact_bones_of_luke_the_evangelist_effect = {
					OWNER = this
				}
			}
		}
		### Bones of Mark the Evangelist
		if = {
			limit = {
				current_date > 828.1.31				#Arrival of the stolen bones in Venice.
				exists = title:c_venezia.holder
			}
			title:c_venezia.holder = {
				create_artifact_bones_of_mark_the_evangelist_effect = {
					OWNER = this
				}
			}
		}
		### Bones of Mark the Evangelist, KOH 1184
		if = {
			limit = {
				#game_start_date = 1184.1.1
				current_date > 1094.6.25				#Inventio Sancti Marci
				exists = title:c_venezia.holder
			}
			title:c_venezia.holder = {
				create_artifact_bones_of_mark_the_evangelist_inventio_sancti_marci_effect = {
					OWNER = this
				}
			}
		}
		### Bones of Matthew the Evangelist
		if = {
			limit = {
				current_date > 954.5.6				#The bones were transferred from Casal Velino to Salerno in 954.
				exists = title:c_salerno.holder
			}
			title:c_salerno.holder = {
				create_artifact_bones_of_matthew_the_evangelist_effect = {
					OWNER = this
				}
			}
		}
		### Bones of Philip the Apostle
		if = {
			limit = {
				current_date > 886.1.1				#Pope Stephan V. is said to have carried the relics of Philip and James minor barefoot from the catacombs to the church of Santi Apostoli in 886.
				exists = title:k_papal_state.holder
			}
			title:k_papal_state.holder = {
				create_artifact_bones_of_philip_the_apostle_effect = {
					OWNER = this
				}
			}
		}
		### Bones of Simon the Zealot, No. 1
		if = {
			limit = {
				current_date > 638.1.1				#According to Catholic tradition, the bones of Simon the Zealot were secretly brought to Rome after the Muslim conquest of Babylon. 
				exists = title:k_papal_state.holder
			}
			title:k_papal_state.holder = {
				create_artifact_bones_of_simon_the_zealot_effect_1 = {
					OWNER = this
				}
			}
		}
		### Bones of Simon the Zealot, No. 2
		if = {
			limit = {
				current_date > 65.1.1				#Simon the Zealot is said to have preached in Abkhazia and Egrisi and to have died and been buried in Nicopsia, according to Georgian chronicles from the 11th century.
				exists = title:c_abkhazia.holder
			}
			title:c_abkhazia.holder = {
				create_artifact_bones_of_simon_the_zealot_effect_2 = {
					OWNER = this
				}
			}
		}
		### Bones of Matthias the Apostle
		if = {
			limit = {
				current_date > 325.1.1				#The bones are said to have been discovered by Helena or on her behalf in Palestine and brought to Trier, but they were only "rediscovered" in 1127 during demolition work.
				exists = title:c_trier.holder
			}
			title:c_trier.holder = {
				create_artifact_bones_of_matthias_the_apostle_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Adalbert of Prague
		if = {
			limit = {
				current_date > 1039.1.1				#In 1039, after the Polish-Bohemian War, the relics were abducted from Gniezno by the Bohemian Duke Břetislav I and buried at St Vitus Cathedral in Prague.
				exists = title:c_praha.holder
			}
			title:c_praha.holder = {
				create_artifact_bones_of_st_adalbert_of_prague_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Agatha
		if = {
			limit = {
				# NOT = {	game_start_date = 1184.1.1 }
				current_date > 1040.1.1				#The Byzantine general George Maniakes stole the relics from Catania in 1040 during the partial reconquest of Sicily and brought them to Constantinople.
				exists = title:c_byzantion.holder
			}
			title:c_byzantion.holder = {
				create_artifact_bones_of_st_agatha_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Agatha, KOH 1184
		if = {
			limit = {
				#game_start_date = 1184.1.1
				current_date > 1126.1.1				#In 1126, two soldiers of the Byzantine army stole the relics and returned them to Catania.
				exists = title:b_catania.holder
			}
			title:b_catania.holder = {
				create_artifact_bones_of_st_agatha_KOH_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Agnes
		if = {
			limit = {
				current_date > 304.1.1				#After her death, Saint Agnes was buried in the catacombs, where the church of Sant'Agnese fuori le mura was built.
				exists = title:c_roma.holder
			}
			title:c_roma.holder = {
				create_artifact_bones_of_st_agnes_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Anne
		if = {
			limit = {
				current_date > 710.1.1				#The relics of St. Anne are said to have been brought from the Holy Land to Constantinople in 710.
				exists = title:c_byzantion.holder
			}
			title:c_byzantion.holder = {
				create_artifact_bones_of_st_anne_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Anthony the Great
		if = {
			limit = {
				current_date > 635.1.1				#After the Arab conquest of Egypt, the relics were brought from Alexandria to Constantinople in 635.
				exists = title:c_byzantion.holder
			}
			title:c_byzantion.holder = {
				create_artifact_bones_of_st_anthony_the_great_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Anthony the Great, KOH 1184
		if = {
			limit = {
				#game_start_date = 1184.1.1
				current_date > 1070.1.1				#The local nobleman Jocelin received the relics in 1070 from the Byzantine emperor as thanks for his help in arms and brought them to Saint-Antoine-l'Abbaye.
				exists = title:c_viennois.holder
			}
			title:c_viennois.holder = {
				create_artifact_bones_of_st_anthony_the_great_KOH_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Augustine of Canterbury
		if = {
			limit = {
				current_date > 604.6.1				#Augustine of Canterbury died in 604 and was buried in Canterbury Abbey Church.
				exists = title:c_kent.holder
			}
			title:c_kent.holder = {
				create_artifact_bones_of_st_augustine_of_canterbury_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Barbara
		if = {
			limit = {
				current_date > 600.1.1				#In the 6th century, her relics were transferred from Nikomedia to Constantinople.
				exists = title:c_byzantion.holder
			}
			title:c_byzantion.holder = {
				create_artifact_bones_of_st_barbara_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Barnabas
		if = {
			limit = {
				current_date > 478.1.1				#Barnabas is said to have appeared to Archbishop Anthemios of Cyprus in a dream in 478 and revealed his tomb to him.
				exists = title:c_famagusta.holder
			}
			title:c_famagusta.holder = {
				create_artifact_bones_of_st_barnabas_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Benedict of Nursia
		if = {
			limit = {
				current_date > 673.1.1				#St Aigulf is said to have brought the relics of St Benedict to Fleury from Monte Cassino, which had been devastated by the Lombards.
				exists = title:c_orleans.holder
			}
			title:c_orleans.holder = {
				create_artifact_bones_of_st_benedict_of_nursia_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Boniface
		if = {
			limit = {
				current_date > 755.1.1				#After his martyrdom in Dokkum, Boniface's bones were brought to Fulda via Utrecht and Mainz.
				exists = title:c_fulda.holder
			}
			title:c_fulda.holder = {
				create_artifact_bones_of_st_boniface_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Brigid of Kildare, 867
		if = {
			limit = {
				current_date > 523.1.1				#St Brigid of Kildare died in 523 and was buried in Kildare Abbey.
				exists = title:b_kildare.holder
			}
			title:b_kildare.holder = {
				create_artifact_bones_of_st_brigid_of_kildare_867_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Brigid of Kildare, 1066
		if = {
			limit = {
				current_date > 878.1.1				#Due to Viking raids, the relics of St Brigid of Kildare were transferred from Kildare to Downpatrick in 878.
				exists = title:c_ulster.holder
			}
			title:c_ulster.holder = {
				create_artifact_bones_of_st_brigid_of_kildare_1066_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Catherine of Alexandria
		if = {
			limit = {
				current_date > 800.1.1				#The bones of St Catherine of Alexandria were "miraculously" found on Mount Sinai around the year 800.
				exists = title:b_stcatherine.holder
			}
			title:b_stcatherine.holder = {
				create_artifact_bones_of_st_catherine_of_alexandria_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Columba
		if = {
			limit = {
				current_date > 849.1.1				#Due to the Viking attacks, the relics of St Columban were brought from Iona to Ireland in 849.
				exists = title:c_ulster.holder
			}
			title:c_ulster.holder = {
				create_artifact_bones_of_st_columba_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Cuthbert, 867
		if = {
			limit = {
				current_date > 687.3.20				#After his death in the Faren Islands on 20 March 687, St Cuthbert was buried in Lindisfarne Abbey Church.
				exists = title:b_lindisfarne.holder
			}
			title:b_lindisfarne.holder = {
				create_artifact_bones_of_st_cuthbert_867_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Cuthbert, 1066
		if = {
			limit = {
				current_date > 995.1.1				#Bishop Aldhun transferred Cuthbert's remains from Chester to Durham in 995.
				exists = title:c_durham.holder
			}
			title:c_durham.holder = {
				create_artifact_bones_of_st_cuthbert_1066_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Demetrius
		if = {
			limit = {
				current_date > 418.1.1				#The relics are said to have been discovered around 418 and brought to the Hagios Demetrios.
				exists = title:c_thessalonika.holder
			}
			title:c_thessalonika.holder = {
				create_artifact_bones_of_st_demetrius_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Denis
		if = {
			limit = {
				current_date > 250.1.1				#St Denis is said to have walked the path to his tomb in what is now Saint Denis after his beheading in Montmartre.
				exists = title:b_saint_denis.holder
			}
			title:b_saint_denis.holder = {
				create_artifact_bones_of_st_denis_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Epiphanius of Pavia
		if = {
			limit = {
				current_date > 963.1.1				#In 963 the relics came from Pavia to Hildesheim, according to tradition through robbery.
				exists = title:c_hildesheim.holder
			}
			title:c_hildesheim.holder = {
				create_artifact_bones_of_st_epiphanius_of_pavia_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Erasmus of Formia
		if = {
			limit = {
				current_date > 842.1.1				#After the destruction of Formia by the Saracens in 842, the relics were transferred to Gaeta.
				exists = title:c_capua.holder
			}
			title:c_capua.holder = {
				create_artifact_bones_of_st_erasmus_of_formia_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Faith
		if = {
			limit = {
				current_date > 880.1.1				#The relics arrived at the Benedictine monastery in Conques around the year 880 through theft.
				exists = title:b_rodez.holder
			}
			title:b_rodez.holder = {
				create_artifact_bones_of_st_faith_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Giles
		if = {
			limit = {
				current_date > 720.1.1				#After his death, Saint Giles was buried in the abbey of Saint-Gilles, which was built under his direction and over which he had previously presided as abbot.
				exists = title:c_montpellier.holder
			}
			title:c_montpellier.holder = {
				create_artifact_bones_of_st_giles_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Gotthard of Hildesheim
		#On 5 May 1061, Gotthard was episcopally canonised, so his relics are represented, even though he was not papally canonised until 1131 by Pope Innocent II.
		if = {
			limit = {
				current_date > 1038.5.5				#St. Gotthard died on 5. May 1038 in the Mauritius Monastery near Hildesheim and was buried in Hildesheim Cathedral.
				exists = title:c_hildesheim.holder
			}
			title:c_hildesheim.holder = {
				create_artifact_bones_of_st_gotthard_of_hildesheim_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Gudula
		if = {
			limit = {
				current_date > 977.1.1				#The Duke of Lower Lorraine, Charles of France, had her bones brought to Brussels between 977 and 988.
				exists = title:c_brabant.holder
			}
			title:c_brabant.holder = {
				create_artifact_bones_of_st_gudula_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Hubertus
		if = {
			limit = {
				current_date > 825.11.3				#St. Hubertus was buried in Liège, but his bones were transferred to Amdain, now Saint-Hubert, in the Ardennes in 825.
				exists = title:b_saint_hubert.holder
			}
			title:b_saint_hubert.holder = {
				create_artifact_bones_of_st_hubertus_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Januarius
		if = {
			limit = {
				current_date > 831.1.1				#Sico besieged Naples in 831 and was able to take the relics and bring them to Benevento.
				exists = title:c_benevento.holder
			}
			title:c_benevento.holder = {
				create_artifact_bones_of_st_januarius_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Kilian
		if = {
			limit = {
				current_date > 752.1.1				#(Staged) Finding of the relics by Bishop Burkard on the initiative of St. Boniface.
				exists = title:c_wurzburg.holder
			}
			title:c_wurzburg.holder = {
				create_artifact_bones_of_st_kilian_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Lambert
		if = {
			limit = {
				current_date > 720.1.1				#His successor St. Hubert transferred the bones of St. Lambert from Maastricht to Liège.
				exists = title:c_liege.holder
			}
			title:c_liege.holder = {
				create_artifact_bones_of_st_lambert_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Lawrence
		if = {
			limit = {
				current_date > 258.1.1				#St. Laurence is said to have died in 258 and to be buried on the site of the present church San Lorenzo fuori le mura.
				exists = title:k_papal_state.holder
			}
			title:k_papal_state.holder = {
				create_artifact_bones_of_st_lawrence_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Liborius
		if = {
			limit = {
				current_date > 836.5.28				#Transfer from Le Mans to Paderborn
				exists = title:c_paderborn.holder
			}
			title:c_paderborn.holder = {
				create_artifact_bones_of_st_liborius_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Longinus
		if = {
			limit = {
				current_date > 553.1.1				#The relic of the Holy Blood came to Mantua in 553 as a gift from Constantinople.
				exists = title:c_mantua.holder
			}
			title:c_mantua.holder = {
				create_artifact_bones_of_st_longinus_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Lucia
		if = {
			limit = {
				current_date > 768.1.1				#Pope Stephen II sent the relics of St. Lucy to Constantinople for safety against the Saracen incursions.
				exists = title:c_byzantion.holder
			}
			title:c_byzantion.holder = {
				create_artifact_bones_of_st_lucia_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Ludmila of Bohemia
		if = {
			limit = {
				current_date > 925.1.1				#Her grandson, St. Wenceslas, had her bones transferred from Tetín to Prague in 925.
				exists = title:c_praha.holder
			}
			title:c_praha.holder = {
				create_artifact_bones_of_st_ludmila_of_bohemia_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Martial
		if = {
			limit = {
				current_date > 400.1.1				#Martial was buried after his death in Limoges, outside the Roman city
				exists = title:c_limousin.holder
			}
			title:c_limousin.holder = {
				create_artifact_bones_of_st_martial_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Martin
		if = {
			limit = {
				current_date > 461.1.1				#Transfer of the bones from Candes to Tours
				exists = title:c_tourraine.holder
			}
			title:c_tourraine.holder = {
				create_artifact_bones_of_st_martin_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Maurice
		if = {
			limit = {
				current_date > 961.1.1				#Otto receives the bones from Conrad of Burgundy at Christmas 960 and sends them to the Moritz Monastery in Magdeburg
				exists = title:c_magdeburg.holder
			}
			title:c_magdeburg.holder = {
				create_artifact_bones_of_st_maurice_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Maximin of Trier
		if = {
			limit = {
				current_date > 353.5.29				#His successor Paulinus transferred his bones to Trier on 29 May 353.
				exists = title:c_trier.holder
			}
			title:c_trier.holder = {
				create_artifact_bones_of_st_maximin_of_trier_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Nicholas
		if = {
			limit = {
				# NOT = {	game_start_date = 1184.1.1 }
				current_date > 650.1.1				#The bones were probably brought to Myra from the island of Gemile in the 650s.
				exists = title:c_lycia.holder
			}
			title:c_lycia.holder = {
				create_artifact_bones_of_st_nicholas_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Nicholas, KOH 1184
		if = {
			limit = {
				#game_start_date = 1184.1.1
				current_date > 1087.5.9				#After the evacuation of Myra from the Seljuks, Italian merchants stole the relics from the Church of St. Nicholas and brought them to Bari, where they arrived on 9 May 1087.
				exists = title:c_bari.holder
			}
			title:c_bari.holder = {
				create_artifact_bones_of_st_nicholas_KOH_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Olav
		if = {
			limit = {
				current_date > 1031.8.3				#After Olav's death, his bones are said to have been brought to Nidaros (Trondheim), where he is said to have been canonised on 3 August 1031.
				exists = title:b_nidaros.holder
			}
			title:b_nidaros.holder = {
				create_artifact_bones_of_st_olav_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Patrick
		if = {
			limit = {
				current_date > 461.1.1				#Saint Patrick is said to have been buried in Downpatrick in 461 after a dispute over his bones.
				exists = title:c_ulster.holder
			}
			title:c_ulster.holder = {
				create_artifact_bones_of_st_patrick_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Peter
		if = {
			limit = {
				current_date > 315.1.1				#Start of construction of St Peter's Basilica by Constantine the Great.
				exists = title:k_papal_state.holder
			}
			title:k_papal_state.holder = {
				create_artifact_bones_of_st_peter_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Quirinus of Neuss
		if = {
			limit = {
				current_date > 1050.1.1				#The bones are said to have been brought from Rome to Neuss in 1050 by the Neuss abbess Gepa.
				exists = title:b_neuss.holder
			}
			title:b_neuss.holder = {
				create_artifact_bones_of_st_quirinus_of_neuss_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Remigius
		if = {
			limit = {
				current_date > 533.1.13				#After his death, St. Remigius is said to have been buried in the later basilica of St. Remi.
				exists = title:c_reims.holder
			}
			title:c_reims.holder = {
				create_artifact_bones_of_st_remigius_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Saturnin
		if = {
			limit = {
				current_date > 402.1.1				#The relics were transferred to the Basilica St-Sernin de Toulouse around 400.
				exists = title:c_toulouse.holder
			}
			title:c_toulouse.holder = {
				create_artifact_bones_of_st_saturnin_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Sebastian
		if = {
			limit = {
				current_date > 350.1.1				#The remains of St. Sebastian were moved around 350 to the site of the present church of San Sebastiano fuori le mura.
				exists = title:c_roma.holder
			}
			title:c_roma.holder = {
				create_artifact_bones_of_st_sebastian_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Servatius
		if = {
			limit = {
				current_date > 348.5.13				#St Servatius dies in Maastricht, having moved the episcopal see there.
				exists = title:c_maastricht.holder
			}
			title:c_maastricht.holder = {
				create_artifact_bones_of_st_servatius_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Stephen
		if = {
			limit = {
				current_date > 585.1.1				#Pope Pelagius II is said to have transferred the relics of St. Stephen to Rome around 585 and buried them next to those of St. Lawrence in the church of San Lorenzo fuori le mura.
				exists = title:k_papal_state.holder
			}
			title:k_papal_state.holder = {
				create_artifact_bones_of_st_stephen_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Thomas Becket
		if = {
			limit = {
				#game_start_date = 1184.1.1
				current_date > 1170.12.29				#After his death, his remains were buried in the crypt of Canterbury Cathedral.
				exists = title:c_kent.holder
			}
			title:c_kent.holder = {
				create_artifact_bones_of_st_thomas_becket_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Timothy
		if = {
			limit = {
				current_date > 356.1.1				#The relics are said to have been transferred from Ephesus to Constantinople in 356.
				exists = title:c_byzantion.holder
			}
			title:c_byzantion.holder = {
				create_artifact_bones_of_st_timothy_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Titus, 867
		if = {
			limit = {
				current_date > 105.1.1				#Saint Titus died in 105 on Crete and was buried in the Episcopal Church of Gortys.
				exists = title:c_chandax.holder
			}
			title:c_chandax.holder = {
				create_artifact_bones_of_st_titus_867_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Titus, 1066
		if = {
			limit = {
				current_date > 961.1.1				#In 961, the relics were transferred from the Agios Titos church in Gortys to the new island capital of Handakas (Iraklio).
				exists = title:c_chandax.holder
			}
			title:c_chandax.holder = {
				create_artifact_bones_of_st_titus_1066_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Ulrich
		if = {
			limit = {
				current_date > 973.7.4				#Day of the death of St. Ulrich, he is buried in the rebuilt church of St. Afra in Augsburg.
				exists = title:c_augsburg.holder
			}
			title:c_augsburg.holder = {
				create_artifact_bones_of_st_ulrich_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Ursula
		if = {
			limit = {
				current_date > 947.1.1				#In 947, the bones of St. Pinnosa were transferred to Essen and from then on Ursula was named as the leader of the virgins instead of Pinnosa.
				exists = title:c_cologne.holder
			}
			title:c_cologne.holder = {
				create_artifact_bones_of_st_ursula_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Vitus
		if = {
			limit = {
				current_date > 836.1.1				#In 836, the bones were donated to the Saxon Benedictine Abbey of Corvey.
				exists = title:c_paderborn.holder
			}
			title:c_paderborn.holder = {
				create_artifact_bones_of_st_vitus_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Walpurga
		if = {
			limit = {
				current_date > 870.5.1				#In 870, Bishop Otgar of Eichstätt arranged for the remains of St. Walpurga to be transferred from Heidenheim to Eichstätt.
				exists = title:c_eichstadt.holder
			}
			title:c_eichstadt.holder = {
				create_artifact_bones_of_st_walpurga_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Wenceslaus of Bohemia
		if = {
			limit = {
				current_date > 938.1.1				#Three years after Wenceslaus' death, Boleslav is said to have transferred his bones to Prague Castle.
				exists = title:c_praha.holder
			}
			title:c_praha.holder = {
				create_artifact_bones_of_st_wenceslaus_of_bohemia_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Willibrord
		if = {
			limit = {
				current_date > 739.11.7				#After his death, St Wilibrord was buried in the choir room of his monastery church in Echternach.
				exists = title:c_luxembourg.holder
			}
			title:c_luxembourg.holder = {
				create_artifact_bones_of_st_willibrord_effect = {
					OWNER = this
				}
			}
		}
		### Bones of St. Wolfgang of Regensburg
		if = {
			limit = {
				current_date > 994.1.1				#St Wolfgang died on 31 October 994 in the chapel of St Othmar in Pupping, his bones were transferred to Regensburg.
				exists = title:c_regensburg.holder
			}
			title:c_regensburg.holder = {
				create_artifact_bones_of_st_wolfgang_of_regensburg_effect = {
					OWNER = this
				}
			}
		}
		### Bones of the Three Kings
		if = {
			limit = {
				# NOT = {	game_start_date = 1184.1.1 }
				current_date > 301.1.1				#Transfer from Constantinople to Milan.
				exists = title:c_lombardia.holder
			}
			title:c_lombardia.holder = {
				create_artifact_bones_of_the_three_kings_effect = {
					OWNER = this
				}
			}
		}
		### Bones of the Three Kings, KOH 1184
		if = {
			limit = {
				#game_start_date = 1184.1.1
				current_date > 1164.7.23				#The relics reached Cologne on 23 July 1164, after Emperor Barbarossa had given them to Rainald von Dassel, Bishop of Cologne and Archchancellor for Italy.
				exists = title:c_cologne.holder
			}
			title:c_cologne.holder = {
				create_artifact_bones_of_the_three_kings_KOH_effect = {
					OWNER = this
				}
			}
		}
		### Bones of Thomas the Apostle
		if = {
			limit = {
				current_date > 232.1.1				#The Indian king Misdeus sends the bones of the apostle Thomas from mylapore to edessa
				exists = title:c_edessa.holder
			}
			title:c_edessa.holder = {
				create_artifact_bones_of_thomas_the_apostle_effect = {
					OWNER = this
				}
			}
		}
		### Bridle of Constantine
		if = {
			limit = {
				current_date > 325.6.1				#Helena discovers the nail, has the bridle forged from it and hands it over to Konstantin.
				exists = title:e_byzantium.holder
			}
			title:e_byzantium.holder = {
				create_artifact_bridle_of_constantine_effect = {
					OWNER = this
				}
			}
		}
		### Cappa (Cloak) of the St. Martin
		if = {
			limit = {
				current_date > 679.1.1				##First mention of the cappa as part of the royal treasury when it was kept in the palatium of Luzarches
				exists = title:b_tours.holder
			}
			title:b_tours.holder = {
				create_artifact_cappa_of_st_martin_effect = {
					OWNER = this
				}
			}
		}
		### Chair of St. Peter
		if = {
			limit = {
				current_date > 875.1.1				#Gift from Charles 'the Bald' to Pope John VIII.
				exists = title:k_papal_state.holder
			}
			title:k_papal_state.holder = {
				create_artifact_chair_of_st_peter_effect = {
					OWNER = this
				}
			}
		}
		### Chains  of St. Peter
		if = {
			limit = {
				current_date > 440.1.1				#after 440, Licinia Eudoxia presents Leo I with the chains from Jerusalem and the chains merge with those from Rome
				exists = title:k_papal_state.holder
			}
			title:k_papal_state.holder = {
				create_artifact_chains_of_st_peter_effect = {
					OWNER = this
				}
			}
		}
		### Chalice of St. Servatius
		if = {
			limit = {
				current_date > 348.5.13				#St Servatius dies in Maastricht, having moved the episcopal see there.
				exists = title:c_maastricht.holder
			}
			title:c_maastricht.holder = {
				create_artifact_chalice_of_st_servatius_effect = {
					OWNER = this
				}
			}
		}
		### Communion Cloth
		if = {
			limit = {
				current_date > 973.1.1				#The origin of the Communion Cloth remains unknown, but since there is a second one in the Imperial Regalia, we assume for the Mod that it was a gift from Otto I. for the abbey foundation.
				exists = title:b_gladbach.holder
			}
			title:b_gladbach.holder = {
				create_artifact_communion_cloth_effect = {
					OWNER = this
				}
			}
		}
		### Crosier of St. Servatius
		if = {
			limit = {
				current_date > 348.5.13				#St Servatius dies in Maastricht, having moved the episcopal see there.
				exists = title:c_maastricht.holder
			}
			title:c_maastricht.holder = {
				create_artifact_crosier_of_st_servatius_effect = {
					OWNER = this
				}
			}
		}
		### Cross of Andrew the Apostle
		if = {
			limit = {
				current_date >= 867.1.1				#Emperor Basil has the cross brought back to Patras.
				exists = title:c_achaia.holder
			}
			title:c_achaia.holder = {
				create_artifact_cross_of_andrew_the_apostle_effect = {
					OWNER = this
				}
			}
		}
		### Crown of Thorns, 867
		if = {
			limit = {
				current_date > 570.1.1				#The crown of thorns is first mentioned as a relic in 570 by Cassiodorus.
				exists = title:c_jerusalem.holder
			}
			title:c_jerusalem.holder = {
				create_artifact_crown_of_thorns_867_effect = {
					OWNER = this
				}
			}
		}
		### Crown of Thorns, 1066
		if = {
			limit = {
				current_date > 1063.1.1				#Transfer from Jerusalem to Constantinople
				exists = title:c_byzantion.holder
			}
			title:c_byzantion.holder = {
				create_artifact_crown_of_thorns_1066_effect = {
					OWNER = this
				}
			}
		}
		### Decaptation Cloth of John the Baptist
		if = {
			limit = {
				current_date >= 799.1.1				#A treasure of relics sent for the consecration of the Palatine Chapel in 799
				exists = title:c_aachen.holder
			}
			title:c_aachen.holder = {
				create_artifact_decaptation_cloth_of_john_the_baptist_effect = {
					OWNER = this
				}
			}
		}
		### Dress of Mary, No. 1, Chartres
		if = {
			limit = {
				current_date >= 876.1.1				#Charles the Bald bequeathed the relic to Chartres Cathedral in 876. 
				exists = title:c_chartres.holder
			}
			title:c_chartres.holder = {
				create_artifact_dress_of_mary_effect_1 = {
					OWNER = this
				}
			}
		}
		### Dress of Mary, No. 2, Aachen
		if = {
			limit = {
				current_date >= 799.1.1				#A treasure of relics sent for the consecration of the Palatine Chapel in 799
				exists = title:c_aachen.holder
			}
			title:c_aachen.holder = {
				create_artifact_dress_of_mary_effect_2 = {
					OWNER = this
				}
			}
		}
		### Fragment of the True Cross, Part No. 1, Jerusalem
		if = {
			limit = {
				current_date >= 325.1.1				#Helena finds the cross, one part is taken to Rome, one to Constantinople and one remains in Jerusalem
				exists = title:c_jerusalem.holder
			}
			title:c_jerusalem.holder = {
				create_artifact_fragment_of_the_true_cross_effect_1 = {
					OWNER = this
				}
			}
		}
		### Fragment of the True Cross, Part No. 2, Rome
		if = {
			limit = {
				current_date >= 325.1.1				#Helena finds the cross, one part is taken to Rome, one to Constantinople and one remains in Jerusalem
				exists = title:k_papal_state.holder
			}
			title:k_papal_state.holder = {
				create_artifact_fragment_of_the_true_cross_effect_2 = {
					OWNER = this
				}
			}
		}
		### Fragment of the True Cross, Part No. 3, Constantinople
		if = {
			limit = {
				current_date >= 325.1.1				#Helena finds the cross, one part is taken to Rome, one to Constantinople and one remains in Jerusalem
				exists = title:c_byzantion.holder
			}
			title:c_byzantion.holder = {
				create_artifact_fragment_of_the_true_cross_effect_3 = {
					OWNER = this
				}
			}
		}
		### Gifts of the Three Kings
		if = {
			limit = {
				current_date > 400.1.1				#Emperor Arcadius is said to have brought the gifts of the three kings to Constantinople at the end of the fourth century
				exists = title:c_byzantion.holder
			}
			title:c_byzantion.holder = {
				create_artifact_gifts_of_the_three_kings_effect = {
					OWNER = this
				}
			}
		}
		### Girdle of Christ
		if = {
			limit = {
				current_date >= 799.1.1				#A treasure of relics sent for the consecration of the Palatine Chapel in 799
				exists = title:c_aachen.holder
			}
			title:c_aachen.holder = {
				create_artifact_girdle_of_christ_effect = {
					OWNER = this
				}
			}
		}
		### Girdle of Mary No.1, Constantinople
		if = {
			limit = {
				current_date >= 400.1.1				#During the reign of Emperor Arcadius, the relic was transferred from Jerusalem to Constantinople.
				exists = title:c_byzantion.holder
			}
			title:c_byzantion.holder = {
				create_artifact_girdle_of_mary_effect_1 = {
					OWNER = this
				}
			}
		}
		### Girdle of Mary No.2, Aachen
		if = {
			limit = {
				current_date >= 799.1.1				#A treasure of relics sent for the consecration of the Palatine Chapel in 799-
				exists = title:c_aachen.holder
			}
			title:c_aachen.holder = {
				create_artifact_girdle_of_mary_effect_2 = {
					OWNER = this
				}
			}
		}
		### Grapevine Cross of St. Nino
		if = {
			limit = {
				# NOT = {	game_start_date = 1184.1.1 }
				current_date > 541.1.1				#In 541, due to the Persian invasions, the cross was brought to Armenia.
				exists = title:b_ani.holder
			}
			title:b_ani.holder = {
				create_artifact_grapevine_cross_of_st_nino_effect = {
					OWNER = this
				}
			}
		}
		### Grapevine Cross of St. Nino, KOH 1184
		if = {
			limit = {
				#game_start_date = 1184.1.1
				current_date > 1124.1.1				#The Georgian King David IV conquered the city of Ani in 1124 and brought the cross back to Mtskheta to the Svetitskhoveli Cathedral.
				exists = title:c_kakheti.holder
			}
			title:c_kakheti.holder = {
				create_artifact_grapevine_cross_of_st_nino_KOH_effect = {
					OWNER = this
				}
			}
		}
		### Gridiron of St. Lawrence
		if = {
			limit = {
				current_date >= 900.1.1				#First mention of the Gridiron under the altar of St Laurence's Chapel.
				exists = title:c_roma.holder
			}
			title:c_roma.holder = {
				create_artifact_gridiron_of_st_lawrence_effect = {
					OWNER = this
				}
			}
		}
		### Holy Blood No. 1, Mantua
		if = {
			limit = {
				current_date > 553.1.1				#The relic of the Holy Blood came to Mantua in 553 as a gift from Constantinople.
				exists = title:c_mantua.holder
			}
			title:c_mantua.holder = {
				create_artifact_holy_blood_effect_1 = {
					OWNER = this
				}
			}
		}
		### Holy Blood No. 2, Roma
		if = {
			limit = {
				current_date > 1053.1.1				#After a church synod in Mantua in 1053, Pope Leo IX. wanted to take the relic of the Holy Blood with him, but due to the protest of the Mantuans it was divided and he only received part of the relic.
				exists = title:c_roma.holder
			}
			title:c_roma.holder = {
				create_artifact_holy_blood_effect_2 = {
					OWNER = this
				}
			}
		}
		### Holy Blood No. 3, Brugge
		if = {
			limit = {
				# NOT = {	game_start_date = 1184.1.1 }
				current_date > 1056.5.10				#Emperor Heinrich III bequeathed his piece of the Holy Blood Relic of Mantua to Balduin V in 1056.
				exists = title:c_brugge.holder
			}
			title:c_brugge.holder = {
				create_artifact_holy_blood_effect_3 = {
					OWNER = this
				}
			}
		}
		### Holy Blood No. 3, Weingarten, KOH 1184
		if = {
			limit = {
				#game_start_date = 1184.1.1
				current_date > 1094.3.12				#Balduin gave the relic to his relative Judith of Flanders, who gave it to Walicho, the abbot of Weingarten Monastery, in 1094.
				exists = title:c_ravensburg.holder
			}
			title:c_ravensburg.holder = {
				create_artifact_holy_blood_KOH_effect_3 = {
					OWNER = this
				}
			}
		}
		### Holy Chalice
		if = {
			limit = {
				current_date > 258.1.1				#According to tradition, the relic reached Huesca via Pope Sixtus II in 258.
				exists = title:c_huesca.holder
			}
			title:c_huesca.holder = {
				create_artifact_holy_chalice_effect = {
					OWNER = this
				}
			}
		}
		### Holy Headdress
		if = {
			limit = {
				current_date > 803.1.1				#There are three different traditions, the one around 803 fits the start dates best. Charlemagne is said to have given the headdress to the Bishop of Cahors around 803.
				exists = title:c_quercy.holder
			}
			title:c_quercy.holder = {
				create_artifact_holy_headdress_effect = {
					OWNER = this
				}
			}
		}
		### Holy Lance No.1, Constantinople
		if = {
			limit = {
				current_date >= 629.9.14				#Niketas brings the Holy Sponge and the Holy Lance from Jerusalem to Constantinople
				exists = title:c_byzantion.holder
			}
			title:c_byzantion.holder = {
				create_artifact_holy_lance_effect_1 = {
					OWNER = this
				}
			}
		}
		### Holy Lance No.2, Yerewan
		if = {
			limit = {
				current_date >= 70.1.1				#The holy lance is said to have been brought to the Armenian monastery of Geghard by the apostle Judas Thaddeus.
				exists = title:c_hayk.holder
			}
			title:c_hayk.holder = {
				create_artifact_holy_lance_effect_2 = {
					OWNER = this
				}
			}
		}
		### Holy Lance (of St. Maurice)
		if = {
			limit = {
				current_date > 926.1.1				#Henry I acquires the Lance from the Burgundian King Rudolf II at the Court Day of Worms in 926.
				exists = title:e_hre.holder
			}
			title:e_hre.holder = {
				create_artifact_holy_lance_maurice_effect = {
					OWNER = this
				}
			}
		}
		### Holy Nail No.1, Rome
		if = {
			limit = {
				current_date > 325.6.1				#Helena finds the cross
				exists = title:k_papal_state.holder
			}
			title:k_papal_state.holder = {
				create_artifact_holy_nail_effect_1 = {
					OWNER = this
				}
			}
		}
		### Holy Nail No.2, Trier
		if = {
			limit = {
				current_date > 325.6.1				#Gift from Empress Helena
				exists = title:c_trier.holder
			}
			title:c_trier.holder = {
				create_artifact_holy_nail_effect_2 = {
					OWNER = this
				}
			}
		}
		### Holy Prepuce No.1, Rome
		if = {
			limit = {
				current_date > 800.12.25				#Gift from Charlemagne to Pope Leo III on the occasion of his coronation as emperor
				exists = title:k_papal_state.holder
			}
			title:k_papal_state.holder = {
				create_artifact_holy_prepuce_effect_1 = {
					OWNER = this
				}
			}
		}
		### Holy Prepuce No.2, Charroux
		if = {
			limit = {
				current_date > 800.1.1				#Alleged gift from Charlemagne to the of Abbey of Charroux
				exists = title:c_clermont_sur_allier.holder
			}
			title:c_clermont_sur_allier.holder = {
				create_artifact_holy_prepuce_effect_2 = {
					OWNER = this
				}
			}
		}
		### Holy Right, KOH 1184
		if = {
			limit = {
				#game_start_date = 1184.1.1
				current_date > 1083.1.1				#The relic was stolen in 1083 and by Mercurios, a watchman, who took it to his lands in Bihar. King Ladislaus I heard about it, pardoned him and founded the monastery of Szentjobb, where the relic was kept.
				exists = title:c_bihar.holder
			}
			title:c_bihar.holder = {
				create_artifact_holy_right_KOH_effect = {
					OWNER = this
				}
			}
		}
		### Holy Ring
		if = {
			limit = {
				current_date >= 1000.1.1
				exists = title:c_siena.holder
			}
			title:c_siena.holder = {
				create_artifact_holy_ring_effect = {
					OWNER = this
				}
			}
		}
		### Holy Sponge
		if = {
			limit = {
				current_date >= 629.9.14				#Niketas brings the Holy Sponge and the Holy Lance from Jerusalem to Constantinople
				exists = title:c_byzantion.holder
			}
			title:c_byzantion.holder = {
				create_artifact_holy_sponge_effect = {
					OWNER = this
				}
			}
		}
		### Loin Cloth of Jesus
		if = {
			limit = {
				current_date >= 799.1.1				#A treasure of relics sent for the consecration of the Palatine Chapel in 799
				exists = title:c_aachen.holder
			}
			title:c_aachen.holder = {
				create_artifact_loin_cloth_of_jesus_effect = {
					OWNER = this
				}
			}
		}
		### Manger of Jesus
		if = {
			limit = {
				current_date >= 635.1.1				#The relic was brought to Europe in the middle of the 7th century as a gift from the Jerusalem Patriarch Sophron to Pope Theodore I
				exists = title:k_papal_state.holder
			}
			title:k_papal_state.holder = {
				create_artifact_manger_of_jesus_effect = {
					OWNER = this
				}
			}
		}
		### Maphorion
		if = {
			limit = {
				current_date >= 474.1.1				#The relic is said to have been stolen by two Greek pilgrims in the Holy Land and brought to Constantinople in 474
				exists = title:e_byzantium.holder
			}
			title:e_byzantium.holder = {
				create_artifact_maphorion_effect = {
					OWNER = this
				}
			}
		}
		### Nappies of Jesus
		if = {
			limit = {
				current_date >= 799.1.1				#A treasure of relics sent for the consecration of the Palatine Chapel in 799
				exists = title:c_aachen.holder
			}
			title:c_aachen.holder = {
				create_artifact_nappies_of_jesus_effect = {
					OWNER = this
				}
			}
		}
		### Paten of St. Servatius
		if = {
			limit = {
				current_date > 348.5.13				#St Servatius dies in Maastricht, having moved the episcopal see there.
				exists = title:c_maastricht.holder
			}
			title:c_maastricht.holder = {
				create_artifact_paten_of_st_servatius_effect = {
					OWNER = this
				}
			}
		}
		### Pectoral Cross of St. Servatius
		if = {
			limit = {
				current_date > 348.5.13				#St Servatius dies in Maastricht, having moved the episcopal see there.
				exists = title:c_maastricht.holder
			}
			title:c_maastricht.holder = {
				create_artifact_pectoral_cross_of_st_servatius_effect = {
					OWNER = this
				}
			}
		}
		### Rod of St. Peter, Part No. 1, Cologne
		if = {
			limit = {
				current_date > 953.1.1				#Transfer from Metz to Cologne
				exists = title:c_cologne.holder
			}
			title:c_cologne.holder = {
				create_artifact_rod_of_st_peter_effect_1 = {
					OWNER = this
				}
			}
		}
		### Rod of St. Peter, Part No. 2, Trier
		if = {
			limit = {
				current_date > 980.1.1				#Transfer from Cologne to Trier
				exists = title:c_trier.holder
			}
			title:c_trier.holder = {
				create_artifact_rod_of_st_peter_effect_2 = {
					OWNER = this
				}
			}
		}
		### Sandals of Jesus
		if = {
			limit = {
				current_date >= 752.1.1				#Gift from Pope Zacharias to Pippin
				exists = title:b_prum.holder
			}
			title:b_prum.holder = {
				create_artifact_sandals_of_jesus_effect = {
					OWNER = this
				}
			}
		}
		### Scourge Rope of Christ
		if = {
			limit = {
				current_date >= 799.1.1				#A treasure of relics sent for the consecration of the Palatine Chapel in 799
				exists = title:c_aachen.holder
			}
			title:c_aachen.holder = {
				create_artifact_scourge_rope_of_christ_effect = {
					OWNER = this
				}
			}
		}
		### Scourge Pillar
		if = {
			limit = {
				current_date >= 325.1.1				#Helen is said to have discovered the pillar on her pilgrimage to the Holy Land
				exists = title:c_jerusalem.holder
			}
			title:c_jerusalem.holder = {
				create_artifact_scourge_pillar_effect = {
					OWNER = this
				}
			}
		}
		### Seamless Robe of Jesus No.1, Trier
		if = {
			limit = {
				current_date >= 1066.1.1				#First mention 1196, bringing it forward so it shows up in the game
				exists = title:c_trier.holder
			}
			title:c_trier.holder = {
				create_artifact_seamless_robe_of_jesus_effect_1 = {
					OWNER = this
				}
			}
		}
		### Seamless Robe of Jesus No.2, Argenteuil
		if = {
			limit = {
				current_date >= 800.1.1				#Alleged gift from Empress Irene to Charlemagne, who gives it to his daughter Theocrate, Abbess of Argenteuil
				exists = title:c_ile_de_france.holder
			}
			title:c_ile_de_france.holder = {
				create_artifact_seamless_robe_of_jesus_effect_2 = {
					OWNER = this
				}
			}
		}
		### Shroud of Jesus No. 1, Kornelimünster
		if = {
			limit = {
				current_date >= 814.1.1				#Louis the Pious gives Benedict of Aniane the three relics from the reliquary treasure of the Palatine Chapel for the Kornelimünster monastery founded in 814.
				exists = title:c_aachen.holder
			}
			title:c_aachen.holder = {
				create_artifact_shroud_of_jesus_effect_1 = {
					OWNER = this
				}
			}
		}
		### Shroud of Jesus No. 2, Compiegne
		if = {
			limit = {
				current_date >= 875.1.1				#The shroud of Kornelimünster Abbey is divided in 875 because Charles the Bald needs one half for the foundation of the monastery in Compiegne.
				exists = title:c_valois.holder
			}
			title:c_valois.holder = {
				create_artifact_shroud_of_jesus_effect_2 = {
					OWNER = this
				}
			}
		}
		### Skullcap of Paul the Apostle
		if = {
			limit = {
				current_date >= 1040.1.1				#The Paulushead reliquary that contains the relic was made around 1040.
				exists = title:c_munster.holder
			}
			title:c_munster.holder = {
				create_artifact_skullcap_of_paul_the_apostle_effect = {
					OWNER = this
				}
			}
		}
		### Skull of Andrew the Apostle
		if = {
			limit = {
				current_date >= 867.1.1				#Emperor Basil has the skull brought back to Patras.
				exists = title:c_achaia.holder
			}
			title:c_achaia.holder = {
				create_artifact_skull_of_andrew_the_apostle_effect = {
					OWNER = this
				}
			}
		}
		### Skull of John the Baptist
		if = {
			limit = {
				current_date >= 850.1.1				#Third finding of the head and transfer to Constantinople
				exists = title:e_byzantium.holder
			}
			title:e_byzantium.holder = {
				create_artifact_skull_of_john_the_baptist_effect = {
					OWNER = this
				}
			}
		}
		### Skull of Paul the Apostle
		if = {
			limit = {
				current_date >= 900.1.1				#The skulls of the Apostles Peter and Paul have been in the Lateran Palace since at least the 9th century.
				exists = title:k_papal_state.holder
			}
			title:k_papal_state.holder = {
				create_artifact_skull_of_paul_the_apostle_effect = {
					OWNER = this
				}
			}
		}
		### Skull of St. Blaise
		if = {
			limit = {
				current_date >= 972.1.1				#Transfer of the head to Ragusa
				exists = title:c_ragusa.holder
			}
			title:c_ragusa.holder = {
				create_artifact_skull_of_st_blaise_effect = {
					OWNER = this
				}
			}
		}
		### Skull of St. Cornelius
		if = {
			limit = {
				current_date >= 875.1.1				#Kornelimünster Abbey receives the relic as compensation for the division of the shroud, because Charles the Bald needs a piece of it for the foundation of a monastery in Compiègne.
				exists = title:c_aachen.holder
			}
			title:c_aachen.holder = {
				create_artifact_skull_of_st_cornelius_effect = {
					OWNER = this
				}
			}
		}
		### Skull of St. Cyprian
		if = {
			limit = {
				current_date >= 875.1.1				#Kornelimünster Abbey receives the relic as compensation for the division of the shroud, because Charles the Bald needs a piece of it for the foundation of a monastery in Compiègne.
				exists = title:c_aachen.holder
			}
			title:c_aachen.holder = {
				create_artifact_skull_of_st_cyprian_effect = {
					OWNER = this
				}
			}
		}
		### Skull of St. George
		if = {
			limit = {
				current_date >= 751.1.1				#The skull of St. George was brought from Cappadocia to Rome in 751 on the orders of Pope Zacharias and kept first in the Lateran Palace, later in the church of San Giorgio in Velabro.
				exists = title:k_papal_state.holder
			}
			title:k_papal_state.holder = {
				create_artifact_skull_of_st_george_effect = {
					OWNER = this
				}
			}
		}
		### Skull of St. Peter
		if = {
			limit = {
				current_date >= 900.1.1				#The skulls of the Apostles Peter and Paul have been in the Lateran Palace since at least the 9th century.
				exists = title:k_papal_state.holder
			}
			title:k_papal_state.holder = {
				create_artifact_skull_of_st_peter_effect = {
					OWNER = this
				}
			}
		}
		### Skull of St. Servatius
		if = {
			limit = {
				current_date > 348.5.13				#St Servatius dies in Maastricht, having moved the episcopal see there.
				exists = title:c_maastricht.holder
			}
			title:c_maastricht.holder = {
				create_artifact_skull_of_st_servatius_effect = {
					OWNER = this
				}
			}
		}
		### Skull of St. Valentine
		if = {
			limit = {
				current_date > 820.1.1				#Under Pope Paschalis I, the relics of St. Valentine were transferred from the Roman catacomb of San Valentino to various churches; the skull ended up in the church of Santa Maria in Cosmedin.
				exists = title:c_roma.holder
			}
			title:c_roma.holder = {
				create_artifact_skull_of_st_valentine_effect = {
					OWNER = this
				}
			}
		}
		### Skull of St. Wenceslaus of Bohemia
		if = {
			limit = {
				current_date > 938.1.1				#Three years after Wenceslaus' death, Boleslav is said to have transferred his bones to Prague Castle.
				exists = title:c_praha.holder
			}
			title:c_praha.holder = {
				create_artifact_skull_of_st_wenceslaus_of_bohemia_effect = {
					OWNER = this
				}
			}
		}
		### St. Patricks Bell
		if = {
			limit = {
				current_date >= 552.1.1				#St. Columban is said to have recovered the bell from Patrick's grave in 552 along with other relics
				exists = title:b_armagh.holder
			}
			title:b_armagh.holder = {
				create_artifact_st_patricks_bell_effect = {
					OWNER = this
				}
			}
		}
		### Sudarium of Jesus, No. 1, Oviedo
		if = {
			limit = {
				current_date >= 840.1.1				#Transfer to Oviedo
				exists = title:c_asturias_de_oviedo.holder
			}
			title:c_asturias_de_oviedo.holder = {
				create_artifact_sudarium_of_jesus_effect_1 = {
					OWNER = this
				}
			}
		}
		### Sudarium of Jesus, No. 2, Kornelimünster
		if = {
			limit = {
				current_date >= 814.1.1				#Louis the Pious gives Benedict of Aniane the three relics from the reliquary treasure of the Palatine Chapel for the Kornelimünster monastery founded in 814.
				exists = title:c_aachen.holder
			}
			title:c_aachen.holder = {
				create_artifact_sudarium_of_jesus_effect_2 = {
					OWNER = this
				}
			}
		}
		### Titulus Crucis
		if = {
			limit = {
				current_date >= 325.1.1				#Helena finds the cross, the titulus is taken to the church Santa Croce in Gerusalemme in Rome
				exists = title:k_papal_state.holder
			}
			title:k_papal_state.holder = {
				create_artifact_titulus_crucis_effect = {
					OWNER = this
				}
			}
		}
		### Veil of St. Agatha
		if = {
			limit = {
				# NOT = {	game_start_date = 1184.1.1 }
				current_date > 1040.1.1				#The Byzantine general George Maniakes stole the relics from Catania in 1040 during the partial reconquest of Sicily and brought them to Constantinople.
				exists = title:c_byzantion.holder
			}
			title:c_byzantion.holder = {
				create_artifact_veil_of_st_agatha_effect = {
					OWNER = this
				}
			}
		}
		### Veil of St. Agatha, KOH 1184
		if = {
			limit = {
				#game_start_date = 1184.1.1
				current_date > 1126.1.1				#In 1126, two soldiers of the Byzantine army stole the relics and returned them to Catania.
				exists = title:b_catania.holder
			}
			title:b_catania.holder = {
				create_artifact_veil_of_st_agatha_KOH_effect = {
					OWNER = this
				}
			}
		}
		### Veil of Veronica
		if = {
			limit = {
				current_date >= 1011.1.1				#First mention
				exists = title:k_papal_state.holder
			}
			title:k_papal_state.holder = {
				create_artifact_veil_of_veronica_effect = {
					OWNER = this
				}
			}
		}
		# Historical Artifacts
		## We do these per-artefact rather than per-title so that they can be easily reshuffled if desired.
		## Crowns
		### Iron Crown of Lombardy
		if = {
			limit = {
				#has_dlc_feature = royal_court
				exists = title:e_hre.holder
			}
			title:e_hre.holder = {
				create_artifact_pedestal_crown_iron_effect = {
					OWNER = this
				}
			}
		}
		### Reichskrone
		if = {
			limit = {
				current_date > 1000.1.1
				exists = title:e_hre.holder
			}
			title:e_hre.holder = {
				create_artifact_reichskrone_effect = {
					OWNER = this
				}
			}
		}
		### Essen Crown
		if = {
			limit = {
				current_date > 1000.1.1
				exists = title:e_hre.holder
			}
			title:e_hre.holder = {
				create_artifact_essen_crown_effect = {
					OWNER = this
				}
			}
		}
		### Nikephoros' Crown
		if = {
			limit = {
				current_date >= 1000.1.1
				exists = title:e_byzantium.holder
			}
			title:e_byzantium.holder = {
				create_artifact_nikephoros_crown_effect = {
					OWNER = this
				}
			}
		}
		### Monomachus Crown
		if = {
			limit = {
				#has_dlc_feature = royal_court
				current_date >= 1000.1.1
				exists = title:e_byzantium.holder
			}
			title:e_byzantium.holder = {
				create_artifact_monomachus_crown_effect = {
					OWNER = this
				}
			}
		}
		### Crown of Justinian
		if = {
			limit = {
				#has_dlc_feature = royal_court
				exists = title:e_byzantium.holder
				current_date >= 550.1.15
			}
			title:e_byzantium.holder = {
				create_artifact_pedestal_justinian_effect = {
					OWNER = this
				}
			}
		}
		### al-Taj
		if = {
			limit = {
				# Establishment of the Fatimid Caliphate.
				current_date >= 910.1.15
				exists = title:d_shiite.holder
			}
			title:d_shiite.holder = {
				create_artifact_al_taj_crown_effect = {
					OWNER = this
				}
			}
		}
		### Papal Tiara
		if = {
			limit = {
				exists = title:k_papal_state.holder
			}
			title:k_papal_state.holder = {
				create_artifact_papal_tiara_effect = {
					OWNER = this
				}
			}
		}
		### Visigothic Votive Crowns
		if = {
			limit = {
				# has_fp2_dlc_trigger = yes
				current_date >= 800.1.15
			}
			every_county_in_region = {
				region = world_europe_west_iberia
				holder = {
					add_to_list = potential_votive_crown_holders_list
				}
			}
			while = {
				count = 5
				random_in_list = {
					list = potential_votive_crown_holders_list
					limit = {
						NOT = {
							has_character_flag = seeded_relic
						}
					}
					create_artifact_fp2_votive_crowns_effect = {
						OWNER = this
					}
					add_character_flag = {
						flag = seeded_relic
						days = 1
					}
				}
			}
		}
		## Clothes
		### Robe of Kassapa
		if = {
			limit = {
				#has_dlc_feature = royal_court
				exists = title:k_pagan.holder
			}
			title:k_pagan.holder = {
				create_artifact_robe_kassapa_effect = {
					OWNER = this
				}
			}
		}
		### Mantle of the Prophet
		if = {
			limit = {
				exists = title:d_sunni.holder
			}
			title:d_sunni.holder = {
				create_artifact_mantle_of_the_prophet_effect = {
					OWNER = this
				}
			}
		}
		## Other Regalia
		### Qadib al-Mulk
		if = {
			limit = {
				# Establishment of the Fatimid Caliphate.
				current_date >= 910.1.15
				exists = title:d_shiite.holder
			}
			title:d_shiite.holder = {
				create_artifact_qadib_al_mulk_effect = {
					OWNER = this
				}
			}
		}
		### Chalice of Dona Urraca
		if = {
			limit = {
				# It's likely that Urraca paid for her eponymous chalice using money she earnt from the titles her father pre-bequeathed to her, so it was probably made some time *after* 1066 (since she only got the lands in 1065, shortly before her father died), buuuuuut it's really mean to not let her have it at game start, so we give it to her in 1066.
				current_date >= 1066.1.1
				# has_fp2_dlc_trigger = yes
				exists = character:108501
				character:108501 = {
					is_alive = yes
				}
			}
			create_artifact_goblet_chalice_of_dona_urraca = {
				OWNER = character:108501
			}
		}
		## Thrones
		### Throne of Scone (featuring Stone)
		if = {
			limit = {
				#has_dlc_feature = royal_court
				exists = title:k_scotland.holder
				current_date > 450.1.1
			}
			title:k_scotland.holder = {
				create_artifact_throne_scone_effect = {
					OWNER = this
				}
			}
		}
		else = {
			limit = {
				#has_dlc_feature = royal_court
				exists = title:d_albany.holder
				current_date > 450.1.1
			}
			title:d_albany.holder = {
				create_artifact_throne_scone_effect = {
					OWNER = this
				}
			}
		}
		### Throne of Charlemagne
		if = {
			limit = {
				#has_dlc_feature = royal_court
				exists = title:e_hre.holder
				current_date >= 800.1.15
			}
			title:e_hre.holder = {
				create_artifact_throne_charlemagne_effect = {
					OWNER = this
				}
			}
		}
		### Throne of Solomon (the Byzantine one)
		if = {
			limit = {
				# has_ep3_dlc_trigger = yes
				exists = title:e_byzantium.holder
				current_date >= 940.1.1
			}
			title:e_byzantium.holder = {
				create_artifact_byz_throne_effect = {
					OWNER = this
				}
			}
		}
		## Furniture
		### Pentapyrgion
		if = {
			limit = {
				#has_dlc_feature = royal_court
				exists = title:e_byzantium.holder
			}
			title:e_byzantium.holder = {
				create_artifact_sculpture_cabinet_pentapyrgion_effect = {
					OWNER = this
				}
			}
		}
		### Bells of Santiago
		if = {
			# If we're before Almanzor's raid, then the bells go to c_santiago's holder.
			limit = {
				# has_fp2_dlc_trigger = yes
				current_date < 997.1.1
				current_date >= 800.1.15
			}
			title:c_santiago.holder = {
				create_artifact_various_bells_santiago = {
					OWNER = this
				}
				# The bells haven't been changed at all.
				scope:newly_created_artifact = {
					set_variable = {
						name = artefact_santiago_bells
						value = 0
					}
				}
			}
		}
		### (Former) Bells of Santiago
		#### These aren't actually furniture, but we keep 'em here so they're next to the regular bells, which *are*.
		if = {
			# If we're after Almanzor's raid, then the bells go to c_toledo's holder.
			limit = {
				# has_fp2_dlc_trigger = yes
				current_date >= 997.1.1
			}
			title:c_toledo.holder = {
				create_artifact_various_aquamanile_santiago = {
					OWNER = this
				}
				# The bells have been morphed once.
				scope:newly_created_artifact = {
					set_variable = {
						name = artefact_santiago_bells
						value = 1
					}
				}
			}
		}
		## Weapons (including decoratives)
		### Curtana
		#### Not the *actual* Curtana, but at least occasionally traced as Edward the Confessor's sword (and then ascribed an even more mythic origin from there).
		if = {
			limit = {
				#has_dlc_feature = royal_court
				current_date >= 1042.8.6
				exists = title:k_england.holder
			}
			title:k_england.holder = {
				create_artifact_curtana_effect = {
					OWNER = this
				}
			}
		}
		### Sword of Atilla 
		#### Associated with the Arpads, but "discovered"/passed out of their possession around or after 1063. They maintain a house claim on it.
		if = {
			limit = {
				#has_dlc_feature = royal_court
				current_date >= 1064.1.1
				exists = title:d_bavaria.holder
			}
			title:d_bavaria.holder = {
				create_artifact_wall_sword_attila_effect = {
					OWNER = this
				}
				dynasty:708 = {
					random_dynasty_member = {
						house = {
							add_house_artifact_claim = scope:newly_created_artifact
						}
					}
				}
			}
		}
		### al-Sayf al-Khass
		if = {
			limit = {
				# Establishment of the Fatimid Caliphate.
				current_date >= 910.1.15
				#has_dlc_feature = royal_court
				exists = title:d_shiite.holder
			}
			title:d_shiite.holder = {
				create_artifact_al_sayf_al_khass_effect = {
					OWNER = this
				}
			}
		}
		### Staff of Kakusandha
		if = {
			limit = {
				#has_dlc_feature = royal_court
				exists = title:k_pagan.holder
			}
			title:k_pagan.holder = {
				create_artifact_staff_kakusandha_effect = {
					OWNER = this
				}
			}
		}
		### "Excalibur"
		every_county_in_region = {
			region = world_europe_west_britannia
			holder = {
				# We exclude kings'n'emperors so the Excaliburs scatter a little better.
				if = {
					limit = {
						faith.religion = religion:christianity_religion
						highest_held_title_tier <= tier_duchy
					}
					add_to_list = potential_excalibur_holders_list
				}
			}
		}
		every_county_in_region = {
			region = world_europe_west_francia
			holder = {
				# We exclude kings'n'emperors so the Excaliburs scatter a little better.
				if = {
					limit = {
						faith.religion = religion:christianity_religion
						highest_held_title_tier <= tier_duchy
					}
					add_to_list = potential_excalibur_holders_list
				}
			}
		}
		if = {
			limit = {
				any_in_list = {
					list = potential_excalibur_holders_list
				}
				current_date >= 525.1.1
			}
			while = {
				count = 6
				random_in_list = {
					list = potential_excalibur_holders_list
					limit = {
						NOT = {
							has_character_flag = seeded_relic
						}
					}
					weight = {
						# Weight up Arthurian heartlands.
						## We don't weigh 'em up _too_ much, because there's quite a few rulers in this region.
						modifier = {
							add = 10
							capital_province = {
								geographical_region = dlc_ep1_arthurian_heartlands_region
							}
						}
					}
					create_artifact_excalibur_effect = {
						OWNER = this
					}
					add_character_flag = {
						flag = seeded_relic
						days = 1
					}
				}
			}
		}
		### Spear of the Prophet
		if = {
			limit = {
				#has_dlc_feature = royal_court
				current_date >= 600.1.15
				exists = title:d_sunni.holder
			}
			title:d_sunni.holder = {
				create_artifact_spear_of_the_prophet_effect = {
					OWNER = this
				}
			}
		}
		## Books, Scrolls, & Other Recorded Nerdery
		### Konagamana
		if = {
			limit = {
				#has_dlc_feature = royal_court
				exists = title:k_pagan.holder
			}
			title:k_pagan.holder = {
				create_artifact_konagamana_effect = {
					OWNER = this
				}
			}
		}
		### Vinaya Pitaka
		random_character_with_royal_court = {
			limit = {
				faith = faith:theravada
			}
			create_artifact_vinaya_pitaka_effect = {
				OWNER = this
			}
		}
		### Sutta Pitaka
		random_character_with_royal_court = {
			limit = {
				faith = faith:theravada
			}
			create_artifact_sutta_pitaka_effect = {
				OWNER = this
			}
		}
		### Abhidhamma Pitaka
		random_character_with_royal_court = {
			limit = {
				faith = faith:theravada
			}
			create_artifact_abhidhamma_pitaka_effect = {
				OWNER = this
			}
		}
		## Banners
		### Banner of Kaviani
		if = {
			limit = {
				#has_dlc_feature = royal_court
				# Only generated in the earlier bookmarks.
				current_date < 1000.1.1
				exists = title:k_makran.holder
			}
			title:k_makran.holder = {
				create_artifact_wall_banner_kaviani_effect = {
					OWNER = this
				}
			}
		}
		### Banner of Edessa
		if = {
			limit = {
				#has_dlc_feature = royal_court
				exists = title:e_byzantium.holder
			}
			title:e_byzantium.holder = {
				create_artifact_wall_banner_edessa_effect = {
					OWNER = this
				}
			}
		}
		### Banner of Thankfulness
		if = {
			limit = {
				# Establishment of the Fatimid Caliphate.
				current_date >= 910.1.15
				#has_dlc_feature = royal_court
				exists = title:d_shiite.holder
			}
			title:d_shiite.holder = {
				create_artifact_wall_banner_thankfulness_effect = {
					OWNER = this
				}
			}
		}
		## Misc
		### Head of St. Edmund
		if = {
			limit = {
				#has_dlc_feature = royal_court
				# Date of earliest likely canonisation.
				current_date >= 924.1.1
				exists = title:k_england.holder
			}
			title:k_england.holder = {
				create_artifact_edmund_head_effect = {
					OWNER = this
				}
			}
		}
		### al-Dawat
		if = {
			limit = {
				# Establishment of the Fatimid Caliphate.
				current_date >= 910.1.15
				#has_dlc_feature = royal_court
				exists = title:d_shiite.holder
			}
			title:d_shiite.holder = {
				create_artifact_al_dawat_effect = {
					OWNER = this
				}
			}
		}
		### al-Hafir
		if = {
			limit = {
				# Establishment of the Fatimid Caliphate.
				current_date >= 910.1.15
				#has_dlc_feature = royal_court
				exists = title:d_shiite.holder
			}
			title:d_shiite.holder = {
				create_artifact_al_hafir_effect = {
					OWNER = this
				}
			}
		}
		### Skull Cap of Charlemagne
		if = {
			limit = {
				#has_dlc_feature = royal_court
				exists = title:k_france.holder
				current_date >= 769.1.1
			}
			title:k_france.holder = {
				create_artifact_skull_cap_charlemagne_effect = {
					OWNER = this
				}
			}
		}
		### Sassanian Sword
		if = {
			limit = {
				# Only generated in the earlier bookmarks.
				current_date < 900.1.1
				#has_dlc_feature = legacy_of_persia
				exists = title:c_mazandaran.holder
			}
			title:c_mazandaran.holder = {
				create_artifact_illustrious_sassanian_sword_effect = {
					OWNER = this
				}
			}
		}
		### Incense Burner Sculpture
		if = {
			limit = {
				# Only generated in the earlier bookmarks.
				current_date < 900.1.1
				#has_dlc_feature = legacy_of_persia
				exists = title:k_khorasan.holder
			}
			title:k_khorasan.holder = {
				create_artifact = {
					name = fp3_incense_burner_sculpture
					description = fp3_incense_burner_sculpture_desc
					visuals = fp3_incense_burner_sculpture
					type = sculpture
					wealth = 80
					quality = 80
					modifier = artifact_negate_health_penalty_add_2_modifier
					modifier = artifact_stress_gain_3_modifier
					modifier = artifact_attraction_opinion_2_modifier
					modifier = artifact_court_grandeur_baseline_add_3_modifier
					history = {
						type = created_before_history
					}
				}
			}
		}
		### Oxus Bracelet
		if = {
			limit = {
				# Only generated in the earlier bookmarks.
				current_date < 900.1.1
				#has_dlc_feature = legacy_of_persia
				exists = title:k_transoxiana.holder
			}
			title:k_transoxiana.holder = {
				create_artifact_oxus_bracelet_effect = {
					OWNER = this
				}
			}
		}
		### Persian Drinking Vessel
		if = {
			limit = {
				# Only generated in the earlier bookmarks.
				current_date < 900.1.1
				#has_dlc_feature = legacy_of_persia
				exists = title:k_makran.holder
			}
			title:k_makran.holder = {
				create_artifact = {
					name = fp3_ancient_drinking_vessel
					description = fp3_ancient_drinking_vessel_desc
					visuals = persian_drinking_vessel
					type = goblet
					wealth = 80
					quality = 80
					modifier = artifact_negate_health_penalty_add_2_modifier
					modifier = artifact_stress_gain_3_modifier
					modifier = artifact_monthly_prestige_5_modifier
					modifier = artifact_court_grandeur_baseline_add_3_modifier
				}
			}
		}
		### Statue of Constantine the Great
		### Statue of Roman Woman
		### Four Tetrarchs Statue
		### Hydraulic Organ
		if = {
			limit = {
				# has_ep3_dlc_trigger = yes
				exists = title:e_byzantium.holder
			}
			title:e_byzantium.holder = {
				create_artifact_statue_constantine_effect = {
					OWNER = this
				}
				create_artifact_statue_roman_woman_effect = {
					OWNER = this
				}
				create_artifact_statue_four_tetrarchs_effect = {
					OWNER = this
				}
				create_artifact_hydraulic_organ_effect = {
					OWNER = this
				}
			}
		}
		### Tree automa
		if = {
			limit = {
				# has_ep3_dlc_trigger = yes
				exists = title:e_byzantium.holder
				current_date >= 940.1.1
			}
			title:e_byzantium.holder = {
				create_artifact_tree_automa_effect = {
					OWNER = this
				}
			}
		}
		### Spread some Orthodox icons
		every_county_in_region = {
			region = world_europe_east
			holder = {
				if = {
					limit = {
						faith = faith:orthodox
					}
					add_to_list = potential_icons_holders_list
				}
			}
		}
		every_county_in_region = {
			region = world_asia_minor
			holder = {
				if = {
					limit = {
						faith = faith:orthodox
					}
					add_to_list = potential_icons_holders_list
				}
			}
		}
		every_county_in_region = {
			region = world_europe_south_east
			holder = {
				if = {
					limit = {
						faith = faith:orthodox
					}
					add_to_list = potential_icons_holders_list
				}
			}
		}
		every_county_in_region = {
			region = world_europe_south_italy
			holder = {
				if = {
					limit = {
						faith = faith:orthodox
					}
					add_to_list = potential_icons_holders_list
				}
			}
		}
		if = {
			limit = {
				any_in_list = {
					list = potential_icons_holders_list
				}
			}
			while = {
				count = 4
				random_in_list = {
					list = potential_icons_holders_list
					limit = {
						NOT = {
							has_character_flag = seeded_relic
						}
					}
					create_artifact_trinket_icon_ancient_effect = {
						OWNER = this
					}
					add_character_flag = {
						flag = seeded_relic
						days = 1
					}
				}
			}
		}
	}
}

#Save a memorable battle as potential topic for artifacts
historical_artifacts.0100 = {
	hidden = yes
	scope = combat_side
	trigger = {
		# Check to ensure all needed scopes are valid
		exists = combat.location
		exists = side_primary_participant
		exists = enemy_side.side_primary_participant
		# Check if this battle was important enough to be memorialized
		calc_true_if = {
			amount >= 2
			any_in_list = {
				list = slain_combatants
				OR = {
					this = root.enemy_side.side_primary_participant
					is_heir_of = root.enemy_side.side_primary_participant
				}
			}
			any_in_list = {
				list = prisoners_of_war
				OR = {
					this = root.enemy_side.side_primary_participant
					is_heir_of = root.enemy_side.side_primary_participant
				}
			}
			troops_ratio <= 0.5
			num_enemies_killed >= 10000
			AND = {
				percent_enemies_killed >= 75
				combat = {
					num_total_troops >= 20000
				}
			}
			combat = {
				OR = {
					num_total_troops >= 30000
					warscore_value >= 25
				}
			}
		}
	}
	immediate = {
		side_primary_participant = {
			if = {
				limit = {
					exists = var:epic_battle_location
				}
				remove_variable = epic_battle_location
			}
			if = {
				limit = {
					exists = var:epic_loser
				}
				remove_variable = epic_loser
			}
			set_variable = {
				name = epic_battle_location
				value = root.combat.location
				years = 5
			}
			set_variable = {
				name = epic_loser
				value = root.enemy_side.side_primary_participant
				years = 5
			}
		}
	}
}
