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

Scripted effect

undirected_ghw_recipient_selection_on_victory_effect

undirected_ghw_recipient_selection_on_victory_effect = yes

game/common/scripted_effects/00_religious_interaction_effects.txt, line 814 (164 lines). No parameters.

undirected_ghw_recipient_selection_on_victory_effect is a scripted effect in Crusader Kings III, written at line 814 of its file. It takes no parameters: undirected_ghw_recipient_selection_on_victory_effect = yes. The game's script calls it in 1 place, among them Great Holy War (casus belli). Patch 1.20.1.2, from game/common/scripted_effects/00_religious_interaction_effects.txt.

What it does

  • If

    Then

    • scope:the_faith.great_holy_war:
      • set_designated_winner = scope:title_recipient

    Else if

    Then

    • scope:the_faith.great_holy_war:
      • set_designated_winner = scope:title_recipient

    Else if

    Then

    • scope:the_faith.great_holy_war:
      • set_designated_winner = scope:title_recipient

• 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 (120 lines of game script)
undirected_ghw_recipient_selection_on_victory_effect = { #Set in the event of no Recipient or Beneficiary when a Crusade is won.
	#Prioritize Holder of the target_kingdom.
	#Then Claimants of the target_kingdom.
	#And so forth...
	if = { #The Kingdom is held by a member of the Faith, the Crusade is attempting to restore some of its provinces.
		limit = {
			exists = scope:target_kingdom
			exists = scope:target_kingdom.holder
			exists = scope:the_faith.great_holy_war
			scope:target_kingdom.holder = {
				faith = scope:the_faith
				NOR = {
					has_trait = excommunicated
					has_trait = incapable
					has_trait = devoted
				}
			}
		}
		scope:target_kingdom.holder = {
			save_scope_as = title_recipient
		}
		scope:the_faith.great_holy_war = {
			set_designated_winner = scope:title_recipient
		}
	}
	else_if = { #Claimants of the King-title belonging to the Faith exist.
		limit = {
			exists = scope:target_kingdom
			exists = scope:the_faith.great_holy_war
			scope:target_kingdom = {
				any_claimant = {
					faith = scope:the_faith
					NOR = {
						has_trait = excommunicated
						has_trait = incapable
						has_trait = devoted
					}
				}
			}
		}
		scope:target_kingdom = {
			random_claimant = {
				limit = {
					faith = scope:the_faith
					is_adult = yes
					has_trait = zealous
					NOR = {
						has_trait = excommunicated
						has_trait = incapable
						has_trait = devoted
					}
					rite = { rite_has_dominant_ruling_gender = prev }
					reverse_opinion = {
						target = scope:ghw_sponsor
						value >= 0
					}
				}
				alternative_limit = {
					this.faith = scope:the_faith
					is_adult = yes
					NOR = {
						has_trait = excommunicated
						has_trait = incapable
						has_trait = devoted
					}
					rite = { rite_has_dominant_ruling_gender = prev }
					reverse_opinion = {
						target = scope:ghw_sponsor
						value >= 0
					}
				}
				alternative_limit = {
					this.faith = scope:the_faith
					is_adult = yes
					NOR = {
						has_trait = excommunicated
						has_trait = incapable
						has_trait = devoted
					}
					rite = { rite_has_dominant_ruling_gender = prev }
				}
				alternative_limit = {
					this.faith = scope:the_faith
					NOR = {
						has_trait = excommunicated
						has_trait = incapable
						has_trait = devoted
					}
					rite = { rite_has_dominant_ruling_gender = prev }
				}
				alternative_limit = {
					this.faith = scope:the_faith
					NOR = {
						has_trait = excommunicated
						has_trait = incapable
						has_trait = devoted
					}
				}
				save_scope_as = title_recipient
			}
		}
		scope:the_faith.great_holy_war = {
			set_designated_winner = scope:title_recipient
		}
	}
	else_if = { #If truly no character is available, just pick a random faithful.
		limit = {
			exists = scope:ghw_sponsor
			exists = scope:the_faith.great_holy_war
			scope:ghw_sponsor = {
				any_courtier = {
					is_adult = yes
					is_ai = yes
					NOR = {
						has_trait = excommunicated
						has_trait = incapable
						has_trait = devoted
					}
					faith = scope:the_faith
				}

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

The first 120 of its 164 lines; the rest is in game/common/scripted_effects/00_religious_interaction_effects.txt from line 814.

Where it is used

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

Casus belli (1)

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