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

Scripted effect

family_purge_execute_opinion_effect

family_purge_execute_opinion_effect = { EXECUTIONER = … VICTIM = … }

game/common/scripted_effects/00_prison_effects.txt, line 2921 (101 lines). Parameters: $EXECUTIONER$, $VICTIM$.

family_purge_execute_opinion_effect is a scripted effect in Crusader Kings III, written at line 2921 of its file. A call passes 2 parameters: EXECUTIONER and VICTIM. The game's script calls it in 1 place, among them family_purge_execute_prisoner_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/00_prison_effects.txt.

The comment above it in the file

Because the entire family is being collectively purged, the original effect will try to add opinion modifiers to people who may be killed in the course of the parent effect, and so we need a separate instance with an is_alive sanity check to avoid errors

What it does

Every line of it is script with no tooltip text: the script is below.

The script as written (101 lines of game script)
family_purge_execute_opinion_effect = {
	$VICTIM$ = {
		# Victim's family & spouse hates executioner
		every_close_family_member = {
			limit = { NOT = { this = $EXECUTIONER$ } }
			add_to_temporary_list = victim_family_list
		}
		every_spouse = {
			limit = {
				NOR = {
					this = $EXECUTIONER$
					is_in_list = victim_family_list
				}
			}
			add_to_temporary_list = victim_family_list
		}
		every_in_list = {
			list = victim_family_list
			custom = all_close_family_and_spouses
			limit = {
				is_alive = yes
			}
			if = {
				limit = {
					$EXECUTIONER$ = {
						has_execute_reason = $VICTIM$
					}
				}
				add_opinion = {
					target = $EXECUTIONER$
					modifier = executed_close_family
				}
			}
			else = {
				add_opinion = {
					target = $EXECUTIONER$
					modifier = executed_close_family_crime
				}
			}
		}
		# Victim's dynasty hates executioner
		if = {
			limit = {
				exists = dynasty
				exists = $EXECUTIONER$.dynasty
				NOT = { dynasty = $EXECUTIONER$.dynasty }
				NOT = {
					$EXECUTIONER$ = {
						has_execute_reason = $VICTIM$
					}
				}
			}
			dynasty = {
				every_dynasty_member = {
					limit = {
						NOR = {
							this = $VICTIM$
							is_in_list = victim_family_list
						}
						is_alive = yes
					}
					custom = all_dynasty_members
					add_to_temporary_list = victim_dynasty_list
					add_opinion = {
						target = $EXECUTIONER$
						modifier = executed_dynasty_member
					}
				}
			}
		}
		
		# Victim's friends and lovers
		every_relation = {
			type = friend
			type = lover
			limit = {
				NOT = {
					this = $EXECUTIONER$ 
				}
				is_alive = yes
			}
			custom = all_friends_and_lovers
			add_opinion = {
				target = $EXECUTIONER$
				modifier = executed_close_relation_opinion
			}
		}

		# House Relation
		house ?= {
			change_house_relation_effect = {
				HOUSE = $EXECUTIONER$.house
				VALUE = house_relation_damage_medium_value
				REASON = execution
				CHAR = $EXECUTIONER$
				TARGET_CHAR = $VICTIM$
				TITLE = scope:dummy_gender
			}
		}
	}
}

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

Where it is used

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

Source: game/common/scripted_effects/00_prison_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?