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_contest_versus_composition_effect

tournament_contest_versus_composition_effect = { CONTEST = … SKILL = … }

game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt, line 1582 (147 lines). Parameters: $CONTEST$, $SKILL$.

tournament_contest_versus_composition_effect is a scripted effect in Crusader Kings III, in the Tours and Tournaments files, written at line 1582 of its file. A call passes 2 parameters: CONTEST and SKILL. The game's script calls it in 1 place, among them Grand Tournament (activity). Patch 1.20.1.2, from game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt.

The comment above it in the file

Create versus contestant list and log entry  - contest_$CONTEST$_potential

What it does

• 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_contest_versus_composition_effect = {
	scope:activity = {
		set_variable = { name = tournament_commenced }
		if = {
			limit = { exists = var:contest_versus_progress }
			remove_variable = contest_versus_progress
		}
		# Players
		every_guest_subset = {
			name = contestant
			phase = tournament_phase_$CONTEST$
			limit = {
				OR = {
					is_ai = no
					AND = {
						has_court_position = champion_court_position
						liege = { is_ai = no }
					}
				}
				tournament_contest_can_compete_trigger = yes
				exists = var:progress_to_victory
				var:progress_to_victory >= scope:activity.var:progress_to_victory_threshold
			}
			add_tournament_contest_contestant_effect = {
				CONTEST = $CONTEST$
				SKILL = $SKILL$
				PTV = progress_to_victory_active_contestant_value
			}
		}
		# Filter relevant into entrants list
		while = {
			limit = {
				any_guest_subset = {
					name = qualified
					phase = tournament_phase_$CONTEST$
					count < 7
				}
				any_guest_subset_current_phase = {
					name = contestant
					tournament_contest_can_compete_trigger = yes
				}
			}
			ordered_guest_subset = {
				name = contestant
				phase = tournament_phase_$CONTEST$
				limit = { tournament_contest_can_compete_trigger = yes }
				order_by = var:progress_to_victory
				add_tournament_contest_contestant_effect = {
					CONTEST = $CONTEST$
					SKILL = $SKILL$
					PTV = progress_to_victory_active_contestant_value
				}
			}
		}
		# Chance for a mysterious stranger
		hidden_effect = {
			random_list = {
				3 = {
					ordered_guest_subset = {
						name = contestant
						phase = tournament_phase_$CONTEST$
						limit = { tournament_contest_can_compete_trigger = yes }
						order_by = var:progress_to_victory
						add_tournament_contest_contestant_effect = {
							CONTEST = $CONTEST$
							SKILL = $SKILL$
							PTV = progress_to_victory_active_contestant_value
						}
					}
				}
				1 = {
					trigger = {
						NOT = { exists = var:mysterious_stranger_appeared }
						any_attending_character = {
							culture = {
								any_culture_county = {
									exists = faith
									any_direct_de_jure_vassal_title = { exists = this }
								}
							}
						}
						any_attending_character = { count <= 240 }
					}
					tournament_mysterious_stranger_effect = {
						CONTEST = $CONTEST$
						SKILL = $SKILL$
					}
				}
			}
		}
		# Inform liege of prestige from qualified knights
		tournament_liege_qualification_toast_effect = yes
		# Save scopes for tournament tables
		tournament_contest_versus_summary_scope_effect = yes
		# Qualification ping
		every_guest_subset = {
			name = contestant
			phase = tournament_phase_$CONTEST$
			limit = {
				save_temporary_scope_as = new_list_member
				NOT = {
					scope:activity = {
						any_guest_subset_current_phase = {
							name = qualified
							this = scope:new_list_member
						}
					}
				}
			}
			tournament_contest_qualification_failure_effect = yes
		}
		# Add Activity Log entry
		add_activity_log_entry = {
			key = tournament_contest_start_log
			tags = { contest }
			score = 20
			character = scope:host
		}
		switch = {
			trigger = has_current_phase

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

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

Where it is used

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

Activities (1)

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?