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

Scripted trigger

ai_should_focus_on_building_in_their_capital

ai_should_focus_on_building_in_their_capital = yes

game/common/scripted_triggers/00_ai_value_triggers.txt, line 350 (27 lines). No parameters.

ai_should_focus_on_building_in_their_capital is a scripted trigger in Crusader Kings III, written at line 350 of its file. It takes no parameters: ai_should_focus_on_building_in_their_capital = yes (or no). The game's script calls it in 47 places, among them Commission Artifact (decision), Commission Icon (decision) and Commission Silk Regalia (decision). Patch 1.20.1.2, from game/common/scripted_triggers/00_ai_value_triggers.txt.

What it checks

  • Is landed
  • Highest held Title is at least County Rank
  • Does not have “conqueror” (a variable the game's script sets)
  • Their government is not Nomadic
  • One of these

    • capital_county.title_province.free_building_slots > 0
    • or

      All of these

      • Their culture:
        • has_innovation = innovation_ledger
      • capital_county.title_province.combined_building_level <= 4
    • or

      All of these

      • Their culture:
        • has_innovation = innovation_baliffs
      • capital_county.title_province.combined_building_level <= 6
    • or

      All of these

      • Their culture:
        • has_innovation = innovation_guilds
      • capital_county.title_province.combined_building_level <= 9
    • or

      All of these

      • Their culture:
        • has_innovation = innovation_cranes
      • capital_county.title_province.combined_building_level <= 12

• 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 (27 lines of game script)
ai_should_focus_on_building_in_their_capital = {
	is_landed = yes
	highest_held_title_tier >= tier_county
	NOT = { has_variable = conqueror }
	NOT = { government_has_flag = government_is_nomadic }
	exists = capital_county
	exists = culture
	OR = {
		capital_county.title_province.free_building_slots > 0
		AND = {
			culture = { has_innovation = innovation_ledger }
			capital_county.title_province.combined_building_level <= 4
		}
		AND = {
			culture = { has_innovation = innovation_baliffs }
			capital_county.title_province.combined_building_level <= 6
		}
		AND = {
			culture = { has_innovation = innovation_guilds }
			capital_county.title_province.combined_building_level <= 9
		}
		AND = {
			culture = { has_innovation = innovation_cranes }
			capital_county.title_province.combined_building_level <= 12
		}
	}
}

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

Where it is used

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

Scripted effects (1)

Script values (8)

  • ai_men_at_arms_chance_expense_below_ideal
  • ai_men_at_arms_chance_expense_below_min
  • base_legend_create_ai
  • base_legend_promote_ai
  • court_position_liege_score_base_value
  • heroic_legend_create_ai
2 more
  • holy_legend_create_ai
  • legitimizing_legend_create_ai

Subject contracts (6)

  • Feudal Taxes
  • Herd Tithes
  • Mandala Taxes
  • Nomadic Taxes
  • Special Contract
  • Tributary Taxes

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