Scripted effect
progress_towards_rival_effect
progress_towards_rival_effect = { CHARACTER = … OPINION = … REASON = … }game/common/scripted_effects/00_relation_effects.txt, line 207 (225 lines). Parameters: $CHARACTER$, $OPINION$, $REASON$.
progress_towards_rival_effect is a scripted effect in Crusader Kings III, written at line 207 of its file. A call passes 3 parameters: CHARACTER, OPINION and REASON. The game's script calls it in 462 places, among them Restore Temporal Rule (decision), Seize Mandala Temple Complex (decision) and Claim House Bloc Leadership (interaction). Patch 1.20.1.2, from game/common/scripted_effects/00_relation_effects.txt.
The comment above it in the file
Sets potential rival + opinion or upgrades potential rival to full rival
What it does
If
Then
If
NOT = { has_relation_grudge = scope:target_char }
Then
Otherwise
- Opinion: Grudge Exacerbated (-20)
Else if
has_relation_potential_rival = scope:target_charcan_set_relation_rival_trigger = { CHARACTER = scope:target_char }
Then
Otherwise
If
can_set_relation_potential_rival_trigger = { CHARACTER = scope:target_char }
Then
set_relation_potential_rival = scope:target_char
If
NOT = { scope:rival_opinion = 0 }
Then
If
- scope:target_char: Is played by the AI
Then
reverse_add_opinion = { target = scope:target_char modifier = hate_opinion opinion = scope:rival_opinion }
- Opinion: Hatred
• 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)
progress_towards_rival_effect = {
$CHARACTER$ = { save_scope_as = target_char }
# Do we merit an actual rivalry?
if = {
limit = {
# We don't care between low-tier chars.
scope:target_char = { highest_held_title_tier > tier_barony }
# Are they low-tier themselves or more than two tiers below the target?
OR = {
highest_held_title_tier <= tier_barony
highest_held_title_tier <= {
value = scope:target_char.highest_held_title_tier
subtract = 3
}
}
# If they are then they must...
NOR = {
# ... be related to the target...
is_close_or_extended_family_of = scope:target_char
is_consort_of = scope:target_char
# ... or be heir to someone within social spitting distance of the target.
any_heir_title = {
tier >= {
value = scope:target_char.highest_held_title_tier
# So if they're feuding with an emperor, then they must be heir to at least a duchy.
subtract = 2
}
}
}
}
# Now, set grudge if we could already set it.
if = {
limit = {
NOT = { has_relation_grudge = scope:target_char }
}
if = {
limit = {
exists = scope:relationship_reason_involved_character
exists = scope:relationship_reason_province
}
set_relation_grudge = {
reason = $REASON$
target = scope:target_char
involved_character = scope:relationship_reason_involved_character
province = scope:relationship_reason_province
}
}
else_if = {
limit = {
exists = scope:relationship_reason_province
}
set_relation_grudge = {
reason = $REASON$
target = scope:target_char
province = scope:relationship_reason_province
}
}
else_if = {
limit = {
exists = scope:relationship_reason_involved_character
}
set_relation_grudge = {
reason = $REASON$
target = scope:target_char
involved_character = scope:relationship_reason_involved_character
}
}
else = {
set_relation_grudge = {
reason = $REASON$
target = scope:target_char
}
}
}
# Otherwise, increment raw opinion.
else = {
add_opinion = {
target = scope:target_char
modifier = grudge_opinion
opinion = -20
}
}
}
#If potential rival, set rival!
else_if = {
limit = {
has_relation_potential_rival = scope:target_char
can_set_relation_rival_trigger = { CHARACTER = scope:target_char }
}
if = {
limit = {
exists = scope:relationship_reason_involved_character
exists = scope:relationship_reason_province
}
set_relation_rival = {
reason = $REASON$
target = scope:target_char
involved_character = scope:relationship_reason_involved_character
province = scope:relationship_reason_province
}
if = {
limit = {
this.involved_activity ?= {
has_activity_type = activity_playdate
}
}
this.involved_activity ?= {
add_activity_log_entry = {
key = activity_generic_rival_log
tags = { bad }
score = 10
character = prev
target = scope:target_char
}
}
}
}
else_if = {
limit = {
exists = scope:relationship_reason_provinceAs written in game/common/scripted_effects/00_relation_effects.txt.
The first 120 of its 225 lines; the rest is in game/common/scripted_effects/00_relation_effects.txt from line 207.
Where it is used
Every place in common/, events/ and history/ that calls progress_towards_rival_effect — the first 120 of 462.
Decisions (2)
Character interactions (12)
6 more
- harm_clerical_candidacy_interaction
- Imprison
- Join My Side
- Negotiate Release
- Request Retirement
- Retire Governor
Activity pulse actions (3)
- apa_debate_entrant_disagreement
- apa_entrant_disagreement
- apa_student_disagreement
Casus belli (1)
Court position tasks (1)
- Encourage Competition
Task contracts (1)
- Treasure Map
Events (100)
- … …: The Penurious Paladin
ep2_tournament_events.4009 - … Advancements
fp2_struggle.1002 - … Charm
bp1_yearly.8160 - … Clanger
bp1_yearly.8162 - … Cocky Lordling
pilgrimage.2511 - … Favoritism
bp1_yearly.8070
94 more
- … Friend
bp1_yearly.8170 - … Guile
bp1_yearly.8131 - … in Despair
court.0107 - … in Distress
ep3_powerful_families.8010 - … Mistakes
bp1_yearly.8192 - … Objections
fp3_decision.0013 - … Rewards
bp1_yearly.8191 - … Secret
bp1_yearly.8110 - … Spared
raiding.0003 - … Talents
bp1_yearly.8190 - … Ultimatum
bp1_yearly.8180 - … Who Spurns the Fight
jason_locale_events.100 - …: Aggressive Negotiations
coerce_tributary_ongoing.0010 - …: All a Misunderstanding
ep2_tournament_events.5502 - …: Gneiss to Meet You
pet_rock.0105 - …: Mis-loose
ep2_tournament_events.6503 - …: New Experiences
tournament_events.1406 - …: One to Root For
tournament_events.1409 - …: Rebuilding Project
ep2_tournament_events.1002 - …: Sabotage
tournament_events.6051 - …: Sabotage
tournament_events.6053 - …: Small Tales
tournament_events.1400 - …: Success
scheme_critical_moments.8012 - …: Supplies!
ep3_laamp_decision_event.1010 - …: Taking an Opportunity
ep2_tournament_events.5505 - …: Tall Tales
tournament_events.1401 - …: the … Ward
host_dinner_events.3031 - …: The Hapless …
ep2_tournament_events.3503 - …: The Loyal Steed
tour_grounds_events.1010 - …: The Return
pet_animal.3011 - …: Win Some, Lose Some
scheme_critical_moments.1226 - ...And Sinker
bp1_yearly.5711 - ...Comes Around
travel_events.2035 - 'Haunted' Manor: Safe and Sound
travel_events.2022 - A … in Our Bed
bp1_yearly.9019 - A …'s Heart
ep2_wedding.1200 - A Better Guardian
bp1_yearly.4010 - A Brown Naming
bp1_yearly.9046 - A Caring Hand
bp1_yearly.9024 - A Ceremonial …
tgp_ceremonial_liege_events.0020 - A Courtier Between Friends
bp1_yearly.3100 - A Courtly Gift
court.9001 - A Crime of Fashion
ecumenical_council_events_josh.0013 - A Crop of New Ideas
fp2_yearly.3000 - A Familiar Favor
tournament_events.1254 - A Fine Tilt!
bp2_yearly.5108 - A Friend of Wood
bp1_yearly.9001 - A Friend of Wood
bp1_yearly.9002 - A Glorious Guest
tournament_events.1310 - A Glorious Mare
feast_tsagaan_sar_events.0101 - A Green Spot
migration_events.1000 - A Hero Returns?
bp1_yearly.6006 - A Holy Endeavor
pam_religious_artifact_events.0001 - A Language Barrier
bp1_yearly.9023 - A Language in Common
language_events.0002 - A Lecture on Lustfulness
court_yearly.0110 - A Matter of Life and Death
fp1_yearly.0021 - A Mess of Legs
jason_first_race_event.1 - A Night to Forget
relation_upgrade.1001 - A Night to Forget: Interminable Screeching
relation_upgrade.1004 - A Nose for Trouble
ep3_laamp_flavour_ewan.1111 - A Novel Challenge
fp1_yearly.0661 - A Poetic Friendship
bp1_yearly.4020 - A Private Invitation
az_examination.0012 - A Proper Position
fp3_clan.8005 - A Prospective …
fp1_shieldmaiden.0001 - A Question of Precedence
coronation_events.1007 - A Raw Serving
coronation_events.1012 - A Ritual Wash
ep2_wedding.1100 - A Skillful Courtier
pilgrimage.6780 - A Slice of the Pie
court.2201 - A Snapped Twig
travel_events.2010 - A Spectacular Courtier
court.0108 - A Spot of Sin
pam_generic_events.0011 - A Stop on the Way: The Banquet
tour_travel.3111 - A Suspiciously Cultured Crowd
coronation_events_klank.1001 - A Toast To...
feast.7202 - A Tool for the Wielding
bp2_yearly.0661 - A Traveler from Across the Border
pam_theocratic_ruler_events.0002 - A Tumbling …
tour_grounds_events.3006 - A Tumbling …
tour_grounds_events.3007 - A Villainous Villa
ep3_powerful_families.8060 - A War for the …
pam_interactions_events.0070 - A Winged Thief
travel_events.4006 - A Zanj Steps Forth
fp3_story_cycle_zanj_rebellion_events.0006 - ach_coronation.0019
- Allegiance, Burped
jason_locale_events.200 - Alone in the Dark
tour_travel.3020 - An Acidic Accident
fp3_yearly.8021 - An Early Pledge
host_dinner_events.3005 - An Intellectual Debate
bp2_adult_education.1000 - An Odd Request
bp1_yearly.9020 - An Unhealthy Obsession
court_yearly.0104 - An Unwelcome Guest
host_dinner_events.1032
Source: game/common/scripted_effects/00_relation_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.