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

Scripted effect

set_favorite_treat_effect

set_favorite_treat_effect = yes

game/common/scripted_effects/00_personal_details_effects.txt, line 707 (573 lines). No parameters.

set_favorite_treat_effect is a scripted effect in Crusader Kings III, written at line 707 of its file. It takes no parameters: set_favorite_treat_effect = yes. The game's script calls it in 16 places, among them …: Suq al-Warraqin (event travel_events_cities.1010), A … Specialty (event bp3_journey.2100) and A Deep Friendship (event childhood.1000). Patch 1.20.1.2, from game/common/scripted_effects/00_personal_details_effects.txt.

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)
set_favorite_treat_effect = {
	if = {
		limit = { NOT = { has_variable = favorite_treat } }
		hidden_effect = {
			random_list = {
				10 = {
					trigger = {
						trigger_if = {
							limit = {
								exists = capital_province
								is_travelling = no #Let's pick something from our location instead.
							}
							capital_province = {
								NOT = {
									geographical_region = world_europe_north
								}
							}
						}
						trigger_else_if = {
							limit = {
								exists = liege.capital_province
								is_travelling = no #Let's pick something from our location instead.
							}
							liege.capital_province = {
								NOT = {
									geographical_region = world_europe_north
								}
							}
						}
						trigger_else_if = {
							limit = {
								exists = location
							}
							location = {
								NOT = {
									geographical_region = world_europe_north
								}
							}
						}
						trigger_else = {
							always = no
						}
					}
					set_variable = {
						name = favorite_treat
						value = flag:comfit #famous in sicily
					}
				}
				10 = {
					set_variable = {
						name = favorite_treat
						value = flag:roasted_almonds
					}
				}
				10 = {
					trigger = {
						trigger_if = {
							limit = {
								exists = capital_province
								is_travelling = no #Let's pick something from our location instead.
							}
							capital_province = {
								OR = {
									geographical_region = world_middle_east
									geographical_region = world_asia_minor
									geographical_region = world_india
									geographical_region = world_africa_north
									geographical_region = world_europe_south
									geographical_region = world_asia_china
									geographical_region = world_asia_japan
									geographical_region = world_asia_korea
									geographical_region = world_asia_southeast
								}
							}
						}
						trigger_else_if = {
							limit = {
								exists = liege.capital_province
								is_travelling = no #Let's pick something from our location instead.
							}
							liege.capital_province = {
								OR = {
									geographical_region = world_middle_east
									geographical_region = world_asia_minor
									geographical_region = world_india
									geographical_region = world_africa_north
									geographical_region = world_europe_south
									geographical_region = world_asia_china
									geographical_region = world_asia_japan
									geographical_region = world_asia_korea
									geographical_region = world_asia_southeast
								}
							}
						}
						trigger_else_if = {
							limit = {
								exists = location
							}
							location = {
								OR = {
									geographical_region = world_middle_east
									geographical_region = world_asia_minor
									geographical_region = world_india
									geographical_region = world_africa_north
									geographical_region = world_europe_south
									geographical_region = world_asia_china
									geographical_region = world_asia_japan
									geographical_region = world_asia_korea
									geographical_region = world_asia_southeast
								}
							}
						}
						trigger_else = {
							always = no
						}
					}
					set_variable = {
						name = favorite_treat
						value = flag:nougat
					}

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

The first 120 of its 573 lines; the rest is in game/common/scripted_effects/00_personal_details_effects.txt from line 707.

Where it is used

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

Events (16)

10 more

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