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_pressed_flower_effect

create_artifact_pressed_flower_effect = { OWNER = … }

game/common/scripted_effects/00_ep1_artifact_creation_effects.txt, line 12185 (107 lines). Parameters: $OWNER$.

create_artifact_pressed_flower_effect is a scripted effect in Crusader Kings III, in the The Royal Court files, written at line 12185 of its file. A call passes 1 parameter: OWNER. The game's script calls it in 7 places, among them A Beautiful Specimen (event hunt.5003), A Poetic Life: An Ephemeral … (event tgp_japan_yearly_events.1263) and Flower Power (event legend_spread_events.5225). Patch 1.20.1.2, from game/common/scripted_effects/00_ep1_artifact_creation_effects.txt.

What it does

  • scope:owner:

• 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 (107 lines of game script)
create_artifact_pressed_flower_effect = {
	# Get the character the artifact is being made for.
	$OWNER$ = { save_scope_as = owner }
	scope:owner = { save_scope_as = creator }
	hidden_effect = {
		# Get artifact quality and wealth
		get_artifact_quality_effect = yes
		get_artifact_wealth_effect = yes

		#Get flower
		get_animal_hunt_location_effect = yes #not hunting, but need the location in a similar way
	}

	# Create the artifact
	scope:owner = {
		if = {
			limit = {
				exists = scope:flower_picker
			}
			hidden_effect = {
				get_pressed_flower_species_effect = { LOCATION = scope:flower_picker.location }
			}
			# Create the artifact
			create_artifact = {
				name = artifact_pressed_flower_name
				description = placeholder #properly set later
				creator = scope:flower_picker
				visuals = flowers
				type = miscellaneous
				modifier = artifact_placeholder_modifier
				wealth = scope:wealth
				quality = scope:quality
				save_scope_as = newly_created_artifact
			}
		}
		else = {
			hidden_effect = {
				get_pressed_flower_species_effect = { LOCATION = scope:owner.location }
			}
			# Create the artifact
			create_artifact = {
				name = artifact_pressed_flower_name
				description = placeholder #properly set later
				creator = scope:owner
				visuals = flowers
				type = miscellaneous
				modifier = artifact_placeholder_modifier
				wealth = scope:wealth
				quality = scope:quality
				save_scope_as = newly_created_artifact
			}
		}
	}




	hidden_effect_new_object = {
		scope:newly_created_artifact = {
			#Loc
			get_artifact_feature_references_effect = yes
			set_artifact_description = artifact_pressed_flower_description
			remove_artifact_modifier = artifact_placeholder_modifier
			add_scaled_artifact_modifier_minor_prestige_effect = yes

			# If the average wealth/quality of the artifact is above 75, add 2nd tier fertility bonus

			if = {
				limit = {
					rarity = illustrious
				}
				add_artifact_modifier = artifact_fertility_gain_4_modifier
			}
			else_if = {
				limit = {
					rarity = famed
				}
				add_artifact_modifier = artifact_fertility_gain_3_modifier
			}
			else_if = {
				limit = {
					rarity = masterwork
				}
				add_artifact_modifier = artifact_fertility_gain_2_modifier
			}
			else_if = {
				limit = {
					rarity = common
				}
				add_artifact_modifier = artifact_fertility_gain_1_modifier
			}

			set_variable = {
				name = quality
				value = scope:quality
			}
			set_variable = {
				name = wealth
				value = scope:wealth
			}
			set_variable = {
				name = flower_species
				value = scope:flower_species
			}
		}
	}
}

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

Where it is used

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

Events (6)

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?