Scripted effect
successful_befriend_critical_change_effect
successful_befriend_critical_change_effect = { CHARACTER = … REASON = … }game/common/scripted_effects/00_scheme_scripted_effects.txt, line 14454 (46 lines). Parameters: $CHARACTER$, $REASON$.
successful_befriend_critical_change_effect is a scripted effect in Crusader Kings III, written at line 14454 of its file. A call passes 2 parameters: CHARACTER and REASON. The game's script calls it in 7 places, among them … Friendship (event befriend_outcome.0002), Befriend: An Enjoyable Evening (event befriend_outcome.6001) and Befriend: An Evening's Company (event befriend_outcome.6003). Patch 1.20.1.2, from game/common/scripted_effects/00_scheme_scripted_effects.txt.
What it does
$CHARACTER$ = { … }If
- Has a Adventurer Government
- Has the Friendly Counsel Perk
$CHARACTER$ = { is_ruler = yes }
Then
add_contact = $CHARACTER$
• 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 (46 lines of game script)
successful_befriend_critical_change_effect = {
$CHARACTER$ = {
hidden_effect = {
if = { #Remove potential rival relation if you have it
limit = {
has_relation_potential_rival = root
}
remove_relation_potential_rival = root
}
}
if = { #Set friend relation
limit = {
NOT = { has_relation_friend = root }
}
if = {
limit = {
exists = scope:relationship_reason_location
}
set_relation_friend = { reason = $REASON$ target = root province = scope:relationship_reason_location }
}
else = {
set_relation_friend = { reason = $REASON$ target = root }
}
}
else_if = { #Fallback
limit = {
has_relation_friend = root
}
$CHARACTER$ = {
add_opinion = {
modifier = friendliness_opinion
target = root
opinion = 40
}
}
}
}
if = {
limit = {
has_government = landless_adventurer_government
has_perk = friendly_counsel_perk
$CHARACTER$ = { is_ruler = yes }
}
add_contact = $CHARACTER$
}
}As written in game/common/scripted_effects/00_scheme_scripted_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls successful_befriend_critical_change_effect.
Events (7)
- … Friendship
befriend_outcome.0002 - Befriend: An Enjoyable Evening
befriend_outcome.6001 - Befriend: An Evening's Company
befriend_outcome.6003 - Befriend: Kindred Minds
befriend_outcome.6004 - Befriend: Mutual Understanding
befriend_outcome.2007 - Befriend: The Dance
befriend_outcome.6002
1 more
- Befriend: The Estate
befriend_outcome.6301
Source: game/common/scripted_effects/00_scheme_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.