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

Scripted effect

hunt_animal_melee_kill_effect

hunt_animal_melee_kill_effect = { DEATH = … VAR = … }

game/common/scripted_effects/00_hunt_effects.txt, line 1500 (187 lines). Parameters: $DEATH$, $VAR$.

hunt_animal_melee_kill_effect is a scripted effect in Crusader Kings III, written at line 1500 of its file. A call passes 2 parameters: DEATH and VAR. The game's script calls it in 4 places, among them Cornering the … (event hunt.1003), Rampaging … (event hunt.4007) and Rampaging … (event hunt.4900). Its body carries 1 text 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

• 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_effect = {
	save_scope_as = melee_kill
	play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Hunts/ConstructionKits/ep2_event_grand_hunt_ck_spear_impact"
	hunt_animal_kill_effect = { DEATH = $DEATH$ VAR = $VAR$ }
	hunter_progress_point_gain_effect = { CHANGE = 3 RANDOM_CHANGE = 1 } #Gives Hunter Lifestyle XP
	# Determine who could be wounded
	scope:activity ?= {
		random_attending_character = {
			limit = { is_alive = yes }
			save_scope_as = injury_target
			hunt_wound_select_effect = yes
		}
	}
	save_scope_as = injury_target
	hunt_wound_select_effect = yes
	duel = {
		skill = prowess
		value = hunt_melee_kill_prowess_value
		50 = {
			desc = hunt_kill_success_melee
			hunt_kill_melee_modifiers = yes # SPEAR
			hunt_kill_hunter_modifiers = yes # HUNTER
			if = { #chance_to_gain_prowess_during_bear_hunts parameter check
				limit = {
					rite = { rite_has_parameter = chance_to_gain_prowess_during_bear_hunts }
					scope:activity.var:animal_type = flag:bear
				}
				add_prowess_skill = 1
				add_martial_skill = 1
			}
			send_interface_toast = {
				title = {
					first_valid = {
						triggered_desc = {
							trigger = { scope:animal_slayer ?= root }
							desc = hunt_kill_success_melee_root
						}
						desc = hunt_kill_success_melee_guest
					}
				}
				left_icon = scope:animal_slayer
				scope:activity ?= {
					add_activity_log_entry = {
						key = hunt_melee_log
						tags = { kill }
						score = 100

						character = scope:animal_slayer

						#Effect
						scope:animal_slayer ?= {
							add_prestige = hunt_prestige_melee_value
							# Complete activity intent if relevant
							if = {
								limit = {
									AND = {
										scope:hunt_kill_death_chance = flag:yes
										NOT = {
											hunt_small_game_trigger = { VAR = $VAR$ }
										}
									}
								}
								hunt_animal_slayer_memory_effect = yes
							}
						}
					}
				}
			}
			save_scope_as = melee_success
		}
		1 = { # Injury
			desc = hunt_kill_failure_melee
			compare_modifier = {
				value = scope:duel_value
				multiplier = -3.5
				min = 5
			}
			modifier = {
				hunt_small_game_trigger = { VAR = $VAR$ }
				factor = 0.05
			}
			modifier = { add = hunt_melee_danger_value }
			# Effect
			hidden_effect = {
				scope:injury_target = {
					if = {
						limit = {
							hunt_animal_type_dangerous_trigger = { VAR = $VAR$ }
						}
						hunt_wound_apply_effect = { SEVERE = yes }
					}
					else = {
						hunt_wound_apply_effect = { SEVERE = no }
					}
				}
			}
			scope:activity ?= {
				add_activity_log_entry = {
					key = hunt_melee_log
					tags = { kill }
					score = 100

					character = scope:animal_slayer

					#Effects
					scope:animal_slayer ?= {
						add_prestige = hunt_prestige_melee_wound_value
						# Complete activity intent if relevant
						if = {
							limit = {
								AND = {
									scope:hunt_kill_death_chance = flag:yes
									NOT = {
										hunt_small_game_trigger = { VAR = $VAR$ }
									}
								}
							}
							hunt_animal_slayer_memory_effect = yes
						}
					}

As written in game/common/scripted_effects/00_hunt_effects.txt.

The first 120 of its 187 lines; the rest is in game/common/scripted_effects/00_hunt_effects.txt from line 1500.

Where it is used

Every place in common/, events/ and history/ that calls hunt_animal_melee_kill_effect.

Events (4)

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?