Scripted effect · Tours and Tournaments files
activity_tournament_change_contestant_score_effect
activity_tournament_change_contestant_score_effect = { SCORE = … }game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt, line 13 (137 lines). Parameters: $SCORE$.
activity_tournament_change_contestant_score_effect is a scripted effect in Crusader Kings III, in the Tours and Tournaments files, written at line 13 of its file. A call passes 1 parameter: SCORE. The game's script calls it in 150 places, among them tournament_archery_arrow_split (activity pulse), tournament_guest_ptv_small (activity pulse) and tournament_horse_stumbles (activity pulse). Its body carries 2 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.
The comment above it in the file
Change score of a character for the current contest Used to increase/decrease chance of winning the contest based on event outcomes
What it does
If
is_participant_in_activity = scope:score_changee.involved_activity- scope:score_changee.involved_activity › Any guest subset current phase:
name = contestant
scope:score_changee:
Then
If
has_activity_state = active
Then
If
scope:score_changee.involved_activity:
Then
scope:score_changee.involved_activity:
If
has_activity_state = passive- Is played by a person
Then
If
scope:old_ptv >= scope:score_changee.involved_activity.var:progress_to_victory_threshold- Progress to victory less than scope:score changee.involved activity.var:progress to victory threshold
Then
- You may not qualify for the … contest
Else if
scope:old_ptv < scope:score_changee.involved_activity.var:progress_to_victory_threshold- Progress to victory at least scope:score changee.involved activity.var:progress to victory threshold
Then
- You are on course to qualify for the … contest
• 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)
activity_tournament_change_contestant_score_effect = {
save_scope_as = score_changee
if = {
limit = {
exists = scope:score_changee.involved_activity
is_participant_in_activity = scope:score_changee.involved_activity
scope:score_changee.involved_activity = {
any_guest_subset_current_phase = {
name = contestant
this = scope:score_changee
}
}
scope:score_changee = { activity_is_competing_trigger = yes }
}
if = {
limit = { exists = var:progress_to_victory }
save_scope_value_as = {
name = old_ptv
value = var:progress_to_victory
}
}
# Set score tracker
if = {
limit = {
NOT = { exists = var:progress_to_victory_score }
}
set_variable = {
name = progress_to_victory_score
value = {
value = contest_progress_$SCORE$_value
if = {
limit = {
scope:score_changee = {
is_ai = yes
NOR = {
liege.court_position:champion_court_position ?= this
involved_activity.special_guest:special_guest_champion ?= this
}
}
}
multiply = 0.5
}
}
}
}
# Change existing score tracker
else = {
change_variable = {
name = progress_to_victory_score
add = {
value = contest_progress_$SCORE$_value
if = {
limit = {
scope:score_changee = {
is_ai = yes
NOR = {
liege.court_position:champion_court_position ?= this
involved_activity.special_guest:special_guest_champion ?= this
}
}
}
multiply = 0.5
}
}
}
}
# Tooltip
custom_tooltip = contestant_score_$SCORE$_tt
# Update current PtV
if = {
limit = { has_activity_state = active }
if = {
limit = {
scope:score_changee.involved_activity = { activity_tournament_team_contest_trigger = yes }
}
scope:score_changee.involved_activity = { tournament_contest_update_team_ptv_effect = yes }
}
else = {
set_variable = {
name = progress_to_victory
value = progress_to_victory_active_contestant_value
}
}
}
else = {
set_variable = {
name = progress_to_victory
value = progress_to_victory_passive_contestant_value
}
}
# Toasts for qualification
if = {
limit = {
has_activity_state = passive
is_ai = no
}
if = { # No Longer Qualify
limit = {
exists = scope:old_ptv
scope:old_ptv >= scope:score_changee.involved_activity.var:progress_to_victory_threshold
var:progress_to_victory < scope:score_changee.involved_activity.var:progress_to_victory_threshold
}
send_interface_toast = {
title = tournament_unqualified_ptv_toast
left_icon = scope:score_changee
custom_tooltip = tournament_unqualified_ptv_tt
}
}
else_if = { # Now Qualify
limit = {
exists = scope:old_ptv
scope:old_ptv < scope:score_changee.involved_activity.var:progress_to_victory_threshold
var:progress_to_victory >= scope:score_changee.involved_activity.var:progress_to_victory_threshold
}
send_interface_toast = {
title = tournament_qualified_ptv_toast
left_icon = scope:score_changee
custom_tooltip = tournament_qualified_ptv_tt
}
}As written in game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt.
The first 120 of its 137 lines; the rest is in game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt from line 13.
Where it is used
Every place in common/, events/ and history/ that calls activity_tournament_change_contestant_score_effect — the first 120 of 150.
Activity pulse actions (7)
- tournament_archery_arrow_split
- tournament_guest_ptv_small
- tournament_horse_stumbles
- tournament_joust_lance_broken
- tournament_joust_unhorsed
- tournament_recital_successful_verse
1 more
- tournament_win_memory
Events (113)
- … …: A Beefy Bout
ep2_tournament_events.2004 - … …: A Handy Option
ep2_tournament_events.0011 - … …: A Hobbled Combatant
ep2_tournament_events.0001 - … …: An Honorable …?
ep2_tournament_events.4005 - … …: An Opening
ep2_tournament_events.0006 - … …: Any Edge
ep2_tournament_events.0021
107 more
- … …: Butting In
ep2_tournament_events.2002 - … …: By Any Means
ep2_tournament_events.0005 - … …: Calculated Gambles
ep2_tournament_events.0010 - … …: Death From Above
ep2_tournament_events.0004 - … …: Dirty Tricks
ep2_tournament_events.2001 - … …: Doom and Groom
ep2_tournament_events.4007 - … …: Fighting Patter
ep2_tournament_events.0020 - … …: Grappling with Lust
ep2_tournament_events.2005 - … …: Mercy Me
ep2_tournament_events.4006 - … …: Outside Interference
ep2_tournament_events.2003 - … …: Penny For Your...
ep2_tournament_events.0007 - … …: Playing to the Crowd
ep2_tournament_events.0002 - … …: Taking Up the Mantle
ep2_tournament_events.0012 - … …: The Mighty Log
ep2_tournament_events.4003 - … …: The Penurious Paladin
ep2_tournament_events.4009 - … …: Trouble Afoot
ep2_tournament_events.4004 - … …: Unhorsed
ep2_tournament_events.4002 - … …: Who Are Ya?
ep2_tournament_events.4008 - …: A Famous Adversary
ep2_tournament_events.1011 - …: A Mysterious …
ep2_tournament_events.1015 - …: All a Misunderstanding
ep2_tournament_events.5502 - …: Arm and a Leg
ep2_tournament_events.6502 - …: Arrow Dynamics
ep2_tournament_events.1502 - …: Be A …!
tournament_events.7000 - …: Bored at the Butts
ep2_tournament_events.1503 - …: Burning Buildings
ep2_tournament_events.1001 - …: Cornered
ep2_tournament_events.1017 - …: Fallen Blade
ep2_tournament_events.1003 - …: Fame and Fortune
ep2_tournament_events.6501 - …: From The Trees
ep2_tournament_events.1012 - …: Honor Defended
tournament_events.1407 - …: Mis-loose
ep2_tournament_events.6503 - …: Quiet Please!
ep2_tournament_events.1501 - …: Sabotage
tournament_events.6051 - …: Stage Fright
ep2_tournament_events.5503 - …: Stolen Moment
ep2_tournament_events.5501 - …: Sweet Refuge
ep2_tournament_events.1007 - …: Taking an Opportunity
ep2_tournament_events.5505 - …: The Hapless …
ep2_tournament_events.3503 - …: The High Ground
ep2_tournament_events.1013 - …: The Lost …
ep2_tournament_events.1004 - …: The Weather's Will
ep2_tournament_events.5504 - …: To the Victor
tournament_events.1240 - …: Under … Wing
tournament_events.1300 - A … Pride
tournament_events.1140 - A Fine Favor
tournament_events.8000 - A Glorious Guest
tournament_events.1310 - A Liegeless …
tournament_events.9001 - A Mess of Legs
jason_first_race_event.1 - A New Hire
ep2_locale_events.5030 - A Strong… Show
tournament_events.9002 - A Turn at Speed
jason_race_events.2 - Armorer: Fame or Effectiveness?
ep2_locale_events.2001 - Armorer: Gleaming Panoply
ep2_locale_events.2050 - Armorer: Tattered Straps
ep2_locale_events.2002 - Audience Participation
ep2_tournament_events.2007 - Bad Air
ep2_locale_events.3010 - Bad Air: Miasma
ep2_locale_events.3011 - Befuddling Blows
ep2_tournament_events.2507 - Bowyer: Bowed But Not...
ep2_locale_events.4001 - Bowyer: Brace Yourself
ep2_locale_events.4050 - Choices, Choices...
ep2_tournament_events.2501 - Construction Catastrophe
ep2_tournament_events.3502 - Disjointed
ep2_tournament_events.2502 - ep2_locale_events.0001
- ep2_locale_events.0002
- ep2_locale_events.0003
- Farrier: A Little Prick
ep2_locale_events.3500 - Feathered Entertainment
tournament_events.9004 - For Dust You Are
ep2_locale_events.1530 - For Family?
tournament_events.1331 - Foreign Flair
tournament_events.1312 - Give and Take
tournament_events.1332 - In Times Past
ep2_locale_events.1070 - Keeping the Peace
tournament_events.1260 - Knightly Fanfare
tournament_events.9007 - Merry-Making
ep2_locale_events.5530 - Muddled Up
tournament_events.1311 - Old as Stone
ep2_locale_events.5500 - Passage of Arms
tournament_events.1101 - Rags to Maile
tournament_events.1230 - Religious Reproach
tournament_events.1200 - Roisterous Revelry
tournament_events.9005 - Sweet Words
ep2_locale_events.3020 - Tailor: A New Purchase
ep2_locale_events.2560 - Tailor: A Pope-priate Clothing
ep2_locale_events.2501 - Tailor: Fighting Robes
ep2_locale_events.2502 - Tavern: A Betting …?
ep2_locale_events.1050 - Tavern: Another Round
ep2_locale_events.1000 - Tavern: Dare to Drink?
ep2_locale_events.1002 - Temple: … Favors
ep2_locale_events.1500 - Tent Camp: Stealing a Moment
ep2_locale_events.3001 - The Call of the Steel
ep2_locale_events.5000 - The Sights of …
tournament_events.9000 - The Weakest Wink
ep2_tournament_events.2503 - Tilting for Attention
ep2_tournament_events.3501 - Tournament Tales
tournament_events.9006 - Tourney Grounds: Almost There
ep2_locale_events.5010 - Tourney Grounds: Impressed?
ep2_locale_events.5020 - Two Moons
ep2_locale_events.1520 - Unseemly Conduct
ep2_tournament_events.2504 - Village: Back Alley
ep2_locale_events.5510 - Village: Pulling on the Threads
ep2_locale_events.5520 - Weaponsmith: Chip Off The Old Sword
ep2_locale_events.4500 - Weaponsmith: Sanguine Steel
ep2_locale_events.4521 - Weaponsmith: The Wisdom of the Hammer
ep2_locale_events.4530 - Weaponsmith: Worthy Ichor
ep2_locale_events.4520
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.