CK3 DatabaseCrusader Kings III · 1.20.1.2 “Crozier” · unofficial
Silk & Silverout Tue, Nov 17What's free, what needs the DLC, price →

Scripted effect

create_artifact_pedestal_islamic_relic_effect_hist

create_artifact_pedestal_islamic_relic_effect_hist = { OWNER = … }

game/common/scripted_effects/01_exp1_historical_artifacts_creation_effect.txt, line 351 (215 lines). Parameters: $OWNER$.

create_artifact_pedestal_islamic_relic_effect_hist is a scripted effect in Crusader Kings III, written at line 351 of its file. A call passes 1 parameter: OWNER. The game's script calls it in 5 places, among them historical_artifacts.0023 (event), Qanats of … (event travel_events_fp3.0021) and Tomb Raiders (event travel_events_fp3.0050). Patch 1.20.1.2, from game/common/scripted_effects/01_exp1_historical_artifacts_creation_effect.txt.

What it does

• the game's own tooltip text · ◦ our reading of the script line · code the script where neither exists

“They” is whatever it runs on (the scope it is called in). The scripted triggers and effects it calls link to their own pages; $PARAMETERS$ stay as written: each call fills them in.

The script as written (120 lines of game script)
create_artifact_pedestal_islamic_relic_effect_hist = {
	# Get the character the artifact is being made for.
	$OWNER$ = { save_scope_as = owner }
	# Not really used, but if we don't set the scopes we get errors in the feature selection
	get_artifact_quality_effect = yes
	get_artifact_wealth_effect = yes

	# Identify which relic it is
	random_list = {
		10 = {
			save_scope_value_as = {
				name = islam_relic_name
				value = flag:hair
			}
		}
		10 = {
			trigger = {
				NOT = {
					any_artifact = {
						has_variable = islam_cloak
					}
				}
			}
			save_scope_value_as = {
				name = islam_relic_name
				value = flag:cloak
			}
		}
		10 = {
			trigger = {
				NOT = {
					any_artifact = {
						has_variable = islam_hand
					}
				}
			}
			save_scope_value_as = {
				name = islam_relic_name
				value = flag:hand
			}
		}
		10 = {
			trigger = {
				NOT = {
					any_artifact = {
						has_variable = islam_keys
					}
				}
			}
			save_scope_value_as = {
				name = islam_relic_name
				value = flag:keys
			}
		}
		10 = {
			save_scope_value_as = {
				name = islam_relic_name
				value = flag:tooth
			}
		}
		10 = {
			trigger = {
				NOT = {
					any_artifact = {
						has_variable = islam_seal
					}
				}
			}
			save_scope_value_as = {
				name = islam_relic_name
				value = flag:seal
			}
		}
		10 = {
			trigger = {
				NOT = {
					any_artifact = {
						has_variable = islam_banner
					}
				}
			}
			save_scope_value_as = {
				name = islam_relic_name
				value = flag:banner
			}
		}
	}

	# Create the artifact
	if = {
		limit = {
			exists = scope:islam_relic_name
			scope:islam_relic_name = flag:banner
		}
		set_artifact_rarity_illustrious = yes
		create_artifact = {	
			name = artifact_banner_islam_name
			description = artifact_banner_islam_description
			type = wall_big
			template = islam_artifact_template
			visuals = banner_islam
			visuals_source = title:d_shiite #Caliphate
			wealth = scope:wealth
			quality = scope:quality
			history = {
				type = created_before_history
			}
			modifier = artifact_placeholder_modifier
			save_scope_as = newly_created_artifact
		}
	}
	else_if = {
		limit = {
			exists = scope:islam_relic_name
			OR = {
				scope:islam_relic_name = flag:cloak
				scope:islam_relic_name = flag:hand
				scope:islam_relic_name = flag:keys
				scope:islam_relic_name = flag:seal
			}

As written in game/common/scripted_effects/01_exp1_historical_artifacts_creation_effect.txt.

The first 120 of its 215 lines; the rest is in game/common/scripted_effects/01_exp1_historical_artifacts_creation_effect.txt from line 351.

Where it is used

Every place in common/, events/ and history/ that calls create_artifact_pedestal_islamic_relic_effect_hist.

Events (4)

Source: game/common/scripted_effects/01_exp1_historical_artifacts_creation_effect.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.

Spotted a mistake on this page?