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_resignation_effect

tournament_contest_versus_resignation_effect = { CONTEST = … RESIGNER = … SKILL = … }

game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt, line 2559 (81 lines). Parameters: $CONTEST$, $RESIGNER$, $SKILL$.

tournament_contest_versus_resignation_effect is a scripted effect in Crusader Kings III, in the Tours and Tournaments files, written at line 2559 of its file. A call passes 3 parameters: CONTEST, RESIGNER and SKILL. The game's script calls it in 14 places, among them … …: Contested Clemency (event ep2_tournament_events.0003), … …: Feat of Strength (event ep2_tournament_events.2006) and … …: Gashed (event ep2_tournament_events.4001). Patch 1.20.1.2, from game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt.

The comment above it in the file

Set round participants after resignations

What it does

  • scope:activity › Depending on contest versus progress:
    • When contest versus progress is 0:
      • add_to_guest_subset = { name = semi_finalist target = scope:resign_match phase = tournament_phase_$CONTEST$ }
    • When contest versus progress is 1:
      • add_to_guest_subset = { name = finalist target = scope:resign_match phase = tournament_phase_$CONTEST$ }
    • When contest versus progress is 2:
      • add_to_guest_subset = { name = winner target = scope:resign_match phase = tournament_phase_$CONTEST$ }
      • add_to_guest_subset = { name = second_place target = scope:resign_target phase = tournament_phase_$CONTEST$ }
  • scope:activity:

• 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 (81 lines of game script)
tournament_contest_versus_resignation_effect = {
	$RESIGNER$ = { save_scope_as = resign_target }
	scope:resign_target = {
		save_scope_as = contest_loser
		remove_variable = contest_aptitude
		add_character_flag = {
			flag = resigned_contest_flag
			months = 2
		}
	}
	scope:activity = {
		switch = {
			trigger = var:contest_versus_progress
			0 = {
				scope:resign_target.var:contest_qualified_match_$CONTEST$ = { save_scope_as = resign_match }
				add_to_guest_subset = {
					name = semi_finalist
					target = scope:resign_match
					phase = tournament_phase_$CONTEST$
				}
			}
			1 = {
				scope:resign_target.var:contest_semi_finalist_match_$CONTEST$ = { save_scope_as = resign_match }
				add_to_guest_subset = {
					name = finalist
					target = scope:resign_match
					phase = tournament_phase_$CONTEST$
				}
			}
			2 = {
				scope:resign_target.var:contest_finalist_match_$CONTEST$ = { save_scope_as = resign_match }
				add_to_guest_subset = {
					name = winner
					target = scope:resign_match
					phase = tournament_phase_$CONTEST$
				}
				add_to_guest_subset = {
					name = second_place
					target = scope:resign_target
					phase = tournament_phase_$CONTEST$
				}
			}
		}
	}
	scope:resign_match = {
		save_scope_as = contest_winner
		remove_variable = contest_aptitude
		set_variable = {
			name = contest_aptitude
			value = contest_$SKILL$_aptitude_value
		}
	}
	scope:activity = {
		add_activity_log_entry = {
			key = tournament_resigned_versus_log
			tags = { contestant removal }
			score = 25
			character = scope:contest_loser
			target = scope:contest_winner

			# Effect
			versus_contest_resignation_tooltip_effect = {
				RESIGNER = scope:resign_target
				WINNER = scope:resign_match
			}
		}
		every_attending_character = {
			limit = {
				is_ai = no
				NOR = {
					this = scope:contest_winner
					this = scope:contest_loser
				}
			}
			trigger_event = {
				id = contest_events.0825
				days = 1 
			}
		}
	}
}

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

Events (14)

8 more

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?