Scripted effect · Friends and Foes files
worsen_relationship_effect
worsen_relationship_effect = { REASON = … TARGET = … }game/common/scripted_effects/01_dlc_bp1_filippa_scripted_effects.txt, line 3 (182 lines). Parameters: $REASON$, $TARGET$.
worsen_relationship_effect is a scripted effect in Crusader Kings III, in the Friends and Foes files, written at line 3 of its file. A call passes 2 parameters: REASON and TARGET. The game's script calls it in 14 places, among them 'Haunted' Manor: Safe and Sound (event travel_events.2022), Catching a Break (event travel_events.2040) and Danger: Danger: Life or Death, Stranded (event travel_events.2111). Patch 1.20.1.2, from game/common/scripted_effects/01_dlc_bp1_filippa_scripted_effects.txt.
The comment above it in the file
Does not add opinion if either person is NOT AI
What it does
If
a check the game hides
Then
If
has_relation_best_friend = $TARGET$
Then
remove_relation_best_friend = $TARGET$- If played by the AI: Opinion: Unfriendly (-15)
If
$TARGET$ = { is_ai = yes }
Then
reverse_add_opinion = { target = $TARGET$ modifier = unfriendly_opinion opinion = -15 }
Else if
has_relation_friend = $TARGET$
Then
remove_relation_friend = $TARGET$- If played by the AI: Opinion: Unfriendly (-15)
If
$TARGET$ = { is_ai = yes }
Then
reverse_add_opinion = { target = $TARGET$ modifier = unfriendly_opinion opinion = -15 }
Else if
has_relation_potential_friend = $TARGET$NOT = { has_relation_potential_rival = $TARGET$ }
Then
remove_relation_potential_friend = $TARGET$set_relation_potential_rival = $TARGET$- If played by the AI: Opinion: Unfriendly (-15)
If
$TARGET$ = { is_ai = yes }
Then
reverse_add_opinion = { target = $TARGET$ modifier = unfriendly_opinion opinion = -15 }
Else if
has_relation_potential_rival = $TARGET$
Then
- Gains a Rival
- If played by the AI: Opinion: Unfriendly (-30)
If
$TARGET$ = { is_ai = yes }
Then
reverse_add_opinion = { target = $TARGET$ modifier = unfriendly_opinion opinion = -30 }
Else if
has_relation_rival = $TARGET$can_set_relation_nemesis_trigger = { CHARACTER = $TARGET$ }
Then
- Gains a Nemesis
- If played by the AI: Opinion: Hatred (-50)
If
$TARGET$ = { is_ai = yes }
Then
reverse_add_opinion = { target = $TARGET$ modifier = hate_opinion opinion = -50 }
Otherwise
set_relation_potential_rival = $TARGET$- If played by the AI: Opinion: Unfriendly (-15)
If
$TARGET$ = { is_ai = yes }
Then
reverse_add_opinion = { target = $TARGET$ modifier = unfriendly_opinion opinion = -15 }
• 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)
worsen_relationship_effect = {
if = {
limit = {
this != $TARGET$
}
#Best Friend -> Friend
if = {
limit = {
has_relation_best_friend = $TARGET$
}
remove_relation_best_friend = $TARGET$
hidden_effect = {
set_relation_friend = {
target = $TARGET$
reason = $REASON$
}
}
if = {
limit = {
is_ai = yes
}
add_opinion = {
target = $TARGET$
modifier = unfriendly_opinion
opinion = -15
}
}
if = {
limit = {
$TARGET$ = { is_ai = yes }
}
reverse_add_opinion = {
target = $TARGET$
modifier = unfriendly_opinion
opinion = -15
}
}
}
#Friend -> Potential Friend
else_if = {
limit = {
has_relation_friend = $TARGET$
}
remove_relation_friend = $TARGET$
hidden_effect = { set_relation_potential_friend = $TARGET$ }
if = {
limit = {
is_ai = yes
}
add_opinion = {
target = $TARGET$
modifier = unfriendly_opinion
opinion = -15
}
}
if = {
limit = {
$TARGET$ = { is_ai = yes }
}
reverse_add_opinion = {
target = $TARGET$
modifier = unfriendly_opinion
opinion = -15
}
}
}
#Potential Friend -> Potential Rival
else_if = {
limit = {
has_relation_potential_friend = $TARGET$
NOT = { has_relation_potential_rival = $TARGET$ }
}
remove_relation_potential_friend = $TARGET$
set_relation_potential_rival = $TARGET$
if = {
limit = {
is_ai = yes
}
add_opinion = {
target = $TARGET$
modifier = unfriendly_opinion
opinion = -15
}
}
if = {
limit = {
$TARGET$ = { is_ai = yes }
}
reverse_add_opinion = {
target = $TARGET$
modifier = unfriendly_opinion
opinion = -15
}
}
}
#Potential Rival -> Rival
else_if = {
limit = {
has_relation_potential_rival = $TARGET$
}
set_relation_rival = {
target = $TARGET$
reason = $REASON$
}
if = {
limit = {
is_ai = yes
}
add_opinion = {
target = $TARGET$
modifier = unfriendly_opinion
opinion = -30
}
}
if = {
limit = {
$TARGET$ = { is_ai = yes }
}
reverse_add_opinion = {
target = $TARGET$As written in game/common/scripted_effects/01_dlc_bp1_filippa_scripted_effects.txt.
The first 120 of its 182 lines; the rest is in game/common/scripted_effects/01_dlc_bp1_filippa_scripted_effects.txt from line 3.
Where it is used
Every place in common/, events/ and history/ that calls worsen_relationship_effect.
Events (10)
- 'Haunted' Manor: Safe and Sound
travel_events.2022 - Catching a Break
travel_events.2040 - Danger: Danger: Life or Death, Stranded
travel_events.2111 - Danger: Life or Death, Betrayed
travel_events.2102 - Danger: Life or Death, Stranded
travel_events.2110 - Domestic Disputes
bp1_yearly.2040
4 more
- Time to Go Home Soon?
pilgrimage.6520 - Tip the Host
travel_events.2026 - travel_events.2103
- Weird Whispers
travel_events.3150
Scripted effects inside an event file (4)
- bp1_yearly_2030_relationship_effect
- bp2_yearly_1055_economy_effect
- elephant_trauma_effect
- tour_general_liege_kills_pets_effect
Source: game/common/scripted_effects/01_dlc_bp1_filippa_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.