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_winner_effect

tournament_contest_versus_winner_effect = { CONTEST = … }

game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt, line 3019 (44 lines). Parameters: $CONTEST$.

tournament_contest_versus_winner_effect is a scripted effect in Crusader Kings III, in the Tours and Tournaments files, written at line 3019 of its file. A call passes 1 parameter: CONTEST. 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

Save winner and second place scopes, award prizes, and fire ping events

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 (44 lines of game script)
tournament_contest_versus_winner_effect = {
	# Achievement.
	little_william_marshal_achievement_contest_end_effect = yes
	scope:activity = {
		save_scope_value_as = { name = contest_complete value = flag:$CONTEST$ }
		# Save winner and add to overall winner tracker
		random_guest_subset = {
			name = winner
			phase = tournament_phase_$CONTEST$
			save_scope_as = contest_winner
			tournament_complete_win_contest_intent_effect = yes
			# Achievement.
			little_william_marshal_achievement_contest_end_winner_effect = yes
		}
		# Save other finalist as second place
		random_guest_subset = {
			name = second_place
			phase = tournament_phase_$CONTEST$
			save_scope_as = second_place
		}
		if = {
			limit = {
				NOT = { exists = scope:second_place }
			}
			scope:contest_winner.var:next_versus_match ?= { save_scope_as = second_place }
		}
		# Save all non-winner entrants so we can easily check if someone lost
		every_guest_subset = {
			name = qualified
			phase = tournament_phase_$CONTEST$
			limit = {
				NOT = { scope:contest_winner ?= this }
			}
			add_to_list = contest_losers
		}
		# Rewards
		tournament_contest_rewards_effect = { CONTEST = $CONTEST$ }
		# Fire host's prize award event
		activity_host = { trigger_event = contest_events.0805 }
		# Clear redundant variables
		remove_variable = contest_versus_progress
		every_attending_character = { tournament_clear_contest_variables_effect = yes }
	}
}

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

Where it is used

Every place in common/, events/ and history/ that calls tournament_contest_versus_winner_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?