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

Scripted effect · Silk and Silver files

create_creature_artifact_effect

create_creature_artifact_effect = { CREATOR = … OWNER = … }

game/common/scripted_effects/gdp_domicile_artifact_creation_scripted_effects.txt, line 442 (165 lines). Parameters: $CREATOR$, $OWNER$.

create_creature_artifact_effect is a scripted effect in Crusader Kings III, in the Silk and Silver files, written at line 442 of its file. A call passes 2 parameters: CREATOR and OWNER. The game's script calls it in 10 places, among them Solicit Patronage (decision), Spending Spree (decision) and …: Local Color (event gdp_merchant_luxury_contract.0011). Its body carries 1 text of the game's own for the player. Patch 1.21.0, from game/common/scripted_effects/gdp_domicile_artifact_creation_scripted_effects.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_creature_artifact_effect = {
	# owner is who the artifact is made for
	# For luxury contracts the creator is the contract giver, otherwise it should always be a merchant
	$OWNER$ = { save_scope_as = owner }
	$CREATOR$ = { save_scope_as = creator }

	get_artifact_quality_effect = yes
	get_artifact_wealth_effect = yes

	scope:owner = {
		if = {
			limit = {
				# Check if creature type is already set.
				NOT = { domicile_creature_animal_type_trigger = { TYPE = var:animal_type } }
			}
			random_list = {
				8 = {
					luxury_contract_standard_creature_effect = { PROVINCE = scope:creator.location }
				}
				2 = {
					luxury_contract_dangerous_creature_effect = { PROVINCE = scope:creator.location }
				}
			}
		}

		hidden_effect_new_object = {
			if = {
				limit = {
					OR = {
						var:animal_type ?= flag:peacock
						var:animal_type ?= flag:parrot
						var:animal_type ?= flag:cockatoo
						var:animal_type ?= flag:crane
					}
				}
				create_domicile_creature_artifact_object_effect = { VISUALS = creature_court_trophy_bird }
			}
			else_if = {
				limit = {
					var:animal_type ?= flag:monkey
				}
				create_domicile_creature_artifact_object_effect = { VISUALS = creature_court_trophy_monkey }
			}
			else_if = {
				limit = {
					OR = {
						var:animal_type ?= flag:caracal
						var:animal_type ?= flag:lynx
					}
				}
				create_domicile_creature_artifact_object_effect = { VISUALS = creature_court_small_hide }
			}
			else_if = {
				limit = {
					OR = {
						var:animal_type ?= flag:lion
						var:animal_type ?= flag:tiger
						var:animal_type ?= flag:leopard
						var:animal_type ?= flag:bear
						var:animal_type ?= flag:elephant
					}
				}
				create_domicile_creature_artifact_object_effect = { VISUALS = creature_court_large_hide }
			}
			else = {
				create_domicile_creature_artifact_object_effect = { VISUALS = creature }
			}
		}
	}

	# DO NOT set this variable inside of the hidden effect - the whole scripted effect will break!! 
	scope:newly_created_artifact ?= {
		set_variable = {
			name = animal_type
			value = scope:owner.var:animal_type
		}
		set_variable = {
			name = creature_location
			value = scope:creature_location
		}
		if = {
			limit = { exists = var:creature_location }
			## Supress startup errors
		}
	}

	hidden_effect = {
		# Now we set the proper name and desc.
		scope:newly_created_artifact ?= {
			switch = {
				trigger = var:animal_type
				flag:lion = {
					set_artifact_name = creature_type_lion_name
					set_artifact_description = creature_type_lion_desc
				}
				flag:caracal = {
					set_artifact_name = creature_type_caracal_name
					set_artifact_description = creature_type_caracal_desc
				}
				flag:lynx = {
					set_artifact_name = creature_type_lynx_name
					set_artifact_description = creature_type_lynx_desc
				}
				flag:tiger = {
					set_artifact_name = creature_type_tiger_name
					set_artifact_description = creature_type_tiger_desc
				}
				flag:leopard = {
					set_artifact_name = creature_type_leopard_name
					set_artifact_description = creature_type_leopard_desc
				}
				flag:bear = {
					set_artifact_name = creature_type_bear_name
					set_artifact_description = creature_type_bear_desc
				}
				flag:elephant = {
					set_artifact_name = creature_type_elephant_name
					set_artifact_description = creature_type_elephant_desc
				}
				flag:peacock = {

As written in game/common/scripted_effects/gdp_domicile_artifact_creation_scripted_effects.txt.

The first 120 of its 165 lines; the rest is in game/common/scripted_effects/gdp_domicile_artifact_creation_scripted_effects.txt from line 442.

Where it is used

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

Character interactions (1)

  • Create Domicile Artifact

Events (7)

1 more

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

Spotted a mistake on this page, or have an idea for the site?