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

Scripted trigger · All Under Heaven files

house_relation_heads_in_range_trigger

house_relation_heads_in_range_trigger = { HOUSE = … OTHER_HOUSE = … }

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

house_relation_heads_in_range_trigger is a scripted trigger in Crusader Kings III, in the All Under Heaven files, written at line 28 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_valid_feud_target_trigger (scripted trigger), house_relation_is_valid_to_keep_trigger (scripted trigger) and house_relation_is_valid_to_start_trigger (scripted trigger). Patch 1.21.0, from game/common/scripted_triggers/10_tgp_house_relation_triggers.txt.

The comment above it in the file

Landless merchants have no de facto counties, so in_diplomatic_range does not work for them
We use the company range check like other merchant interactions, plus overlapping markets

What it checks

  • $HOUSE$ ?= { save_temporary_scope_as = range_house_1_temp }
  • $OTHER_HOUSE$ ?= { save_temporary_scope_as = range_house_2_temp }
  • If

    a check the game hides

    Then

    • One of these

      • scope:range_house_1_temp.house_head:
        • in_diplomatic_range = scope:range_house_2_temp.house_head
      • or

        All of these

      • or

        All of these

      • or

        house_relation_merchants_share_market_trigger = { HOUSE = scope:range_house_1_temp OTHER_HOUSE = scope:range_house_2_temp }

    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 (32 lines of game script)
house_relation_heads_in_range_trigger = {
	$HOUSE$ ?= { save_temporary_scope_as = range_house_1_temp }
	$OTHER_HOUSE$ ?= { save_temporary_scope_as = range_house_2_temp }
	trigger_if = {
		limit = {
			exists = scope:range_house_1_temp.house_head
			exists = scope:range_house_2_temp.house_head
		}
		OR = {
			scope:range_house_1_temp.house_head = { in_diplomatic_range = scope:range_house_2_temp.house_head }
			AND = {
				scope:range_house_1_temp.house_head = { government_has_flag = government_is_merchant }
				gdp_merchant_diplo_range_trigger = {
					MERCHANT = scope:range_house_1_temp.house_head
					TARGET = scope:range_house_2_temp.house_head
				}
			}
			AND = {
				scope:range_house_2_temp.house_head = { government_has_flag = government_is_merchant }
				gdp_merchant_diplo_range_trigger = {
					MERCHANT = scope:range_house_2_temp.house_head
					TARGET = scope:range_house_1_temp.house_head
				}
			}
			house_relation_merchants_share_market_trigger = {
				HOUSE = scope:range_house_1_temp
				OTHER_HOUSE = scope:range_house_2_temp
			}
		}
	}
	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_heads_in_range_trigger.

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.21.0.

Spotted a mistake on this page, or have an idea for the site?