CK3 DatabaseCrusader Kings III · 1.20.1.2 “Crozier” · unofficial
Silk & Silverout Tue, Nov 17What's free, what needs the DLC, price →

Scripted effect · Tours and Tournaments files

tournament_liege_qualification_toast_effect

tournament_liege_qualification_toast_effect = yes

game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt, line 7649 (158 lines). No parameters.

tournament_liege_qualification_toast_effect is a scripted effect in Crusader Kings III, in the Tours and Tournaments files, written at line 7649 of its file. It takes no parameters: tournament_liege_qualification_toast_effect = yes. The game's script calls it in 4 places, among them tournament_contest_race_composition_effect (scripted effect), tournament_contest_team_composition_effect (scripted effect) and tournament_contest_turn_composition_effect (scripted effect). Its body carries 4 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt.

What it does

  • Every in list:
    • If

      a check the game hides

      Then

      • Your champion, …, and … of your Knights entered … … contest
      • add_prestige = { … }

      Else if

      a check the game hides

      Then

      • Your champion, …, entered … … contest
      • Gain +75 Prestige

      Else if

      a check the game hides

      Then

      • … and … of your other Knights entered … … contest
      • add_prestige = { … }

      Else if

      a check the game hides

      Then

      • Your Knight, …, entered … … contest
      • add_prestige = { … }

• 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)
tournament_liege_qualification_toast_effect = {
	every_in_list = {
		list = qualification_liege_list
		save_scope_as = qualification_liege
		# Save number below 2 for toast
		set_variable = {
			name = qualified_knights_count
			value = {
				value = 0
				scope:qualification_liege = {
					every_in_list = {
						variable = qualified_knights
						limit = {
							NOR = {
								has_court_position = champion_court_position
								scope:qualification_liege.court_position:champion_court_position ?= this
							}
						}
						add = 1
					}
				}
			}
			days = 1
		}
		# If champion qualified
		if = {
			limit = {
				any_in_list = {
					variable = qualified_knights
					OR = {
						has_court_position = champion_court_position
						scope:qualification_liege.court_position:champion_court_position ?= this
					}
				}
			}
			random_in_list = {
				variable = qualified_knights
				limit = {
					OR = {
						has_court_position = champion_court_position
						scope:qualification_liege.court_position:champion_court_position ?= this
					}
				}
				save_scope_as = contest_champion
			}
		}
		if = {
			limit = {
				any_in_list = {
					variable = qualified_knights
					NOT = { scope:contest_champion ?= this  }
				}
			}
			random_in_list = {
				variable = qualified_knights
				limit = {
					NOT = { scope:contest_champion ?= this  }
					is_of_major_interest_trigger = { CHARACTER = scope:qualification_liege }
				}
				alternative_limit = {
					NOT = { scope:contest_champion ?= this  }
					is_of_minor_interest_trigger = { CHARACTER = scope:qualification_liege }
				}
				alternative_limit = {
					NOT = { scope:contest_champion ?= this  }
				}
				save_scope_as = knight_1
			}
		}
		if = {
			limit = {
				NOT = { exists = scope:contest_champion }
				any_in_list = {
					variable = qualified_knights
					NOT = { scope:knight_1 ?= this }
				}
			}
			random_in_list = {
				variable = qualified_knights
				limit = {
					NOT = { scope:knight_1 ?= this }
					is_of_major_interest_trigger = { CHARACTER = scope:qualification_liege }
				}
				alternative_limit = {
					NOT = { scope:knight_1 ?= this }
					is_of_minor_interest_trigger = { CHARACTER = scope:qualification_liege }
				}
				alternative_limit = {
					NOT = { scope:knight_1 ?= this }
				}
				save_scope_as = knight_2
			}
		}
		if = { # Champion + knights
			limit = {
				exists = scope:contest_champion
				exists = scope:knight_1
			}
			send_interface_toast = {
				type = toast_tournament_qualification_champion
				title = tournament_champion_qualify_multi_title
				left_icon = scope:contest_champion
				right_icon = scope:knight_1
				custom_tooltip = tournament_champion_qualify_multi_desc
				add_prestige = {
					value = { # Knights
						value = miniscule_prestige_gain
						multiply = var:qualified_knights_count
					}
					add = minor_prestige_gain # Champion
				}
			}
		}
		else_if = { # Champion
			limit = { exists = scope:contest_champion }
			send_interface_toast = {
				type = toast_tournament_qualification_champion
				title = tournament_champion_qualify_title
				left_icon = scope:contest_champion
				right_icon = scope:knight_1

As written in game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt.

The first 120 of its 158 lines; the rest is in game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt from line 7649.

Where it is used

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

Source: game/common/scripted_effects/04_dlc_ep2_tournament_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?