Scripted effect
end_court_scheme_effect
end_court_scheme_effect = { OUTCOME = … REASON = … }game/common/scripted_effects/00_scheme_scripted_effects.txt, line 16041 (165 lines). Parameters: $OUTCOME$, $REASON$.
end_court_scheme_effect is a scripted effect in Crusader Kings III, written at line 16041 of its file. A call passes 2 parameters: OUTCOME and REASON. The game's script calls it in 9 places, among them Intruder (event court_outcome.1105), Romance: Declaration Of Love (event court_ongoing.0503) and Romance: Intruder (event court_outcome.1101). Its body carries 1 text of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/00_scheme_scripted_effects.txt.
What it does
scope:owner:If
scope:court_outcome = flag:success_soulmate
Then
- scope:target: Gains a Soulmate
If
None of these
has_sexuality = asexualscope:target:has_sexuality = asexual
Then
had_sex_with_effect = { CHARACTER = scope:target PREGNANCY_CHANCE = pregnancy_chance }
reverse_add_opinion = { target = scope:target modifier = romance_scheme_courtship_opinion }
Else if
scope:court_outcome = flag:success_kiss
Then
- … and I share a kiss
reverse_add_opinion = { target = scope:target modifier = romance_scheme_courtship_opinion }
Else if
scope:court_outcome = flag:failure_soft
Then
scope:target:seduction_cooldown_for_character_effect = { CHARACTER = scope:owner }
Else if
scope:court_outcome = flag:failure_hard
Then
scope:target:seduction_block_character_effect = { CHARACTER = scope:owner }
If
One of these
scope:court_outcome = flag:success_soulmateor
scope:court_outcome = flag:success_kiss
Then
If
One of these
scope:court_outcome = flag:success_soulmateor
scope:court_outcome = flag:success_kiss
is_spouse_of = scope:target- Their rite: The rite has Romancing your spouse is significantly easier and bestows a major Fertility bonus
Then
- Gains the modifier “Rekindled Passion” for 5 years
- Fertility +200%
scope:target:- Gains the modifier “Rekindled Passion” for 5 years
- Fertility +200%
- Gains the modifier “Rekindled Passion” for 5 years
scope:scheme:end_scheme = yes
• 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)
end_court_scheme_effect = {
save_temporary_scope_value_as = {
name = court_outcome
value = flag:$OUTCOME$
}
scope:owner = {
# SUCCESS: SOULMATES
# (This is the only one which target also needs to see, run it in owner scope in show_as_tooltip first and then execute in target's scope)
if = {
limit = { scope:court_outcome = flag:success_soulmate }
scope:target = { set_relation_soulmate = { reason = $REASON$ target = prev } }
if = {
limit = {
NOR = {
has_sexuality = asexual
scope:target = { has_sexuality = asexual }
}
}
had_sex_with_effect = { #Run this in target scope because owner has own tooltip
CHARACTER = scope:target
PREGNANCY_CHANCE = pregnancy_chance
}
}
reverse_add_opinion = {
target = scope:target
modifier = romance_scheme_courtship_opinion #Blocks courtship
}
#Maybe break of existing lover relationships
hidden_effect = {
scope:target = {
if = {
limit = {
has_trait = lustful
is_ai = yes
accepts_adultery_without_penalty_trigger = no
any_relation = {
type = lover
this != scope:owner
}
}
every_relation = {
type = lover
random = {
chance = 90
opinion_modifier = { #Less likely if they really like the lover
who = scope:target
opinion_target = this
multiplier = -0.5
min = -20
}
modifier = { #More likely if they have more lovers
add = 10
scope:target = {
any_relation = {
type = lover
count >= 2
}
}
}
save_temporary_scope_as = lover
lover_breakup_effect = {
BREAKER = scope:target
LOVER = scope:lover
}
}
}
}
}
}
}
# SUCCESS: KISS
else_if = {
limit = { scope:court_outcome = flag:success_kiss }
custom_tooltip = court_outcome.kiss.tt
reverse_add_opinion = {
target = scope:target
modifier = romance_scheme_courtship_opinion #Blocks courtship
}
}
# FAILURE: SOFT
else_if = {
limit = { scope:court_outcome = flag:failure_soft }
#Shared effect with Seduce because failure in one scheme should block the other
scope:target = { seduction_cooldown_for_character_effect = { CHARACTER = scope:owner } }
}
# FAILURE: HARD
else_if = {
limit = { scope:court_outcome = flag:failure_hard }
#Shared effect with Seduce because failure in one scheme should block the other
scope:target = { seduction_block_character_effect = { CHARACTER = scope:owner } }
}
if = {
limit = {
OR = {
scope:court_outcome = flag:success_soulmate
scope:court_outcome = flag:success_kiss
}
}
polyamory_personal_tenet_scheme_reward_effect = yes
}
if = {
limit = {
OR = {
scope:court_outcome = flag:success_soulmate
scope:court_outcome = flag:success_kiss
}
is_spouse_of = scope:target
rite = { rite_has_parameter = tenet_be_fruitful_and_multiply_easy_spouse_romance }
}
add_character_modifier = {
modifier = tenet_be_fruitful_and_multiply_spouse_romance_fertility
years = 5
}
scope:target = {
add_character_modifier = {As written in game/common/scripted_effects/00_scheme_scripted_effects.txt.
The first 120 of its 165 lines; the rest is in game/common/scripted_effects/00_scheme_scripted_effects.txt from line 16041.
Where it is used
Every place in common/, events/ and history/ that calls end_court_scheme_effect.
Events (9)
- Intruder
court_outcome.1105 - Romance: Declaration Of Love
court_ongoing.0503 - Romance: Intruder
court_outcome.1101 - Romance: Intruder
court_outcome.1102 - Romance: Intruder
court_outcome.1103 - Romance: The Wild Hunt
court_outcome.1001
3 more
- Romance: The Wild Hunt
court_outcome.1002 - Romance: The Wild Hunt
court_outcome.1005 - The Wild Hunt
court_outcome.1003
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.