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_wall_banner_effect

create_artifact_wall_banner_effect = { CREATOR = … OWNER = … TARGET = … }

game/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt, line 1468 (706 lines). Parameters: $CREATOR$, $OWNER$, $TARGET$.

create_artifact_wall_banner_effect is a scripted effect in Crusader Kings III, in the The Royal Court files, written at line 1468 of its file. A call passes 3 parameters: CREATOR, OWNER and TARGET. The game's script calls it in 8 places, among them historical_artifacts.0023 (event), Inspiration Realized (event fund_inspiration.1001) and Inspiration Realized (event fund_inspiration.1042). 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 (120 lines of game script)
create_artifact_wall_banner_effect = {
	$OWNER$ = { save_scope_as = owner }
	$CREATOR$ = { save_scope_as = creator }
	$TARGET$ = { save_scope_as = target } #Can be a title, a house or a dynasty

	#This effect can be used to generate banners - either from battle or a character.
	#For battle banners the variables epic_battle_location and epic_loser must be set.
	#To generate a dynasty banner the variable banner_from_dynasty must be set
	#To generate a house banner the variable banner_from_house must be set
	#To generate a banner for a title no special variables need to be set
	
	hidden_effect_new_object = {
		if = {
			limit = { has_variable = epic_battle_location }
			var:epic_battle_location = { save_scope_as = epic_battle_location }
			remove_variable = epic_battle_location
		}
		if = {
			limit = { has_variable = epic_loser }
			var:epic_loser = { save_scope_as = epic_loser }
			remove_variable = epic_loser
		}
		# Dynasty banner rarity determined by Dynasty Splendor
		if = { 
			limit = {
				scope:owner = { has_variable = banner_from_dynasty }
			}
			if = {
				limit = { scope:owner.dynasty.dynasty_prestige_level = max_dynasty_prestige_level }
				set_artifact_rarity_illustrious = yes
			}
			else_if = {
				limit = { scope:owner.dynasty.dynasty_prestige_level >= high_dynasty_prestige_level }
				set_artifact_rarity_famed = yes
			}
			else_if = {
				limit = { scope:owner.dynasty.dynasty_prestige_level >= medium_dynasty_prestige_level }
				set_artifact_rarity_masterwork = yes
			}
			else = { set_artifact_rarity_common = yes }
		}
		# Other banners use default rarity script
		else = {
			get_artifact_quality_effect = yes
			get_artifact_wealth_effect = yes
		}

		scope:owner = {
			if = { #Dynasty Banner
				limit = { has_variable = banner_from_dynasty }
				if = { #Startup Banner
					limit = { has_variable = startup_banner }
					create_artifact = {
						name = artifact_wall_banner_dynasty_name
						description = artifact_wall_banner_dynasty_description
						visuals = banner
						visuals_source = scope:target
						template = dynasty_banner_template
						type = wall_big
						modifier = artifact_placeholder_modifier
						save_scope_as = newly_created_artifact
						wealth = scope:wealth
						quality = scope:quality
						history = {
							type = created
							recipient = scope:owner
							location = scope:owner.capital_province
						}
					}
					remove_variable = startup_banner
				}
				else = { #Created Banner
					create_artifact = {
						name = artifact_wall_banner_dynasty_name
						creator = scope:creator
						description = artifact_wall_banner_dynasty_description
						visuals = banner
						visuals_source = scope:target
						template = dynasty_banner_template
						type = wall_big
						modifier = artifact_placeholder_modifier
						save_scope_as = newly_created_artifact
						wealth = scope:wealth
						quality = scope:quality
					}
				}
				scope:newly_created_artifact = {
					set_variable = { # Tracks house
						name = banner_dynasty
						value = scope:target
					}
					set_variable = { # Tracks first owner
						name = banner_commissioner
						value = scope:owner
					}
					grant_banner_house_claim_effect = yes
					set_artifact_description = artifact_wall_banner_dynasty_description # For commissioner flavor
				}
			}
			else_if = { #House Banner
				limit = { has_variable = banner_from_house }
				if = { #Startup Banner
					limit = { has_variable = startup_banner }
					create_artifact = {
						name = artifact_wall_banner_house_name
						description = artifact_wall_banner_house_description
						visuals = banner
						visuals_source = scope:target
						template = house_banner_template
						type = wall_big
						modifier = artifact_placeholder_modifier
						save_scope_as = newly_created_artifact
						wealth = scope:wealth
						quality = scope:quality
						history = {
							type = created
							recipient = scope:owner
							location = scope:owner.capital_province
						}
					}

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

The first 120 of its 706 lines; the rest is in game/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt from line 1468.

Where it is used

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

Character interactions (1)

  • Bestow Artifact

Events (7)

1 more

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?