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

Scripted effect · The Royal Court files

steal_artifact_in_event_effect

steal_artifact_in_event_effect = { ARTIFACT = … THIEF = … VICTIM = … }

game/common/scripted_effects/00_ep1_artifact_effects.txt, line 112 (64 lines). Parameters: $ARTIFACT$, $THIEF$, $VICTIM$.

steal_artifact_in_event_effect is a scripted effect in Crusader Kings III, in the The Royal Court files, written at line 112 of its file. A call passes 3 parameters: ARTIFACT, THIEF and VICTIM. The game's script calls it in 2 places, among them Steal Artifact: Success! (event steal_back_artifact_outcome.1001) and The Art of Delegation (event laamp_base_contract_schemes.0791). Patch 1.20.1.2, from game/common/scripted_effects/00_ep1_artifact_effects.txt.

What it does

Every line of it is script with no tooltip text: the script is below.

The script as written (64 lines of game script)
steal_artifact_in_event_effect = {
	if = {
		limit = { exists = $VICTIM$.capital_province }
		set_local_variable = {
			name = location
			value = $VICTIM$.capital_province
		}
	}
	else_if = {
		limit = { exists = $VICTIM$.location }
		set_local_variable = {
			name = location
			value = $VICTIM$.location
		}
	}

	$ARTIFACT$ = {
		save_scope_as = artifact_to_steal
		hidden_effect = {
			if = {
				limit = {
					exists = local_var:location
				}
				set_owner = {
					target = $THIEF$
					history = {
						type = stolen
						actor = $VICTIM$ #stolen from
						recipient = $THIEF$ #stealer
						location = local_var:location
					}
				}
			}
			else = { #If no location exists it is "conquered"
				set_owner = {
					target = $THIEF$
					history = {
						type = conquest
						actor = $THIEF$ #stealer
						recipient = $VICTIM$ #stolen from
					}
				}
			}
			if = {
				limit = {
					NOT = { has_variable = stolen_artifact }
				}
				set_variable = {
					name = stolen_artifact
					value = 1
				}
			}
			else = {
				change_variable = {
					name = stolen_artifact
					add = 1
				}
			}
		}
	}
	$VICTIM$ = {
		add_personal_artifact_claim = scope:artifact_to_steal
	}
}

As written in game/common/scripted_effects/00_ep1_artifact_effects.txt.

Where it is used

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

Events (2)

Source: game/common/scripted_effects/00_ep1_artifact_effects.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?