CK3 DatabaseCrusader Kings III · 1.20.0.3 “Crozier” · unofficial

Decision · Decisions

AI Enshrine Artifact

Requirements

The game shows no text of its own for these conditions; the script is below.

Shown to a character when (is_shown) (1 line of game script)
is_ai = yes

As written in game/common/decisions/50_holy_site_decisions.txt.

Can be taken when (is_valid) (17 lines of game script)
is_available_ai_adult = yes
has_any_artifact = yes
any_character_artifact = {
	is_holy_relic = yes
	is_holy_relic_for = root.faith
	save_temporary_scope_as = artifact_to_enshrine
	root.faith = {
		any_holy_site = {
			root = {
				can_enshrine_holy_site_artifact = {
					holy_site = prev
					artifact = scope:artifact_to_enshrine
				}
			}
		}
	}
}

As written in game/common/decisions/50_holy_site_decisions.txt.

Effects

The effect has no text of its own in the files; its script is below.

Effect (49 lines of game script)
ordered_character_artifact = {
	limit = {
		is_holy_relic_for = root.faith
	}
	max = 1
	order_by = artifact_rarity
	save_scope_as = artifact_to_enshrine
}
if = {
	limit = {
		exists = scope:artifact_to_enshrine
	}
	root.faith = {
		random_eminent_holy_site = {
			limit = {
				total_active_artifact_rarity_sum = 0
				root = {
					can_enshrine_holy_site_artifact = {
						holy_site = prev
						artifact = scope:artifact_to_enshrine
					}
				}
			}
			save_scope_as = target_holy_site
		}
		if = {
			limit = {
				NOT = {
					exists = scope:target_holy_site
				}
			}
			random_holy_site = {
				limit = {
					root = {
						can_enshrine_holy_site_artifact = {
							holy_site = prev
							artifact = scope:artifact_to_enshrine
						}
					}
				}
				save_scope_as = target_holy_site
			}
		}
	}
}
enshrine_holy_site_artifact = {
	holy_site = scope:target_holy_site
	artifact = scope:artifact_to_enshrine
}

As written in game/common/decisions/50_holy_site_decisions.txt.

Source: game/common/decisions/50_holy_site_decisions.txt and the English localisation, Crusader Kings III 1.20.0.3.