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

Scripted trigger

useful_courtier_or_guest_claim_trigger

useful_courtier_or_guest_claim_trigger = { RULER = … }

game/common/scripted_triggers/00_courtier_guest_management_triggers.txt, line 591 (50 lines). Parameters: $RULER$.

useful_courtier_or_guest_claim_trigger is a scripted trigger in Crusader Kings III, written at line 591 of its file. A call passes 1 parameter: RULER. The game's script calls it in 11 places, among them Raid for Captives (casus belli), Raid for Captives Contract (casus belli) and Caught in the Act (event intrigue_temptation.3150). Patch 1.20.1.2, from game/common/scripted_triggers/00_courtier_guest_management_triggers.txt.

What it checks

  • courtier_or_guest_claim_trigger = { RULER = $RULER$ }
  • Title tier less than $RULER$.highest held title tier
  • $RULER$ = { is_landed = yes }
  • One of these

    • exists = title_province
    • or

      exists = holder.capital_province
  • If

    • $RULER$ = { highest_held_title_tier >= tier_empire }

    Then

    • If a check the game hides passes: the same again (1 line)
      • Their province:
        • squared_distance = { target = $RULER$.capital_province value <= squared_distance_almost_massive }

      Otherwise

      • Their holder’s capital province:
        • squared_distance = { target = $RULER$.capital_province value <= squared_distance_almost_massive }

    Else if

    • $RULER$ = { highest_held_title_tier = tier_kingdom }

    Then

    • If a check the game hides passes: the same again (1 line)
      • Their province:
        • squared_distance = { target = $RULER$.capital_province value <= squared_distance_huge }

      Otherwise

      • Their holder’s capital province:
        • squared_distance = { target = $RULER$.capital_province value <= squared_distance_huge }

    Else if

    • $RULER$ = { highest_held_title_tier = tier_duchy }

    Then

    • If a check the game hides passes: the same again (1 line)
      • Their province:
        • squared_distance = { target = $RULER$.capital_province value <= squared_distance_large }

      Otherwise

      • Their holder’s capital province:
        • squared_distance = { target = $RULER$.capital_province value <= squared_distance_large }

    Otherwise

    • If a check the game hides passes: the same again (1 line)
      • Their province:
        • squared_distance = { target = $RULER$.capital_province value <= squared_distance_medium }

      Otherwise

      • Their holder’s capital province:
        • squared_distance = { target = $RULER$.capital_province value <= squared_distance_medium }

• 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 (50 lines of game script)
useful_courtier_or_guest_claim_trigger = {
	courtier_or_guest_claim_trigger = { RULER = $RULER$ }
	tier < $RULER$.highest_held_title_tier
	$RULER$ = { is_landed = yes }
	OR = { #For distance check
		exists = title_province
		exists = holder.capital_province
	}
	#The higher tier the ruler has, the longer distance is acceptable
	#We prefer to measure against the title's province, but if there is none, check its holder
	trigger_if = {
		limit = { $RULER$ = { highest_held_title_tier >= tier_empire } }
		trigger_if = {
			limit = { exists = title_province }
			title_province = { squared_distance = { target = $RULER$.capital_province value <= squared_distance_almost_massive } }
		}
		trigger_else = {
			holder.capital_province = { squared_distance = { target = $RULER$.capital_province value <= squared_distance_almost_massive } }
		}
	}
	trigger_else_if = {
		limit = { $RULER$ = { highest_held_title_tier = tier_kingdom } }
		trigger_if = {
			limit = { exists = title_province }
			title_province = { squared_distance = { target = $RULER$.capital_province value <= squared_distance_huge } }
		}
		trigger_else = {
			holder.capital_province = { squared_distance = { target = $RULER$.capital_province value <= squared_distance_huge } }
		}
	}
	trigger_else_if = {
		limit = { $RULER$ = { highest_held_title_tier = tier_duchy } }
		trigger_if = {
			limit = { exists = title_province }
			title_province = { squared_distance = { target = $RULER$.capital_province value <= squared_distance_large } }
		}
		trigger_else = {
			holder.capital_province = { squared_distance = { target = $RULER$.capital_province value <= squared_distance_large } }
		}
	}
	trigger_else = {
		trigger_if = {
			limit = { exists = title_province }
			title_province = { squared_distance = { target = $RULER$.capital_province value <= squared_distance_medium } }
		}
		trigger_else = {
			holder.capital_province = { squared_distance = { target = $RULER$.capital_province value <= squared_distance_medium } }
		}
	}
}

As written in game/common/scripted_triggers/00_courtier_guest_management_triggers.txt.

Where it is used

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

Events (4)

Scripted triggers inside an event file (1)

  • intrigue_temptation_3120_temptable_guests

Courtier guest management (2)

  • courtier_management
  • guest_management

Source: game/common/scripted_triggers/00_courtier_guest_management_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?