You are on page 1of 6

#Events notifying about prison status changes

namespace = prison_notification

#I have been imprisoned!


prison_notification.0001 = {
type = character_event
title = prison_notification.0001.t
desc = prison_notification.0001.desc
theme = prison
left_portrait = {
character = scope:prisoner
animation = sadness

}
right_portrait = {
character = scope:imprisoner
}

trigger = {
NOT = {
has_character_flag = was_abducted_block_notification_event
}
}

on_trigger_fail = {
if = {
limit = {
has_character_flag = was_abducted_block_notification_event
}
remove_character_flag = was_abducted_block_notification_event
}
}

immediate = {
play_music_cue = "mx_cue_prison"
save_scope_as = prisoner

# Figure out who needs to be notified about this character being


imprisoned.
every_player = {
save_scope_as = this_player
if = { # If prisoner is a player's heir or spouse, send them a
full pop-up event.
limit = {
OR = {
AND = {
exists = player_heir
player_heir = scope:prisoner
}
AND = {
exists = primary_heir
primary_heir = scope:prisoner
}
is_consort_of = scope:prisoner
}
}
trigger_event = prison_notification.0002
}
else_if = { # Otherwise, if they are of interest to a player,
send the player a notification
limit = {
scope:prisoner = {
has_any_relation_trigger = {CHARACTER =
scope:this_player }
}
}
trigger_event = prison_notification.0003
}
}
}

option = {
name = prison_notification.0001.a
}
}

#My significant relation has been imprisoned!


prison_notification.0002 = {
type = character_event
title = prison_notification.0002.t
desc = prison_notification.0002.desc
theme = prison
left_portrait = {
character = scope:prisoner
animation = sadness

}
right_portrait = {
character = scope:imprisoner
}

trigger = {
NOT = { scope:imprisoner = root }
NOT = { scope:prisoner = { has_character_flag =
block_imprisonment_event } }
}

immediate = {
show_as_tooltip = {
scope:imprisoner = {
imprison = {
target = scope:prisoner
type = dungeon
}
}
}
}

option = {
name = prison_notification.0002.a
}
}

#My less-significant relation has been imprisoned!


prison_notification.0003 = {
hidden = yes
trigger = {
NOT = { scope:imprisoner = root }
NOT = { scope:prisoner = { has_character_flag =
block_imprisonment_event } }
}

immediate = {
send_interface_message = {
type = event_prison_neutral
title = prison_notification.0003.message

left_icon = scope:prisoner
right_icon = scope:imprisoner

show_as_tooltip = {
scope:imprisoner = {
imprison = {
target = scope:prisoner
type = dungeon
}
}
}
}
}
}

#I have been moved to the dungeon!


prison_notification.1001 = {
type = character_event
title = prison_notification.1001.t
desc = prison_notification.1001.desc
theme = prison
left_portrait = {
character = root
animation = sadness

}
right_portrait = {
character = scope:imprisoner
animation = schadenfreude
}

option = {
name = prison_notification.1001.a
custom_tooltip = prison_notification.1001.a.tt
}
}

#I have been moved to house arrest!


prison_notification.1002 = {
type = character_event
title = prison_notification.1002.t
desc = prison_notification.1002.desc
theme = prison
left_portrait = {
character = root
animation = happiness
}
right_portrait = {
character = scope:imprisoner
}

option = {
name = prison_notification.1002.a
custom_tooltip = prison_notification.1002.a.tt
}
}

#I have been released!


prison_notification.2001 = {
type = character_event
title = prison_notification.2001.t
desc = prison_notification.2001.desc
theme = prison
override_background = {
event_background = sitting_room
}
left_portrait = {
character = root
animation = happiness
}
lower_right_portrait = {
character = scope:imprisoner
}

trigger = { NOT = { has_character_flag =


block_for_prison_release_notification } }

immediate = {
save_scope_as = prisoner

# Figure out who needs to be notified about this character being


released.
every_player = {
save_scope_as = this_player

if = { # If prisoner is a player's heir or spouse, send them a


full pop-up event.
limit = {
OR = {
AND = {
exists = player_heir
player_heir = scope:prisoner
}
AND = {
exists = primary_heir
primary_heir = scope:prisoner
}
is_consort_of = scope:prisoner
}
}
trigger_event = prison_notification.2002
}
else_if = { # Otherwise, if they are of interest to a player,
send the player a notification
limit = {
scope:prisoner = {
has_any_relation_trigger = {CHARACTER =
scope:this_player }
}
}
trigger_event = prison_notification.2003
}
}
}

option = {
name = prison_notification.2001.a
}
}

#My significant relation has been released!


prison_notification.2002 = {
type = character_event
title = prison_notification.2002.t
desc = prison_notification.2002.desc
theme = prison
override_background = {
event_background = sitting_room
}
left_portrait = {
character = scope:prisoner
animation = happiness
}
lower_right_portrait = {
character = scope:imprisoner
}

trigger = {
NOT = { scope:imprisoner = root }
NOT = { scope:prisoner = { has_character_flag =
block_release_from_prison_event } }
scope:prisoner = {
is_alive = yes
}
}

immediate = {
show_as_tooltip = {
scope:prisoner = {
release_from_prison = yes
}
}
}

option = {
name = prison_notification.2002.a
}
}

#My less-significant relation has been released!


prison_notification.2003 = {
hidden = yes

trigger = {
NOT = { scope:imprisoner = root }
NOT = { scope:prisoner = { has_character_flag =
block_release_from_prison_event } }
scope:prisoner = {
is_alive = yes
}
}

immediate = {
send_interface_message = {
type = event_prison_neutral
title = prison_notification.2003.message

left_icon = scope:prisoner
right_icon = scope:imprisoner

show_as_tooltip = {
scope:prisoner = {
release_from_prison = yes
}
}
}
}
}

You might also like