﻿namespace = cagm_vintage

cagm_vintage.0001 = {
	type = activity_event
	title = cagm_vintage.0001.t
	desc = cagm_vintage.0001.desc
	theme = stewardship
	override_background = { reference = bp1_kitchen_western }
	left_portrait = { character = root animation = personality_rational }
	right_portrait = { trigger = { exists = scope:lead_producer } character = scope:lead_producer animation = admiration }
	immediate = {
		if = {
			limit = {
				root = { exists = court_position:court_brewmaster_court_position }
				root.court_position:court_brewmaster_court_position = { is_available_adult = yes }
			}
			root.court_position:court_brewmaster_court_position = { save_scope_as = lead_producer }
		}
		if = {
			limit = { NOT = { exists = scope:lead_producer } }
			involved_activity = {
				random_attending_character = {
					limit = {
						this != root
						is_available_adult = yes
						OR = { stewardship >= 10 learning >= 10 }
					}
					save_scope_as = lead_producer
				}
			}
		}
		if = {
			limit = { NOT = { exists = scope:lead_producer } }
			create_character = {
				template = cagm_local_production_master_character
				culture = root.location.culture
				faith = root.location.faith
				location = root.location
				save_scope_as = lead_producer
			}
		}
		if = {
			limit = { exists = scope:lead_producer }
			involved_activity = { set_variable = { name = cagm_vintage_lead_producer value = scope:lead_producer } }
		}
	}
	option = {
		name = cagm_vintage.0001.a
		custom_tooltip = cagm_vintage_progress_fair_tt
		involved_activity = { every_attending_character = { limit = { this != scope:host } add_opinion = { target = root modifier = cagm_vintage_fair_share_opinion years = 4 } } }
		hidden_effect = {
			involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 9 } set_variable = { name = cagm_vintage_story_route_fair value = yes } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } }
			trigger_event = { id = cagm_vintage.0100 days = 4 }
		}
		ai_chance = { base = 45 modifier = { add = 25 has_trait = just } }
	}
	option = {
		name = cagm_vintage.0001.b
		add_prestige = 35
		custom_tooltip = cagm_vintage_progress_good_tt
		hidden_effect = {
			involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 7 } set_variable = { name = cagm_vintage_story_route_house value = yes } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } }
			trigger_event = { id = cagm_vintage.0100 days = 4 }
		}
		ai_chance = { base = 35 modifier = { add = 20 has_trait = ambitious } }
	}
	option = {
		name = cagm_vintage.0001.c
		trigger = { gold >= 15 }
		remove_short_term_gold = 15
		custom_tooltip = cagm_vintage_progress_great_cost_tt
		hidden_effect = {
			involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 12 } set_variable = { name = cagm_vintage_story_route_buy value = yes } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } }
			trigger_event = { id = cagm_vintage.0100 days = 4 }
		}
		ai_chance = { base = 20 modifier = { add = 25 stewardship >= 12 } }
	}
}

cagm_vintage.0010 = {
	type = activity_event
	title = cagm_vintage.0010.t
	desc = cagm_vintage.0010.desc
	theme = stewardship
	override_background = { reference = bp1_kitchen_western }
	left_portrait = { character = root animation = thinking }
	option = {
		name = cagm_vintage.0010.a
		custom_tooltip = cagm_vintage_progress_strong_tt
		hidden_effect = {
			involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 10 } set_variable = { name = cagm_vintage_story_method_quality value = yes } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } }
			trigger_event = { id = cagm_vintage.0200 days = 4 }
		}
		ai_chance = { base = 40 modifier = { add = 20 has_trait = patient } }
	}
	option = {
		name = cagm_vintage.0010.b
		add_gold = 25
		custom_tooltip = cagm_vintage_progress_small_volume_tt
		hidden_effect = {
			involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 5 } set_variable = { name = cagm_vintage_story_method_volume value = yes } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } }
			trigger_event = { id = cagm_vintage.0200 days = 4 }
		}
		ai_chance = { base = 25 modifier = { add = 25 has_trait = greedy } }
	}
	option = {
		name = cagm_vintage.0010.c
		custom_tooltip = cagm_vintage_progress_good_tt
		hidden_effect = {
			involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 8 } set_variable = { name = cagm_vintage_story_method_balance value = yes } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } }
			trigger_event = { id = cagm_vintage.0200 days = 4 }
		}
		ai_chance = { base = 35 modifier = { add = 20 stewardship >= 12 } }
	}
}

cagm_vintage.0020 = {
	type = activity_event
	title = cagm_vintage.0020.t
	desc = cagm_vintage.0020.desc
	theme = stewardship
	override_background = { reference = bp1_kitchen_western }
	immediate = { involved_activity.var:cagm_vintage_lead_producer = { save_scope_as = lead_producer } }
	left_portrait = { character = root animation = personality_rational }
	right_portrait = { trigger = { exists = scope:lead_producer } character = scope:lead_producer animation = personality_rational }
	option = {
		name = cagm_vintage.0020.a
		custom_tooltip = cagm_vintage_progress_strong_tt
		hidden_effect = { involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 9 } set_variable = { name = cagm_vintage_production_local value = yes } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } } }
		ai_chance = { base = 40 modifier = { add = 20 has_trait = humble } }
	}
	option = {
		name = cagm_vintage.0020.b
		add_stewardship_lifestyle_xp = 40
		custom_tooltip = cagm_vintage_progress_strong_tt
		hidden_effect = { involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 10 } set_variable = { name = cagm_vintage_production_self value = yes } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } } }
		ai_chance = { base = 40 modifier = { add = 20 stewardship >= 12 } }
	}
	option = {
		name = cagm_vintage.0020.c
		add_stress = 10
		custom_tooltip = cagm_vintage_progress_great_strain_tt
		hidden_effect = { involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 13 } set_variable = { name = cagm_vintage_production_hasty value = yes } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } } }
		ai_chance = { base = 20 modifier = { add = 20 has_trait = impatient } }
	}
	option = {
		name = cagm_vintage.0020.d
		trigger = {
			has_character_modifier = cagm_apiary_honey_reserve
			involved_activity = {
				OR = {
					has_activity_option = { category = cagm_vintage_product option = cagm_vintage_local }
					has_activity_option = { category = cagm_vintage_product option = cagm_vintage_preserved }
				}
			}
		}
		remove_character_modifier = cagm_apiary_honey_reserve
		custom_tooltip = cagm_vintage_royal_honey_tt
		hidden_effect = {
			involved_activity = {
				change_variable = { name = cagm_vintage_event_adjustment add = 14 }
				set_variable = { name = cagm_vintage_production_honey value = yes }
				set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value }
			}
		}
		ai_chance = { base = 10 modifier = { add = 15 learning >= 12 } modifier = { add = 15 has_trait = diligent } }
	}
}

cagm_vintage.0030 = {
	type = activity_event
	title = cagm_vintage.0030.t
	desc = cagm_vintage.0030.desc
	theme = stewardship
	override_background = { reference = bp1_kitchen_western }
	left_portrait = { character = root animation = worry }
	option = {
		name = cagm_vintage.0030.a
		trigger = { gold >= 10 }
		remove_short_term_gold = 10
		custom_tooltip = cagm_vintage_progress_strong_cost_tt
		hidden_effect = { involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 10 } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } } }
		ai_chance = { base = 40 modifier = { add = 20 has_trait = diligent } }
	}
	option = {
		name = cagm_vintage.0030.b
		add_learning_lifestyle_xp = 35
		custom_tooltip = cagm_vintage_progress_good_tt
		hidden_effect = { involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 7 } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } } }
		ai_chance = { base = 40 modifier = { add = 20 learning >= 12 } }
	}
	option = {
		name = cagm_vintage.0030.c
		add_stress = 5
		custom_tooltip = cagm_vintage_progress_great_conceal_tt
		hidden_effect = { involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = -8 } set_variable = { name = cagm_vintage_concealed_fault value = yes } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } } }
		ai_chance = { base = 20 modifier = { add = 25 has_trait = deceitful } modifier = { factor = 0 has_trait = honest } }
	}
}

cagm_vintage.0040 = {
	type = activity_event
	title = cagm_vintage.0040.t
	desc = cagm_vintage.0040.desc
	theme = stewardship
	override_background = { reference = bp1_kitchen_western }
	left_portrait = { character = root animation = admiration }
	option = {
		name = cagm_vintage.0040.a
		custom_tooltip = cagm_vintage_progress_strong_tt
		hidden_effect = { involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 10 } set_variable = { name = cagm_vintage_sealed_record value = yes } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } } }
		ai_chance = { base = 40 modifier = { add = 20 has_trait = patient } }
	}
	option = {
		name = cagm_vintage.0040.b
		custom_tooltip = cagm_vintage_progress_good_opinion_tt
		involved_activity = { every_attending_character = { limit = { this != scope:host } add_opinion = { target = root modifier = cagm_vintage_fair_share_opinion years = 3 } } }
		hidden_effect = { involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 7 } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } } }
		ai_chance = { base = 35 modifier = { add = 20 has_trait = gregarious } }
	}
	option = {
		name = cagm_vintage.0040.c
		add_learning_lifestyle_xp = 40
		custom_tooltip = cagm_vintage_progress_good_tt
		hidden_effect = { involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 8 } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } } }
		ai_chance = { base = 25 modifier = { add = 25 learning >= 12 } }
	}
}

cagm_vintage.0100 = {
	type = activity_event
	title = {
		first_valid = {
			triggered_desc = { trigger = { involved_activity = { has_variable = cagm_vintage_story_route_fair } } desc = cagm_vintage.0100.fair.t }
			triggered_desc = { trigger = { involved_activity = { has_variable = cagm_vintage_story_route_house } } desc = cagm_vintage.0100.house.t }
			desc = cagm_vintage.0100.buy.t
		}
	}
	desc = {
		first_valid = {
			triggered_desc = { trigger = { involved_activity = { has_variable = cagm_vintage_story_route_fair } } desc = cagm_vintage.0100.fair.desc }
			triggered_desc = { trigger = { involved_activity = { has_variable = cagm_vintage_story_route_house } } desc = cagm_vintage.0100.house.desc }
			desc = cagm_vintage.0100.buy.desc
		}
	}
	theme = stewardship
	override_background = { reference = bp1_kitchen_western }
	trigger = { exists = scope:activity involved_activity.activity_host ?= this }
	immediate = { involved_activity.var:cagm_vintage_lead_producer = { save_scope_as = lead_producer } }
	left_portrait = { character = root animation = personality_rational }
	right_portrait = { trigger = { exists = scope:lead_producer } character = scope:lead_producer animation = thinking }

	option = {
		name = cagm_vintage.0100.a
		trigger = { involved_activity = { has_variable = cagm_vintage_story_route_fair } }
		custom_tooltip = cagm_branch_steady_tt
		hidden_effect = { involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 4 } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } add_activity_log_entry = { key = cagm_vintage_log_route_steady character = root score = 10 show_in_conclusion = no } } }
		ai_chance = { base = 65 modifier = { add = 20 has_trait = just } }
	}
	option = {
		name = cagm_vintage.0100.b
		trigger = { involved_activity = { has_variable = cagm_vintage_story_route_fair } }
		add_prestige = 20
		custom_tooltip = cagm_branch_ambitious_tt
		hidden_effect = { involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 2 } set_variable = { name = cagm_vintage_story_route_ambition value = yes } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } add_activity_log_entry = { key = cagm_vintage_log_route_ambitious character = root score = 10 show_in_conclusion = no } } }
		ai_chance = { base = 35 modifier = { add = 20 has_trait = generous } }
	}
	option = {
		name = cagm_vintage.0100.c
		trigger = { involved_activity = { has_variable = cagm_vintage_story_route_house } }
		add_stewardship_lifestyle_xp = 20
		custom_tooltip = cagm_branch_steady_tt
		hidden_effect = { involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 4 } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } add_activity_log_entry = { key = cagm_vintage_log_route_steady character = root score = 10 show_in_conclusion = no } } }
		ai_chance = { base = 65 modifier = { add = 20 stewardship >= 12 } }
	}
	option = {
		name = cagm_vintage.0100.d
		trigger = { involved_activity = { has_variable = cagm_vintage_story_route_house } }
		add_prestige = 30
		custom_tooltip = cagm_branch_ambitious_tt
		hidden_effect = { involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 2 } set_variable = { name = cagm_vintage_story_route_ambition value = yes } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } add_activity_log_entry = { key = cagm_vintage_log_route_ambitious character = root score = 10 show_in_conclusion = no } } }
		ai_chance = { base = 35 modifier = { add = 25 has_trait = greedy } }
	}
	option = {
		name = cagm_vintage.0100.e
		trigger = { involved_activity = { has_variable = cagm_vintage_story_route_buy } }
		add_stewardship_lifestyle_xp = 20
		custom_tooltip = cagm_branch_steady_tt
		hidden_effect = { involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 4 } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } add_activity_log_entry = { key = cagm_vintage_log_route_steady character = root score = 10 show_in_conclusion = no } } }
		ai_chance = { base = 65 modifier = { add = 20 has_trait = diligent } }
	}
	option = {
		name = cagm_vintage.0100.f
		trigger = { involved_activity = { has_variable = cagm_vintage_story_route_buy } }
		add_prestige = 25
		custom_tooltip = cagm_branch_ambitious_tt
		hidden_effect = { involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 2 } set_variable = { name = cagm_vintage_story_route_ambition value = yes } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } add_activity_log_entry = { key = cagm_vintage_log_route_ambitious character = root score = 10 show_in_conclusion = no } } }
		ai_chance = { base = 35 modifier = { add = 25 has_trait = ambitious } }
	}
}

cagm_vintage.0200 = {
	type = activity_event
	title = {
		first_valid = {
			triggered_desc = { trigger = { involved_activity = { has_variable = cagm_vintage_story_method_quality } } desc = cagm_vintage.0200.quality.t }
			triggered_desc = { trigger = { involved_activity = { has_variable = cagm_vintage_story_method_volume } } desc = cagm_vintage.0200.volume.t }
			desc = cagm_vintage.0200.balance.t
		}
	}
	desc = {
		first_valid = {
			triggered_desc = { trigger = { involved_activity = { has_variable = cagm_vintage_story_method_quality } } desc = cagm_vintage.0200.quality.desc }
			triggered_desc = { trigger = { involved_activity = { has_variable = cagm_vintage_story_method_volume } } desc = cagm_vintage.0200.volume.desc }
			desc = cagm_vintage.0200.balance.desc
		}
	}
	theme = stewardship
	override_background = { reference = bp1_kitchen_western }
	trigger = { exists = scope:activity involved_activity.activity_host ?= this }
	immediate = { involved_activity.var:cagm_vintage_lead_producer = { save_scope_as = lead_producer } }
	left_portrait = { character = root animation = thinking }
	right_portrait = { trigger = { exists = scope:lead_producer } character = scope:lead_producer animation = personality_rational }

	option = {
		name = cagm_vintage.0200.a
		trigger = { involved_activity = { has_variable = cagm_vintage_story_method_quality } }
		add_stewardship_lifestyle_xp = 20
		custom_tooltip = cagm_branch_steady_tt
		hidden_effect = { involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 4 } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } add_activity_log_entry = { key = cagm_vintage_log_method_steady character = root score = 10 show_in_conclusion = no } } }
		ai_chance = { base = 65 modifier = { add = 20 has_trait = temperate } }
	}
	option = {
		name = cagm_vintage.0200.b
		trigger = { involved_activity = { has_variable = cagm_vintage_story_method_quality } }
		add_stress = 5
		custom_tooltip = cagm_branch_ambitious_tt
		hidden_effect = { involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 2 } set_variable = { name = cagm_vintage_story_method_ambition value = yes } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } add_activity_log_entry = { key = cagm_vintage_log_method_ambitious character = root score = 10 show_in_conclusion = no } } }
		ai_chance = { base = 35 modifier = { add = 20 has_trait = ambitious } }
	}
	option = {
		name = cagm_vintage.0200.c
		trigger = { involved_activity = { has_variable = cagm_vintage_story_method_volume } }
		add_stewardship_lifestyle_xp = 15
		custom_tooltip = cagm_branch_steady_tt
		hidden_effect = { involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 4 } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } add_activity_log_entry = { key = cagm_vintage_log_method_steady character = root score = 10 show_in_conclusion = no } } }
		ai_chance = { base = 65 modifier = { add = 20 stewardship >= 12 } }
	}
	option = {
		name = cagm_vintage.0200.d
		trigger = { involved_activity = { has_variable = cagm_vintage_story_method_volume } }
		add_gold = 15
		custom_tooltip = cagm_branch_ambitious_tt
		hidden_effect = { involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 2 } set_variable = { name = cagm_vintage_story_method_ambition value = yes } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } add_activity_log_entry = { key = cagm_vintage_log_method_ambitious character = root score = 10 show_in_conclusion = no } } }
		ai_chance = { base = 35 modifier = { add = 25 has_trait = greedy } }
	}
	option = {
		name = cagm_vintage.0200.e
		trigger = { involved_activity = { has_variable = cagm_vintage_story_method_balance } }
		custom_tooltip = cagm_branch_steady_tt
		hidden_effect = { involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 4 } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } add_activity_log_entry = { key = cagm_vintage_log_method_steady character = root score = 10 show_in_conclusion = no } } }
		ai_chance = { base = 65 modifier = { add = 20 has_trait = honest } }
	}
	option = {
		name = cagm_vintage.0200.f
		trigger = { involved_activity = { has_variable = cagm_vintage_story_method_balance } }
		add_prestige = 20
		custom_tooltip = cagm_branch_ambitious_tt
		hidden_effect = { involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 2 } set_variable = { name = cagm_vintage_story_method_ambition value = yes } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } add_activity_log_entry = { key = cagm_vintage_log_method_ambitious character = root score = 10 show_in_conclusion = no } } }
		ai_chance = { base = 35 modifier = { add = 20 has_trait = deceitful } }
	}
}

# Hunt-style contextual pulse: one harvest or workshop incident is sampled and
# then rejoins the fixed production timeline.
cagm_vintage.0050 = {
	type = activity_event
	hidden = yes
	trigger = { exists = scope:activity involved_activity.activity_host ?= this }
	immediate = {
		random_list = {
			34 = { trigger_event = cagm_vintage.0300 }
			33 = { trigger_event = cagm_vintage.0310 }
			33 = { trigger_event = cagm_vintage.0320 }
		}
	}
}

cagm_vintage.0300 = {
	type = activity_event
	title = cagm_vintage.0300.t
	desc = cagm_vintage.0300.desc
	theme = stewardship
	override_background = { reference = bp1_kitchen_western }
	trigger = { exists = scope:activity involved_activity.activity_host ?= this }
	left_portrait = { character = root animation = worry }
	option = {
		name = cagm_vintage.0300.a
		add_stewardship_lifestyle_xp = 15
		custom_tooltip = cagm_vintage_progress_good_tt
		hidden_effect = { involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 4 } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } add_activity_log_entry = { key = cagm_vintage_log_rain_cover character = root score = 10 show_in_conclusion = no } } }
		ai_chance = { base = 60 modifier = { add = 20 stewardship >= 12 } }
	}
	option = {
		name = cagm_vintage.0300.b
		add_stress = 5
		custom_tooltip = cagm_vintage_progress_strong_tt
		hidden_effect = { involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 7 } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } add_activity_log_entry = { key = cagm_vintage_log_rain_hurry character = root score = 10 show_in_conclusion = no } } }
		ai_chance = { base = 40 modifier = { add = 20 has_trait = impatient } }
	}
}

cagm_vintage.0310 = {
	type = activity_event
	title = cagm_vintage.0310.t
	desc = cagm_vintage.0310.desc
	theme = stewardship
	override_background = { reference = bp1_kitchen_western }
	trigger = { exists = scope:activity involved_activity.activity_host ?= this }
	left_portrait = { character = root animation = personality_rational }
	option = {
		name = cagm_vintage.0310.a
		add_prestige = 20
		custom_tooltip = cagm_vintage_progress_good_tt
		hidden_effect = { involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 4 } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } add_activity_log_entry = { key = cagm_vintage_log_workers_fair character = root score = 10 show_in_conclusion = no } } }
		ai_chance = { base = 60 modifier = { add = 20 has_trait = just } }
	}
	option = {
		name = cagm_vintage.0310.b
		add_stress = 5
		custom_tooltip = cagm_vintage_progress_strong_tt
		hidden_effect = { involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 7 } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } add_activity_log_entry = { key = cagm_vintage_log_workers_command character = root score = 10 show_in_conclusion = no } } }
		ai_chance = { base = 40 modifier = { add = 20 has_trait = arrogant } }
	}
}

cagm_vintage.0320 = {
	type = activity_event
	title = cagm_vintage.0320.t
	desc = cagm_vintage.0320.desc
	theme = stewardship
	override_background = { reference = bp1_kitchen_western }
	trigger = { exists = scope:activity involved_activity.activity_host ?= this }
	left_portrait = { character = root animation = thinking }
	option = {
		name = cagm_vintage.0320.a
		add_learning_lifestyle_xp = 15
		custom_tooltip = cagm_vintage_progress_good_tt
		hidden_effect = { involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 4 } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } add_activity_log_entry = { key = cagm_vintage_log_merchant_refuse character = root score = 10 show_in_conclusion = no } } }
		ai_chance = { base = 60 modifier = { add = 20 has_trait = diligent } }
	}
	option = {
		name = cagm_vintage.0320.b
		add_gold = 20
		custom_tooltip = cagm_vintage_progress_strong_tt
		hidden_effect = { involved_activity = { change_variable = { name = cagm_vintage_event_adjustment add = 7 } set_variable = { name = cagm_vintage_success value = cagm_vintage_success_value } add_activity_log_entry = { key = cagm_vintage_log_merchant_deal character = root score = 10 show_in_conclusion = no } } }
		ai_chance = { base = 40 modifier = { add = 20 has_trait = greedy } }
	}
}

cagm_vintage.0099 = {
	type = activity_event
	hidden = yes
	immediate = {
		random = {
			chance = { value = involved_activity.var:cagm_vintage_success }
			involved_activity = { set_variable = { name = cagm_vintage_success_roll value = yes } }
		}
		if = {
			limit = { involved_activity = { has_variable = cagm_vintage_success_roll } }
			random_list = {
				75 = { trigger_event = cagm_vintage.1100 }
				25 = {
					modifier = { factor = 0 involved_activity = { has_variable = cagm_vintage_concealed_fault } }
					modifier = { add = 15 involved_activity = { has_activity_option = { category = cagm_vintage_purpose option = cagm_vintage_reserve } } }
					modifier = { add = 10 involved_activity = { has_activity_option = { category = cagm_vintage_equipment option = cagm_vintage_equipment_master } } }
					modifier = { add = 10 involved_activity = { has_variable = cagm_vintage_sealed_record } }
					modifier = { add = 5 involved_activity = { has_variable = cagm_vintage_story_route_ambition } }
					modifier = { add = 5 involved_activity = { has_variable = cagm_vintage_story_method_ambition } }
					trigger_event = cagm_vintage.1200
				}
			}
		}
		else = { trigger_event = cagm_vintage.1000 }
	}
}

cagm_vintage.1000 = {
	type = activity_event
	title = cagm_vintage.1000.t
	desc = {
		first_valid = {
			triggered_desc = { trigger = { involved_activity = { has_variable = cagm_vintage_production_local } } desc = cagm_vintage.1000.local.desc }
			triggered_desc = { trigger = { involved_activity = { has_variable = cagm_vintage_production_self } } desc = cagm_vintage.1000.self.desc }
			triggered_desc = { trigger = { involved_activity = { has_variable = cagm_vintage_production_hasty } } desc = cagm_vintage.1000.hasty.desc }
			triggered_desc = { trigger = { involved_activity = { has_variable = cagm_vintage_production_honey } } desc = cagm_vintage.1000.honey.desc }
			desc = cagm_vintage.1000.desc
		}
	}
	theme = stewardship
	override_background = { reference = bp1_kitchen_western }
	left_portrait = { character = root animation = worry }
	immediate = {
		involved_activity = {
			add_activity_log_entry = {
				key = cagm_vintage_log_failure
				character = root
				score = 25
				show_in_conclusion = yes
			}
		}
	}
	option = {
		name = cagm_vintage.1000.a
		remove_short_term_gold = 20
		add_stress = 15
		if = { limit = { involved_activity = { has_variable = cagm_vintage_concealed_fault } } add_prestige = -75 }
		else = { add_prestige = -25 }
		add_learning_lifestyle_xp = 50
		involved_activity = { set_variable = { name = cagm_vintage_result_failure value = yes } }
	}
}

cagm_vintage.1100 = {
	type = activity_event
	title = cagm_vintage.1100.t
	desc = {
		first_valid = {
			triggered_desc = { trigger = { involved_activity = { has_variable = cagm_vintage_production_local } } desc = cagm_vintage.1100.local.desc }
			triggered_desc = { trigger = { involved_activity = { has_variable = cagm_vintage_production_self } } desc = cagm_vintage.1100.self.desc }
			triggered_desc = { trigger = { involved_activity = { has_variable = cagm_vintage_production_hasty } } desc = cagm_vintage.1100.hasty.desc }
			triggered_desc = { trigger = { involved_activity = { has_variable = cagm_vintage_production_honey } } desc = cagm_vintage.1100.honey.desc }
			desc = cagm_vintage.1100.desc
		}
	}
	theme = stewardship
	override_background = { reference = bp1_kitchen_western }
	left_portrait = { character = root animation = war_over_win }
	immediate = {
		involved_activity = {
			add_activity_log_entry = {
				key = cagm_vintage_log_success
				character = root
				score = 75
				show_in_conclusion = yes
			}
		}
	}
	option = {
		name = cagm_vintage.1100.a
		trigger = { involved_activity = { has_activity_option = { category = cagm_vintage_purpose option = cagm_vintage_celebrate } } }
		add_prestige = 150
		add_stress = -35
		cagm_replace_vintage_reward_effect = { MODIFIER = cagm_vintage_harvest_goodwill YEARS = 4 }
		involved_activity = { every_attending_character = { limit = { this != scope:host } add_opinion = { target = root modifier = cagm_vintage_fair_share_opinion years = 4 } } set_variable = { name = cagm_vintage_result_success value = yes } }
	}
	option = {
		name = cagm_vintage.1100.b
		trigger = { involved_activity = { has_activity_option = { category = cagm_vintage_purpose option = cagm_vintage_perfect } } }
		add_prestige = 125
		add_learning_lifestyle_xp = 175
		add_stewardship_lifestyle_xp = 175
		cagm_replace_vintage_reward_effect = { MODIFIER = cagm_vintage_craft_reputation YEARS = 4 }
		involved_activity = { set_variable = { name = cagm_vintage_result_success value = yes } }
	}
	option = {
		name = cagm_vintage.1100.c
		trigger = { involved_activity = { has_activity_option = { category = cagm_vintage_purpose option = cagm_vintage_market } } }
		add_gold = 100
		add_prestige = 100
		involved_activity = { activity_location = { county = { add_county_modifier = { modifier = cagm_vintage_market_reputation years = 5 } } } set_variable = { name = cagm_vintage_result_success value = yes } }
	}
	option = {
		name = cagm_vintage.1100.d
		trigger = { involved_activity = { has_activity_option = { category = cagm_vintage_purpose option = cagm_vintage_reserve } } }
		add_prestige = 175
		cagm_replace_vintage_reward_effect = { MODIFIER = cagm_vintage_house_reserve YEARS = 6 }
		involved_activity = { set_variable = { name = cagm_vintage_result_success value = yes } }
	}
}

cagm_vintage.1200 = {
	type = activity_event
	title = cagm_vintage.1200.t
	desc = {
		first_valid = {
			triggered_desc = { trigger = { involved_activity = { has_variable = cagm_vintage_production_local } } desc = cagm_vintage.1200.local.desc }
			triggered_desc = { trigger = { involved_activity = { has_variable = cagm_vintage_production_self } } desc = cagm_vintage.1200.self.desc }
			triggered_desc = { trigger = { involved_activity = { has_variable = cagm_vintage_production_hasty } } desc = cagm_vintage.1200.hasty.desc }
			triggered_desc = { trigger = { involved_activity = { has_variable = cagm_vintage_production_honey } } desc = cagm_vintage.1200.honey.desc }
			desc = cagm_vintage.1200.desc
		}
	}
	theme = stewardship
	override_background = { reference = bp1_kitchen_western }
	left_portrait = { character = root animation = war_over_win }
	immediate = {
		involved_activity = {
			add_activity_log_entry = {
				key = cagm_vintage_log_exceptional
				character = root
				score = 100
				show_in_conclusion = yes
			}
		}
	}
	option = {
		name = cagm_vintage.1200.a
		trigger = { involved_activity = { has_activity_option = { category = cagm_vintage_purpose option = cagm_vintage_celebrate } } }
		add_prestige = 300
		add_stress = -55
		cagm_replace_vintage_reward_effect = { MODIFIER = cagm_vintage_harvest_goodwill YEARS = 6 }
		involved_activity = { every_attending_character = { limit = { this != scope:host } add_opinion = { target = root modifier = cagm_vintage_fair_share_opinion years = 6 } } set_variable = { name = cagm_vintage_result_exceptional value = yes } }
	}
	option = {
		name = cagm_vintage.1200.b
		trigger = { involved_activity = { has_activity_option = { category = cagm_vintage_purpose option = cagm_vintage_perfect } } }
		add_prestige = 300
		add_learning_lifestyle_xp = 300
		add_stewardship_lifestyle_xp = 300
		cagm_replace_vintage_reward_effect = { MODIFIER = cagm_vintage_craft_reputation YEARS = 6 }
		involved_activity = { set_variable = { name = cagm_vintage_result_exceptional value = yes } }
	}
	option = {
		name = cagm_vintage.1200.c
		trigger = { involved_activity = { has_activity_option = { category = cagm_vintage_purpose option = cagm_vintage_market } } }
		add_gold = 200
		add_prestige = 250
		involved_activity = { activity_location = { county = { add_county_modifier = { modifier = cagm_vintage_market_reputation years = 8 } } } set_variable = { name = cagm_vintage_result_exceptional value = yes } }
	}
	option = {
		name = cagm_vintage.1200.d
		trigger = { involved_activity = { has_activity_option = { category = cagm_vintage_purpose option = cagm_vintage_reserve } } }
		add_prestige = 350
		cagm_replace_vintage_reward_effect = { MODIFIER = cagm_vintage_house_reserve YEARS = 8 }
		cagm_create_product_vintage_artifact_effect = yes
		involved_activity = { set_variable = { name = cagm_vintage_result_exceptional value = yes } }
	}
}
