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

change_artifact_quality_effect

change_artifact_quality_effect = { AMOUNT = … }

game/common/scripted_effects/00_ep1_artifact_creation_effects.txt, line 736 (88 lines). Parameters: $AMOUNT$.

change_artifact_quality_effect is a scripted effect in Crusader Kings III, in the The Royal Court files, written at line 736 of its file. A call passes 1 parameter: AMOUNT. The game's script calls it in 45 places, among them fund_inspiration.2042 (event), I Could Do Better! (event court_events.3120) and Inspiration: … … in the … (event fund_inspiration.9100). Its body carries 8 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/00_ep1_artifact_creation_effects.txt.

The comment above it in the file

Effect used to influence the artifact's quality

What it does

  • If

    • inspiration = { has_inspiration_type = research_inspiration }

    Then

    • If

      • $AMOUNT$ > 3

      Then

      Else if

      • $AMOUNT$ < -3

      Then

      Else if

      • $AMOUNT$ > 0

      Then

      Else if

      • $AMOUNT$ < 0

      Then

    Otherwise

    • If

      • $AMOUNT$ > 3

      Then

      • The Artifact produced through … … will be of a higher quality

      Else if

      • $AMOUNT$ > 0

      Then

      • The Artifact produced through … … might be of a slightly higher quality

      Else if

      • $AMOUNT$ > -3

      Then

      • The Artifact produced through … … might be of a slightly lower quality

      Else if

      • $AMOUNT$ <= -3

      Then

      • The Artifact produced through … … will be of a lower quality

• 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 (88 lines of game script)
change_artifact_quality_effect = {
	save_scope_as = artifact_quality_scope
	inspiration = { save_scope_as = inspiration }
	if = {
		limit = { NOT = { exists = scope:inspiration_owner } }
		save_scope_as = inspiration_owner
	}
	if = {
		limit = {
			inspiration = { has_inspiration_type = research_inspiration }
		}
		if = {
			limit = {
				$AMOUNT$ > 3
			}
			custom_tooltip = fp3_scholarship_research_success_gain_effect
		}
		else_if = {
			limit = {
				$AMOUNT$ < -3
			}
			custom_tooltip = fp3_scholarship_research_success_loss_effect
		}
		else_if = {
			limit = {
				$AMOUNT$ > 0
			}
			custom_tooltip = fp3_scholarship_research_success_slight_gain_effect
		}
		else_if = {
			limit = {
				$AMOUNT$ < 0
			}
			custom_tooltip = fp3_scholarship_research_success_slight_loss_effect
		}
		scope:inspiration_owner = {
			change_variable = {
				name = research_success_chance
				add = $AMOUNT$
			}
		}
	}
	else = {
		if = {
			limit = {
				$AMOUNT$ > 3
			}
			custom_tooltip = change_artifact_quality_effect_gain
		}
		else_if = {
			limit = {
				$AMOUNT$ > 0
			}
			custom_tooltip = change_artifact_quality_effect_slight_gain
		}
		else_if = {
			limit = {
				$AMOUNT$ > -3
			}
			custom_tooltip = change_artifact_quality_effect_slight_loss
		}
		else_if = {
			limit = {
				$AMOUNT$ <= -3
			}
			custom_tooltip = change_artifact_quality_effect_loss
		}
		hidden_effect = {
			if = {
				limit = {
					NOT = {
						exists = var:artifact_quality
					}
				}
				set_variable = {
					name = artifact_quality
					value = $AMOUNT$
				}
			}
			else = {
				change_variable = {
					name = artifact_quality
					add = $AMOUNT$
				}
			}
		}
	}
}

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

Events (43)

37 more

Scripted effects inside an event file (2)

  • fund_inspiration_skillcheck_duel_effect
  • improve_quality_fund_inspiration_2002_scripted_effect

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?