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

Scripted effect

excommunication_cb_piety_change

excommunication_cb_piety_change = { LOSER = … WINNER = … }

game/common/scripted_effects/00_war_effects.txt, line 1006 (90 lines). Parameters: $LOSER$, $WINNER$.

excommunication_cb_piety_change is a scripted effect in Crusader Kings III, written at line 1006 of its file. A call passes 2 parameters: LOSER and WINNER. The game's script calls it in 1 place, among them Excommunication (casus belli). Patch 1.20.1.2, from game/common/scripted_effects/00_war_effects.txt.

What it does

  • If

    • scope:defender.highest_held_title_tier >= tier_empire

    Then

    • $WINNER$ = { … }
    • $LOSER$ = { add_piety = religious_cb_piety_loss_empire }

    Else if

    • scope:defender.highest_held_title_tier = tier_kingdom

    Then

    • $WINNER$ = { … }
    • $LOSER$ = { add_piety = religious_cb_piety_loss_kingdom }

    Else if

    • scope:defender.highest_held_title_tier = tier_duchy

    Then

    • $WINNER$ = { … }
    • $LOSER$ = { add_piety = religious_cb_piety_loss_duchy }

    Otherwise

    • $WINNER$ = { … }
    • $LOSER$ = { add_piety = religious_cb_piety_loss_county }

• 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 (90 lines of game script)
excommunication_cb_piety_change = {

	#Amount of piety gain is scaled based on the highest tier title the defender has.
	if = {
		limit = {
			scope:defender.highest_held_title_tier >= tier_empire
		}
		$WINNER$ = {
			if = {
				limit = {
					$WINNER$ = scope:attacker
				}
				add_piety = {
					add = religious_cb_piety_gain_empire
					multiply = excommunication_cb_piety_change_multiplier
				}
			}
			else = {
				add_piety = religious_cb_piety_gain_empire
			}
		}
		$LOSER$ = {
			add_piety = religious_cb_piety_loss_empire
		}
	}

	else_if = {
		limit = {
			scope:defender.highest_held_title_tier = tier_kingdom
		}
		$WINNER$ = {
			if = {
				limit = {
					$WINNER$ = scope:attacker
				}
				add_piety = {
					add = religious_cb_piety_gain_kingdom
					multiply = excommunication_cb_piety_change_multiplier
				}
			}
			else = {
				add_piety = religious_cb_piety_gain_kingdom
			}
		}
		$LOSER$ = {
			add_piety = religious_cb_piety_loss_kingdom
		}
	}
	else_if = {
		limit = {
			scope:defender.highest_held_title_tier = tier_duchy
		}
		$WINNER$ = {
			if = {
				limit = {
					$WINNER$ = scope:attacker
				}
				add_piety = {
					add = religious_cb_piety_gain_duchy
					multiply = excommunication_cb_piety_change_multiplier
				}
			}
			else = {
				add_piety = religious_cb_piety_gain_duchy
			}
		}
		$LOSER$ = {
			add_piety = religious_cb_piety_loss_duchy
		}
	}
	else = {
		$WINNER$ = {
			if = {
				limit = {
					$WINNER$ = scope:attacker
				}
				add_piety = {
					add = religious_cb_piety_gain_county
					multiply = excommunication_cb_piety_change_multiplier
				}
			}
			else = {
				add_piety = religious_cb_piety_gain_county
			}
		}
		$LOSER$ = {
			add_piety = religious_cb_piety_loss_county
		}
	}
}

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

Where it is used

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

Casus belli (1)

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