namespace = republic

################################################
# Republic events from VIET
################################################
# Pickpocket! (on_yearly_pulse)
character_event = {
	id = republic.1
	desc = EVTDESCrepublic.1
	picture = GFX_evt_market
	
	is_triggered_only = yes
	
	min_age = 15
	capable_only = yes
	prisoner = no
	is_patrician = yes
	
	trigger = {
		NOT = { culture = wilderness}
		in_command = no
	}
	
	weight_multiplier = {
		days = 1
		modifier = {
			factor = 1.3
			trait = slothful
		}
		modifier = {
			factor = 1.3
			trait = trusting
		}
		modifier = {
			factor = 1.3
			OR = {
				trait = slow
				trait = dull
			}
		}
		modifier = {
			factor = 1.3
			trait = imbecile
		}
		modifier = {
			factor = 0.6
			trait = diligent
		}
		modifier = {
			factor = 0.5
			trait = paranoid
		}
		modifier = {
			factor = 0.7
			OR = {
				trait = quick
				trait = shrewd
			}
		}
		modifier = {
			factor = 0.7
			trait = genius
		}
	}
	
	option = { #Bad luck
		name = EVTOPTArepublic.1 
		random_list = {
			25 = { wealth = -1 }
			25 = { wealth = -2 }
			25 = { wealth = -3 }
			25 = { wealth = -4 }
		}
	}
	
	option = { #Hope he finds good use for it
		name = EVTOPTBrepublic.1 
		tooltip_info = kind
		trigger = { 
			trait = kind
		}
		ai_chance = {
			factor = 5
			modifier = {
				factor = 0
				trait = greedy
			}
			modifier = {
				factor = 0.1
				trait = wroth
			}
		}
		piety = 1
		random_list = {
			25 = { wealth = -1 }
			25 = { wealth = -2 }
			25 = { wealth = -3 }
			25 = { wealth = -4 }
		}
	}

	option = { #GARRRRRRRRRRRRRRRR
		name = EVTOPTCrepublic.1 
		tooltip_info = wroth
		trigger = { 
			trait = wroth
		}
		ai_chance = {
			factor = 5
			modifier = {
				factor = 0.1
				trait = kind
			}
			modifier = {
				factor = 0.1
				trait = content
			}
		}
		prestige = 1
		random_list = {
			25 = { wealth = -1 }
			25 = { wealth = -2 }
			25 = { wealth = -3 }
			25 = { wealth = -4 }
		}
	}

	option = { #Whatever
		name = EVTOPTDrepublic.1 
		tooltip_info = slothful
		trigger = { 
			trait = slothful
			NOT = { trait = content }
		}
		ai_chance = {
			factor = 5
			modifier = {
				factor = 0.1
				trait = wroth
			}
			modifier = {
				factor = 0.1
				trait = envious
			}
		}
		random_list = {
			50 = { prestige = 1 }
			50 = { piety = 1 }
		}
		random_list = {
			25 = { wealth = -1 }
			25 = { wealth = -2 }
			25 = { wealth = -3 }
			25 = { wealth = -4 }
		}
	}

	option = { #Whatever 2
		name = EVTOPTDrepublic.1 
		tooltip_info = content
		trigger = { 
			trait = content
		}
		ai_chance = {
			factor = 5
			modifier = {
				factor = 0.1
				trait = wroth
			}
			modifier = {
				factor = 0.1
				trait = envious
			}
		}
		random_list = {
			50 = { prestige = 1 }
			50 = { piety = 1 }
		}
		random_list = {
			25 = { wealth = -1 }
			25 = { wealth = -2 }
			25 = { wealth = -3 }
			25 = { wealth = -4 }
		}
	}
}
# Ruined clothes (on_yearly_pulse)
character_event = {
	id = republic.2
	desc = EVTDESCrepublic.2 
	picture = GFX_evt_doge_republic
	
	is_triggered_only = yes
	
	min_age = 15
	capable_only = yes
	prisoner = no
	is_patrician = yes
	
	trigger = {
		NOT = { culture = wilderness}
		in_command = no
	}
	
	weight_multiplier = {
		days = 1

		modifier = {
			factor = 2
			trait = proud
		}
		modifier = {
			factor = 2
			trait = gregarious
		}
		modifier = {
			factor = 2
			trait = diligent
		}
		modifier = {
			factor = 2
			trait = ambitious
		}
		modifier = {
			factor = 0.5
			trait = slothful
		}
		modifier = {
			factor = 0.5
			trait = content
		}
		modifier = {
			factor = 0.5
			trait = shy
		}
		modifier = {
			factor = 0.5
			trait = humble
		}
	}
	
	option = { #Wait
		name = EVTOPTArepublic.2 
		ai_chance = {
			factor = 1
			modifier = {
				factor = 10
				trait = patient
			}
			modifier = {
				factor = 4
				trait = trusting
			}
			modifier = {
				factor = 0.2
				trait = greedy
			}
			modifier = {
				factor = 0.2
				trait = proud
			}
		}
		wealth = -1
		prestige = 5
		random_list = {
			10 = { add_trait = patient }
			90 = { }
		}
	}
	
	option = { #Content
		name = EVTOPTBrepublic.2 
		tooltip_info = content
		trigger = { 
			trait = content
		}
		ai_chance = {
			factor = 5
			modifier = {
				factor = 0
				trait = proud
			}
			modifier = {
				factor = 0.1
				trait = gregarious
			}
			modifier = {
				factor = 0.1
				trait = ambitious
			}
		}
		piety = 3
	}

	option = { #Get something now
		name = EVTOPTCrepublic.2 
		tooltip_info = proud
		trigger = { 
			trait = proud
		}
		ai_chance = {
			factor = 5
			modifier = {
				factor = 0.1
				trait = patient
			}
			modifier = {
				factor = 2
				trait = proud
			}
			modifier = {
				factor = 2
				trait = gregarious
			}
			modifier = {
				factor = 2
				trait = diligent
			}
			modifier = {
				factor = 2
				trait = ambitious
			}
			modifier = {
				factor = 0.5
				trait = slothful
			}
			modifier = {
				factor = 0.5
				trait = content
			}
			modifier = {
				factor = 0.5
				trait = shy
			}
			modifier = {
				factor = 0.5
				trait = humble
			}
		}
		prestige = 10
		random_list = {
			25 = { wealth = -1 }
			25 = { wealth = -2 }
			25 = { wealth = -3 }
			25 = { wealth = -4 }
		}
	}
}
# Grounded Ship (on_bi_yearly_pulse)
character_event = {
	id = republic.3
	desc = EVTDESCrepublic.3 
	picture = GFX_evt_trade_post_republic
	
	is_triggered_only = yes
	
	min_age = 15
	capable_only = yes
	prisoner = no
	is_patrician = yes
	
	trigger = {
		NOT = { culture = wilderness}
		in_command = no
	}
	
	weight_multiplier = {
		days = 1

		modifier = {
			factor = 2
			trait = slothful
		}
		modifier = {
			factor = 2
			trait = trusting
		}
		modifier = {
			factor = 2
			NOT = { stewardship = 7 }
		}
		modifier = {
			factor = 0.5
			trait = diligent
		}
		modifier = {
			factor = 0.3
			stewardship = 13
		}
	}
	
	option = { #Get what we can
		name = EVTOPTArepublic.3 
		ai_chance = {
			factor = 1
			modifier = {
				factor = 10
				trait = slothful
			}
			modifier = {
				factor = 4
				trait = trusting
			}
			modifier = {
				factor = 4
				trait = content
			}
			modifier = {
				factor = 4
				trait = imbecile
			}
			modifier = {
				factor = 4
				OR = {
					trait = slow
					trait = dull
				}
			}
		}
		prestige = -5
		random_list = {
			40 = { scaled_wealth = -0.1 }
			40 = { scaled_wealth = -0.15 }
			15 = { scaled_wealth = -0.3 }
			5 = { scaled_wealth = -0.5 }
		}
	}
	
	option = { #Get useful stuff
		name = EVTOPTBrepublic.3 
		tooltip_info = stewardship
		trigger = { 
			stewardship = 13
		}
		ai_chance = {
			factor = 100
			modifier = {
				factor = 4
				trait = diligent
			}
			modifier = {
				factor = 4
				trait = genius
			}
			modifier = {
				factor = 4
				OR = {
				trait = quick
				trait = shrewd
			}
			}
			modifier = {
				factor = 4
				trait = greedy
			}
		}
		prestige = -1
		random_list = {
			40 = { scaled_wealth = -0.04 }
			40 = { scaled_wealth = -0.08 }
			15 = { scaled_wealth = -0.15 }
			5 = { scaled_wealth = -0.2 }
		}
	}
}
# Character's associate gone bankrupt, asks for money (on_bi_yearly_pulse)
character_event = {
	id = republic.4
	desc = EVTDESCrepublic.4 
	picture = GFX_evt_busy_trading_dock_republic
	
	is_triggered_only = yes
	
	min_age = 15
	capable_only = yes
	prisoner = no
	is_patrician = yes
	
	trigger = {
		NOT = { culture = wilderness}
		in_command = no
	}
	
	weight_multiplier = {
		days = 1

		modifier = {
			factor = 2
			trait = charitable
		}
		modifier = {
			factor = 2
			trait = kind
		}
		modifier = {
			factor = 2
			trait = gregarious
		}
		modifier = {
			factor = 0.5
			trait = envious
		}
		modifier = {
			factor = 0.5
			trait = greedy
		}
		modifier = {
			factor = 0.5
			trait = arbitrary
		}
	}
	
	option = { #Help
		name = EVTOPTArepublic.4 
		ai_chance = {
			factor = 1
			modifier = {
				factor = 0.3
				trait = cynical
			}
			modifier = {
				factor = 0.1
				trait = greedy
			}
			modifier = {
				factor = 3
				trait = trusting
			}
		}
		random_list = {
			40 = { scaled_wealth = -0.05 }
			40 = { scaled_wealth = -0.1 }
			15 = { scaled_wealth = -0.15 }
			5 = { scaled_wealth = -0.25 }
		}
		if = {
			limit = {
				NOT = { stewardship = 11 }
			}
			random_list = {
				70 = {
					character_event = { #fails
						id = republic.5
						tooltip = EVTTOOLTIPrepublic.5 
						days = 3
					}
				}
				30 = {
					character_event = { #succeeds
						id = republic.6
						tooltip = EVTTOOLTIPrepublic.6 
						days = 3
					}
				}
			}
		}
		if = {
			limit = {
				stewardship = 11
				NOT = { stewardship = 18 }
			}
			random_list = {
				50 = {
					character_event = { #fails
						id = republic.5
						tooltip = EVTTOOLTIPrepublic.5 
						days = 3
					}
				}
				50 = {
					character_event = { #succeeds
						id = republic.6
						tooltip = EVTTOOLTIPrepublic.6 
						days = 3
					}
				}
			}
		}
		if = {
			limit = {
				stewardship = 18
			}
			random_list = {
				40 = {
					character_event = { #fails
						id = republic.5
						tooltip = EVTTOOLTIPrepublic.5 
						days = 3
					}
				}
				60 = {
					character_event = { #succeeds
						id = republic.6
						tooltip = EVTTOOLTIPrepublic.6 
						days = 3
					}
				}
			}
		}
	}
	
	option = { #Don't bother
		name = EVTOPTBrepublic.4 
		ai_chance = {
			factor = 1
			modifier = {
				factor = 10
				trait = greedy
			}
			modifier = {
				factor = 0.6
				trait = kind
			}
		}
	}
}
# Deal fails
character_event = {
	id = republic.5
	desc = EVTDESCrepublic.5 
	picture = GFX_evt_family_feud_republic
	
	is_triggered_only = yes
	
	option = { #Dammit
		name = EVTOPTArepublic.5 
		ai_chance = {
			factor = 1
			modifier = {
				factor = 0.3
				trait = cynical
			}
			modifier = {
				factor = 0.1
				trait = greedy
			}
			modifier = {
				factor = 3
				trait = trusting
			}
		}
		random_list = {
			40 = { prestige = -5 }
			30 = { prestige = -10 }
			20 = { prestige = -20 }
			10 = { prestige = -40 }
		}
		random_list = {
			40 = { scaled_wealth = -0.1 }
			40 = { scaled_wealth = -0.2 }
			15 = { scaled_wealth = -0.4 }
			5 = { scaled_wealth = -0.8 }
		}	
	}
	option = { #DAMMIT
		name = EVTOPTBrepublic.5 
		tooltip_info = wroth
		trigger = {
			trait = wroth
		}
		ai_chance = {
			factor = 10
		}
		random_list = {
			40 = { prestige = -5 }
			30 = { prestige = -10 }
			20 = { prestige = -20 }
			10 = { prestige = -40 }
		}
		random_list = {
			40 = { scaled_wealth = -0.1 }
			40 = { scaled_wealth = -0.2 }
			15 = { scaled_wealth = -0.4 }
			5 = { scaled_wealth = -0.8 }
		}	
	}
	option = { #Try to alleviate losses
		name = EVTOPTCrepublic.5 
		tooltip_info = stewardship
		trigger = {
			stewardship = 15
		}
		ai_chance = {
			factor = 1000
		}
		random_list = {
			40 = { prestige = -2 }
			30 = { prestige = -5 }
			20 = { prestige = -10 }
			10 = { prestige = -20 }
		}
		random_list = {
			40 = { scaled_wealth = -0.04 }
			40 = { scaled_wealth = -0.08 }
			15 = { scaled_wealth = -0.15 }
			5 = { scaled_wealth = -0.25 }
		}
		random_list = {
			25 = { change_stewardship = 1 }
			25 = { change_intrigue = 1 }
			50 = { }
		}
	}
}
# Deal works!
character_event = {
	id = republic.6
	desc = EVTDESCrepublic.6 
	picture = GFX_evt_busy_trading_dock_republic
	
	is_triggered_only = yes
	
	option = { #Caution is good
		name = EVTOPTArepublic.6 
		ai_chance = {
			factor = 1
			modifier = {
				factor = 2
				trait = cynical
			}
			modifier = {
				factor = 4
				trait = patient
			}
			modifier = {
				factor = 2
				trait = paranoid
			}
		}
		piety = 5
		random_list = {
			40 = { scaled_wealth = 0.2 }
			40 = { scaled_wealth = 0.3 }
			15 = { scaled_wealth = 0.4 }
			5 = { scaled_wealth = 0.5 }
		}	
	}
	option = { #Risk is awesome
		name = EVTOPTBrepublic.6 
		ai_chance = {
			factor = 1
			modifier = {
				factor = 2
				trait = trusting
			}
			modifier = {
				factor = 4
				trait = greedy
			}
			modifier = {
				factor = 2
				trait = brave
			}
		}
		prestige = 5
		random_list = {
			40 = { scaled_wealth = 0.2 }
			40 = { scaled_wealth = 0.3 }
			15 = { scaled_wealth = 0.4 }
			5 = { scaled_wealth = 0.5 }
		}
	}
}
# Character misjudged prices (on_bi_yearly_pulse)
character_event = {
	id = republic.7
	desc = EVTDESCrepublic.7 
	picture = GFX_evt_merchant_ship_at_sea_republic
	
	is_triggered_only = yes
	
	min_age = 15
	capable_only = yes
	prisoner = no
	is_patrician = yes
	
	trigger = {
		NOT = { culture = wilderness}
		in_command = no
	}
	
	weight_multiplier = {
		days = 1

		modifier = {
			factor = 2
			OR = {
				trait = slow
				trait = dull
			}
		}
		modifier = {
			factor = 2
			trait = imbecile
		}
		modifier = {
			factor = 2
			trait = greedy
		}
		modifier = {
			factor = 2
			NOT = { stewardship = 7 }
		}
		modifier = {
			factor = 2
			trait = trusting
		}
		modifier = {
			factor = 0.3
			stewardship = 16
		}
		modifier = {
			factor = 0.5
			trait = diligent
		}
		modifier = {
			factor = 0.5
			trait = paranoid
		}
		modifier = {
			factor = 0.5
			trait = patient
		}
	}
	
	option = { #Nooooooo
		name = EVTOPTArepublic.7 
		ai_chance = {
			factor = 1
		}
		prestige = -10
		random_list = {
			40 = { scaled_wealth = -0.2 }
			40 = { scaled_wealth = -0.3 }
			15 = { scaled_wealth = -0.4 }
			5 = { scaled_wealth = -0.5 }
		}
	}
	
	option = { #Convince others to buy at lower prices
		name = EVTOPTBrepublic.7 
		tooltip_info = diplomacy
		trigger = { 
			diplomacy = 13
		}
		ai_chance = {
			factor = 100
		}
		prestige = -5
		random_list = {
			25 = { scaled_wealth = 0.08 }
			25 = { scaled_wealth = 0.04 }
			25 = { scaled_wealth = -0.1 }
			25 = { scaled_wealth = -0.2 }
		}
	}
}
# Bad associate (on_bi_yearly_pulse)
character_event = {
	id = republic.8
	desc = EVTDESCrepublic.8 
	picture = GFX_evt_busy_trading_dock_republic
	
	is_triggered_only = yes
	
	only_rulers = yes
	min_age = 15
	capable_only = yes
	prisoner = no
	
	trigger = {
		NOT = { culture = wilderness}
		is_ruler = yes
		war = no
		in_command = no
		is_patrician = yes
	}
	
	weight_multiplier = {
		days = 1
		
		modifier = {
			factor = 2
			trait = slothful
		}
		modifier = {
			factor = 0.5
			trait = diligent
		}
		modifier = {
			factor = 2
			trait = trusting
		}
		modifier = {
			factor = 0.5
			trait = paranoid
		}
		modifier = {
			factor = 2
			trait = greedy
		}
		modifier = {
			factor = 0.5
			trait = temperate
		}
		modifier = {
			factor = 2
			trait = patient
		}
		modifier = {
			factor = 0.5
			trait = wroth
		}
		modifier = {
			factor = 2
			NOT = { intrigue = 7 }
		}
		modifier = {
			factor = 0.5
			intrigue = 15
		}
		modifier = {
			factor = 2
			trait = deceitful
		}
		modifier = {
			factor = 0.5
			trait = honest
		}
		modifier = {
			factor = 2
			trait = arbitrary
		}
		modifier = {
			factor = 0.5
			trait = just
		}
	}
	
	option = {
		name = EVTOPTArepublic.8   #crap
		add_character_modifier = {
			name = business_partner_fraud
			duration = 365
		}
	}
}
# Minor family vendetta (on_bi_yearly_pulse)
character_event = {
	id = republic.9
	desc = EVTDESCrepublic.9
	picture = GFX_evt_family_feud_republic
	
	is_triggered_only = yes
	min_age = 15
	only_rulers = yes
	capable_only = yes
	prisoner = no
	
	trigger = { 
		war = no 
		in_command = no 
		is_abroad = no
		is_patrician = yes
	}
	
	weight_multiplier = {
		days = 1
		modifier = {
			factor = 2
			trait = slothful
		}
		modifier = {
			factor = 0.5
			trait = diligent
		}
		modifier = {
			factor = 2
			trait = content
		}
		modifier = {
			factor = 0.5
			trait = ambitious
		}
		modifier = {
			factor = 2
			trait = arbitrary
		}
		modifier = {
			factor = 0.5
			trait = just
		}
		modifier = {
			factor = 2
			trait = kind
		}
		modifier = {
			factor = 0.5
			trait = cruel
		}
		modifier = {
			factor = 2
			trait = trusting
		}
		modifier = {
			factor = 0.5
			trait = paranoid
		}
	}
	
	option = {
		name = EVTOPTArepublic.9
		random_demesne_province = {
			add_province_modifier = {
				name = family_vendetta
				duration = 1000
			}
		}
	}
	option = {
		name = EVTOPTBrepublic.9
		tooltip_info = diligent
		trigger = {
			trait = diligent
		}
		wealth = -3
	}
}

################################################
# Fisstech, drugs and smuggling
################################################
