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_bow_effect

create_artifact_bow_effect = { CREATOR = … OWNER = … SET_BOW_TYPE = … }

game/common/scripted_effects/00_ep1_artifact_creation_effects.txt, line 13567 (375 lines). Parameters: $CREATOR$, $OWNER$, $SET_BOW_TYPE$.

create_artifact_bow_effect is a scripted effect in Crusader Kings III, in the The Royal Court files, written at line 13567 of its file. A call passes 3 parameters: CREATOR, OWNER and SET_BOW_TYPE. The game's script calls it in 6 places, among them Bowyer: Ballistic Gifts (event ep2_locale_events.4011), Forgotten (event mpo_nerge.1040) and Inspiration Realized (event fund_inspiration.1091). Patch 1.20.1.2, from game/common/scripted_effects/00_ep1_artifact_creation_effects.txt.

What it does

  • If

    • scope:bowyer = scope:dummy_gender

    Then

    • clear_saved_scope = bowyer
    • clear_saved_scope = dummy_gender
  • save_adventurer_location_effect = yes
  • hidden_effect_new_object = { … }

• 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_artifact_bow_effect = {
	# Get the character the artifact is being made for.
	# If scope:adventurer exists this will result in the history entry reading that the weapon was discovered instead of made.
	$OWNER$ = { save_scope_as = owner }
	$CREATOR$ = { save_scope_as = bowyer }
	save_temporary_scope_value_as = {
		name = bow_type_is_set
		value = $SET_BOW_TYPE$
	}
	if = { #Any existing dummy character gets turned into the bowyer
		limit = {
			exists = scope:dummy_gender
			scope:bowyer = scope:dummy_gender
		}
		clear_saved_scope = bowyer
		clear_saved_scope = dummy_gender
	}
	save_adventurer_location_effect = yes
	hidden_effect_new_object = {
		if = {
			limit = { scope:bow_type_is_set = flag:no }
			if = {
				limit = { exists = scope:bowyer }
				set_bow_artifact_type_effect = {
					BASE_SCOPE = scope:bowyer
					NO_TYPE = no
				}
				scope:bowyer = {
					var:artifact_bow_type = { save_scope_as = bow_type }
					remove_variable = artifact_bow_type
				}
			}
			else = {
				set_bow_artifact_type_effect = {
					BASE_SCOPE = scope:owner
					NO_TYPE = no
				}
				scope:owner = {
					var:artifact_bow_type = { save_scope_as = bow_type }
					remove_variable = artifact_bow_type
				}
			}
		}
		else = {
			scope:bow_type_is_set = { save_scope_as = bow_type }
		}
		# Get artifact quality and wealth.
		get_artifact_quality_effect = yes
		get_artifact_wealth_effect = yes

		# Get the type of weapon to forge. Defaults to bow if an invalid type is provided.
		if = { # Longbow
			limit = { scope:bow_type = flag:artifact_bow_type_longbow }
			if = {
				limit = { exists = scope:adventurer }
				create_artifact = {
					name = artifact_longbow_name
					description = placeholder # Will be re-generated once decorations are added in the post-creation effects.
					visuals = longbow
					type = longbow
					modifier = artifact_prowess_1_modifier
					wealth = scope:wealth
					quality = scope:quality
					save_scope_as = newly_created_artifact
					history = {
						location = scope:location
						actor = scope:adventurer
						recipient = root
						type = discovered
					}
				}
			}
			else_if = {
				limit = {
					scope:host ?= $OWNER$
					scope:activity ?= { has_activity_type = activity_tournament }
				}
				tournament_contest_bow_prize_effect = { TYPE = longbow }
			}
			else_if = {
				limit = { exists = scope:bowyer }
				create_artifact = {
					name = artifact_longbow_name
					creator = scope:bowyer
					description = placeholder # Will be re-generated once decorations are added in the post-creation effects.
					visuals = longbow
					type = longbow
					modifier = artifact_prowess_1_modifier
					wealth = scope:wealth
					quality = scope:quality
					save_scope_as = newly_created_artifact
				}
			}
			else = {
				create_artifact = {
					name = artifact_longbow_name
					description = placeholder # Will be re-generated once decorations are added in the post-creation effects.
					visuals = longbow
					type = longbow
					modifier = artifact_prowess_1_modifier
					wealth = scope:wealth
					quality = scope:quality
					save_scope_as = newly_created_artifact
					history = { type = created_before_history }
				}
			}
			scope:newly_created_artifact = {
				get_artifact_feature_references_effect = yes
				set_artifact_description = artifact_longbow_description
			}
		}
		else_if = { # Composite
			limit = { scope:bow_type = flag:artifact_bow_type_composite }
			if = {
				limit = { exists = scope:adventurer }
				create_artifact = {
					name = artifact_composite_name
					description = placeholder # Will be re-generated once decorations are added in the post-creation effects.
					visuals = composite
					type = composite

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

The first 120 of its 375 lines; the rest is in game/common/scripted_effects/00_ep1_artifact_creation_effects.txt from line 13567.

Where it is used

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

Character interactions (1)

  • Bestow Artifact

Events (4)

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