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_appoint_char_to_court_position

can_appoint_char_to_court_position = { CHAR = … COURT_POS = … }

game/common/scripted_triggers/00_court_position_triggers.txt, line 211 (20 lines). Parameters: $CHAR$, $COURT_POS$.

can_appoint_char_to_court_position is a scripted trigger in Crusader Kings III, written at line 211 of its file. A call passes 2 parameters: CHAR and COURT_POS. The game's script calls it in 43 places, among them Grand Tournament (activity), Hunt (activity) and … Passes …! (event chariot_race.3030). Patch 1.20.1.2, from game/common/scripted_triggers/00_court_position_triggers.txt.

The comment above it in the file

IMPORTANT: This should be used before most instances of appoint_court_position - CU
Checks that you can employ a specific character to a specific court position at a given moment. This prevents errors from randomly trying to already hire the holder of that court position in some cases.
Trigger should be used in the scope of the hiring liege
$COURT_POS$ is the position to which you want to appoint a character
$CHAR$ is the character you wish to appoint

What it checks

  • One of these

    • can_employ_court_position_type = $COURT_POS$
    • or

      Employs a $COURT POS$
  • $CHAR$ = { … }

• 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 (20 lines of game script)
can_appoint_char_to_court_position = {
	save_temporary_scope_as = hiring_liege
	OR = { # can_employ_court_position_type will return false if we have the maximum amount of character for a given slot (like 2 bodyguard)
		can_employ_court_position_type = $COURT_POS$
		employs_court_position = $COURT_POS$
	}
	$CHAR$ = {
		this != scope:hiring_liege
		NOT = { has_court_position = $COURT_POS$ }
		would_be_valid_for_court_position = {
			court_position = $COURT_POS$
			employer = scope:hiring_liege
		}
		trigger_if = {
			limit = { is_ruler = yes }
			liege ?= scope:hiring_liege
			liege != this
		}
	}
}

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

Where it is used

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

Activities (2)

Events (31)

25 more

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