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

Scripted effect

ai_chance_to_switch_to_travel_focus_effect

ai_chance_to_switch_to_travel_focus_effect = yes

game/common/scripted_effects/00_lifestyle_focus_effects.txt, line 936 (131 lines). No parameters.

ai_chance_to_switch_to_travel_focus_effect is a scripted effect in Crusader Kings III, written at line 936 of its file. It takes no parameters: ai_chance_to_switch_to_travel_focus_effect = yes. The game's script calls it in 1 place, among them five_year_playable_pulse (on action). Patch 1.20.1.2, from game/common/scripted_effects/00_lifestyle_focus_effects.txt.

What it does

  • If

    Then

    • …% chance of › 1 of 3 things will happen:
      • 33% (base chance; changed in play):
        • set_focus = wanderer_internal_affairs_focus
      • 33% (base chance; changed in play):
        • set_focus = wanderer_journey_focus
      • 33% (base chance; changed in play):
        • set_focus = wanderer_destination_focus

• 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)
ai_chance_to_switch_to_travel_focus_effect = {
	if = {
		limit = {
			is_ai = yes
			is_adult = yes
			is_at_war = no
			is_landed = yes
			has_bp3_dlc_trigger = yes
			gold >= minor_gold_value
			highest_held_title_tier >= tier_county
			has_completed_one_tree_in_current_lifestyle_trigger = yes
			NOR = {
				has_focus = wanderer_internal_affairs_focus
				has_focus = wanderer_journey_focus
				has_focus = wanderer_destination_focus
				has_trait = reclusive
				is_incapable = yes
				has_character_modifier = isolating_modifier
			}
		}
		random = {
			chance = {
				value = 5
				if = {
					limit = {
						has_completed_current_lifestyle_trigger = yes # No good reason to stick with your lifestyle
					}
					add = 75
				}
				if = {
					limit = {
						has_trait_xp = {
							trait = lifestyle_traveler
							track = travel
							value >= 25
						}
					}
					add = 20
				}
				if = {
					limit = {
						has_trait_xp = {
							trait = lifestyle_traveler
							track = travel
							value >= 50
						}
					}
					add = 20
				}
				if = { # Busy doing.. other things
					limit = {
						has_focus = intrigue_temptation_focus
					}
					add = -20
				}
				if = { # Wants to get away
					limit = {
						has_trait = shy
					}
					add = {
						value = root.perk_points_assigned
						multiply = 3
					}
				}
				if = { # Very stressed
					limit = {
						stress >= 150
					}
					add = {
						value = root.perk_points_assigned
						multiply = 3
					}
				}
				if = { # Has an adventurous sort of personality
					limit = {
						ai_sociability >= 50
						ai_boldness >= 0
					}
					add = {
						value = root.perk_points_assigned
						multiply = 3
					}
				}
			}
			random_list = {
				1 = { # Stewards and realm-focused character
					modifier = {
						add = 99
						OR = {
							ai_has_economical_boom_personality = yes
							has_focus_stewardship = yes
							has_trait = greedy
						}
					}
					set_focus = wanderer_internal_affairs_focus
				}
				1 = { # Stressed or asocial characters
					modifier = {
						add = 99
						OR = {
							stress >= 50
							ai_sociability <= -25
						}
						NOT = {
							has_trait = impatient
						}
					}
					modifier = {
						add = 100
						stress >= 150
						NOT = {
							has_trait = impatient
						}
					}
					set_focus = wanderer_journey_focus
				}
				1 = { # Learning focused self-improvement characters
					modifier = {
						add = 99
						OR = {

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

The first 120 of its 131 lines; the rest is in game/common/scripted_effects/00_lifestyle_focus_effects.txt from line 936.

Where it is used

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

On actions (the game's own hooks) (1)

  • five_year_playable_pulse

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?