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

Scripted effect · All Under Heaven files

promote_appointment_house_relation_effect

promote_appointment_house_relation_effect = { CANDIDATE = … INVESTOR = … TITLE = … }

game/common/scripted_effects/10_dlc_tgp_house_relation_scripted_effects.txt, line 318 (97 lines). Parameters: $CANDIDATE$, $INVESTOR$, $TITLE$.

promote_appointment_house_relation_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 318 of its file. A call passes 3 parameters: CANDIDATE, INVESTOR and TITLE. The game's script calls it in 2 places, among them Influence Candidacy (interaction) and Influence Candidacy (interaction). Patch 1.20.1.2, from game/common/scripted_effects/10_dlc_tgp_house_relation_scripted_effects.txt.

The comment above it in the file

Promoting someone not of the same noble family as the current heir (with active investment)

What it does

  • If

    • scope:investor_temp.house.house_head › Any held title: The … is a Noble Family Title
    • scope:title_temp:
      • current_heir ?= { … }
      • place_in_line_of_succession = { target = scope:candidate_temp value <= 5 }

    Then

  • If

    • scope:investor_temp.house:
      • NOT = { scope:candidate_temp.house ?= this }
      • Their house head:
        • top_liege = scope:candidate_temp.house.house_head.top_liege
        • Any held title: The … is a Noble Family Title
    • scope:candidate_temp:
      • top_liege = scope:candidate_temp.house.house_head.top_liege
      • Their house’s house head:
        • Any held title: The … is a Noble Family Title
        • top_liege = scope:investor_temp.top_liege
      • has_succession_appointment_investors = scope:title_temp
    • scope:title_temp:
      • NOT = { current_heir.house ?= scope:candidate_temp.house }
      • place_in_line_of_succession = { target = scope:candidate_temp value <= 3 }

    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 (97 lines of game script)
promote_appointment_house_relation_effect = {
	$TITLE$ ?= { save_temporary_scope_as = title_temp }
	$CANDIDATE$ ?= { save_temporary_scope_as = candidate_temp }
	$INVESTOR$ ?= { save_temporary_scope_as = investor_temp }
	if = { # DAMAGE WITH CURRENT HEIR
		limit = {
			scope:investor_temp.house.house_head = {
				# Investor belongs to a noble family
				any_held_title = { is_noble_family_title = yes }
			}
			scope:title_temp = {
				current_heir ?= {
					# Heir has been invested in
					has_succession_appointment_investors = $TITLE$
					# Candidate is not the heir
					NOT = { scope:candidate_temp ?= this }
					house ?= {
						NOR = { # HEIR IS NOT FROM CANDIDATE OR INVESTOR HOUSES
							scope:candidate_temp.house ?= this
							scope:investor_temp.house ?= this
						}
						house_head ?= {
							# HEIR HOUSE HEAD IN SAME REALM AS INVESTOR
							scope:investor_temp.top_liege ?= top_liege
							# HEIR HOUSE IS A NOBLE FAMILY
							any_held_title = { is_noble_family_title = yes }
							# SAME REALM AS HEIR
							top_liege = scope:title_temp.current_heir.top_liege
							# SAME REALM AS INVESTOR
							top_liege = scope:investor_temp.top_liege
						}
					}
				}
				# CANDIDATE IS ACTUALLY MUSCLING IN
				place_in_line_of_succession = {
					target = scope:candidate_temp
					value <= 5
				}
			}
		}
		scope:investor_temp.house = {
			change_house_relation_effect = {
				HOUSE = scope:title_temp.current_heir.house
				VALUE = house_relation_damage_minor_value
				REASON = appointment_competition
				CHAR = scope:investor_temp
				TARGET_CHAR = scope:title_temp.current_heir
				TITLE = scope:title_temp
			}
		}
	}
	if = { # IMPROVE WITH CANDIDATE
		limit = {
			scope:investor_temp.house ?= {	
				# Investor is of a different house than the candidate
				NOT = { scope:candidate_temp.house ?= this }
				house_head ?= {
					# Investor in same realm as candidate
					top_liege = scope:candidate_temp.house.house_head.top_liege
					# Investor belongs to a noble family
					any_held_title = { is_noble_family_title = yes }
				}
			}
			scope:candidate_temp ?= {
				# Candidate in same realm as their house head
				top_liege = scope:candidate_temp.house.house_head.top_liege
				# Candidate belongs to a noble family
				house.house_head ?= {
					any_held_title = { is_noble_family_title = yes }
					# SAME REALM
					top_liege = scope:investor_temp.top_liege
				}
				# Candidate has been invested in
				has_succession_appointment_investors = scope:title_temp
			}
			scope:title_temp = {
				# Not promoting another member of the house that is already winning the succession
				NOT = { current_heir.house ?= scope:candidate_temp.house }
				# Candidate has a good chance
				place_in_line_of_succession = {
					target = scope:candidate_temp
					value <= 3
				}
			}
		}
		scope:investor_temp.house = {
			change_house_relation_effect = {
				HOUSE = scope:candidate_temp.house
				VALUE = house_relation_improve_minor_value
				REASON = appointment_support
				CHAR = scope:investor_temp
				TARGET_CHAR = scope:candidate_temp
				TITLE = scope:title_temp
			}
		}
	}
}

As written in game/common/scripted_effects/10_dlc_tgp_house_relation_scripted_effects.txt.

Where it is used

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

Character interactions (2)

Source: game/common/scripted_effects/10_dlc_tgp_house_relation_scripted_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?