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

Scripted effect

guardian_remove_opinion_effect

guardian_remove_opinion_effect = { GUARDIAN = … WARD = … WARD_LIEGE = … }

game/common/scripted_effects/00_education_effects.txt, line 1777 (154 lines). Parameters: $GUARDIAN$, $WARD$, $WARD_LIEGE$.

guardian_remove_opinion_effect is a scripted effect in Crusader Kings III, written at line 1777 of its file. A call passes 3 parameters: GUARDIAN, WARD and WARD_LIEGE. The game's script calls it in 7 places, among them Imprison (interaction), Remove Guardian (interaction) and on_death_relation_guardian (on action). Patch 1.20.1.2, from game/common/scripted_effects/00_education_effects.txt.

The comment above it in the file

To run every time a guardian/ward relationship is ended (should be in all decisions/event options etc. where the relation is removed, but is also run through the on_remove_relation_guardian on_action just in case)

What it does

  • If

    a check the game hides

    Then

    • $GUARDIAN$ = { … }
    • $WARD$ = { … }

• 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)
guardian_remove_opinion_effect = {
	if = {
		limit = {
			exists = $GUARDIAN$
			exists = $WARD$
			exists = $WARD_LIEGE$
		}
		$GUARDIAN$ = {
			if = {
				limit = {
					has_opinion_modifier = {
						modifier = guardian_of_heir_opinion
						target = $WARD_LIEGE$
					}
				}
				remove_opinion = {
					modifier = guardian_of_heir_opinion
					target = $WARD_LIEGE$
				}
			}
			else_if = {
				limit = {
					has_opinion_modifier = {
						modifier = guardian_of_relative_opinion
						target = $WARD_LIEGE$
					}
					NOT = { # They're not still guardian of a relative
						any_relation = {
							type = ward
							is_close_family_of = $WARD_LIEGE$
						}
					}
				}
				remove_opinion = {
					modifier = guardian_of_relative_opinion
					target = $WARD_LIEGE$
				}
			}
			if = {
				limit = {
					has_opinion_modifier = {
						modifier = guardian_of_heir_parochial_opinion
						target = $WARD_LIEGE$
					}
				}
				remove_opinion = {
					modifier = guardian_of_heir_parochial_opinion
					target = $WARD_LIEGE$
				}
			}
			else_if = {
				limit = {
					has_opinion_modifier = {
						modifier = guardian_of_relative_parochial_opinion
						target = $WARD_LIEGE$
					}
					NOT = { # They're not still guardian of a relative
						any_relation = {
							type = ward
							is_close_family_of = $WARD_LIEGE$
						}
					}
				}
				remove_opinion = {
					modifier = guardian_of_relative_parochial_opinion
					target = $WARD_LIEGE$
				}
			}
		}
		$WARD$ = {
			if = {
				limit = {
					exists = var:guardian_liege
					var:guardian_liege = { is_alive = yes }
				}
				var:guardian_liege = {
					if = {
						limit = {
							has_opinion_modifier = {
								modifier = guardian_of_heir_opinion
								target = $WARD_LIEGE$
							}
						}
						remove_opinion = {
							modifier = guardian_of_heir_opinion
							target = $WARD_LIEGE$
						}
					}
					else_if = {
						limit = {
							has_opinion_modifier = {
								modifier = guardian_of_relative_opinion
								target = $WARD_LIEGE$
							}
							NOT = { # They're not still guardian of a relative
								any_relation = {
									type = ward
									is_close_family_of = $WARD_LIEGE$
								}
							}
						}
						remove_opinion = {
							modifier = guardian_of_relative_opinion
							target = $WARD_LIEGE$
						}
					}
					if = {
						limit = {
							has_opinion_modifier = {
								modifier = guardian_of_heir_parochial_opinion
								target = $WARD_LIEGE$
							}
						}
						remove_opinion = {
							modifier = guardian_of_heir_parochial_opinion
							target = $WARD_LIEGE$
						}
					}
					else_if = {
						limit = {

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

The first 120 of its 154 lines; the rest is in game/common/scripted_effects/00_education_effects.txt from line 1777.

Where it is used

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

Character interactions (2)

On actions (the game's own hooks) (4)

  • on_death_relation_guardian
  • on_death_relation_ward
  • on_remove_relation_guardian
  • on_remove_relation_ward

Scripted effects (1)

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