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

create_artifact_cabinet_effect

create_artifact_cabinet_effect = { CARPENTER = … OWNER = … }

game/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt, line 57 (116 lines). Parameters: $CARPENTER$, $OWNER$.

create_artifact_cabinet_effect is a scripted effect in Crusader Kings III, in the The Royal Court files, written at line 57 of its file. A call passes 2 parameters: CARPENTER and OWNER. The game's script calls it in 2 places, among them Inspiration Realized (event fund_inspiration.1061) and … Artifact (event debug.314). Patch 1.20.1.2, from game/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt.

What it does

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

The script as written (116 lines of game script)
create_artifact_cabinet_effect = {
	# Get the character the artifact is being made for.
	$OWNER$ = { save_scope_as = owner }
	$CARPENTER$ = { save_scope_as = carpenter }
	hidden_effect_new_object = {
		# Get artifact quality, wealth, and materials
		get_artifact_quality_effect = yes
		get_artifact_wealth_effect = yes

		# Create the artifact
		# Indian cabinets are actually diwans!
		if = {
			limit = {
				scope:carpenter = { artifact_use_indian_building_visuals_trigger = yes }
			}
			scope:owner = {
				create_artifact = {
					name = artifact_diwan_name
					creator = scope:carpenter
					description = placeholder # Will be regenerated in the post-creation effects
					visuals = diwan
					type = cabinet
					modifier = artifact_placeholder_modifier
					save_scope_as = newly_created_artifact
					wealth = scope:wealth
					quality = scope:quality
					#decaying = no
				}
			}
		}
		#Mena cabinets are actually tables!
		else_if = {
			limit = {
				scope:carpenter = {
					OR = {
						artifact_use_mena_building_visuals_trigger = yes
						artifact_use_iranian_building_visuals_trigger = yes
						artifact_use_steppe_building_visuals_trigger = yes
					}
				}
			}
			scope:owner = {
				create_artifact = {
					name = artifact_table_name
					creator = scope:carpenter
					description = placeholder # Will be regenerated in the post-creation effects
					visuals = table
					type = cabinet
					modifier = artifact_placeholder_modifier
					save_scope_as = newly_created_artifact
					wealth = scope:wealth
					quality = scope:quality
					#decaying = no
				}
			}
		}
		else = {
			scope:owner = {
				create_artifact = {
					name = artifact_cabinet_name
					creator = scope:carpenter
					description = placeholder # Will be regenerated in the post-creation effects
					visuals = cabinet
					type = cabinet
					modifier = artifact_placeholder_modifier
					save_scope_as = newly_created_artifact
					wealth = scope:wealth
					quality = scope:quality
					#decaying = no
				}
			}
		}
		scope:newly_created_artifact = {
			get_artifact_feature_references_effect = yes

			add_scaled_artifact_modifier_grandeur_small_effect = yes
			add_scaled_artifact_modifier_piety_effect = yes
			if = {
				limit = {
					OR = {
						rarity = famed
						rarity = illustrious
					}
				}
				add_scaled_artifact_modifier_dynasty_prestige_effect = yes
			}
			remove_artifact_modifier = artifact_placeholder_modifier
			# Indian cabinets are actually diwans!
			if = {
				limit = {
					scope:carpenter = { artifact_use_indian_building_visuals_trigger = yes }
				}
				set_artifact_description = artifact_diwan_description
			}
			else_if = {
				limit = {
					scope:carpenter = {
						OR = {
							artifact_use_mena_building_visuals_trigger = yes
							artifact_use_iranian_building_visuals_trigger = yes
							artifact_use_steppe_building_visuals_trigger = yes
						}
					}
				}
				set_artifact_description = artifact_table_description
			}
			else = {
				set_variable = {
					name = cabinet
					value = yes
				}
				set_artifact_description = artifact_cabinet_description
			}
		}
	}
}

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

Where it is used

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

Events (2)

Source: game/common/scripted_effects/01_ep1_court_artifact_creation_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?