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_granted_titles_by

can_be_granted_titles_by = { RULER = … }

game/common/scripted_triggers/00_scripted_triggers.txt, line 305 (62 lines). Parameters: $RULER$.

can_be_granted_titles_by is a scripted trigger in Crusader Kings III, written at line 305 of its file. A call passes 1 parameter: RULER. The game's script calls it in 8 places, among them Appoint as Republican Overseer (interaction), Grant Titles (interaction) and Dynastic Duties (event ach_coronation.0018). Patch 1.20.1.2, from game/common/scripted_triggers/00_scripted_triggers.txt.

What it checks

  • If

    • Is not a ruler
    • Is not Leasing holdings from their Liege
    • NOT = { $RULER$ = { government_has_mechanic = administrative } }
    • NOT = { $RULER$.faith = { has_dominant_ruling_gender = scope:title_grantee } }

    Then

    • If

      • $RULER$ = { government_allows = state_faith }

      Then

      • $RULER$.primary_title.state_rite = { rite_has_dominant_ruling_gender = scope:title_grantee }

      Otherwise

      • $RULER$.rite = { rite_has_dominant_ruling_gender = scope:title_grantee }
  • If

    • Is not a ruler
    • Is not Leasing holdings from their Liege
    • $RULER$ = { … }

    Then

    • If

      • $RULER$ = { has_realm_law = male_only_law }

      Then

      • scope:title_grantee:
        • is_female = no
    • If

      • $RULER$ = { has_realm_law = female_only_law }

      Then

      • scope:title_grantee:
        • is_female = yes
  • Else, if leasing holdings from their Liege:
    • liege = $RULER$
  • Otherwise:
    • always = yes

• 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 (62 lines of game script)
can_be_granted_titles_by = { #This is set up with trigger-ifs to allow for nice tooltip printouts in grant title interaction
	save_temporary_scope_as = title_grantee
	#Gender check
	trigger_if = {
		limit = {
			is_ruler = no #Rulers can always get additional titles
			is_theocratic_lessee = no #Theocratic lessees use other gender checks
			NOT = { $RULER$ = { government_has_mechanic = administrative } }
			NOT = {
				$RULER$.faith = {
					has_dominant_ruling_gender = scope:title_grantee
				}
			}
		}
		trigger_if = {
			limit = {
				$RULER$ = { government_allows = state_faith }
			}
			$RULER$.primary_title.state_rite = {
				rite_has_dominant_ruling_gender = scope:title_grantee
			}
		}
		trigger_else = {
			$RULER$.rite = {
				rite_has_dominant_ruling_gender = scope:title_grantee
			}
		}
	}
	trigger_if = {
		limit = {
			is_ruler = no #Rulers can always get additional titles
			is_theocratic_lessee = no #Theocratic lessees use other gender checks
			$RULER$ = {
				government_has_mechanic = administrative
				NOT = { has_realm_law = equal_law }
			}
		}
		trigger_if = {
			limit = {
				$RULER$ = { has_realm_law = male_only_law }
			}
			scope:title_grantee = { is_female = no }
		}
		trigger_if = {
			limit = {
				$RULER$ = { has_realm_law = female_only_law }
			}
			scope:title_grantee = { is_female = yes }
		}
		#trigger_else = { always = yes }
	}
	trigger_else_if = {
		limit = {
			is_theocratic_lessee = yes
		}
		liege = $RULER$
		#If this is ever visible anywhere, we need to write a custom desc "Theocratic lessees cannot only be given titles by their ruler"
	}
	trigger_else = {
		always = yes
	}
}

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

Where it is used

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

Events (3)

Scripted rules (1)

  • allowed_to_be_granted_titles_by

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