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

Scripted effect

call_ally_interaction_event_effect

call_ally_interaction_event_effect = yes

game/common/scripted_effects/00_interaction_effects.txt, line 3192 (127 lines). No parameters.

call_ally_interaction_event_effect is a scripted effect in Crusader Kings III, written at line 3192 of its file. It takes no parameters: call_ally_interaction_event_effect = yes. The game's script calls it in 2 places, among them call_ally.0100 (event) and call_ally_interaction_effect (scripted effect). Its body carries 1 text of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/00_interaction_effects.txt.

The comment above it in the file

So that we can show a tooltip in the event about them responding

What it does

  • If

    • One of these

      • scope:actor › Any home court hostage:
        • warden ?= { is_attacker_in_war = scope:target }
      • or

        scope:target › Any war attacker › Any warden hostage:
        • home_court ?= scope:actor

    Then

  • scope:target:
    • If

      • is_attacker = scope:actor

      Then

      • add_attacker = scope:recipient
      • scope:actor:
        • If

          Then

          • If

            • scope:recipient.primary_title.tier = tier_barony

            Then

            • add_piety = { add = minor_piety_loss multiply = 2 }

            Else if

            • scope:recipient.primary_title.tier = tier_county

            Then

            • add_piety = { add = medium_piety_loss multiply = 2 }

            Else if

            • scope:recipient.primary_title.tier = tier_duchy

            Then

            • add_piety = { add = major_piety_loss multiply = 2 }

            Else if

            • scope:recipient.primary_title.tier = tier_kingdom

            Then

            • add_piety = { add = massive_piety_loss multiply = 1.5 }

            Else if

            • scope:recipient.primary_title.tier = tier_empire

            Then

            • add_piety = { add = monumental_piety_loss multiply = 1.5 }

            Else if

            • scope:recipient.primary_title.tier = tier_hegemony

            Then

            • add_piety = { add = monumental_piety_loss multiply = 2.5 }

          Otherwise

          • If

            • NOT = { has_relation_blood_brother = scope:recipient }

            Then

            • If

              • scope:actor:
                • Their faith is the same as that of recipient
                • The Personal Tenets unlock tenet peace of god cheaper ally call
                • Their faith:
                  • faith_hostility_level = { target = scope:target.primary_defender.faith value >= faith_hostile_level }

              Then

              Otherwise

              • add_prestige = { value = 0 subtract = scope:recipient.tier_scaled_prestige_value }

      Otherwise

      • add_defender = scope: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)
call_ally_interaction_event_effect = {
	if = {
		limit = {
			OR = {
				scope:actor = {
					any_home_court_hostage = {
						warden ?= { is_attacker_in_war = scope:target }
					}
				}
				scope:target = {
					any_war_attacker = {
						any_warden_hostage = { home_court ?= scope:actor }
					}
				}
			}
		}
		custom_tooltip = hostage_execution_warning_tt
	}
	scope:target = {
		hidden_effect = {
			set_called_to = scope:recipient
		}
		if = {
			limit = {
				is_attacker = scope:actor
			}
			add_attacker = scope:recipient
			scope:actor = {
				#Check for Mandala first
				if = {
					limit = {
						government_has_flag = government_is_mandala
						scope:recipient = { is_tributary_of = scope:actor }
					}
					if = {
						limit = {
							scope:recipient.primary_title.tier = tier_barony
						}
						add_piety = {
							add = minor_piety_loss
							multiply = 2
						}
					}
					else_if = {
						limit = {
							scope:recipient.primary_title.tier = tier_county
						}
						add_piety = {
							add = medium_piety_loss
							multiply = 2
						}
					}
					else_if = {
						limit = {
							scope:recipient.primary_title.tier = tier_duchy
						}
						add_piety = {
							add = major_piety_loss
							multiply = 2
						}
					}
					else_if = {
						limit = {
							scope:recipient.primary_title.tier = tier_kingdom
						}
						add_piety = {
							add = massive_piety_loss
							multiply = 1.5
						}
					}
					else_if = {
						limit = {
							scope:recipient.primary_title.tier = tier_empire
						}
						add_piety = {
							add = monumental_piety_loss
							multiply = 1.5
						}
					}
					else_if = {
						limit = {
							scope:recipient.primary_title.tier = tier_hegemony
						}
						add_piety = {
							add = monumental_piety_loss
							multiply = 2.5
						}
					}
				}
				#Then do everything else
				else = {
					if = {
						limit = {
							NOT = {
								has_relation_blood_brother = scope:recipient
							}
						}
						if = { # PAM - Peace of God PT discount
							limit = {
								scope:actor = {
									faith = scope:recipient.faith
									has_personal_tenet_flag = tenet_peace_of_god_cheaper_ally_call
									faith = {
										faith_hostility_level = {
											target = scope:target.primary_defender.faith
											value >= faith_hostile_level
										}
									}
								}
							}
							pam_peace_of_god_personal_tenet_cheaper_alliance_call_effect = yes
						}
						else = {
							add_prestige = {
								value = 0
								subtract = scope:recipient.tier_scaled_prestige_value
							}
						}
					}
				}

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

The first 120 of its 127 lines; the rest is in game/common/scripted_effects/00_interaction_effects.txt from line 3192.

Where it is used

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

Events (1)

Scripted effects (1)

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