Scripted effect
select_local_animal_effect
select_local_animal_effect = { TYPE = … }game/common/scripted_effects/00_hunt_effects.txt, line 26 (223 lines). Parameters: $TYPE$.
select_local_animal_effect is a scripted effect in Crusader Kings III, written at line 26 of its file. A call passes 1 parameter: TYPE. The game's script calls it in 35 places, among them … Struggle (event travel_events.4032), …, the … … (event travel_events.4012) and …: In the Eye of the Beholder (event tour_general.3001). Patch 1.20.1.2, from game/common/scripted_effects/00_hunt_effects.txt.
The comment above it in the file
Used to find a local animal to hunt Note: Don't add more here without also revisiting artifact creation for Skulls and hides. Note: May save any of below scopes before running the effect to limit possible animals: big_local_game small_local_game dangerous_local_game harmless_local_game prowling_local_game
What it does
Every line of it is script with no tooltip text: the script is below.
The script as written (120 lines of game script)
select_local_animal_effect = {
save_scope_as = $TYPE$_local_game
location = { save_scope_as = animal_location }
hidden_effect = {
if = {
limit = {
NOT = { exists = var:animal_type }
}
random_list = {
60 = { # Deer, Antelope, Gazelle, etc.
trigger = {
scope:animal_location = { hunt_animal_deer_antelope_trigger = yes }
NOT = { exists = scope:dangerous_local_game }
NOT = { exists = scope:prowling_local_game }
}
hunt_activity_deer_game_effect = { PROVINCE = scope:animal_location }
}
20 = { # Boar
trigger = {
scope:animal_location = { hunt_animal_boar_trigger = yes }
NOT = { exists = scope:small_local_game }
NOT = { exists = scope:harmless_local_game }
NOT = { exists = scope:prowling_local_game }
}
# they're everywhere, but Muslims and Jews wouldn't hunt them
modifier = {
factor = 0
faith = {
OR = {
religion_tag = islam_religion
religion_tag = judaism_religion
}
}
}
set_variable = { name = animal_type value = flag:boar years = 3 }
}
10 = { # Fox
trigger = {
scope:animal_location = { hunt_animal_fox_trigger = yes }
NOT = { exists = scope:big_local_game }
NOT = { exists = scope:dangerous_local_game }
NOT = { exists = scope:prowling_local_game }
}
# they're everywhere
set_variable = { name = animal_type value = flag:fox years = 3 }
}
1 = { # Aurochs
trigger = {
scope:animal_location = { hunt_animal_aurochs_trigger = yes }
NOT = { religion = religion:hinduism_religion }
NOT = { exists = scope:small_local_game }
NOT = { exists = scope:dangerous_local_game }
NOT = { exists = scope:prowling_local_game }
}
set_variable = { name = animal_type value = flag:aurochs }
}
10 = { # Bison
trigger = {
scope:animal_location = { hunt_animal_bison_trigger = yes }
NOT = { exists = scope:small_local_game }
NOT = { exists = scope:dangerous_local_game }
NOT = { exists = scope:prowling_local_game }
}
set_variable = { name = animal_type value = flag:bison }
}
10 = { # Wolf, Hyena, Lynx
trigger = {
NOT = { exists = scope:harmless_local_game }
scope:animal_location = {
OR = {
hunt_animal_wolf_trigger = yes
hunt_animal_hyena_trigger = yes
hunt_animal_lynx_trigger = yes
}
}
}
random_list = {
10 = { # Wolf
trigger = {
scope:animal_location = { hunt_animal_wolf_trigger = yes }
}
set_variable = { name = animal_type value = flag:wolf years = 3 }
}
20 = { # Hyena
trigger = {
scope:animal_location = { hunt_animal_hyena_trigger = yes }
}
set_variable = { name = animal_type value = flag:hyena years = 3 }
}
5 = { # Lynx
trigger = {
scope:animal_location = { hunt_animal_lynx_trigger = yes }
}
set_variable = { name = animal_type value = flag:lynx years = 3 }
}
}
}
1 = { # Hare
trigger = {
NOT = { exists = scope:dangerous_local_game }
NOT = { exists = scope:prowling_local_game }
}
modifier = {
exists = scope:big_local_game
add = -5
}
modifier = {
add = 10 #A really poor hunter or a child has a higher chance of focusing on hunting a hare
OR = {
is_adult = no
adventure_inspiration_average_skill_value < 2
}
}
set_variable = { name = animal_type value = flag:hare years = 3 }
}
5 = { # Bear
trigger = {
NOT = { exists = scope:small_local_game }
NOT = { exists = scope:harmless_local_game }
NOT = { exists = scope:prowling_local_game }As written in game/common/scripted_effects/00_hunt_effects.txt.
The first 120 of its 223 lines; the rest is in game/common/scripted_effects/00_hunt_effects.txt from line 26.
Where it is used
Every place in common/, events/ and history/ that calls select_local_animal_effect.
Events (33)
- … Struggle
travel_events.4032 - …, the … …
travel_events.4012 - …: In the Eye of the Beholder
tour_general.3001 - …: The Little Hunter
tour_grounds_events.1014 - A Legendary Guest
ep2_wedding.2010 - A Matter of Life and Death
fp1_yearly.0021
27 more
- A Moment in the Wilds
tour_grounds_events.1005 - A Sinister Consideration
bp1_yearly.9006 - Beneath Those Layers
seduce_ongoing.7202 - Budding Attraction
child_personality.4011 - Chronicler: A Legend Found
legend_events.0001 - Danger: …, the Outlander
travel_events.4020 - Inspiration: … … in the …
fund_inspiration.9100 - Into the …: A Monster!
martial_chivalry.6001 - Learn Language: Infantile Fables
learn_language_ongoing.1120 - Perform in a Play
laamp_base_contract_schemes.6021 - Perform in a Play: Failure!
laamp_base_contract_schemes.6023 - Perform in a Play: Success!
laamp_base_contract_schemes.6022 - Predatory Beasts
governor_contract_event.2040 - Preparations for the Hunt
fp1_yearly.2400 - Protect the Innocent: Success!
laamp_base_contract_schemes.6002 - Reflections: A Beastly Omen
pilgrimage_intent.1040 - Rescue a Fair Subject: Success!
laamp_base_contract_schemes.6012 - Rites of Passage: Seclusion
bp2_yearly.7025 - Romance: The Wild Hunt
court_outcome.1001 - The … Child
legend_spread_events.8190 - The Beast of …
fp1_yearly.0541 - The Stench of Success
fp1_yearly.0511 - Trouble in the Garden
yearly.9100 - Under Attack
hunt.8510 - Under the Open Sky
seduce_outcome.2304 - Under the Open Sky
seduce_outcome.3304 - Wild at Heart
court.7600
Scripted effects (2)
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.