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

Scripted trigger

can_recruit_character_to_court_trigger

can_recruit_character_to_court_trigger = { RECRUITEE = … RECRUITER = … }

game/common/scripted_triggers/00_courtier_guest_management_triggers.txt, line 335 (241 lines). Parameters: $RECRUITEE$, $RECRUITER$.

can_recruit_character_to_court_trigger is a scripted trigger in Crusader Kings III, written at line 335 of its file. A call passes 2 parameters: RECRUITEE and RECRUITER. The game's script calls it in 10 places, among them Adopt into House (interaction), Invite to Court (interaction) and Sponsor Inspiration (interaction). Its body carries 5 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_triggers/00_courtier_guest_management_triggers.txt.

The comment above it in the file

This is a localized trigger for checking that a character do not have a spouse that's employed or has some other circumstance blocking them from being recruited to a court

What it checks

  • $RECRUITER$ = { save_temporary_scope_as = recruiter }
  • $RECRUITEE$ = { save_temporary_scope_as = recruitee }
  • scope:recruitee:
    • bp2_valid_for_standard_interactions_trigger = yes
    • If a child: Is an unrelated child
    • None of these

      • Is imprisoned
      • Is Leasing holdings from their Liege
      • is_diarch = yes
      • If

        • Their host: Is played by a person
        • NOT = { is_player_heir_of = scope:recruiter }

        Then

        • is_player_heir_of = host
      • If

        • Their host: Is played by the AI
        • NOT = { is_player_heir_of = scope:recruiter }

        Then

        • is_primary_heir_of = host
      • If

        a check the game hides

        Then

        • is_consort_of = host
      • If

        a check the game hides

        Then

      • If

        a check the game hides

        Then

        • One of these

          • is_councillor_of = scope:recruitee.host
          • or

            is_knight_of = scope:recruitee.host
          • or

            Any relation:
            • One of these

              • this = scope:recruitee.host
              • or

                is_close_family_of = scope:recruitee.host
          • or

            Any relation:
            • One of these

              • this = scope:recruitee.host
              • or

                is_close_family_of = scope:recruitee.host
          • or

            Any relation:
            • One of these

              • this = scope:recruitee.host
              • or

                is_close_family_of = scope:recruitee.host
          • or

            Any relation:
            • One of these

              • this = scope:recruitee.host
              • or

                is_close_family_of = scope:recruitee.host
          • or

            Any court position employer:
            • this = scope:recruitee.host
      • If

        Then

      • They is in a Matrilineal marriage and their partner is employed by their liege
      • They is in a Patrilineal marriage and their partner is employed by their liege
      • You recently tried to Imprison They
      • They is a merchant traveling on a nomad ruler's order

• 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)
can_recruit_character_to_court_trigger = {
	$RECRUITER$ = { save_temporary_scope_as = recruiter }
	$RECRUITEE$ = { save_temporary_scope_as = recruitee }
	scope:recruitee = {
		bp2_valid_for_standard_interactions_trigger = yes
		trigger_if = {
			limit = { is_adult = no }
			custom_description = {
				text = is_not_wandering_child
				subject = scope:recruitee
				OR = {
					is_close_or_extended_family_of = scope:recruiter
					scope:recruiter = {
						any_spouse = {
							any_child = { this = scope:recruitee }
						}
					}
					trigger_if = {
						limit = {
							scope:recruiter.culture = { has_cultural_parameter = wider_adoption }
							scope:recruitee.culture = { has_cultural_parameter = wider_adoption }
						}
						NOT = {
							any_parent = {
								is_alive = yes
								can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = liege }
							}
						}
					}
				}
			}
		}
		NOR = {
			is_imprisoned = yes
			is_theocratic_lessee = yes
			is_diarch = yes
			trigger_if = {
				limit = {
					exists = host
					host = { is_ai = no }
					NOT = { is_player_heir_of = scope:recruiter }
				}
				is_player_heir_of = host
			}
			trigger_if = {
				limit = {
					exists = host
					host = { is_ai = yes }
					NOT = { is_player_heir_of = scope:recruiter }
				}
				is_primary_heir_of = host
			}
			trigger_if = {
				limit = { exists = host }
				is_consort_of = host
			}
			trigger_if = {
				limit = { exists = host }
				host = {
					pressing_claim_of_character_trigger = { CHARACTER = scope:recruitee }
				}
			}
			trigger_if = {
				limit = { exists = host }
				#Are they employed?
				OR = {
					is_councillor_of = scope:recruitee.host
					is_knight_of = scope:recruitee.host
					any_relation = {
						type = ward
						OR = {
							this = scope:recruitee.host
							is_close_family_of = scope:recruitee.host
						}
					}
					any_relation = {
						type = guardian
						OR = {
							this = scope:recruitee.host
							is_close_family_of = scope:recruitee.host
						}
					}
					any_relation = {
						type = mentor
						OR = {
							this = scope:recruitee.host
							is_close_family_of = scope:recruitee.host
						}
					}
					any_relation = {
						type = student
						OR = {
							this = scope:recruitee.host
							is_close_family_of = scope:recruitee.host
						}
					}
					any_court_position_employer = { this = scope:recruitee.host }
				}
			}
			trigger_if = {
				limit = {
					scope:recruiter = { has_government = landless_adventurer_government }
				}
				custom_tooltip = {
					text = can_recruit_character_to_court_trigger.tt.laamps_invitation_restrictions
					NOR = {
						is_player_heir_of = scope:recruiter
						has_relation_soulmate = scope:recruiter
						has_relation_best_friend = scope:recruiter
						is_consort_of = scope:recruiter
						AND = {
							is_pool_character = yes
							OR = {
								has_relation_friend = scope:recruiter
								has_relation_lover = scope:recruiter
								is_close_family_of = scope:recruiter
							}
						}
					}
				}

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

The first 120 of its 241 lines; the rest is in game/common/scripted_triggers/00_courtier_guest_management_triggers.txt from line 335.

Where it is used

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

Events (5)

Scripted effects (1)

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?