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

Scripted effect

send_new_alliance_message

send_new_alliance_message = { OTHER_CHARACTER = … THIS_CHARACTER = … }

game/common/scripted_effects/00_war_effects.txt, line 1817 (37 lines). Parameters: $OTHER_CHARACTER$, $THIS_CHARACTER$.

send_new_alliance_message is a scripted effect in Crusader Kings III, written at line 1817 of its file. A call passes 2 parameters: OTHER_CHARACTER and THIS_CHARACTER. The game's script calls it in 1 place, among them on_alliance_added (on action). Its body carries 1 text of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/00_war_effects.txt.

What it does

Every line of it is script with no tooltip text: the script is below.

The script as written (37 lines of game script)
send_new_alliance_message = {
	$THIS_CHARACTER$ = {
		every_character_war = {
			limit = {
				# As a pure notification thing, we only care about players. No need to waste CPU cycles for AI-only wars.
				any_war_participant = {
					is_ai = no
				}
				# Only if we're the primary attacker or defender (non-primary participants can't call their own allies)
				OR = {
					primary_attacker = $THIS_CHARACTER$
					primary_defender = $THIS_CHARACTER$
				}
				# Don't send messages about alliances to landless courtiers (who can't actually join wars, alliance or no)
				$THIS_CHARACTER$ = { is_playable_character = yes }
				$OTHER_CHARACTER$ = { is_playable_character = yes }
			}
			save_scope_as = this_war
			$THIS_CHARACTER$ = { save_scope_as = this_character }
			$OTHER_CHARACTER$ = { save_scope_as = other_character }
			every_war_participant = {
				limit = {
					is_ai = no
					# We only want to alert people of potential new enemies
					any_war_enemy = { this = scope:this_character}
				}
				send_interface_toast = {
					type = msg_war_enemy_new_ally
					title = enemy_gained_new_ally
					left_icon = scope:this_character
					right_icon = scope:other_character
					custom_tooltip = enemy_gained_new_ally_tt
				}
			}
		}
	}
}

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

Where it is used

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

On actions (the game's own hooks) (1)

  • on_alliance_added

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?