CK3 DatabaseCrusader Kings III · 1.20.1.2 “Crozier” · unofficial
Silk & Silverout Tue, Nov 17What's free, what needs the DLC, price →

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)

27 more

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.

Spotted a mistake on this page?