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

Scripted trigger · All Under Heaven files

house_relation_is_valid_to_start_trigger

house_relation_is_valid_to_start_trigger = { HOUSE = … OTHER_HOUSE = … }

game/common/scripted_triggers/10_tgp_house_relation_triggers.txt, line 3 (64 lines). Parameters: $HOUSE$, $OTHER_HOUSE$.

house_relation_is_valid_to_start_trigger is a scripted trigger in Crusader Kings III, in the All Under Heaven files, written at line 3 of its file. A call passes 2 parameters: HOUSE and OTHER_HOUSE. The game's script calls it in 4 places, among them house_feud_start_effect (scripted effect), tgp_set_historical_house_relation_effect (scripted effect) and Relation (house relation types). Patch 1.20.1.2, from game/common/scripted_triggers/10_tgp_house_relation_triggers.txt.

What it checks

  • $HOUSE$ ?= { save_temporary_scope_as = house_1_temp }
  • $OTHER_HOUSE$ ?= { save_temporary_scope_as = house_2_temp }
  • If

    a check the game hides

    Then

    • scope:house_1_temp:
      • If

        • NOT = { has_house_relation_with = scope:house_2_temp }

        Then

        • Their house head:
        • scope:house_2_temp.house_head:
        • If

          • None of these

            • Any player:
              • house ?= scope:house_1_temp
            • Any player:
              • house ?= scope:house_2_temp

          Then

          • House member (at least 5):
          • scope:house_2_temp: House member (at least 5):
      • One of these

        • house_dynasty = scope:house_2_temp.house_dynasty
        • or

          If

          Then

          • Their house head:
            • tier_difference = { target = scope:house_2_temp.house_head value < 2 }
            • tier_difference = { target = scope:house_2_temp.house_head value > -2 }

          Otherwise

          • house_head.top_liege = scope:house_2_temp.house_head.top_liege
      • Their house head:
        • in_diplomatic_range = scope:house_2_temp.house_head

    Otherwise

    • Never

• 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 (64 lines of game script)
house_relation_is_valid_to_start_trigger = {
	$HOUSE$ ?= { save_temporary_scope_as = house_1_temp }
	$OTHER_HOUSE$ ?= { save_temporary_scope_as = house_2_temp }
	trigger_if = {
		limit = {
			exists = scope:house_1_temp
			exists = scope:house_2_temp
		}
		scope:house_1_temp = {
			NOT = { this = scope:house_2_temp }
			# IF HOUSE RELATION DOES NOT ALREADY EXIST, ENSURE IT IS WORTHWHILE TO START
			trigger_if = {
				limit = {
					NOT = { has_house_relation_with = scope:house_2_temp }
				}
				# MINIMUM START CHECKS
				house_head ?= { is_playable_character = yes }
				scope:house_2_temp.house_head ?= { is_playable_character = yes }
				# EXTRA CHECKS FOR AI
				trigger_if = {
					limit = {
						NOR = {
							any_player = { house ?= scope:house_1_temp }
							any_player = { house ?= scope:house_2_temp }
						}
					}
					# DON'T CREATE LOTS OF RELATIONS FOR TINY AI HOUSES
					any_house_member = { count >= 5 }
					scope:house_2_temp = {
						any_house_member = { count >= 5 }
					}
				}
			}
			# GENERAL CHECKS
			OR = {
				# HOUSES IN SAME DYNASTY CAN ALWAYS MAKE RELATIONS
				house_dynasty = scope:house_2_temp.house_dynasty
				# TIER CHECKS IF BOTH INDEPENDENT
				trigger_if = {
					limit = {
						house_head = { is_independent_ruler = yes }
						scope:house_2_temp.house_head = { is_independent_ruler = yes }
					}
					house_head = {
						tier_difference = {
							target = scope:house_2_temp.house_head
							value < 2
						}
						tier_difference = {
							target = scope:house_2_temp.house_head
							value > -2
						}
					}
				}
				# SAME REALM CHECK IF NOT BOTH INDEPENDENT (SHARED TOP LIEGE)
				trigger_else = { house_head.top_liege = scope:house_2_temp.house_head.top_liege }
			}
			# DIPLO RANGE IS ALWAYS REQUIRED
			house_head = { in_diplomatic_range = scope:house_2_temp.house_head }
		}
	}
	# SCOPES ARE INVALID
	trigger_else = { always = no }
}

As written in game/common/scripted_triggers/10_tgp_house_relation_triggers.txt.

Where it is used

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

Character interactions (1)

  • Impact House Relation

House relation types (1)

  • Relation

Source: game/common/scripted_triggers/10_tgp_house_relation_triggers.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?