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

Scripted effect · Roads to Power files

create_artifact_trinket_icon_effect

create_artifact_trinket_icon_effect = { OWNER = … PAINTER = … }

game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt, line 11129 (82 lines). Parameters: $OWNER$, $PAINTER$.

create_artifact_trinket_icon_effect is a scripted effect in Crusader Kings III, in the Roads to Power files, written at line 11129 of its file. A call passes 2 parameters: OWNER and PAINTER. The game's script calls it in 1 place, among them Icon Realized (event ep3_decisions_event.5000). Patch 1.20.1.2, from game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt.

The comment above it in the file

Trinket Artifact

What it does

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

The script as written (82 lines of game script)
create_artifact_trinket_icon_effect = {
	# Get the character the artifact is being made for.
	$OWNER$ = { save_scope_as = owner }
	$PAINTER$ = { save_scope_as = painter }
	save_adventurer_location_effect = yes

	hidden_effect_new_object = {
		# Get artifact quality, wealth, and materials
		get_artifact_quality_effect = yes
		get_artifact_wealth_effect = yes
		# Create the artifact
		scope:owner = {
			if = {
				limit = {
					exists = scope:inspiration_owner
				}
				create_artifact = {
					name = artifact_trinket_icon_name
					description = placeholder # Will be regenerated in the post-creation effects
					creator = scope:painter
					visuals = trinket_icon
					type = miscellaneous
					modifier = artifact_placeholder_modifier
					save_scope_as = newly_created_artifact
					wealth = scope:wealth
					quality = scope:quality
				}
			}
			else_if = {
				limit = {
					exists = scope:adventurer
				}
				create_artifact = {
					name = artifact_trinket_icon_name
					description = placeholder # Will be regenerated in the post-creation effects
					creator = scope:adventurer
					visuals = icon_court_small
					type = miscellaneous
					modifier = artifact_placeholder_modifier
					save_scope_as = newly_created_artifact
					wealth = scope:wealth
					quality = scope:quality
					history = {
						location = scope:location
						actor = scope:adventurer
						recipient = root
						type = discovered
					}
				}
			}
			else = {
				create_artifact = {
					name = artifact_trinket_icon_name
					description = placeholder # Will be regenerated in the post-creation effects
					creator = scope:painter
					visuals = trinket_icon
					type = miscellaneous
					modifier = artifact_placeholder_modifier
					save_scope_as = newly_created_artifact
					wealth = scope:wealth
					quality = scope:quality
				}
			}
		}
		scope:newly_created_artifact = {
			set_artifact_description = artifact_trinket_icon_description
			# Set piety
			add_scaled_artifact_modifier_piety_effect = yes

			if = {
				limit = {
					OR = {
						rarity = famed
						rarity = illustrious
					}
				}
				add_scaled_artifact_modifier_learning_lifestyle_xp_effect = yes
			}
			remove_artifact_modifier = artifact_placeholder_modifier
		}
	}
}

As written in game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt.

Where it is used

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

Events (1)

Source: game/common/scripted_effects/07_dlc_ep3_scripted_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?