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

Scripted trigger

court_position_generator_pickable_trigger

court_position_generator_pickable_trigger = { EMPLOYER = … POS = … }

game/common/scripted_triggers/00_court_position_triggers.txt, line 1151 (39 lines). Parameters: $EMPLOYER$, $POS$.

court_position_generator_pickable_trigger is a scripted trigger in Crusader Kings III, written at line 1151 of its file. A call passes 2 parameters: EMPLOYER and POS. The game's script calls it in 1 place, among them court_position_generator_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_triggers/00_court_position_triggers.txt.

What it checks

  • $EMPLOYER$ = { … }
  • NOT = { has_court_position = $POS$_court_position }
  • If

    • liege ?= $EMPLOYER$

    Then

    • can_be_employed_as = $POS$_court_position

    Otherwise

    • $POS$_validity_trigger = { EMPLOYER = $EMPLOYER$ }
  • If

    a check the game hides

    Then

    • Target court position is not $POS$
  • If

    a check the game hides

    Then

    • Second court position is not $POS$
  • If

    a check the game hides

    Then

    • NOT = { $EMPLOYER$ = { … } }

• 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 (39 lines of game script)
court_position_generator_pickable_trigger = {
	$EMPLOYER$ = {
		OR = {
			can_employ_court_position_type = $POS$_court_position
			employs_court_position = $POS$_court_position
		}
		trigger_if = {
			limit = { scope:only_empty ?= flag:yes }
			NOT = { employs_court_position = $POS$_court_position }
		}
	}
	NOT = { has_court_position = $POS$_court_position }
	trigger_if = {
		limit = { liege ?= $EMPLOYER$ }
		can_be_employed_as = $POS$_court_position
	}
	trigger_else = {
		$POS$_validity_trigger = { EMPLOYER = $EMPLOYER$ }
	}
	trigger_if = {
		limit = { exists = var:target_court_position }
		NOT = { var:target_court_position = flag:$POS$ }
	}
	trigger_if = {
		limit = { exists = var:second_court_position }
		NOT = { var:second_court_position = flag:$POS$ }
	}
	trigger_if = {
		limit = { exists = scope:eunuch }
		NOT = {
			$EMPLOYER$ = {
				any_court_position_holder = {
					type = $POS$_court_position
					is_close_family_of = scope:eunuch
				}
			}
		}
	}
}

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

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?