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_branch_relic_general_effect

create_artifact_pedestal_branch_relic_general_effect = { OWNER = … RELIGION = … }

game/common/scripted_effects/01_exp1_historical_artifacts_creation_effect.txt, line 1037 (60 lines). Parameters: $OWNER$, $RELIGION$.

create_artifact_pedestal_branch_relic_general_effect is a scripted effect in Crusader Kings III, written at line 1037 of its file. A call passes 2 parameters: OWNER and RELIGION. The game's script calls it in 2 places, among them generate_historical_artifact_based_on_location_effect (scripted effect) and inspiration_adventure_create_artifact_effect (scripted effect). 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 (60 lines of game script)
create_artifact_pedestal_branch_relic_general_effect = {
	# Get the character the artifact is being made for.
	$OWNER$ = { save_scope_as = owner }
	set_artifact_rarity_illustrious = yes

	save_scope_value_as = {
		name = branch_name
		value = flag:general
	}

	# Create the artifact
	create_artifact = {	
		name = artifact_pedestal_branch_name
		description = artifact_pedestal_branch_description
		type = pedestal
		template = branch_general_template
		visuals = pedestal_branch_relic_hinduism
		wealth = scope:wealth
		quality = scope:quality
		history = {
			type = created_before_history
		}
		modifier = artifact_placeholder_modifier
		save_scope_as = newly_created_artifact
	}

	scope:newly_created_artifact = {
		#This is needed to determine what religion the branch will work for.
		if = {
			# when the location is sea province
			limit = { NOT = { exists = $RELIGION$ } }
			set_variable = {
				name = relic_religion
				value = scope:owner.religion
			}
		}
		else = {
			set_variable = {
				name = relic_religion
				value = $RELIGION$
			}
		}
		set_variable = { name = historical_unique_artifact value = yes }
		add_scaled_artifact_modifier_piety_effect = yes
		add_scaled_artifact_modifier_grandeur_small_effect = yes
		if = {
			limit = {
				OR = {
					rarity = famed
					rarity = illustrious
				}
			}
			add_2_scaled_artifact_modifier_devotion_effect = yes
		}
		else = {
			add_scaled_artifact_modifier_devotion_effect = yes
		}
		save_scope_as = epic
	}
}

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

Where it is used

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

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?