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

Scripted effect

maiming_destroy_diarchy_effect

maiming_destroy_diarchy_effect = yes

game/common/scripted_effects/00_diarchy_scripted_effects.txt, line 1623 (85 lines). No parameters.

maiming_destroy_diarchy_effect is a scripted effect in Crusader Kings III, written at line 1623 of its file. It takes no parameters: maiming_destroy_diarchy_effect = yes. The game's script calls it in 9 places, among them Remove Co-Ruler (interaction), Blinded (event prison.1020) and Blinded (event prison.1021). Patch 1.20.1.2, from game/common/scripted_effects/00_diarchy_scripted_effects.txt.

What it does

  • If

    a check the game hides

    Then

    • If

      • scope:actor.diarch = scope:recipient

      Then

      • scope:actor:
        • clear_designated_heir = yes
        • end_diarchy = yes
      • Every player:
        • Where:
          • top_liege = scope:actor.top_liege
        • Event diarchy.8022

      Otherwise

      • scope:recipient:
        • Every held title:
          • Where:
            • One of these

              • this = scope:recipient.capital_county
              • or

                this = scope:recipient.capital_county.duchy
              • or

                All of these

                • Title tier exactly County
                • this.duchy = scope:recipient.capital_county.duchy
              • or

                Title tier at least scope:recipient.highest held title tier
          • Gains the … Title (actor)
        • Every Vassal of …:
          • change_liege = { LIEGE = scope:actor CHANGE = scope:change }
      • scope:recipient:
        • change_liege = { LIEGE = scope:actor CHANGE = scope:change2 }
      • Every player:
        • Where:
          • top_liege = scope:actor.top_liege
        • Event diarchy.8023

• 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 (85 lines of game script)
maiming_destroy_diarchy_effect = {
	if = {
		limit = { exists = scope:destroy_diarchy }
		# Liege maims co-emperor.
		if = {
			limit = { scope:actor.diarch = scope:recipient }
			scope:actor = {
				clear_designated_heir = yes
				end_diarchy = yes
			}
			every_player = {
				limit = {
					NOR = {
						this = scope:actor
						this = scope:recipient
					}
					top_liege = scope:actor.top_liege
				}
				trigger_event = diarchy.8022
			}
		}
		# Co-emperor maims liege.
		else = {
			# We do this in two batches so that we don't produce an error when the emperor is usurped by their old co-emperor.
			## First the empire.
			create_title_and_vassal_change = {
				type = usurped
				save_scope_as = change
			}
			scope:recipient = {
				every_held_title = {
					limit = {
						OR = {
							this = scope:recipient.capital_county
							this = scope:recipient.capital_county.duchy
							AND = {
								tier = tier_county
								this.duchy = scope:recipient.capital_county.duchy
							}
							tier >= scope:recipient.highest_held_title_tier
						}
					}
					change_title_holder = {
						holder = scope:actor
						change = scope:change
					}
				}
				every_vassal = {
					custom = custom.recipient_every_vassal
					change_liege = {
						LIEGE = scope:actor
						CHANGE = scope:change
					}
				}
			}
			resolve_title_and_vassal_change = scope:change
			## Then the former emperor.
			create_title_and_vassal_change = {
				type = usurped
				save_scope_as = change2
			}
			scope:recipient = {
				change_liege = {
					LIEGE = scope:actor
					CHANGE = scope:change2
				}
			}
			resolve_title_and_vassal_change = scope:change2
			# Plus, end the diarchy.
			hidden_effect = {
				scope:recipient = { end_diarchy = yes }
			}
			every_player = {
				limit = {
					NOR = {
						this = scope:actor
						this = scope:recipient
					}
					top_liege = scope:actor.top_liege
				}
				trigger_event = diarchy.8023
			}
		}
	}
}

As written in game/common/scripted_effects/00_diarchy_scripted_effects.txt.

Where it is used

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

Character interactions (1)

Events (8)

2 more

Source: game/common/scripted_effects/00_diarchy_scripted_effects.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?