CK3 DatabaseCrusader Kings III · 1.20.1.2 “Crozier” · unofficial
Silk & Silverout Tue, Nov 17What's free, what needs the DLC, price →

Scripted effect

divorce_effect

divorce_effect = { DIVORCEE = … DIVORCER = … }

game/common/scripted_effects/00_marriage_interaction_effects.txt, line 1112 (59 lines). Parameters: $DIVORCEE$, $DIVORCER$.

divorce_effect is a scripted effect in Crusader Kings III, written at line 1112 of its file. A call passes 2 parameters: DIVORCEE and DIVORCER. The game's script calls it in 17 places, among them Demand Divorce (interaction), Divorce (interaction) and Enforce Divorce (interaction). Patch 1.20.1.2, from game/common/scripted_effects/00_marriage_interaction_effects.txt.

What it does

  • $DIVORCER$ = { … }
  • If

    • $DIVORCER$ = { … }

    Then

    • $DIVORCEE$ = { … }
  • If

    • $DIVORCER$ = { has_relation_lover = $DIVORCEE$ }

    Then

• 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 (59 lines of game script)
divorce_effect = {
	$DIVORCER$ = {
		if = {
			limit = {
				any_spouse = {
					this = $DIVORCEE$
				}
			}
			divorce = $DIVORCEE$
		}
		
		if = {
			limit = {
				NOT = { amicable_infertile_divorce_trigger = { DIVORCEE = $DIVORCEE$ } }
			}
			reverse_add_opinion = {
				modifier = divorced_me_opinion
				target = $DIVORCEE$
			}
		}
	}
	# Opinion hit
	if = {
		limit = {
			$DIVORCER$ = {
				NOT = { amicable_infertile_divorce_trigger = { DIVORCEE = $DIVORCEE$ } }
			}
		}
		$DIVORCEE$ = {
			every_close_or_extended_family_member = {
				limit = { NOT = { this = $DIVORCER$ } } # don't hate yourself just because of some incest
				custom = all_family_members
				add_opinion = {
					modifier = divorced_close_kin
					target = $DIVORCER$
				}
			}
		}
	}

	hidden_effect = {
		if = {
			limit = {
				$DIVORCER$ = {
					any_relation = { type = wedding_very_bad_fertility this = $DIVORCEE$ }
				}
			}
			$DIVORCER$ = { remove_relation_wedding_very_bad_fertility = $DIVORCEE$ }
		}
	}
	
	if = {
		limit = { $DIVORCER$ = { has_relation_lover = $DIVORCEE$ } }
		lover_breakup_effect = {
			BREAKER = $DIVORCER$
			LOVER = $DIVORCEE$
		}			
	}
}

As written in game/common/scripted_effects/00_marriage_interaction_effects.txt.

Where it is used

Every place in common/, events/ and history/ that calls divorce_effect.

Scripted effects inside an event file (2)

  • agree_to_courtier_becoming_nithing_effect
  • fp1_trade_events_1171_marry_partner_child_effect

Source: game/common/scripted_effects/00_marriage_interaction_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.

Spotted a mistake on this page?