Scripted effect · Tours and Tournaments files
tournament_accidental_death_effect
tournament_accidental_death_effect = yesgame/common/scripted_effects/04_dlc_ep2_tournament_effects.txt, line 7402 (88 lines). No parameters.
tournament_accidental_death_effect is a scripted effect in Crusader Kings III, in the Tours and Tournaments files, written at line 7402 of its file. It takes no parameters: tournament_accidental_death_effect = yes. The game's script calls it in 2 places, among them tournament_events.0700 (event) and contest_events.1120 (event). Patch 1.20.1.2, from game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt.
The comment above it in the file
Accidentally kill a character, inform other attendees, and track total number of accidents
What it does
scope:activity:If a check the game hides passes: the same again (1 line)
scope:accident_victim:death = { death_reason = death_contest_melee_accident killer = scope:accident_killer }
Otherwise
scope:accident_victim:death = { death_reason = death_contest_melee_accident }
- Every attending character:
If
One of these
has_any_scripted_relation = scope:accident_victimor
is_close_family_of = scope:accident_victimor
is_consort_of = scope:accident_victimor
All of these
this = scope:accident_victim.liegetier_difference = { target = scope:accident_victim value <= 1 }
or
liege = scope:accident_victim
Then
- Event tournament_events.0701
Otherwise
If
a check the game hides
Then
scope:accident_victim:death = { death_reason = death_contest_melee_accident killer = scope:accident_killer }
Otherwise
scope:accident_victim:death = { death_reason = death_contest_melee_accident }
• 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 (88 lines of game script)
tournament_accidental_death_effect = {
scope:activity = {
if = {
limit = { exists = scope:accident_killer }
add_activity_log_entry = {
key = tournament_accident_killer_log
tags = { contestant death bad }
score = 25
character = scope:accident_victim
target = scope:accident_killer
}
scope:accident_victim = {
death = {
death_reason = death_contest_melee_accident
killer = scope:accident_killer
}
}
}
else = {
add_activity_log_entry = {
key = tournament_accident_log
tags = { contestant death bad }
score = 25
character = scope:accident_victim
}
scope:accident_victim = {
death = { death_reason = death_contest_melee_accident }
}
}
every_attending_character = {
if = {
limit = {
OR = {
has_any_scripted_relation = scope:accident_victim
is_close_family_of = scope:accident_victim
is_consort_of = scope:accident_victim
AND = {
this = scope:accident_victim.liege
tier_difference = {
target = scope:accident_victim
value <= 1
}
}
liege = scope:accident_victim
}
}
trigger_event = tournament_events.0701
}
else = {
send_interface_message = {
type = event_death_bad
title = tournament_accident_death_msg_title
left_icon = scope:accident_victim
show_as_tooltip = {
if = {
limit = { exists = scope:accident_killer }
scope:accident_victim = {
death = {
death_reason = death_contest_melee_accident
killer = scope:accident_killer
}
}
}
else = {
scope:accident_victim = {
death = { death_reason = death_contest_melee_accident }
}
}
}
}
}
}
# For making sure there are not obscene numbers of accidents
if = {
limit = { exists = var:accident_death_count }
change_variable = {
name = accident_death_count
add = 1
}
}
else = {
set_variable = {
name = accident_death_count
value = 1
}
}
}
}As written in game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls tournament_accidental_death_effect.
Source: game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.