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

Scripted effect

hunter_lifestyle_rank_up_check_effect

hunter_lifestyle_rank_up_check_effect = { FALCONRY = … }

game/common/scripted_effects/00_lifestyle_focus_effects.txt, line 441 (109 lines). Parameters: $FALCONRY$.

hunter_lifestyle_rank_up_check_effect is a scripted effect in Crusader Kings III, written at line 441 of its file. A call passes 1 parameter: FALCONRY. The game's script calls it in 3 places, among them tgp_outlawed_falconry_hunt_end_effect (local effect), hunt_individual_guest_awards_effect (scripted effect) and hunt_invalidation_event_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/00_lifestyle_focus_effects.txt.

What it does

  • If does not have the Trait: Hunter: Gains the Trait Hunter
  • Else, if (a hidden condition):
    • add_trait_force_tooltip = lifestyle_hunter
  • If

    Then

    • If hunter lifestyle progress at least hunter rank up 3 threshold: Hunter (falconer) experience +15
    • Else, if hunter lifestyle progress at least hunter rank up 2 threshold: Hunter (falconer) experience +10
    • Else, if hunter lifestyle progress at least hunter rank up 1 threshold: Hunter (falconer) experience +5
    • Otherwise: Hunter (falconer) experience +3
  • Else, if has the Trait: Hunter:
    • If hunter lifestyle progress at least hunter rank up 3 threshold: Hunter (hunter) experience +15
    • Else, if hunter lifestyle progress at least hunter rank up 2 threshold: Hunter (hunter) experience +10
    • Else, if hunter lifestyle progress at least hunter rank up 1 threshold: Hunter (hunter) experience +5
    • Otherwise: Hunter (hunter) experience +3

• 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 (109 lines of game script)
hunter_lifestyle_rank_up_check_effect = {
	save_scope_value_as = {
		name = falconry
		value = $FALCONRY$
	}
	if = {
		limit = {
			is_alive = yes
			NOT = { has_trait = lifestyle_hunter }
			exists = var:hunter_lifestyle_progress
		}
		add_trait = lifestyle_hunter
	}
	else_if = { # To show host trait gain for guests
		limit = {
			is_alive = yes
			exists = var:hunter_lifestyle_progress
			NOT = { has_character_flag = host_existing_hunter }
		}
		add_trait_force_tooltip = lifestyle_hunter
	}	
	if = {
		limit = {
			is_alive = yes 
			exists = var:hunter_lifestyle_progress
			has_trait = lifestyle_hunter
			scope:falconry = yes
		}
		send_interface_toast = {
			title = hunter_xp_gain_message
			if = {
				limit = { var:hunter_lifestyle_progress >= hunter_rank_up_3_threshold }
				add_trait_xp = {
					trait = lifestyle_hunter
					track = falconer
					value = 15
				}
			}
			else_if = {
				limit = { var:hunter_lifestyle_progress >= hunter_rank_up_2_threshold }
				add_trait_xp = {
					trait = lifestyle_hunter
					track = falconer
					value = 10
				}
			}
			else_if = {
				limit = { var:hunter_lifestyle_progress >= hunter_rank_up_1_threshold }
				add_trait_xp = {
					trait = lifestyle_hunter
					track = falconer
					value = 5
				}
			}
			else = {
				add_trait_xp = {
					trait = lifestyle_hunter
					track = falconer
					value = 3
				}
			}
		}
	}
	else_if = {
		limit = {
			is_alive = yes
			exists = var:hunter_lifestyle_progress
			has_trait = lifestyle_hunter
		}
		send_interface_toast = {
			title = hunter_xp_gain_message
			if = {
				limit = { var:hunter_lifestyle_progress >= hunter_rank_up_3_threshold }
				add_trait_xp = {
					trait = lifestyle_hunter
					track = hunter
					value = 15
				}
			}
			else_if = {
				limit = { var:hunter_lifestyle_progress >= hunter_rank_up_2_threshold }
				add_trait_xp = {
					trait = lifestyle_hunter
					track = hunter
					value = 10
				}
			}
			else_if = {
				limit = { var:hunter_lifestyle_progress >= hunter_rank_up_1_threshold }
				add_trait_xp = {
					trait = lifestyle_hunter
					track = hunter
					value = 5
				}
			}
			else = {
				add_trait_xp = {
					trait = lifestyle_hunter
					track = hunter
					value = 3
				}
			}
		}
	}
	set_variable = {
		name = hunter_lifestyle_progress
		value = 0
	}
}

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

Where it is used

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

Scripted effects inside an event file (1)

  • tgp_outlawed_falconry_hunt_end_effect

Source: game/common/scripted_effects/00_lifestyle_focus_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?