Scripted effect
notify_players_about_neighboring_war_resolution_effect
notify_players_about_neighboring_war_resolution_effect = yesgame/common/scripted_effects/00_war_effects.txt, line 2348 (89 lines). No parameters.
notify_players_about_neighboring_war_resolution_effect is a scripted effect in Crusader Kings III, written at line 2348 of its file. It takes no parameters: notify_players_about_neighboring_war_resolution_effect = yes. The game's script calls it in 2 places, among them on_war_won_attacker (on action) and on_war_won_defender (on action). 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 (89 lines of game script)
notify_players_about_neighboring_war_resolution_effect = {
every_player = {
limit = {
NOT = { is_participant_in_war = scope:war}
}
save_scope_as = this_player
# Checks if this player should be notified at all about the war resolution (e.g., either attacker or defender are neighbors).
if = {
limit = {
should_notify_player_about_neighboring_rulers_wars_trigger = { TARGET_CHARACTER = scope:winner }
# Only notify about revolts if rebels win
trigger_if = {
limit = {
scope:war = {
OR = {
using_cb = peasant_war
using_cb = independence_faction_war
using_cb = liberty_faction_war
using_cb = populist_war
using_cb = depose_war
using_cb = claimant_faction_war
}
}
}
scope:winner = scope:attacker
}
}
# Check which type of message we need to send to the player.
if = {
limit = {
always = yes
should_notify_player_about_neighboring_rulers_wars_trigger = { TARGET_CHARACTER = scope:loser }
}
# Send combined message about both the winner and the loser.
send_interface_message = {
type = msg_war_ended_neighbor
left_icon = scope:winner
right_icon = scope:loser
title = war_event.neighbor_war.both_neighbors.t
desc = war_event.neighbor_war.both_neighbors.desc
}
}
else = {
# Send message only about the winner.
send_interface_message = {
type = msg_war_ended_neighbor
left_icon = scope:winner
right_icon = scope:loser
title = war_event.neighbor_war.only_winner.t
desc = war_event.neighbor_war.only_winner.desc
}
}
}
else_if = {
limit = {
should_notify_player_about_neighboring_rulers_wars_trigger = { TARGET_CHARACTER = scope:loser }
# Only notify about revolts if rebels win
trigger_if = {
limit = {
scope:war = {
OR = {
using_cb = peasant_war
using_cb = independence_faction_war
using_cb = liberty_faction_war
using_cb = populist_war
using_cb = depose_war
using_cb = claimant_faction_war
}
}
}
scope:winner = scope:attacker
}
}
# Send message only about the loser.
send_interface_message = {
type = msg_war_ended_neighbor
left_icon = scope:loser
right_icon = scope:winner
title = war_event.neighbor_war.only_loser.t
desc = war_event.neighbor_war.only_loser.desc
}
}
}
}As written in game/common/scripted_effects/00_war_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls notify_players_about_neighboring_war_resolution_effect.
On actions (the game's own hooks) (2)
- on_war_won_attacker
- on_war_won_defender
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.