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

Scripted effect

disinherit_effect

disinherit_effect = { DISINHERITOR = … }

game/common/scripted_effects/00_interaction_effects.txt, line 1507 (254 lines). Parameters: $DISINHERITOR$.

disinherit_effect is a scripted effect in Crusader Kings III, written at line 1507 of its file. A call passes 1 parameter: DISINHERITOR. The game's script calls it in 8 places, among them Disinherit (interaction), Disinherit a Child (interaction) and A Slice of the Pie (event court.2201). Its body carries 1 text of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/00_interaction_effects.txt.

What it does

  • If

    • NOT = { has_relation_rival = $DISINHERITOR$ }
    • One of these

      • Is at least 8 years old
      • or

        All of these

        • Is under 8 years old
        • $DISINHERITOR$ = { is_adult = no }
    • One of these

      • Ai vengefulness at least 20
      • or

        Ai greed at least 20
    • Does not have the Trait: Craven
    • Does not have the Trait: Forgiving
    • Does not have the Trait: Content
    • Does not have the Trait: Humble

    Then

    Else if

    Then

  • If

    • is_heir_of = $DISINHERITOR$
    • $DISINHERITOR$.primary_heir ?= { … }

    Then

    • If

      • NOT = { has_relation_rival = $DISINHERITOR$.primary_heir }
      • One of these

        • Is at least 8 years old
        • or

          All of these

          • Is under 8 years old
          • $DISINHERITOR$.primary_heir ?= { is_adult = no }
      • One of these

        • Ai vengefulness at least 20
        • or

          Ai greed at least 20
      • Does not have the Trait: Craven
      • Does not have the Trait: Forgiving
      • Does not have the Trait: Content
      • Does not have the Trait: Humble

      Then

      Else if

      Then

    Else if

    • is_primary_heir_of = $DISINHERITOR$
    • $DISINHERITOR$.primary_title = { … }

    Then

    • $DISINHERITOR$.primary_title = { … }
    • If

      • NOT = { has_relation_rival = scope:new_primary_heir }
      • One of these

        • Ai vengefulness at least 20
        • or

          Ai greed at least 20
      • Does not have the Trait: Craven
      • Does not have the Trait: Forgiving
      • Does not have the Trait: Content
      • Does not have the Trait: Humble
      • One of these

        • Is at least 8 years old
        • or

          All of these

          • Is under 8 years old
          • scope:new_primary_heir: Is a child

      Then

      Else if

      Then

  • If

    Then

    • $DISINHERITOR$ = { … }
  • Gains the Trait Disinherited
  • Opinion: Disinherited
  • Their house › All house members of …:
    • Where:
      • NOT = { house = $DISINHERITOR$.house }
    • Opinion: Disinherited a House Member
  • If

    • NOT = { $DISINHERITOR$ = dynasty.dynast }

    Then

    • $DISINHERITOR$.dynasty.dynast = { … }

• 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)
disinherit_effect = {
	save_scope_as = disinherited
	#Rivalry
	if = {
		limit = {
			NOT = {
				has_relation_rival = $DISINHERITOR$
			}
			OR = {
				age >= 8
				AND = {
					age < 8
					$DISINHERITOR$ = {
						is_adult = no
					}
				}
			}
			OR = {
				ai_vengefulness >= low_positive_ai_value
				ai_greed >= low_positive_ai_value
			}
			NOR = {
				has_trait = craven
				has_trait = forgiving
				has_trait = content
				has_trait = humble
			}
		}
		set_relation_rival = {
			target = $DISINHERITOR$
			reason = rival_disinherited
		}
	}
	else_if = {
		limit = {
			NOR = {
				has_trait = forgiving
				has_trait = content
				has_trait = humble
			}
		}
		progress_towards_rival_effect = {
			CHARACTER = $DISINHERITOR$
			REASON = rival_disinherited
			OPINION = 0
		}
	}

	#Gain rivalry with primary heir if one of your other heirs
	if = {
		limit = {
			is_heir_of = $DISINHERITOR$
			$DISINHERITOR$.primary_heir ?= {
				NOR = {
					this = scope:disinherited
					has_any_good_relationship_with_character_trigger = { CHARACTER = scope:disinherited }
					is_allied_to = scope:disinherited
					is_child_of = scope:disinherited
				}
			}
		}
		#Rivalry
		if = {
			limit = {
				NOT = {
					has_relation_rival = $DISINHERITOR$.primary_heir
				}
				OR = {
					age >= 8
					AND = {
						age < 8
						$DISINHERITOR$.primary_heir ?= {
							is_adult = no
						}
					}
				}
				OR = {
					ai_vengefulness >= low_positive_ai_value
					ai_greed >= low_positive_ai_value
				}
				NOR = {
					has_trait = craven
					has_trait = forgiving
					has_trait = content
					has_trait = humble
				}
			}
			set_relation_rival = {
				target = $DISINHERITOR$.primary_heir
				reason = rival_disinherited
			}
		}
		else_if = {
			limit = {
				NOR = {
					has_trait = forgiving
					has_trait = content
					has_trait = humble
				}
			}
			progress_towards_rival_effect = {
				CHARACTER = $DISINHERITOR$.primary_heir
				REASON = rival_disinherited
				OPINION = 0
			}
		}
	}
	#Gain rivalry with new primary heir if your primary heir
	else_if = {
		limit = {
			is_primary_heir_of = $DISINHERITOR$
			$DISINHERITOR$.primary_title = {
				any_title_heir = {
					$DISINHERITOR$.primary_title = {
						place_in_line_of_succession = {
							target = prev
							value = 2
						}
					}
					NOR = {

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

The first 120 of its 254 lines; the rest is in game/common/scripted_effects/00_interaction_effects.txt from line 1507.

Where it is used

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

Character interactions (2)

Events (6)

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