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

set_armor_artifact_type_effect

set_armor_artifact_type_effect = { BASE_SCOPE = … NO_TYPE = … }

game/common/scripted_effects/00_ep1_artifact_creation_effects.txt, line 10211 (84 lines). Parameters: $BASE_SCOPE$, $NO_TYPE$.

set_armor_artifact_type_effect is a scripted effect in Crusader Kings III, in the The Royal Court files, written at line 10211 of its file. A call passes 2 parameters: BASE_SCOPE and NO_TYPE. The game's script calls it in 3 places, among them Inspiration Funded (event fund_inspiration.0021), create_artifact_armor_effect (scripted effect) and Armor Inspiration (inspirations). Patch 1.20.1.2, from game/common/scripted_effects/00_ep1_artifact_creation_effects.txt.

The comment above it in the file

If the type of armor hasn't been decided yet we set it here

What it does

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

The script as written (84 lines of game script)
set_armor_artifact_type_effect = {
	save_temporary_scope_value_as = {
		name = allow_no_type_option
		value = $NO_TYPE$
	}
	# Historically many of these types of armor were used in some combination, but to give a clearer portrayal to the player we have to simplify it a bit
	hidden_effect = {
		$BASE_SCOPE$ = {
			#The type has been decided in events, when the character got inspired, or now. Let's save it! (might still leave it up to the sponsor if allow_no_type_option = yes!)
			if = {
				limit = {
					NOT = { exists = var:artifact_armor_type }
				}
				random_list = { #What do they want to forge?
					50 = { #Fairly common everywhere
						artifact_armor_type_mail_modifier = yes
						set_variable = {
							name = artifact_armor_type
							value = flag:armor_type_mail
						}
					}
					1 = { #Expensive
						artifact_armor_type_plate_modifier = yes
						set_variable = {
							name = artifact_armor_type
							value = flag:armor_type_plate
						}
						modifier = {
							factor = 0
							culture = {
								NOT = { has_innovation = innovation_plate_armor }
							}
						}
					}
					50 = { #Fairly common everywhere
						artifact_armor_type_scale_modifier = yes
						set_variable = {
							name = artifact_armor_type
							value = flag:armor_type_scale
						}
					}
					5 = { #Expensive
						artifact_armor_type_lamellar_modifier = yes
						set_variable = {
							name = artifact_armor_type
							value = flag:armor_type_lamellar
						}
					}
					5 = {
						artifact_armor_type_laminar_modifier = yes
						set_variable = {
							name = artifact_armor_type
							value = flag:armor_type_laminar
						}
					}
					0 = {
						artifact_armor_type_brigandine_modifier = yes
						set_variable = {
							name = artifact_armor_type
							value = flag:armor_type_brigandine
						}
					}
					50 = { #They don't care and you can decide!
						trigger = {
							scope:allow_no_type_option = yes
						}
						modifier = {
							add = 30
							has_personality_submissive_trigger = yes
						}
						modifier = {
							add = 9916 # ~1% chance of being predetermined if comissioning from a local artisan.
							has_character_flag = local_artisan
						}
						ai_value_modifier = {
							ai_boldness = -0.25
							ai_energy = -0.25
						}
					}
				}
			}
		}
	}
}

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 set_armor_artifact_type_effect.

Events (1)

Scripted effects (1)

Inspirations (1)

  • Armor Inspiration

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?