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

Scripted trigger · By God Alone files

pam_custom_kingdom_can_claim_duchy_exclave_trigger

pam_custom_kingdom_can_claim_duchy_exclave_trigger = { NEW_KING = … }

game/common/scripted_triggers/pam_scripted_triggers.txt, line 5755 (84 lines). Parameters: $NEW_KING$.

pam_custom_kingdom_can_claim_duchy_exclave_trigger is a scripted trigger in Crusader Kings III, in the By God Alone files, written at line 5755 of its file. A call passes 1 parameter: NEW_KING. The game's script calls it in 4 places, among them Consecrate a New Kingdom (decision), Found a New Kingdom (decision) and Consecrate Kingdom (interaction). Patch 1.20.1.2, from game/common/scripted_triggers/pam_scripted_triggers.txt.

What it checks

  • Title tier exactly Duchy
  • None of these

    • $NEW_KING$ = { completely_controls = prev }
    • holder ?= $NEW_KING$
    • Their holder:
      • target_is_liege_or_above = $NEW_KING$
  • None of these

    • Any de jure county:
      • kingdom.title_capital_county ?= this
  • Their kingdom › Any direct de jure vassal title:
    • Title tier exactly Duchy
    • None of these

      • this = scope:duchy_temp
      • $NEW_KING$ = { completely_controls = prev }
      • holder ?= $NEW_KING$
      • Their holder:
        • target_is_liege_or_above = $NEW_KING$
  • If

    a check the game hides

    Then

    • Their kingdom’s holder:
      • No vassal or below:
      • NOT = { completely_controls = scope:duchy_temp }
  • None of these

    • Any de jure county:
      • save_temporary_scope_as = county_temp
      • Any neighboring county:
        • kingdom = scope:county_temp.kingdom
        • Their duchy:
          • None of these

            • this = scope:county_temp.duchy
            • $NEW_KING$ = { completely_controls = prev }
            • Their holder:
              • target_is_same_character_or_above = $NEW_KING$
  • Any de jure county › Any neighboring county › Their duchy:
    • One of these

      • Their holder:
        • target_is_same_character_or_above = $NEW_KING$
      • or

        $NEW_KING$ = { completely_controls = prev }

• 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 (84 lines of game script)
pam_custom_kingdom_can_claim_duchy_exclave_trigger = {
	tier = tier_duchy
	save_temporary_scope_as = duchy_temp
    NOR = {
        $NEW_KING$ = {
            completely_controls = prev
        }
        holder ?= $NEW_KING$
        holder ?= {
            target_is_liege_or_above = $NEW_KING$
        }
    }
    NOT = {
    	any_de_jure_county = {
    		kingdom.title_capital_county ?= this
    	}
    }
    #Is not only duchy in kingdom
    kingdom = {
    	any_direct_de_jure_vassal_title = {
    		tier = tier_duchy
    		NOR = {
    			this = scope:duchy_temp
    			$NEW_KING$ = {
        		    completely_controls = prev
        		}
        		holder ?= $NEW_KING$
        		holder ?= {
        		    target_is_liege_or_above = $NEW_KING$
        		}
    		}
    	}
    }
    #Is not controlled by de jure liege
   	trigger_if = {
   		limit = {
   			exists = kingdom.holder
   		}
   		kingdom.holder = {
   			NOR = {
   				this = scope:duchy_temp.holder
   				any_vassal_or_below = {
   					this = scope:duchy_temp.holder
   				}
   				completely_controls = scope:duchy_temp
   			}
   		}
   	}
    #Not bordering any other county of de jure kingdom (not held by new king)
    NOT = {
        any_de_jure_county = {
            save_temporary_scope_as = county_temp
            
            any_neighboring_county = {
                kingdom = scope:county_temp.kingdom
                duchy = {
                    NOR = {
                        this = scope:county_temp.duchy
                        $NEW_KING$ = {
                            completely_controls = prev
                        }
                        holder ?= {
                            target_is_same_character_or_above = $NEW_KING$
                        }
                    }
                }
            }
        }
    }
    any_de_jure_county = {
        any_neighboring_county = {
            duchy = {
            	OR = {
            		holder ?= {
                		target_is_same_character_or_above = $NEW_KING$
                	}
                	$NEW_KING$ = {
                	    completely_controls = prev
                	}
                }
            }
        }
    }
}

As written in game/common/scripted_triggers/pam_scripted_triggers.txt.

Where it is used

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

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