Scripted effect
hunt_animal_melee_kill_group_effect
hunt_animal_melee_kill_group_effect = { DEATH = … VAR = … }game/common/scripted_effects/00_hunt_effects.txt, line 1688 (177 lines). Parameters: $DEATH$, $VAR$.
hunt_animal_melee_kill_group_effect is a scripted effect in Crusader Kings III, written at line 1688 of its file. A call passes 2 parameters: DEATH and VAR. The game's script calls it in 2 places, among them Cornering the … (event hunt.1003) and The … … (event hunt.4017). Its body carries 2 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/00_hunt_effects.txt.
What it does
hunt_animal_kill_effect = { DEATH = $DEATH$ VAR = $VAR$ }- scope:activity › Every Participant:
- Where:
can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
hunter_progress_point_gain_effect = { CHANGE = 1 RANDOM_CHANGE = 1 }
- Where:
- One random in list:
hunt_wound_select_effect = yes
- 1 of 4 things will happen:
- 37% – The beast is captured › scope:activity › Activity log entry › Every Participant: Gain 8.33–50 Prestige
- 37% – The beast is slain › scope:activity › Activity log entry › Every Participant: Gain 8.33–50 Prestige
- 19% – ...but wounds someone (base chance; changed in play):
- 7% – ...but kills someone (base chance; changed in play): A random Participant dies
- scope:activity › Every attending character:
- Where: Is played by a person
- Event hunt.1202
• 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)
hunt_animal_melee_kill_group_effect = {
save_scope_as = group_kill
hunt_animal_kill_effect = { DEATH = $DEATH$ VAR = $VAR$ }
scope:activity ?= {
# Determine who is slaying
every_attending_character = {
limit = {
is_alive = yes
NOT = { has_character_flag = not_slaying }
can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
trigger_if = {
limit = { exists = scope:group_craven }
this != scope:host
}
}
custom = hunt_every_hunter_tt
add_to_list = animal_slayers
hunter_progress_point_gain_effect = { CHANGE = 1 RANDOM_CHANGE = 1 } #Gives Hunter Lifestyle XP
}
}
# Determine who could be wounded
random_in_list = {
list = animal_slayers
weight = {
base = 20
hunt_likely_injured_modifiers = yes
}
save_scope_as = injury_target
hunt_wound_select_effect = yes
}
# Outcome
random_list = {
50 = { # Animal is captured
trigger = { exists = scope:group_capture }
desc = hunt_kill_success_capture
scope:activity ?= {
add_activity_log_entry = {
key = hunt_melee_capture_log
score = 75
tags = { kill }
character = scope:animal_slayer
# Effect
every_in_list = {
list = animal_slayers
custom = hunt_every_hunter_tt
add_prestige = hunt_prestige_melee_group_value
}
}
}
save_scope_as = group_success
}
50 = { # Animal is slain
trigger = {
NOT = { exists = scope:group_capture }
}
desc = hunt_kill_success_melee
scope:activity ?= {
add_activity_log_entry = {
key = hunt_melee_group_log
score = 75
tags = { kill }
character = scope:animal_slayer
# Effect
every_in_list = {
list = animal_slayers
custom = hunt_every_hunter_tt
add_prestige = hunt_prestige_melee_group_value
}
}
}
save_scope_as = group_success
}
25 = { # ...but someone is injured
desc = hunt_kill_failure_melee_group
modifier = { add = hunt_melee_kill_prowess_value }
modifier = {
hunt_small_game_trigger = { VAR = $VAR$ }
factor = 0.1
}
modifier = { add = hunt_melee_danger_value }
# Effect
hidden_effect = {
scope:injury_target = {
if = { # Big animal injure big
limit = {
hunt_animal_type_dangerous_trigger = { VAR = $VAR$ }
}
hunt_wound_apply_effect = { SEVERE = yes }
}
else = { # Smol animal injure smol
hunt_wound_apply_effect = { SEVERE = no }
}
}
}
scope:activity ?= {
add_activity_log_entry = {
key = hunt_melee_group_log
score = 75
tags = { kill }
character = scope:animal_slayer
# Effect
every_in_list = {
list = animal_slayers
custom = hunt_every_hunter_tt
add_prestige = hunt_prestige_melee_wound_group_value
}
}
hidden_effect = {
add_activity_log_entry = {
key = hunt_melee_group_wounded_log
score = 75
tags = { kill }
character = scope:injury_target
scope:injury_target = { hunt_wound_tooltip_effect = yes }
}
}
}As written in game/common/scripted_effects/00_hunt_effects.txt.
The first 120 of its 177 lines; the rest is in game/common/scripted_effects/00_hunt_effects.txt from line 1688.
Where it is used
Every place in common/, events/ and history/ that calls hunt_animal_melee_kill_group_effect.
Events (2)
- Cornering the …
hunt.1003 - The … …
hunt.4017
Source: game/common/scripted_effects/00_hunt_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.