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_be_commander_now_trigger

can_be_commander_now_trigger = { ARMY_OWNER = … }

game/common/scripted_triggers/00_war_and_peace_triggers.txt, line 640 (32 lines). Parameters: $ARMY_OWNER$.

can_be_commander_now_trigger is a scripted trigger in Crusader Kings III, written at line 640 of its file. A call passes 1 parameter: ARMY_OWNER. The game's script calls it in 7 places, among them councillor_spouse_martial.0007 (event), marshal_task.2101 (event) and friendship_1008_courtier_trigger (local trigger). Patch 1.20.1.2, from game/common/scripted_triggers/00_war_and_peace_triggers.txt.

The comment above it in the file

If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are.

What it checks

  • Is available (an adult, not imprisoned)
  • One of these

  • If

    • $ARMY_OWNER$ = { is_ai = yes }

    Then

    • Is played by the AI
  • Busy participating in an Activity

• 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)
can_be_commander_now_trigger = {
	is_available_quick = {
		alive = yes
		adult = yes
		imprisoned = no
		travel = no
	}

	OR = { # You can always lead your own armies
		this = $ARMY_OWNER$
		can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = $ARMY_OWNER$ }
	}

	trigger_if = {
		limit = { $ARMY_OWNER$ = { is_ai = yes } }
		is_ai = yes
	}

	custom_description = {
		text = ALREADY_IN_ACTIVITY
		NOR = {
			exists = involved_activity
			has_variable = homage_liege_scope
			has_character_flag = meditation_character_flag
			has_character_flag = local_shrine_rite
			has_character_flag = petition_liege_character_flag
			has_variable = petition_head_of_faith_petitioner
			has_character_flag = holding_court_character_flag
			is_being_visited_on_tour_strict = yes
		}
	}
}

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

Where it is used

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

Scripted triggers inside an event file (2)

  • friendship_1008_courtier_trigger
  • marshal_task_2101_teacher_trigger

Scripted rules (1)

  • can_command_troops_now

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