﻿#Regula Magistri travel events

namespace = regula_travel_events

##################################
# Regula Misc travel Events #
##################################
# Charm the guest from the transport (escort) contract
regula_travel_events.1000 = {
    type = character_event
    title = regula_travel_events.1000.t
    desc = regula_travel_events.1000.desc
    theme = travel
    left_portrait = {
        character = root
        animation = thinking
    }
    right_portrait = {
        character = scope:contract_guest
        animation = idle
    }
    cooldown = { days = 30 }
    trigger = {
        is_travelling = yes
        is_location_valid_for_travel_event_on_land = yes

    }
    immediate = {
        #save_scope_as = actor
        hidden_effect = {
            random_character_active_contract = {
                limit = {
                    OR = {
                        has_task_contract_type = laamp_transport_vip
                        has_task_contract_type = laamp_transport_explorer
                    }
                    var:task_contract_object = {
                        is_adult = yes
                        is_male = no
                        is_regula_devoted_trigger = no
                        is_imprisoned = no
                    }
                }
                save_scope_as = transport_contract
            }
            scope:transport_contract.var:task_contract_object = {
                save_scope_as = contract_guest
            }
        }
    }

    # Fascinare the guest
    option = {
        name = regula_travel_events.1000.a

        add_piety = { subtract = regula_fascinare_cost }
        scope:contract_guest = {
            fascinare_success_effect = { CHARACTER = root }
            # TODO: Make event-specific memory
            create_memory_fascinare_default = { CHARACTER = root }

            add_character_flag = {
                flag = is_naked
                days = 1
            }
        }

        trigger_event = regula_travel_events.1001
    }

    # Ignore the opportunity
    option = {
        name = regula_travel_events.1000.b
        stress_impact = {
            ambitious = minor_stress_gain
        }
        # TODO: We may want to add a flag to avoid additional trigger of this event till the end of the contract
    }
}

regula_travel_events.1001 = {
    type = character_event
    title = regula_travel_events.1001.t
    desc = regula_travel_events.1001.desc
    theme = realm

    right_portrait = {
        character = scope:contract_guest
        animation = personality_compassionate #shock
    }

    option = {
        name = regula_travel_events.1001.a
        regula_sex_with_target_normal = { TARGET = scope:contract_guest }
    }

    option = {
        name = regula_travel_events.1001.b
    }
}

# Visiting a Regula Leyline / Holysite POI
# Get a Regula cultist recruit
regula_travel_events.2000 = {
    type = character_event
    title = regula_travel_events.2000.t
    desc = {
        desc = regula_travel_events.2000.desc_intro

        # Initiate Tier desc
        first_valid = {
            triggered_desc = {
                trigger = {
                    scope:cultist_tier = flag:common
                }
                desc = regula_travel_events.2000.cultist_common
            }
            triggered_desc = {
                trigger = {
                    scope:cultist_tier = flag:noble
                }
                desc = regula_travel_events.2000.cultist_noble
            }
            triggered_desc = {
                trigger = {
                    scope:cultist_tier = flag:royal
                }
                desc = regula_travel_events.2000.cultist_royal
            }
        }

        # Initiate Type desc
        first_valid = {
            triggered_desc = {
                trigger = {
                    scope:cultist_type = flag:solider
                }
                desc = regula_travel_events.2000.cultist_solider
            }
            triggered_desc = {
                trigger = {
                    scope:cultist_type = flag:priestess
                }
                desc = regula_travel_events.2000.cultist_priestess
            }
            triggered_desc = {
                trigger = {
                    scope:cultist_type = flag:spy
                }
                desc = regula_travel_events.2000.cultist_spy
            }
            triggered_desc = {
                trigger = {
                    scope:cultist_type = flag:lady
                }
                desc = regula_travel_events.2000.cultist_lady
            }
            triggered_desc = {
                trigger = {
                    scope:cultist_type = flag:breeder
                }
                desc = regula_travel_events.2000.cultist_breeder
            }
        }

        desc = regula_travel_events.2000.desc_outro
    }

	theme = regula_theme
	override_background = {
		reference = wilderness
	}

    left_portrait = {
        character = root
        animation = idle
    }

    right_portrait = {
        character = scope:cultist_recruit

		scripted_animation = {
			triggered_animation = {
				trigger = {
                    scope:cultist_type = flag:soldier
				}
				animation = { marshal personality_bold hero_flex }
			}
		}

		scripted_animation = {
			triggered_animation = {
				trigger = {
                    scope:cultist_type = flag:priestess
				}
                animation = { chaplain personality_zealous debating } 
			}
		}

        scripted_animation = {
			triggered_animation = {
				trigger = {
                    scope:cultist_type = flag:spy
				}
				animation = { spymaster scheme personality_vengeful }
			}
		}

        scripted_animation = {
			triggered_animation = {
				trigger = {
                    scope:cultist_type = flag:lady
				}
				animation = { personality_honorable personality_forgiving personality_rational }
			}
		}

        scripted_animation = {
			triggered_animation = {
				trigger = {
                    scope:cultist_type = flag:breeder
				}
				animation = { personality_content personality_compassionate personality_coward }
			}
		}

    }

    immediate = {
        # Effects of visiting Regula Leyline
        add_piety = medium_piety_gain
        add_learning_lifestyle_xp = travel_medium_xp

        # Travel XP
        traveler_travel_xp_effect = {
            MIN = 3
            MAX = 5
        }

        hidden_effect = {
            random_list = {
                # Commoner recruit
                50 = {
                    save_scope_value_as = {
                        name = cultist_tier
                        value = flag:common
                    }
                    regula_create_random_initiate_effect_current_location = {
                        initiate_rarity = 1
                    }
                }

                # Noble Recruit
                35 = {
                    save_scope_value_as = {
                        name = cultist_tier
                        value = flag:noble
                    }
                    regula_create_random_initiate_effect_current_location = {
                        initiate_rarity = 2
                    }
                }

                # Royal Recruit
                15 = {
                    save_scope_value_as = {
                        name = cultist_tier
                        value = flag:royal
                    }
                    regula_create_random_initiate_effect_current_location = {
                        initiate_rarity = 3
                    }
                }
            }
            scope:created_character = { save_scope_as = cultist_recruit }
        }
    }

    # Take the Cultist as courtier
    option = {
        name = regula_travel_events.2000.add_cultist
        flavor = regula_travel_events.2000.add_cultist_tt

        add_courtier = scope:cultist_recruit

        stress_impact = {
            shy = minor_stress_gain

            lustful = minor_stress_loss
        }
    }

    # Special options based on Cultist type
    # Size of effects depends on the cultist tier

    # Soldier
    # Refill soldiers
    option = {
        # Loc
        name = regula_travel_events.2000.soldier_refill
        flavor = regula_travel_events.2000.soldier_refill_tt

        # Triggers
        trigger = {
            scope:cultist_type = flag:solider
            any_maa_regiment = {
                maa_current_troops_count < maa_max_troops_count
            }
        }

        # Effects
        every_maa_regiment = {
            limit = { maa_current_troops_count < maa_max_troops_count }
            add_to_list = damaged_maa_regiments
        }

        switch = {
            trigger = scope:cultist_tier
            flag:common = {
                every_in_list = {
                    list = damaged_maa_regiments
                    change_maa_troops_count = {
                        value = replenishable_troops_value
                        multiply = 0.25
                    }
                }
            }
            flag:noble = {
                every_in_list = {
                    list = damaged_maa_regiments
                    change_maa_troops_count = {
                        value = replenishable_troops_value
                        multiply = 0.5
                    }
                }
            }
            flag:royal = {
                every_in_list = {
                    list = damaged_maa_regiments
                    change_maa_troops_count = replenishable_troops_value
                }
            }
        }

        # Stress Impact
        stress_impact = {
            shy = medium_stress_gain
            craven = minor_stress_gain
            paranoid = minor_stress_gain

            brave = minor_stress_loss
            ambitious = minor_stress_loss
            gregarious = minor_stress_loss
            diligent = minor_stress_loss
        }

        # Cleanup
        hidden_effect = {
            scope:cultist_recruit = {
                death = { death_reason = death_vanished }
            }
        }
    }

    # Expand an existing Famuli MAA
    # We only allow expansion to 10 regiments
    option = {
        # Loc
        name = regula_travel_events.2000.soldier_expand
        flavor = regula_travel_events.2000.soldier_expand_tt

        # Triggers
        trigger = {
            scope:cultist_type = flag:solider
            any_maa_regiment = {
                regula_is_famuli_maa = yes
                maa_size <= 10
            }
        }

        # Effects
        random_maa_regiment = {
            limit = {
                regula_is_famuli_maa = yes
                maa_size <= 10
            }

            save_scope_as = regiment

            switch = {
                trigger = scope:cultist_tier
                flag:common = {
                    save_scope_value_as = {
                        name = regiment_size
                        value = {
                            value = maa_size
                            add = 1
                        }
                    }
                }
                flag:noble = {
                    save_scope_value_as = {
                        name = regiment_size
                        value = {
                            value = maa_size
                            add = 2
                            max = 10
                        }
                    }
                }
                flag:royal = {
                    save_scope_value_as = {
                        name = regiment_size
                        value = {
                            value = maa_size
                            add = 3
                            max = 10
                        }
                    }
                }
            }

            root = {
                regula_get_fucked_create_maa_regiment_of_type_with_size = {
                    REGIMENT = scope:regiment
                    SIZE = scope:regiment_size
                }
            }

            hidden_effect = {
                scope:regiment = { destroy_maa_regiment = yes }
            }
        }

        # Stress Impact
        stress_impact = {
            shy = medium_stress_gain
            craven = minor_stress_gain
            paranoid = minor_stress_gain

            brave = minor_stress_loss
            ambitious = minor_stress_loss
            gregarious = minor_stress_loss
            diligent = minor_stress_loss
        }

        # Cleanup
        hidden_effect = {
            scope:cultist_recruit = {
                death = { death_reason = death_vanished }
            }
        }
    }

    # Priestess
    # Change faith of county (and chance for neighbours)
    option = {
        # Loc
        name = regula_travel_events.2000.priestess_convert
        flavor = regula_travel_events.2000.priestess_convert_tt

        # Triggers
        trigger = {
            scope:cultist_type = flag:priestess
            location = {
                NOT = { faith = root.faith }
            }
        }

        # Effects
        # Always convert current county
        location.county = {
            set_county_faith = root.faith
        }

        # Chance to convert neighbor counties
        switch = {
            trigger = scope:cultist_tier
            flag:noble = {
                location = {
                    county = {
                        every_neighboring_county = {
                            limit = {
                                NOT = { faith = root.faith }
                            }
                            random = { 
                                chance = {
                                    value = root.faith.fervor
                                    add = {-25 25} # Bit of randomness
                                    subtract = prev.faith.fervor
                                }
                                set_county_faith = root.faith
                            }
                        }
                    }
                }
            }
            flag:royal = {
                location = {
                    county = {
                        every_neighboring_county = {
                            limit = {
                                NOT = { faith = root.faith }
                            }
                            set_county_faith = root.faith
                        }
                    }
                }
            }
        }

        # Stress Impact
        stress_impact = {
            cynical = minor_stress_gain

            zealous = medium_stress_loss
            humble = minor_stress_loss
        }

        # Cleanup
        hidden_effect = {
            scope:cultist_recruit = {
                death = { death_reason = death_vanished }
            }
        }
    }

    # Decrease fervor of county faith (as long as its not Regula)
    option = {
        # Loc
        name = regula_travel_events.2000.priestess_fervor
        flavor = regula_travel_events.2000.priestess_fervor_tt

        # Triggers
        trigger = {
            scope:cultist_type = flag:priestess
            location = {
                NOT = { faith = root.faith }
            }
        }

        # Effects
        switch = {
            trigger = scope:cultist_tier
            flag:common = {
                location.county.faith = {
                    change_fervor = {
                        value = -5
                        desc = fervor_loss_regula_priestess
                    }
                }
            }
            flag:noble = {
                location.county.faith = {
                    change_fervor = {
                        value = -10
                        desc = fervor_loss_regula_priestess
                    }
                }
            }
            flag:royal = {
                location.county.faith = {
                    change_fervor = {
                        value = -15
                        desc = fervor_loss_regula_priestess
                    }
                }
            }
        }

        # Stress Impact
        stress_impact = {
            cynical = minor_stress_gain
            forgiving = minor_stress_gain

            zealous = medium_stress_loss
        }

        # Cleanup
        hidden_effect = {
            scope:cultist_recruit = {
                death = { death_reason = death_vanished }
            }
        }
    }
    
    # Spy
    # Provide nearby secrets
    option = {
        # Loc
        name = regula_travel_events.2000.spy_secrets
        flavor = regula_travel_events.2000.spy_secrets_tt

        # Triggers
        trigger = {
            scope:cultist_type = flag:spy

            # Any secrets in this realm?
            location.county.holder.liege = {
                OR = {
                    any_secret = {
                        NOT = { any_secret_knower = { this = root } }
                    }
                    any_courtier = {
                        any_secret = {
                            NOT = { any_secret_knower = { this = root } }
                        }
                    }
                    any_vassal_or_below = {
                        any_secret = {
                            NOT = { any_secret_knower = { this = root } }
                        }
                        any_courtier = {
                            any_secret = {
                                NOT = { any_secret_knower = { this = root } }
                            }
                        }
                    }
                }
            }
        }

        # Make list of liege and all vassals that have secrets
        location.county.holder.liege = {
            if = {
                limit = {                 
                    any_secret = {
                        NOT = { any_secret_knower = { this = root } }
                    }
                }
                add_to_list = secret_characters
            }
            every_courtier = {
                limit = {                 
                    any_secret = {
                        NOT = { any_secret_knower = { this = root } }
                    }
                }
                add_to_list = secret_characters
            }

            every_vassal_or_below = {
                limit = {                 
                    any_secret = {
                        NOT = { any_secret_knower = { this = root } }
                    }
                }
                add_to_list = secret_characters

                every_courtier = {
                    limit = {                 
                        any_secret = {
                            NOT = { any_secret_knower = { this = root } }
                        }
                    }
                    add_to_list = secret_characters
                }
            }

            every_vassal_or_below = {
                every_courtier = {
                    limit = {                 
                        any_secret = {
                            NOT = { any_secret_knower = { this = root } }
                        }
                    }
                    add_to_list = secret_characters
                }
            }
        }

        # Effects
        switch = {
            trigger = scope:cultist_tier
            flag:common = {
                random_in_list = {
                    list = secret_characters
                    random_secret = {
                        reveal_to = root
                    }
                }
            }
            flag:noble = {
                random_in_list = {
                    list = secret_characters
                    random_secret = {
                        reveal_to = root
                    }
                    remove_from_list = secret_characters
                }
                random_in_list = {
                    list = secret_characters
                    random_secret = {
                        reveal_to = root
                    }
                    remove_from_list = secret_characters
                }
            }
            flag:royal = {
                random_in_list = {
                    list = secret_characters
                    random_secret = {
                        reveal_to = root
                    }
                    remove_from_list = secret_characters
                }
                random_in_list = {
                    list = secret_characters
                    random_secret = {
                        reveal_to = root
                    }
                    remove_from_list = secret_characters
                }
                random_in_list = {
                    list = secret_characters
                    random_secret = {
                        reveal_to = root
                    }
                    remove_from_list = secret_characters
                }
            }
        }

        # Stress Impact
        stress_impact = {
            humble = minor_stress_gain

            paranoid = minor_stress_loss
        }

        # Cleanup
        hidden_effect = {
            scope:cultist_recruit = {
                death = { death_reason = death_vanished }
            }
        }
    }

    # Or give you a hook on nearby ruler
    option = {
        # Loc
        name = regula_travel_events.2000.spy_patron
        flavor = regula_travel_events.2000.spy_patron_tt

        # Triggers
        trigger = {
            scope:cultist_type = flag:spy
            location.county.holder = { NOT = { is_contact_of = root } }
            is_landless_adventurer = yes
        }

        # Effects
        switch = {
            trigger = scope:cultist_tier
            flag:common = {
                add_contact = location.county.holder
                add_hook = {
                    type = contact_list_weak_hook
                    target = location.county.holder
                }
            }
            flag:noble = {
                add_contact = location.county.holder
                add_hook = {
                    type = manipulation_hook
                    target = location.county.holder
                }
            }
            flag:royal = {
                add_contact = location.county.holder
                add_hook = {
                    type = strong_obligation_hook
                    target = location.county.holder
                }
            }
        }

        # Stress Impact
        stress_impact = {
            humble = minor_stress_gain
            honest = minor_stress_gain
            generous = minor_stress_gain

            greedy = medium_stress_loss
            arrogant = medium_stress_loss
            impatient = minor_stress_loss
        }

        # Cleanup
        hidden_effect = {
            scope:cultist_recruit = {
                death = { death_reason = death_vanished }
            }
        }
    }

    # Lady 
    # Gives resources, gold, prestige and renown
    option = {
        # Loc
        name = regula_travel_events.2000.lady_resources
        flavor = regula_travel_events.2000.lady_resources_tt

        # Triggers
        trigger = {
            scope:cultist_type = flag:lady
        }

        # Effects
        switch = {
            trigger = scope:cultist_tier
            flag:common = {
                add_gold = minor_gold_value_check
                add_prestige = minor_prestige_gain
                dynasty = {
                    add_dynasty_prestige = minor_dynasty_prestige_gain
                }
            }
            flag:noble = {
                add_gold = medium_gold_value_check
                add_prestige = medium_prestige_gain
                dynasty = {
                    add_dynasty_prestige = medium_dynasty_prestige_gain
                }
            }
            flag:royal = {
                add_gold = major_gold_value_check
                add_prestige = major_prestige_gain
                dynasty = {
                    add_dynasty_prestige = major_dynasty_prestige_gain
                }
            }
        }

        # Stress Impact
        stress_impact = {
            generous = medium_stress_gain


            greedy = medium_stress_loss
            diligent = minor_stress_loss
            ambitious = minor_stress_loss
        }

        # Cleanup
        hidden_effect = {
            scope:cultist_recruit = {
                death = { death_reason = death_vanished }
            }
        }
    }

    # Culture acceptance with local culture
    option = {
        # Loc
        name = regula_travel_events.2000.lady_culture
        flavor = regula_travel_events.2000.lady_culture_tt

        # Triggers
        trigger = {
            scope:cultist_type = flag:lady
            NOT = { culture = scope:cultist_recruit.culture }
        }

        # Effects
        switch = {
            trigger = scope:cultist_tier
            flag:common = {
				culture = {
					change_cultural_acceptance = {
						target = scope:cultist_recruit.culture
						value = 5
						desc = cultural_acceptance_gain_event
					}
				}
            }
            flag:noble = {
                culture = {
					change_cultural_acceptance = {
						target = scope:cultist_recruit.culture
						value = 10
						desc = cultural_acceptance_gain_event
					}
				}
            }
            flag:royal = {
                culture = {
					change_cultural_acceptance = {
						target = scope:cultist_recruit.culture
						value = 15
						desc = cultural_acceptance_gain_event
					}
				}
            }
        }

        # Stress Impact
        stress_impact = {
            shy = medium_stress_gain
            craven = minor_stress_gain
            paranoid = minor_stress_gain

            gregarious = medium_stress_loss
            diligent = minor_stress_loss
            ambitious = minor_stress_loss
        }

        # Cleanup
        hidden_effect = {
            scope:cultist_recruit = {
                death = { death_reason = death_vanished }
            }
        }
    }

    # Breeder
    # Can be made into concubine and impregnated straight away
    option = {
        # Loc
        name = regula_travel_events.2000.breeder_impregnate
        flavor = regula_travel_events.2000.breeder_impregnate_tt

        # Triggers
        trigger = {
            scope:cultist_type = flag:breeder
            can_have_children = yes
        }

        # Effects
        scope:cultist_recruit = {
            hidden_effect = {
                random_list = {
                    65 = {
                        make_pregnant = {
                            father = root
                            number_of_children = 1
                        }
                    }
                    25 = {
                        make_pregnant = {
                            father = root
                            number_of_children = 2
                        }
                    }
                    9 = {
                        make_pregnant = {
                            father = root
                            number_of_children = 3
                        }
                    }
                    1 = {
                        make_pregnant = {
                            father = root
                            number_of_children = 4
                        }
                    }
                }
                set_pregnancy_gender = female
            }
        }

        regula_sex_with_target_no_stress = { TARGET = scope:cultist_recruit }

        show_as_tooltip = {
            scope:cultist_recruit = {
                make_pregnant = {
                    father = root
                    number_of_children = 1
                }
            }
        }

        scope:cultist_recruit = {
            add_trait = regula_blessed_pregnancy
        }

        hidden_effect = {
            add_courtier = scope:cultist_recruit
        }
        make_concubine = scope:cultist_recruit

        # Stress Impact
        stress_impact = {
            shy = medium_stress_gain
            chaste = medium_stress_gain
            paranoid = minor_stress_gain

            lustful = medium_stress_loss
            gregarious = minor_stress_loss
            zealous = minor_stress_loss
            impatient = minor_stress_loss
        }
    }

    # Drain her Vigor for some extra life expectency
    option = {
        # Loc
        name = regula_travel_events.2000.breeder_drain
        flavor = regula_travel_events.2000.breeder_drain_tt

        add_internal_flag = dangerous

        # Triggers
        trigger = {
            scope:cultist_type = flag:breeder
            OR = {
                has_trait = callous
                has_trait = sadistic
                has_trait = ambitious
            }
        }

        trait = callous
        trait = sadistic
        trait = ambitious

        # Effects
        # Reduce our piety
        add_piety = { 
            subtract = regula_exhaurire_vitale_absorb_essence_piety_cost
            multiply = 0.5
        }
		add_piety_experience = { 
            subtract = regula_exhaurire_vitale_absorb_essence_piety_experience_cost
        }

        # Drain life
        switch = {
            trigger = scope:cultist_tier
            flag:common = {
				exhaurire_vitale_drain_vitality_effect = {
					ACTOR = root
					TARGET = scope:cultist_recruit
					STACKS = 1
				}
            }
            flag:noble = {
				exhaurire_vitale_drain_vitality_effect = {
					ACTOR = root
					TARGET = scope:cultist_recruit
					STACKS = 2
				}
            }
            flag:royal = {
				exhaurire_vitale_drain_vitality_effect = {
					ACTOR = root
					TARGET = scope:cultist_recruit
					STACKS = 3
				}
            }
        }

        # Stress Impact
        stress_impact = {
			base = minor_stress_impact_gain
            compassionate = minor_stress_impact_gain
            content = minor_stress_impact_gain
            calm = minor_stress_impact_gain
            just = minor_stress_impact_gain

            ambitious = medium_stress_impact_loss
            callous = medium_stress_impact_loss
            sadistic = medium_stress_impact_loss
        }

        # Cleanup
        # Don't hide this because we want player to know he's a killer >:(
        scope:cultist_recruit = {
            death = {
                death_reason = death_drained
                killer = root
            }
        }
    }

    # Take more Piety instead
    option = {
        # Loc
        name = regula_travel_events.2000.take_piety
        flavor = regula_travel_events.2000.take_piety_tt

        # Effects
        regula_sex_with_target_normal = { TARGET = scope:cultist_recruit }

        switch = {
            trigger = scope:cultist_tier
            flag:common = {
                add_piety = medium_piety_gain
            }
            flag:noble = {
                add_piety = major_piety_gain
            }
            flag:royal = {
                add_piety = massive_piety_gain
            }
        }

        # Stress Impact
        stress_impact = {
            lazy = minor_stress_gain

            lustful = minor_stress_loss
        }

        # Cleanup
        hidden_effect = {
            scope:cultist_recruit = {
                death = { death_reason = death_vanished }
            }
        }
    }
}

##################################
# Regula Search for Women Events #
##################################
#
# These events are used when the travel option "Search for Famuli" is enabled
# Each event should be done when a province is travelled via on_action
# The events should provide the opportunity to recruit a decent courtier / camp follower
#
##################################

# Coped from vanilla effect "1033_set_cost_effect" for hiring in taverns
# Added a case for stats being lower then 20 total (aka really trash stats)
scripted_effect search_for_women_set_cost_effect = {
	save_scope_value_as = {
		name = $VALUE_NAME$_sum_skills
		value = {
			add = $CHARACTER$.diplomacy
			add = $CHARACTER$.martial
			add = $CHARACTER$.stewardship
			add = $CHARACTER$.intrigue
			add = $CHARACTER$.learning
			add = $CHARACTER$.prowess
		}
	}
	save_scope_value_as = {
        name = $VALUE_NAME$
        value = {
            integer_range = {
                min = medium_gold_laamps_value
                max = major_gold_laamps_value
            }
            #Cheaper out in the wilds
            if = {
                limit = { 
                    scope:visiting_location = { has_holding_type = tribal_holding }
                }
                multiply = 0.6
            }
            if = { #They're stellar? More expensive. :elmofire:
                limit = { scope:$VALUE_NAME$_sum_skills >= 120 } #Good in all skills?
                multiply = 8 #20 in all skills
            }
            else_if = {
                limit = { scope:$VALUE_NAME$_sum_skills >= 100 } #Good in four skills?
                multiply = 5
            }
            else_if = {
                limit = { scope:$VALUE_NAME$_sum_skills >= 80 } #Good in three skills?
                multiply = 4
            }
            else_if = {
                limit = { scope:$VALUE_NAME$_sum_skills >= 60 } #Good in two skills?
                multiply = 3
            }
            else_if = {
                limit = { scope:$VALUE_NAME$_sum_skills >= 40 } #Good in one-and-a-half skill? Should be roughly 90-110 gold
                multiply = 2.5
            }
            else_if = {
                limit = { scope:$VALUE_NAME$_sum_skills >= 20 } #Good in one skill?
                multiply = 1.5
            }
            #Add perk discounts and other things here.
        }
    }
}

# After we do the travel event, block any regula searchs for either 2/4 months
scripted_effect search_for_women_event_block_with_flag = {
    if = {
        limit = {
            domicile ?= { has_domicile_parameter = camp_better_scout_for_talent }
        }
        add_character_flag = {
            flag = had_regula_search_for_women_event
            months = 2
        }
    }
    else = {
        add_character_flag = {
            flag = had_regula_search_for_women_event
            months = 4
        }
    }
}

# Generic Search events
# 3001 - 3100
# Find a beautiful bard 
regula_travel_events.3001 = {
    type = character_event
    title = regula_travel_events.3001.t
    desc = regula_travel_events.3001.desc
	theme = regula_theme
	override_background = {
		reference = market
	}

    left_portrait = {
        character = root
        scripted_animation = {
            triggered_animation = {
                trigger = {
                    always = yes
                }
                animation = { throne_room_applaud_1 throne_room_cheer_1 throne_room_cheer_2 }
            }
        }
    }

    right_portrait = {
        character = scope:recruit
        animation = instrument_active
    }

    cooldown = { years = 5 }

    trigger = {
        location = {
            OR = {
                has_holding_type = castle_holding
                has_holding_type = city_holding
                has_holding_type = tribal_holding
            }
        }
    }

    immediate = {
        # Play some music!
        play_music_cue = "mx_cue_in_taberna_instrumental"
        # Create the recruit
        hidden_effect = {
            create_character = {
                save_scope_as = recruit
                location = root.location
                culture = root.location.culture
                faith = root.location.faith
                template = regula_orgy_enchanting_singer_character
            }
        }

        # Make cost
        search_for_women_set_cost_effect = { CHARACTER = scope:recruit VALUE_NAME = recruit_cost }
    }

    # Attempt to convince using a attribute
    option = {
        name = regula_travel_events.convince_skill

        trigger = {
            diplomacy < very_high_skill_rating
        }

		duel = {
			skill = diplomacy
			value = average_skill_rating
			# Success: Nice
			50 = {		
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = regula_travel_events.convince.success
				send_interface_toast = {
					title = regula_travel_events.convince.success
					left_icon = root
					right_icon = scope:recruit
					# Yay!
                    add_courtier = scope:recruit
				}
			}
			# Failure: Nah
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -20
				}	
				desc = regula_travel_events.convince.failure
				send_interface_toast = {
					type = event_toast_text_bad
					title = regula_travel_events.convince.failure
                    desc = regula_travel_events.convince.failure.tt
					left_icon = root
					right_icon = scope:recruit
                    hidden_effect = {
                        scope:recruit = {
                            death = {
                                death_reason = death_vanished
                            }
                        }
                    }
				}
			}
		}
    }

    # If our attribute is high enough, automatic success
    option = {
        name = regula_travel_events.convince_skill_great

        skill = diplomacy

        trigger = {
            diplomacy >= very_high_skill_rating
        }

        add_courtier = scope:recruit
    }

    # Pay an amount of gold to hire
    option = {
        name = regula_travel_events.convince_gold

        trigger = {
            gold >= scope:recruit_cost
        }

        show_as_unavailable = { always = yes } 

        #Pay gold
		pay_short_term_gold = {
			target = scope:recruit
			gold = scope:recruit_cost
		}

        add_courtier = scope:recruit
    }

    # Other Special options
    option = {
        name = regula_travel_events.3001.poet

        trait = lifestyle_poet

        trigger = {
            has_trait = lifestyle_poet
        }

        add_courtier = scope:recruit

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = impressed_opinion
                opinion = 20
            }
        }
    }

    # Nevermind
    option = {
        name = regula_travel_events.cancel

        fallback = yes

        hidden_effect = {
            scope:recruit = {
                death = {
                    death_reason = death_vanished
                }
            }
        }
    }

    after = {
        search_for_women_event_block_with_flag = yes
    }
}

# Find a travelling knight being attacked by bandits
regula_travel_events.3002 = {
    type = character_event
    title = regula_travel_events.3002.t
    desc = regula_travel_events.3002.desc
	theme = regula_theme
	override_background = {
		reference = alley_night
	}

    right_portrait = {
        character = scope:recruit
        animation = random_weapon_aggressive
    }

    cooldown = { years = 5 }

    trigger = {
        location = {
            OR = {
                has_holding_type = castle_holding
                has_holding_type = city_holding
                has_holding_type = tribal_holding
            }
        }
    }

    immediate = {
        # Create the recruit
        hidden_effect = {
            create_character = {
                save_scope_as = recruit
                gender = female
                location = root.location
                culture = root.location.culture
                faith = root.location.faith
                template = regula_generated_castle_knight_character
            }
            # Make sure they can be a knight
            scope:recruit = {
                add_trait = shieldmaiden
            }
        }
    }

    # Charge in to help!
    option = {
        name = regula_travel_events.3002.fight_attempt

        trigger = {
            prowess < extremely_high_skill_rating
        }

		duel = {
			skill = prowess
			value = average_skill_rating
			# Success: Nice
			50 = {		
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = regula_travel_events.3002.fight_attempt.success
				send_interface_toast = {
					title = regula_travel_events.3002.fight_attempt.success
					left_icon = root
					right_icon = scope:recruit
					# Yay!
                    add_courtier = scope:recruit
                    scope:recruit = {
                        create_character_memory = {
                            type = saved_from_assault_memory
                            participants = { 
                                rescuer = root
                            }
                        }
                        add_opinion = {
                            target = root
                            modifier = grateful_opinion
                            opinion = 30
                        }
                    }
				}
			}
			# Failure: Knight dies, you are wounded
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -20
				}
				desc = regula_travel_events.3002.fight_attempt.failure
				send_interface_toast = {
					type = event_toast_text_bad
					title = regula_travel_events.3002.fight_attempt.failure
					left_icon = root
					right_icon = scope:recruit

                    increase_wounds_effect = { REASON = fight }

                    scope:recruit = {
                        death = {
                            death_reason = death_fight
                        }
                    }
				}
			}
		}
    }

    # If our attribute is high enough, automatic success
    option = {
        name = regula_travel_events.3002.fight_pass
        flavor = regula_travel_events.3002.fight_attempt.success

        skill = prowess

        trigger = {
            prowess >= extremely_high_skill_rating
        }

        add_courtier = scope:recruit

        scope:recruit = {
            create_character_memory = {
                type = saved_from_assault_memory
                participants = { 
                    rescuer = root
                }
            }
            add_opinion = {
                target = root
                modifier = grateful_opinion
                opinion = 30
            }
        }
    }

    # Other Special options
    option = {
        name = regula_travel_events.3002.knight_errant

        trigger = {
            has_trait = knight_errant
        }

        trait = knight_errant

        add_courtier = scope:recruit

        scope:recruit = {
            create_character_memory = {
                type = saved_from_assault_memory
                participants = { 
                    rescuer = root
                }
            }
            add_opinion = {
                target = root
                modifier = grateful_opinion
                opinion = 30
            }
        }
    }

    # Nevermind
    option = {
        name = regula_travel_events.3002.cancel

        stress_impact = {
            craven = minor_stress_impact_loss

            brave = medium_stress_impact_gain
            just = minor_stress_impact_gain
        }

        fallback = yes

        hidden_effect = {
            scope:recruit = {
                death = {
                    death_reason = death_vanished
                }
            }
        }
    }

    after = {
        search_for_women_event_block_with_flag = yes
    }
}

# Tavern wench
regula_travel_events.3003 = {
    type = character_event
    title = regula_travel_events.3003.t
    desc = regula_travel_events.3003.desc
	theme = regula_theme
	override_background = {
		reference = tavern
	}

    left_portrait = {
        character = root
        scripted_animation = {
            triggered_animation = {
                trigger = {
                    always = yes
                }
                animation = { drink flirtation }
            }
        }
    }

    right_portrait = {
        character = scope:recruit
        outfit_tags = { regula_revealing_clothing }
        animation = eyeroll
    }

    cooldown = { years = 5 }

    trigger = {
        location = {
            OR = {
                has_holding_type = castle_holding
                has_holding_type = city_holding
                has_holding_type = tribal_holding
            }
        }
    }

    immediate = {
        # Create the recruit
        hidden_effect = {
            create_character = {
                save_scope_as = recruit
                location = root.location
                culture = root.location.culture
                faith = root.location.faith
                template = regula_generated_generic_tavern_wench_character
            }
        }

        # Make cost
        search_for_women_set_cost_effect = { CHARACTER = scope:recruit VALUE_NAME = recruit_cost }
    }

    # Convince her to join for less
    option = {
        name = regula_travel_events.convince_skill

        trigger = {
            intrigue < very_high_skill_rating
        }

		duel = {
			skill = intrigue
			value = high_skill_rating
            # Success: Great
			25 = {		
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3
					min = -24
				}
				desc = regula_travel_events.3003.convince.success_great
				send_interface_toast = {
					title = regula_travel_events.3003.convince.success_great
					left_icon = root
					right_icon = scope:recruit

                    scope:recruit = {
                        add_opinion = {
                            target = root
                            modifier = grateful_opinion
                            opinion = 20
                        }
                    }
                    add_courtier = scope:recruit
				}
			}
			# Success: Nice
			40 = {		
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -39
				}
				desc = regula_travel_events.3003.convince.success
				send_interface_toast = {
					title = regula_travel_events.3003.convince.success
					left_icon = root
					right_icon = scope:recruit

                    # Pay gold
                    pay_short_term_gold = {
                        target = scope:recruit
                        gold = {
                            value = scope:recruit_cost
                            multiply = 0.5
                        }
                    }

                    scope:recruit = {
                        add_opinion = {
                            target = root
                            modifier = grateful_opinion
                            opinion = 20
                        }
                    }
                    add_courtier = scope:recruit
				}
			}
			# Failure: You still get her, but more cost
			35 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -30
				}	
				desc = regula_travel_events.3003.convince.failure
				send_interface_toast = {
					type = event_toast_text_bad
					title = regula_travel_events.3003.convince.failure
                    desc = regula_travel_events.3003.convince.failure.tt
					left_icon = root
					right_icon = scope:recruit
                    # Pay gold
                    pay_short_term_gold = {
                        target = scope:recruit
                        gold = {
                            value = scope:recruit_cost
                            multiply = 1.3
                        }
                    }
                    scope:recruit = {
                        add_opinion = {
                            target = root
                            modifier = annoyed_opinion
                            opinion = -10
                        }
                    }
                    add_courtier = scope:recruit
				}
			}
		}
    }

    # If our attribute is high enough, automatic success
    option = {
        name = regula_travel_events.3003.seduce_pass

        skill = intrigue

        trigger = {
            intrigue >= very_high_skill_rating
        }

        add_courtier = scope:recruit
        add_opinion = {
            target = root
            modifier = grateful_opinion
            opinion = 20
        }
    }

    # Pay an amount of gold to hire
    option = {
        name = regula_travel_events.3003.gold

        trigger = {
            gold >= scope:recruit_cost
            NOT = { intrigue >= very_high_skill_rating }
        }

        show_as_unavailable = { always = yes } 

        # Pay gold
		pay_short_term_gold = {
			target = scope:recruit
			gold = scope:recruit_cost
		}

        add_courtier = scope:recruit
    }

    # Other Special options
    option = {
        name = regula_travel_events.3001.seducer
        flavor = regula_travel_events.3001.seducer.tt

        trait = seducer

        trigger = {
            has_trait = seducer
        }

        add_courtier = scope:recruit

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = flustered_opinion
                opinion = 30
            }
        }
    }

    # Nevermind
    option = {
        name = regula_travel_events.cancel

        fallback = yes

        hidden_effect = {
            scope:recruit = {
                death = {
                    death_reason = death_vanished
                }
            }
        }
    }

    after = {
        search_for_women_event_block_with_flag = yes
    }
}

# Farm Girl
regula_travel_events.3004 = {
    type = character_event
    title = regula_travel_events.3004.t
    desc = regula_travel_events.3004.desc
	theme = regula_theme
	override_background = {
		reference = farmland
	}

    left_portrait = {
        character = root
        animation = interested
    }

    right_portrait = {
        character = scope:recruit
        animation = hero_flex
    }

    cooldown = { years = 5 }

    trigger = {
        location = {
            OR = {
                has_holding_type = castle_holding
                has_holding_type = city_holding
                has_holding_type = tribal_holding
                terrain = farmlands
                terrain = plains
                terrain = floodplains
                terrain = wetlands
            }
        }
    }

    immediate = {
        # Create the recruit
        hidden_effect = {
            create_character = {
                save_scope_as = recruit
                gender = female
                location = root.location
                culture = root.location.culture
                faith = root.location.faith
                dynasty = none
                template = regula_generated_generic_farmgirl_character
            }
            scope:recruit = {
                add_character_flag = should_be_topless
            }
        }
    }

    # Attempt to beat at arm wrestle
    option = {
        name = regula_travel_events.3004.wrestle_attempt

        trigger = {
            prowess < monumentally_high_skill_rating
        }

		duel = {
			skill = prowess
			value = scope:recruit.prowess
			# Success: Nice
			50 = {		
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = regula_travel_events.3004.wrestle.success
				send_interface_toast = {
					title = regula_travel_events.3004.wrestle.success
					left_icon = root
					right_icon = scope:recruit
					# Yay!
                    add_courtier = scope:recruit
                    scope:recruit = {
                        add_opinion = {
                            target = root
                            modifier = impressed_opinion
                            opinion = 20
                        }
                    }
				}
			}
			# Failure: Nah
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -20
				}	
				desc = regula_travel_events.3004.wrestle.failure
				send_interface_toast = {
					type = event_toast_text_bad
					title = regula_travel_events.3004.wrestle.failure
					left_icon = root
					right_icon = scope:recruit

                    #Pay gold
                    pay_short_term_gold = {
                        target = scope:recruit
                        gold = {
                            value = minor_gold_value_check
                            multiply = 0.5
                        }
                    }

                    hidden_effect = {
                        scope:recruit = {
                            death = {
                                death_reason = death_vanished
                            }
                        }
                    }
				}
			}
		}
    }

    # If our prowess is high enough, automatic success
    option = {
        name = regula_travel_events.3004.wrestle_pass
        flavor = regula_travel_events.3004.wrestle_pass.tt

        skill = prowess

        trigger = {
            prowess >= monumentally_high_skill_rating
        }

        add_courtier = scope:recruit
        scope:recruit = {
            add_opinion = {
                target = root
                modifier = impressed_opinion
                opinion = 20
            }
        }
    }

    # Other Special options
    # Giant is an instant win
    option = {
        name = regula_travel_events.3004.giant
        flavor = regula_travel_events.3004.giant.tt

        trait = giant

        trigger = {
            has_trait = giant
        }

        add_courtier = scope:recruit

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = scared_opinion
                opinion = 30
            }
        }
    }

    # Nevermind
    option = {
        name = regula_travel_events.cancel

        fallback = yes

        hidden_effect = {
            scope:recruit = {
                death = {
                    death_reason = death_vanished
                }
            }
        }
    }

    after = {
        scope:recruit ?= {
            remove_character_flag = should_be_topless
        }
        search_for_women_event_block_with_flag = yes
    }
}

# Village Idiot
regula_travel_events.3005 = {
    type = character_event
    title = regula_travel_events.3005.t
    desc = regula_travel_events.3005.desc
	theme = regula_theme
	override_background = {
		reference = gallows
	}

    right_portrait = {
        character = scope:recruit
        outfit_tags = { no_clothes }
        animation = prisondungeon
    }

	cooldown = { years = 5 }

    trigger = {
        location = {
            OR = {
                has_holding_type = castle_holding
                has_holding_type = city_holding
                has_holding_type = tribal_holding
            }
        }
    }

	weight_multiplier = {
		base = 1
        modifier = {
            add = { subtract = 0.75 }
            employs_court_position = stooge_camp_officer
        }
	}

    immediate = {
        # Create the recruit
        hidden_effect = {
            create_character = {
                save_scope_as = recruit
                gender = female
                location = root.location
                culture = root.location.culture
                faith = root.location.faith
                template = regula_generated_generic_idiot_character
            }
            scope:recruit = {
                random_list = {
                    1 = { set_nickname_effect = { NICKNAME = nick_the_simple } }
                    1 = { set_nickname_effect = { NICKNAME = nick_the_dull } }
                    1 = { set_nickname_effect = { NICKNAME = nick_the_foolish } }
                }
            }
        }
    }

    # Get her for free
    # Costs a bit of prestige
    option = {
        name = regula_travel_events.3005.recruit
        flavor = regula_travel_events.3005.recruit.tt

        add_prestige = miniscule_prestige_loss
        add_courtier = scope:recruit
    }

    # Add as Stooge, less prestige loss plus small gain opinion with followers
    option = {
        name = regula_travel_events.3005.stooge
        flavor = regula_travel_events.3005.stooge.tt

        trigger = {
            is_landless_adventurer = yes
            can_employ_court_position_type = stooge_camp_officer
            # scope:recruit = {
            #     would_be_valid_for_court_position = {
            #         court_position = stooge_camp_officer
            #         employer = root
            #     }
            # }
        }

        add_prestige = miniscule_prestige_loss
        add_courtier = scope:recruit
        camp_officer_grant_effect = {
			POS = stooge
			CANDIDATE = scope:recruit
			EMPLOYER = root
		}

        every_courtier = {
            custom = custom.every_follower
            add_opinion = {
                target = root
                modifier = humorous_opinion
            }
        }
    }

    # Nevermind
    option = {
        name = regula_travel_events.3005.cancel
        flavor = regula_travel_events.3005.cancel.tt

        fallback = yes

        # Get something at leat
        add_prestige = miniscule_prestige_gain

        hidden_effect = {
            scope:recruit = {
                death = {
                    death_reason = death_vanished
                }
            }
        }
    }

    after = {
        search_for_women_event_block_with_flag = yes
    }
}

# Regula Cultist
# Very similar to regula_travel_events.2000
# Just lower quality recruits
regula_travel_events.3006 = {
    type = character_event
    title = regula_travel_events.3006.t
    desc = {
        desc = regula_travel_events.3006.desc

        # Initiate Type desc
        first_valid = {
            triggered_desc = {
                trigger = {
                    scope:cultist_type = flag:solider
                }
                desc = regula_travel_events.2000.cultist_solider
            }
            triggered_desc = {
                trigger = {
                    scope:cultist_type = flag:priestess
                }
                desc = regula_travel_events.2000.cultist_priestess
            }
            triggered_desc = {
                trigger = {
                    scope:cultist_type = flag:spy
                }
                desc = regula_travel_events.2000.cultist_spy
            }
            triggered_desc = {
                trigger = {
                    scope:cultist_type = flag:lady
                }
                desc = regula_travel_events.2000.cultist_lady
            }
            triggered_desc = {
                trigger = {
                    scope:cultist_type = flag:breeder
                }
                desc = regula_travel_events.2000.cultist_breeder
            }
        }

        desc = regula_travel_events.2000.desc_outro
    }

	theme = regula_theme
	override_background = {
		reference = wilderness
	}

    right_portrait = {
        character = scope:cultist_recruit

		scripted_animation = {
			triggered_animation = {
				trigger = {
                    scope:cultist_type = flag:soldier
				}
				animation = { marshal personality_bold hero_flex }
			}
		}

		scripted_animation = {
			triggered_animation = {
				trigger = {
                    scope:cultist_type = flag:priestess
				}
                animation = { chaplain personality_zealous debating } 
			}
		}

        scripted_animation = {
			triggered_animation = {
				trigger = {
                    scope:cultist_type = flag:spy
				}
				animation = { spymaster scheme personality_vengeful }
			}
		}

        scripted_animation = {
			triggered_animation = {
				trigger = {
                    scope:cultist_type = flag:lady
				}
				animation = { personality_honorable personality_forgiving personality_rational }
			}
		}

        scripted_animation = {
			triggered_animation = {
				trigger = {
                    scope:cultist_type = flag:breeder
				}
				animation = { personality_content personality_compassionate personality_coward }
			}
		}

    }

    # Does not have a cooldown

    trigger = {
        is_magister = yes
        location = {
            is_sea_province = no
            OR = {
                has_holding_type = castle_holding
                has_holding_type = city_holding
                has_holding_type = tribal_holding
                has_holding = no
            }
        }
    }

    immediate = {
        # Create the recruit
        hidden_effect = {
            random_list = {
                # Commoner recruit
                75 = {
                    save_scope_value_as = {
                        name = cultist_tier
                        value = flag:common
                    }
                    regula_create_random_initiate_effect_current_location = {
                        initiate_rarity = 1
                    }
                }

                # Noble Recruit
                20 = {
                    save_scope_value_as = {
                        name = cultist_tier
                        value = flag:noble
                    }
                    regula_create_random_initiate_effect_current_location = {
                        initiate_rarity = 2
                    }
                }

                # Royal Recruit
                5 = {
                    save_scope_value_as = {
                        name = cultist_tier
                        value = flag:royal
                    }
                    regula_create_random_initiate_effect_current_location = {
                        initiate_rarity = 3
                    }
                }
            }
            scope:created_character = { save_scope_as = cultist_recruit }
        }
    }

    # Take the cultist as courtier
    option = {
        name = regula_travel_events.2000.add_cultist

        add_courtier = scope:cultist_recruit

        stress_impact = {
            shy = minor_stress_gain

            lustful = minor_stress_loss
        }
    }

    # Special options based on Cultist type
    # Size of effects depends on the cultist tier

    # Soldier
    # Refill soldiers
    option = {
        # Loc
        name = regula_travel_events.2000.soldier_refill
        flavor = regula_travel_events.2000.soldier_refill_tt

        # Triggers
        trigger = {
            scope:cultist_type = flag:solider
            any_maa_regiment = {
                maa_current_troops_count < maa_max_troops_count
            }
        }

        # Effects
        every_maa_regiment = {
            limit = { maa_current_troops_count < maa_max_troops_count }
            add_to_list = damaged_maa_regiments
        }

        switch = {
            trigger = scope:cultist_tier
            flag:common = {
                every_in_list = {
                    list = damaged_maa_regiments
                    change_maa_troops_count = {
                        value = replenishable_troops_value
                        multiply = 0.25
                    }
                }
            }
            flag:noble = {
                every_in_list = {
                    list = damaged_maa_regiments
                    change_maa_troops_count = {
                        value = replenishable_troops_value
                        multiply = 0.5
                    }
                }
            }
            flag:royal = {
                every_in_list = {
                    list = damaged_maa_regiments
                    change_maa_troops_count = replenishable_troops_value
                }
            }
        }

        # Stress Impact
        stress_impact = {
            shy = medium_stress_gain
            craven = minor_stress_gain
            paranoid = minor_stress_gain

            brave = minor_stress_loss
            ambitious = minor_stress_loss
            gregarious = minor_stress_loss
            diligent = minor_stress_loss
        }

        # Cleanup
        hidden_effect = {
            scope:cultist_recruit = {
                death = { death_reason = death_vanished }
            }
        }
    }

    # Expand an existing Famuli MAA
    # We only allow expansion to 10 regiments
    option = {
        # Loc
        name = regula_travel_events.2000.soldier_expand
        flavor = regula_travel_events.2000.soldier_expand_tt

        # Triggers
        trigger = {
            scope:cultist_type = flag:solider
            any_maa_regiment = {
                regula_is_famuli_maa = yes
                maa_size <= 10
            }
        }

        # Effects
        random_maa_regiment = {
            limit = {
                regula_is_famuli_maa = yes
                maa_size <= 10
            }

            save_scope_as = regiment

            switch = {
                trigger = scope:cultist_tier
                flag:common = {
                    save_scope_value_as = {
                        name = regiment_size
                        value = {
                            value = maa_size
                            add = 1
                        }
                    }
                }
                flag:noble = {
                    save_scope_value_as = {
                        name = regiment_size
                        value = {
                            value = maa_size
                            add = 2
                            max = 10
                        }
                    }
                }
                flag:royal = {
                    save_scope_value_as = {
                        name = regiment_size
                        value = {
                            value = maa_size
                            add = 3
                            max = 10
                        }
                    }
                }
            }

            root = {
                regula_get_fucked_create_maa_regiment_of_type_with_size = {
                    REGIMENT = scope:regiment
                    SIZE = scope:regiment_size
                }
            }

            hidden_effect = {
                scope:regiment = { destroy_maa_regiment = yes }
            }
        }

        # Stress Impact
        stress_impact = {
            shy = medium_stress_gain
            craven = minor_stress_gain
            paranoid = minor_stress_gain

            brave = minor_stress_loss
            ambitious = minor_stress_loss
            gregarious = minor_stress_loss
            diligent = minor_stress_loss
        }

        # Cleanup
        hidden_effect = {
            scope:cultist_recruit = {
                death = { death_reason = death_vanished }
            }
        }
    }

    # Priestess
    # Change faith of county (and chance for neighbours)
    option = {
        # Loc
        name = regula_travel_events.2000.priestess_convert
        flavor = regula_travel_events.2000.priestess_convert_tt

        # Triggers
        trigger = {
            scope:cultist_type = flag:priestess
            location = {
                NOT = { faith = root.faith }
            }
        }

        # Effects
        # Always convert current county
        location.county = {
            set_county_faith = root.faith
        }

        # Chance to convert neighbor counties
        switch = {
            trigger = scope:cultist_tier
            flag:noble = {
                location = {
                    county = {
                        every_neighboring_county = {
                            limit = {
                                NOT = { faith = root.faith }
                            }
                            random = { 
                                chance = {
                                    value = root.faith.fervor
                                    add = {-25 25} # Bit of randomness
                                    subtract = prev.faith.fervor
                                }
                                set_county_faith = root.faith
                            }
                        }
                    }
                }
            }
            flag:royal = {
                location = {
                    county = {
                        every_neighboring_county = {
                            limit = {
                                NOT = { faith = root.faith }
                            }
                            set_county_faith = root.faith
                        }
                    }
                }
            }
        }

        # Stress Impact
        stress_impact = {
            cynical = minor_stress_gain

            zealous = medium_stress_loss
            humble = minor_stress_loss
        }

        # Cleanup
        hidden_effect = {
            scope:cultist_recruit = {
                death = { death_reason = death_vanished }
            }
        }
    }

    # Decrease fervor of county faith (as long as its not Regula)
    option = {
        # Loc
        name = regula_travel_events.2000.priestess_fervor
        flavor = regula_travel_events.2000.priestess_fervor_tt

        # Triggers
        trigger = {
            scope:cultist_type = flag:priestess
            location = {
                NOT = { faith = root.faith }
            }
        }

        # Effects
        switch = {
            trigger = scope:cultist_tier
            flag:common = {
                location.county.faith = {
                    change_fervor = {
                        value = -5
                        desc = fervor_loss_regula_priestess
                    }
                }
            }
            flag:noble = {
                location.county.faith = {
                    change_fervor = {
                        value = -10
                        desc = fervor_loss_regula_priestess
                    }
                }
            }
            flag:royal = {
                location.county.faith = {
                    change_fervor = {
                        value = -15
                        desc = fervor_loss_regula_priestess
                    }
                }
            }
        }

        # Stress Impact
        stress_impact = {
            cynical = minor_stress_gain
            forgiving = minor_stress_gain

            zealous = medium_stress_loss
        }

        # Cleanup
        hidden_effect = {
            scope:cultist_recruit = {
                death = { death_reason = death_vanished }
            }
        }
    }
    
    # Spy
    # Provide nearby secrets
    option = {
        # Loc
        name = regula_travel_events.2000.spy_secrets
        flavor = regula_travel_events.2000.spy_secrets_tt

        # Triggers
        trigger = {
            scope:cultist_type = flag:spy

            # Any secrets in this realm?
            location.county.holder.liege = {
                OR = {
                    any_secret = {
                        NOT = { any_secret_knower = { this = root } }
                    }
                    any_courtier = {
                        any_secret = {
                            NOT = { any_secret_knower = { this = root } }
                        }
                    }
                    any_vassal_or_below = {
                        any_secret = {
                            NOT = { any_secret_knower = { this = root } }
                        }
                        any_courtier = {
                            any_secret = {
                                NOT = { any_secret_knower = { this = root } }
                            }
                        }
                    }
                }
            }
        }

        # Make list of liege and all vassals that have secrets
        location.county.holder.liege = {
            if = {
                limit = {                 
                    any_secret = {
                        NOT = { any_secret_knower = { this = root } }
                    }
                }
                add_to_list = secret_characters
            }
            every_courtier = {
                limit = {                 
                    any_secret = {
                        NOT = { any_secret_knower = { this = root } }
                    }
                }
                add_to_list = secret_characters
            }

            every_vassal_or_below = {
                limit = {                 
                    any_secret = {
                        NOT = { any_secret_knower = { this = root } }
                    }
                }
                add_to_list = secret_characters

                every_courtier = {
                    limit = {                 
                        any_secret = {
                            NOT = { any_secret_knower = { this = root } }
                        }
                    }
                    add_to_list = secret_characters
                }
            }

            every_vassal_or_below = {
                every_courtier = {
                    limit = {                 
                        any_secret = {
                            NOT = { any_secret_knower = { this = root } }
                        }
                    }
                    add_to_list = secret_characters
                }
            }
        }

        # Effects
        switch = {
            trigger = scope:cultist_tier
            flag:common = {
                random_in_list = {
                    list = secret_characters
                    random_secret = {
                        reveal_to = root
                    }
                }
            }
            flag:noble = {
                random_in_list = {
                    list = secret_characters
                    random_secret = {
                        reveal_to = root
                    }
                    remove_from_list = secret_characters
                }
                random_in_list = {
                    list = secret_characters
                    random_secret = {
                        reveal_to = root
                    }
                    remove_from_list = secret_characters
                }
            }
            flag:royal = {
                random_in_list = {
                    list = secret_characters
                    random_secret = {
                        reveal_to = root
                    }
                    remove_from_list = secret_characters
                }
                random_in_list = {
                    list = secret_characters
                    random_secret = {
                        reveal_to = root
                    }
                    remove_from_list = secret_characters
                }
                random_in_list = {
                    list = secret_characters
                    random_secret = {
                        reveal_to = root
                    }
                    remove_from_list = secret_characters
                }
            }
        }

        # Stress Impact
        stress_impact = {
            humble = minor_stress_gain

            paranoid = minor_stress_loss
        }

        # Cleanup
        hidden_effect = {
            scope:cultist_recruit = {
                death = { death_reason = death_vanished }
            }
        }
    }

    # Or give you a hook on nearby ruler
    option = {
        # Loc
        name = regula_travel_events.2000.spy_patron
        flavor = regula_travel_events.2000.spy_patron_tt

        # Triggers
        trigger = {
            scope:cultist_type = flag:spy
            location.county.holder = { NOT = { is_contact_of = root } }
            is_landless_adventurer = yes
        }

        # Effects
        switch = {
            trigger = scope:cultist_tier
            flag:common = {
                add_contact = location.county.holder
                add_hook = {
                    type = contact_list_weak_hook
                    target = location.county.holder
                }
            }
            flag:noble = {
                add_contact = location.county.holder
                add_hook = {
                    type = manipulation_hook
                    target = location.county.holder
                }
            }
            flag:royal = {
                add_contact = location.county.holder
                add_hook = {
                    type = strong_obligation_hook
                    target = location.county.holder
                }
            }
        }

        # Stress Impact
        stress_impact = {
            humble = minor_stress_gain
            honest = minor_stress_gain
            generous = minor_stress_gain

            greedy = medium_stress_loss
            arrogant = medium_stress_loss
            impatient = minor_stress_loss
        }

        # Cleanup
        hidden_effect = {
            scope:cultist_recruit = {
                death = { death_reason = death_vanished }
            }
        }
    }

    # Lady 
    # Gives resources, gold, prestige and renown
    option = {
        # Loc
        name = regula_travel_events.2000.lady_resources
        flavor = regula_travel_events.2000.lady_resources_tt

        # Triggers
        trigger = {
            scope:cultist_type = flag:lady
        }

        # Effects
        switch = {
            trigger = scope:cultist_tier
            flag:common = {
                add_gold = minor_gold_value_check
                add_prestige = minor_prestige_gain
                dynasty = {
                    add_dynasty_prestige = minor_dynasty_prestige_gain
                }
            }
            flag:noble = {
                add_gold = medium_gold_value_check
                add_prestige = medium_prestige_gain
                dynasty = {
                    add_dynasty_prestige = medium_dynasty_prestige_gain
                }
            }
            flag:royal = {
                add_gold = major_gold_value_check
                add_prestige = major_prestige_gain
                dynasty = {
                    add_dynasty_prestige = major_dynasty_prestige_gain
                }
            }
        }

        # Stress Impact
        stress_impact = {
            generous = medium_stress_gain


            greedy = medium_stress_loss
            diligent = minor_stress_loss
            ambitious = minor_stress_loss
        }

        # Cleanup
        hidden_effect = {
            scope:cultist_recruit = {
                death = { death_reason = death_vanished }
            }
        }
    }

    # Culture acceptance with local culture
    option = {
        # Loc
        name = regula_travel_events.2000.lady_culture
        flavor = regula_travel_events.2000.lady_culture_tt

        # Triggers
        trigger = {
            scope:cultist_type = flag:lady
            NOT = { culture = scope:cultist_recruit.culture }
        }

        # Effects
        switch = {
            trigger = scope:cultist_tier
            flag:common = {
				culture = {
					change_cultural_acceptance = {
						target = scope:cultist_recruit.culture
						value = 5
						desc = cultural_acceptance_gain_event
					}
				}
            }
            flag:noble = {
                culture = {
					change_cultural_acceptance = {
						target = scope:cultist_recruit.culture
						value = 10
						desc = cultural_acceptance_gain_event
					}
				}
            }
            flag:royal = {
                culture = {
					change_cultural_acceptance = {
						target = scope:cultist_recruit.culture
						value = 15
						desc = cultural_acceptance_gain_event
					}
				}
            }
        }

        # Stress Impact
        stress_impact = {
            shy = medium_stress_gain
            craven = minor_stress_gain
            paranoid = minor_stress_gain

            gregarious = medium_stress_loss
            diligent = minor_stress_loss
            ambitious = minor_stress_loss
        }

        # Cleanup
        hidden_effect = {
            scope:cultist_recruit = {
                death = { death_reason = death_vanished }
            }
        }
    }

    # Breeder
    # Can be made into concubine and impregnated straight away
    option = {
        # Loc
        name = regula_travel_events.2000.breeder_impregnate
        flavor = regula_travel_events.2000.breeder_impregnate_tt

        # Triggers
        trigger = {
            scope:cultist_type = flag:breeder
            can_have_children = yes
        }

        # Effects
        scope:cultist_recruit = {
            hidden_effect = {
                random_list = {
                    65 = {
                        make_pregnant = {
                            father = root
                            number_of_children = 1
                        }
                    }
                    25 = {
                        make_pregnant = {
                            father = root
                            number_of_children = 2
                        }
                    }
                    9 = {
                        make_pregnant = {
                            father = root
                            number_of_children = 3
                        }
                    }
                    1 = {
                        make_pregnant = {
                            father = root
                            number_of_children = 4
                        }
                    }
                }
                set_pregnancy_gender = female
            }
        }

        regula_sex_with_target_no_stress = { TARGET = scope:cultist_recruit }

        show_as_tooltip = {
            scope:cultist_recruit = {
                make_pregnant = {
                    father = root
                    number_of_children = 1
                }
            }
        }

        scope:cultist_recruit = {
            add_trait = regula_blessed_pregnancy
        }

        hidden_effect = {
            add_courtier = scope:cultist_recruit
        }
        make_concubine = scope:cultist_recruit

        # Stress Impact
        stress_impact = {
            shy = medium_stress_gain
            chaste = medium_stress_gain
            paranoid = minor_stress_gain

            lustful = medium_stress_loss
            gregarious = minor_stress_loss
            zealous = minor_stress_loss
            impatient = minor_stress_loss
        }
    }

    # Drain her Vigor for some extra life expectency
    option = {
        # Loc
        name = regula_travel_events.2000.breeder_drain
        flavor = regula_travel_events.2000.breeder_drain_tt

        add_internal_flag = dangerous

        # Triggers
        trigger = {
            scope:cultist_type = flag:breeder
            OR = {
                has_trait = callous
                has_trait = sadistic
                has_trait = ambitious
            }
        }

        trait = callous
        trait = sadistic
        trait = ambitious

        # Effects
        # Reduce our piety
        add_piety = { 
            subtract = regula_exhaurire_vitale_absorb_essence_piety_cost
            multiply = 0.5
        }
		add_piety_experience = { 
            subtract = regula_exhaurire_vitale_absorb_essence_piety_experience_cost
        }

        # Drain life
        switch = {
            trigger = scope:cultist_tier
            flag:common = {
				exhaurire_vitale_drain_vitality_effect = {
					ACTOR = root
					TARGET = scope:cultist_recruit
					STACKS = 1
				}
            }
            flag:noble = {
				exhaurire_vitale_drain_vitality_effect = {
					ACTOR = root
					TARGET = scope:cultist_recruit
					STACKS = 2
				}
            }
            flag:royal = {
				exhaurire_vitale_drain_vitality_effect = {
					ACTOR = root
					TARGET = scope:cultist_recruit
					STACKS = 3
				}
            }
        }

        # Stress Impact
        stress_impact = {
			base = minor_stress_impact_gain
            compassionate = minor_stress_impact_gain
            content = minor_stress_impact_gain
            calm = minor_stress_impact_gain
            just = minor_stress_impact_gain

            ambitious = medium_stress_impact_loss
            callous = medium_stress_impact_loss
            sadistic = medium_stress_impact_loss
        }

        # Cleanup
        # Don't hide this because we want player to know he's a killer >:(
        scope:cultist_recruit = {
            death = {
                death_reason = death_drained
                killer = root
            }
        }
    }

    # Take more Piety instead
    option = {
        # Loc
        name = regula_travel_events.2000.take_piety
        flavor = regula_travel_events.2000.take_piety_tt

        # Effects
        regula_sex_with_target_normal = { TARGET = scope:cultist_recruit }

        switch = {
            trigger = scope:cultist_tier
            flag:common = {
                add_piety = medium_piety_gain
            }
            flag:noble = {
                add_piety = major_piety_gain
            }
            flag:royal = {
                add_piety = massive_piety_gain
            }
        }

        # Stress Impact
        stress_impact = {
            lazy = minor_stress_gain

            lustful = minor_stress_loss
        }

        # Cleanup
        hidden_effect = {
            scope:cultist_recruit = {
                death = { death_reason = death_vanished }
            }
        }
    }

    after = {
        search_for_women_event_block_with_flag = yes
    }
}

# Specific Terrain/Holding Search events
# 3101 - 3200
# Hungry Poacher in an empty holding
regula_travel_events.3101 = {
    type = character_event
    title = regula_travel_events.3101.t
    desc = regula_travel_events.3101.desc
	theme = regula_theme
	override_background = {
		reference = wilderness
	}

    right_portrait = {
        character = scope:recruit
        outfit_tags = { travel_cloak }
        animation = hunting_shortbow_rest_arrow_default
    }

    cooldown = { years = 5 }

    # Must be an empty holding
    trigger = {
        location = {
            has_holding = no
            is_sea_province = no
        }
    }

    immediate = {
        # Create the recruit
        hidden_effect = {
            create_character = {
                save_scope_as = recruit
                gender = female
                location = root.location
                culture = root.location.culture
                faith = root.location.faith
                template = regula_generated_castle_ranger_character
            }
            scope:recruit = {
                change_current_weight = -100
            }
        }
    }

    # Help with animal hunting
    option = {
        name = regula_travel_events.3101.hunt_attempt

        trigger = {
            prowess < very_high_skill_rating
        }

		duel = {
			skill = prowess
			value = average_skill_rating
			# Success: Nice
			50 = {		
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = regula_travel_events.convince.success
				send_interface_toast = {
					title = regula_travel_events.convince.success
					left_icon = root
					right_icon = scope:recruit
					# Yay!
                    add_courtier = scope:recruit
                    scope:recruit = {
                        add_opinion = {
                            target = root
                            modifier = thankful_opinion
                            opinion = 20
                        }
                        hidden_effect = {
                            change_current_weight = 30
                        }
                    }
				}
			}
			# Failure: Nah
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -20
				}
				desc = regula_travel_events.convince.failure
				send_interface_toast = {
					type = event_toast_text_bad
					title = regula_travel_events.convince.failure
                    desc = regula_travel_events.convince.failure.tt
					left_icon = root
					right_icon = scope:recruit

                    hidden_effect = {
                        scope:recruit = {
                            death = {
                                death_reason = death_vanished
                            }
                        }
                    }
				}
			}
		}
    }

    # If our attribute is high enough, automatic success
    option = {
        name = regula_travel_events.3101.hunt_pass

        skill = prowess

        trigger = {
            prowess >= very_high_skill_rating
        }

        add_courtier = scope:recruit

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = thankful_opinion
                opinion = 20
            }
            hidden_effect = {
                change_current_weight = 30
            }
        }
    }

    # Other Special options
    # Hunter
    option = {
        name = regula_travel_events.3101.hunter

        trigger = {
            has_trait = lifestyle_hunter
        }

        trait = lifestyle_hunter

        add_courtier = scope:recruit

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = thankful_opinion
                opinion = 20
            }
            hidden_effect = {
                change_current_weight = 30
            }
        }
    }

    # Give some food
    option = {
        name = regula_travel_events.3101.provisions

        trigger = {
            is_landless_adventurer = yes
            domicile ?= {
                provisions >= medium_provisions_value
			}
        }

        domicile = {
            change_provisions = medium_provisions_loss
        }

        add_courtier = scope:recruit

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = thankful_opinion
                opinion = 20
            }
            hidden_effect = {
                change_current_weight = 30
            }
        }
    }

    # Nevermind
    option = {
        name = regula_travel_events.3101.cancel

        stress_impact = {
            gluttonous = minor_stress_impact_loss

            generous = medium_stress_impact_gain
            compassionate = minor_stress_impact_gain
        }

        fallback = yes

        hidden_effect = {
            scope:recruit = {
                death = {
                    death_reason = death_vanished
                }
            }
        }
    }

    after = {
        search_for_women_event_block_with_flag = yes
    }
}

# Holy Lady
regula_travel_events.3102 = {
    type = character_event
    title = regula_travel_events.3101.t
    desc = regula_travel_events.3101.desc
	theme = regula_theme
	override_background = {
		reference = temple
	}

    right_portrait = {
        character = scope:recruit
        animation = personality_zealous
    }

    # Must be a church holding
    trigger = {
        location = {
            has_holding_type = church_holding
        }
    }

    immediate = {
        # Create the recruit
        hidden_effect = {
            create_character = {
                save_scope_as = recruit
                gender = female
                location = root.location
                culture = root.location.culture
                faith = root.location.faith
                template = regula_generated_temple_priestess_character
            }
        }
    }

    # Help with animal hunting
    option = {
        name = regula_travel_events.3101.hunt_attempt

        trigger = {
            learning < very_high_skill_rating
        }

		duel = {
			skill = learning
			value = average_skill_rating
			# Success: Nice
			50 = {		
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = regula_travel_events.convince.success
				send_interface_toast = {
					title = regula_travel_events.convince.success
					left_icon = root
					right_icon = scope:recruit
					# Yay!
                    add_courtier = scope:recruit
                    scope:recruit = {
                        add_opinion = {
                            target = root
                            modifier = thankful_opinion
                            opinion = 20
                        }
                        hidden_effect = {
                            change_current_weight = 30
                        }
                    }
				}
			}
			# Failure: Nah
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -20
				}
				desc = regula_travel_events.convince.failure
				send_interface_toast = {
					type = event_toast_text_bad
					title = regula_travel_events.convince.failure
                    desc = regula_travel_events.convince.failure.tt
					left_icon = root
					right_icon = scope:recruit

                    hidden_effect = {
                        scope:recruit = {
                            death = {
                                death_reason = death_vanished
                            }
                        }
                    }
				}
			}
		}
    }

    # If our attribute is high enough, automatic success
    option = {
        name = regula_travel_events.3101.hunt_pass

        skill = prowess

        trigger = {
            prowess >= very_high_skill_rating
        }

        add_courtier = scope:recruit

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = thankful_opinion
                opinion = 20
            }
            hidden_effect = {
                change_current_weight = 30
            }
        }
    }

    # Other Special options
    # Hunter
    option = {
        name = regula_travel_events.3101.hunter

        trigger = {
            has_trait = lifestyle_hunter
        }

        trait = lifestyle_hunter

        add_courtier = scope:recruit

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = thankful_opinion
                opinion = 20
            }
            hidden_effect = {
                change_current_weight = 30
            }
        }
    }

    # Give some food
    option = {
        name = regula_travel_events.3101.provisions

        trigger = {
            is_landless_adventurer = yes
            domicile ?= {
                provisions >= medium_provisions_value
			}
        }

        domicile = {
            change_provisions = medium_provisions_loss
        }

        add_courtier = scope:recruit

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = thankful_opinion
                opinion = 20
            }
            hidden_effect = {
                change_current_weight = 30
            }
        }
    }

    # Nevermind
    option = {
        name = regula_travel_events.3101.cancel

        stress_impact = {
            gluttonous = minor_stress_impact_loss

            generous = medium_stress_impact_gain
            compassionate = minor_stress_impact_gain
        }

        fallback = yes

        hidden_effect = {
            scope:recruit = {
                death = {
                    death_reason = death_vanished
                }
            }
        }
    }
}

# Mysterious Nomad
regula_travel_events.3103 = {
    type = character_event
    title = regula_travel_events.3101.t
    desc = regula_travel_events.3101.desc
	theme = regula_theme
	override_background = {
		reference = wilderness
	}

    right_portrait = {
        character = scope:recruit
        outfit_tags = { travel_cloak }
        animation = hunting_shortbow_rest_arrow_default
    }

    # Must be an empty holding
    trigger = {
        location = {
            has_holding = no
        }
    }

    immediate = {
        # Create the recruit
        hidden_effect = {
            create_character = {
                save_scope_as = recruit
                gender = female
                location = root.location
                culture = root.location.culture
                faith = root.location.faith
                template = regula_generated_castle_ranger_character
            }
            scope:recruit = {
                change_current_weight = -100
            }
        }
    }

    # Help with animal hunting
    option = {
        name = regula_travel_events.3101.hunt_attempt

        trigger = {
            prowess < very_high_skill_rating
        }

		duel = {
			skill = prowess
			value = average_skill_rating
			# Success: Nice
			50 = {		
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = regula_travel_events.convince.success
				send_interface_toast = {
					title = regula_travel_events.convince.success
					left_icon = root
					right_icon = scope:recruit
					# Yay!
                    add_courtier = scope:recruit
                    scope:recruit = {
                        add_opinion = {
                            target = root
                            modifier = thankful_opinion
                            opinion = 20
                        }
                        hidden_effect = {
                            change_current_weight = 30
                        }
                    }
				}
			}
			# Failure: Nah
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -20
				}
				desc = regula_travel_events.convince.failure
				send_interface_toast = {
					type = event_toast_text_bad
					title = regula_travel_events.convince.failure
                    desc = regula_travel_events.convince.failure.tt
					left_icon = root
					right_icon = scope:recruit

                    hidden_effect = {
                        scope:recruit = {
                            death = {
                                death_reason = death_vanished
                            }
                        }
                    }
				}
			}
		}
    }

    # If our attribute is high enough, automatic success
    option = {
        name = regula_travel_events.3101.hunt_pass

        skill = prowess

        trigger = {
            prowess >= very_high_skill_rating
        }

        add_courtier = scope:recruit

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = thankful_opinion
                opinion = 20
            }
            hidden_effect = {
                change_current_weight = 30
            }
        }
    }

    # Other Special options
    # Hunter
    option = {
        name = regula_travel_events.3101.hunter

        trigger = {
            has_trait = lifestyle_hunter
        }

        trait = lifestyle_hunter

        add_courtier = scope:recruit

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = thankful_opinion
                opinion = 20
            }
            hidden_effect = {
                change_current_weight = 30
            }
        }
    }

    # Give some food
    option = {
        name = regula_travel_events.3101.provisions

        trigger = {
            is_landless_adventurer = yes
            domicile ?= {
                provisions >= medium_provisions_value
			}
        }

        domicile = {
            change_provisions = medium_provisions_loss
        }

        add_courtier = scope:recruit

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = thankful_opinion
                opinion = 20
            }
            hidden_effect = {
                change_current_weight = 30
            }
        }
    }

    # Nevermind
    option = {
        name = regula_travel_events.3101.cancel

        stress_impact = {
            gluttonous = minor_stress_impact_loss

            generous = medium_stress_impact_gain
            compassionate = minor_stress_impact_gain
        }

        fallback = yes

        hidden_effect = {
            scope:recruit = {
                death = {
                    death_reason = death_vanished
                }
            }
        }
    }
}

######################
# Sea / Ocean events #
# 3120 - 3129        #
######################

# Lady lost at sea
regula_travel_events.3120 = {
    type = character_event
    title = regula_travel_events.3120.t
    desc = regula_travel_events.3120.desc
	theme = regula_theme

	override_background = {
		reference = ocean
	}

    override_effect_2d = {
		reference = fog	
	}

    left_portrait = {
        character = root
        # Scared
        triggered_animation = {
            trigger = {
                OR = {
                    has_trait = craven
                    has_trait = shy
                    has_trait = lazy
                }
            }
            animation = { personality_coward fear stress }
        }
        # Gallant
        triggered_animation = {
            trigger = {
                OR = {
                    has_trait = brave
                    has_trait = stubborn
                    has_trait = just
                }
            }
            animation = { personality_brave }
        }
        # Cruel
        triggered_animation = {
            trigger = {
                OR = {
                    has_trait = callous
                    has_trait = sadistic
                    has_trait = arrogant
                }
            }
            animation = { eyeroll }
        }

        # Default
        animation = worry
    }

    right_portrait = {
        character = scope:recruit
        outfit_tags = { beggar_rags }
        animation = sadness
    }

    # Must be on the sea, but next to land (for generating recruit)
    trigger = {
        location = {
            is_sea_province = yes
            any_province = {
                squared_distance = {
                    target = prev
                    value < 100000
                }
                exists = county
            }
        }
    }

    immediate = {
        # Create the recruit
        hidden_effect = {
			location = {
                random_province = {
                    limit = {
                        squared_distance = {
                            target = prev
                            value < 100000
                        }
                    }
                    # Weight towards coastal provinces
                    weight = {
                        base = 1
                        modifier = {
                            is_coastal = no
                            add = -0.75
                        }
                    }
                    save_scope_as = recruit_home
                }
			}

            random_list = {
                # Fantastic!
                10 = { create_recruit_from_template_with_location = { SAVE_SCOPE = recruit TEMPLATE = regula_generated_castle_princess_character LOCATION = scope:recruit_home } }

                # Great
                5 = { create_recruit_from_template_with_location = { SAVE_SCOPE = recruit TEMPLATE = regula_orgy_invitee_character LOCATION = scope:recruit_home } }
                5 = { create_recruit_from_template_with_location = { SAVE_SCOPE = recruit TEMPLATE = regula_generated_generic_orphan_youngest LOCATION = scope:recruit_home } }

                # Good
                5 = { create_recruit_from_template_with_location = { SAVE_SCOPE = recruit TEMPLATE = regula_generated_generic_farmgirl_character LOCATION = scope:recruit_home } }
                5 = { create_recruit_from_template_with_location = { SAVE_SCOPE = recruit TEMPLATE = regula_generated_temple_gardener_character LOCATION = scope:recruit_home } }
                5 = { create_recruit_from_template_with_location = { SAVE_SCOPE = recruit TEMPLATE = regula_generated_tribal_submissive_character LOCATION = scope:recruit_home } }
                5 = { create_recruit_from_template_with_location = { SAVE_SCOPE = recruit TEMPLATE = regula_generous_welcome_lustful_indulgence_beauty_attendee LOCATION = scope:recruit_home } }
                5 = { create_recruit_from_template_with_location = { SAVE_SCOPE = recruit TEMPLATE = regula_generous_welcome_lustful_indulgence_strong_attendee LOCATION = scope:recruit_home } }
                5 = { create_recruit_from_template_with_location = { SAVE_SCOPE = recruit TEMPLATE = regula_generous_welcome_lustful_indulgence_smart_attendee LOCATION = scope:recruit_home } }

                # Okay
                35 = { create_recruit_from_template_with_location = { SAVE_SCOPE = recruit TEMPLATE = regula_generated_generic_peasant_character LOCATION = scope:recruit_home } }

                # Terrible
                5 = { create_recruit_from_template_with_location = { SAVE_SCOPE = recruit TEMPLATE = regula_generated_generic_idiot_character LOCATION = scope:recruit_home } }
            }
            scope:recruit = {
                change_current_weight = -75
            }
        }
    }

    # Dive in to save her!
    # No slowdown, but riskier
    option = {
        name = regula_travel_events.3120.save_self
        flavor = regula_travel_events.3120.save_self.tt

        duel = {
			skills = { prowess }
			value = medium_skill_rating
			#Fish them out of the water
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
				}
				desc = regula_travel_events.3120.saved.desc
				send_interface_toast = {
					left_icon = root
					right_icon = scope:recruit
					title = regula_travel_events.3120.saved.t

                    add_prestige = minor_prestige_gain
                    add_courtier = scope:recruit

                    scope:recruit = {
                        add_opinion = {
                            target = root
                            modifier = saved_my_life_opinion
                            opinion = 40
                        }
                    }
                    add_hook = {
                        target = scope:recruit
                        type = saved_my_life_hook
                    }
				}
				stress_impact = {
					base = minor_stress_impact_loss
				}
			}
			#...but they became injured
			30 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
				}
				desc = regula_travel_events.3120.wounded.desc
				send_interface_toast = {
					left_icon = root
					right_icon = scope:recruit
					title = regula_travel_events.3120.wounded.t

                    add_prestige = miniscule_prestige_gain
                    add_courtier = scope:recruit
                    scope:recruit = {
                        increase_wounds_effect = { REASON = sea_storm }
                        add_opinion = {
                            target = root
                            modifier = saved_my_life_opinion
                            opinion = 30
                        }
                    }
                    add_hook = {
                        target = scope:recruit
                        type = saved_my_life_hook
                    }
				}
			}
			#They died
			5 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = 5
				}
				desc = regula_travel_events.3120.failure.desc
				send_interface_toast = {
					left_icon = root
					right_icon = scope:recruit
					title = regula_travel_events.3120.failure.t
					scope:recruit = {
						death = { death_reason = death_drowned }
					}
                    stress_impact = {
                        base = medium_stress_impact_gain
                    }
				}
			}
		}

		traveler_danger_xp_effect = {
			MIN = 3
			MAX = 6
		}
		stress_impact = {
			craven = minor_stress_impact_gain
			brave = minor_stress_impact_loss
		}
    }

    # Organise a search
    # Causes slow down, but is safer
    option = {
        name = regula_travel_events.3120.search
        flavor = regula_travel_events.3120.search.tt

		current_travel_plan = {
			delay_travel_plan = {
				days = 5
			}
		}

        add_prestige = medium_prestige_loss
        duel = {
			skills = { learning stewardship }
			value = medium_skill_rating
			#Fish them out of the water
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
				}
				desc = regula_travel_events.3120.saved.desc
				send_interface_toast = {
					left_icon = root
					right_icon = scope:recruit
					title = regula_travel_events.3120.saved.t
                    add_courtier = scope:recruit

                    scope:recruit = {
                        add_opinion = {
                            target = root
                            modifier = saved_my_life_opinion
                            opinion = 40
                        }
                    }
                    add_hook = {
                        target = scope:recruit
                        type = saved_my_life_hook
                    }
				}
				stress_impact = {
					base = minor_stress_impact_loss
				}
			}
			#...but they became injured
			30 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
				}
				desc = regula_travel_events.3120.wounded.desc
				send_interface_toast = {
					left_icon = root
					right_icon = scope:recruit
					title = regula_travel_events.3120.wounded.t

                    add_courtier = scope:recruit
                    scope:recruit = {
                        increase_wounds_effect = { REASON = sea_storm }
                        add_opinion = {
                            target = root
                            modifier = saved_my_life_opinion
                            opinion = 30
                        }
                    }
                    add_hook = {
                        target = scope:recruit
                        type = saved_my_life_hook
                    }
				}
			}
		}

        traveler_danger_xp_effect = {
			MIN = 1
			MAX = 3
		}
    }

    # Use Archery skills to tow her raft
    option = {
        name = regula_travel_events.3120.arrow
        flavor = regula_travel_events.3120.arrow.tt

        trigger = {
            OR = {
                has_trait_xp = {
                    trait = lifestyle_hunter
                    track = hunter
                    value >= 50
                }
                has_trait_xp = {
                    trait = tourney_participant
                    track = bow
                    value >= 30
                }
            }
        }

        trait = lifestyle_hunter
        trait = tourney_participant

        add_prestige = minor_prestige_gain
        add_courtier = scope:recruit

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = saved_my_life_opinion
                opinion = 40
            }
        }
        add_hook = {
            target = scope:recruit
            type = saved_my_life_hook
        }
    }

    # Nevermind
    option = {
        name = regula_travel_events.3120.cancel
        flavor = regula_travel_events.3120.cancel.tt

		current_travel_plan = {
			add_destination_progress = { days = 2 }
		}

        add_prestige = minor_prestige_loss
        stress_impact = {
            craven = minor_stress_impact_loss

            brave = medium_stress_impact_gain
            compassionate = minor_stress_impact_gain
        }

        fallback = yes

        hidden_effect = {
            scope:recruit = {
                death = {
                    death_reason = death_vanished
                }
            }
        }
    }

    after = {
        search_for_women_event_block_with_flag = yes
    }
}

# Stowaway
regula_travel_events.3121 = {
    type = character_event
    title = regula_travel_events.3121.t
    desc = {
        desc = regula_travel_events.3121.desc_intro
        first_valid = {
            # Light Eater
            triggered_desc = { 
                trigger = {
                    scope:recruit = {
                        OR = {
                            has_trait = temperate
                            has_trait = generous
                            has_trait = patient
                            has_trait = calm
                        }
                    }
                }
                desc = regula_travel_events.3121.light_eater
            }
            # Heavy Eater
            triggered_desc = { 
                trigger = {
                    scope:recruit = {
                        OR = {
                            has_trait = greedy
                            has_trait = impatient
                            has_trait = gluttonous
                        }
                    }
                }
                desc = regula_travel_events.3121.heavy_eater
            }
            # Default
            desc = regula_travel_events.3121.default_eater
        }
    }
	theme = regula_theme
	override_background = {
		reference = ocean
	}

    left_portrait = {
        character = root
        # Angry
        triggered_animation = {
            trigger = {
                OR = {
                    has_trait = callous
                    has_trait = gluttonous
                    has_trait = sadistic
                    has_trait = vengeful
                }
            }
            animation = { rage }
        }
        # Annoyed
        triggered_animation = {
            trigger = {
                OR = {
                    has_trait = arrogant
                    has_trait = temperate
                    has_trait = impatient
                }
            }
            animation = { eyeroll }
        }
        # Forgiving
        triggered_animation = {
            trigger = {
                OR = {
                    has_trait = forgiving
                    has_trait = compassionate
                    has_trait = content
                    has_trait = patient
                }
            }
            animation = { personality_compassionate }
        }

        # Default
        animation = worry
    }

    right_portrait = {
        character = scope:recruit
        outfit_tags = { beggar_rags }

        # Light Eater
        triggered_animation = {
            trigger = {
                OR = {
                    has_trait = temperate
                    has_trait = generous
                    has_trait = patient
                    has_trait = calm
                }
            }
            animation = { crying }
        }
        # Heavy Eater
        triggered_animation = {
            trigger = {
                OR = {
                    has_trait = greedy
                    has_trait = impatient
                    has_trait = gluttonous
                }
            }
            animation = { drink }
        }
        # Default
        animation = sadness
    }

    # Must be on the sea
    trigger = {
        location = {
            is_sea_province = yes
            any_neighboring_province = {
                exists = county # IE this is not a Sea province or an Impassable, etc
            }
        }

        # Make sure we have enough provisions to lose if landless
        trigger_if = {
            limit = { is_landless_adventurer = yes }
            domicile ?= {
                provisions >= medium_provisions_value
			}
        }

        # Or make sure we have enough gold to lose if landed
        trigger_if = {
            limit = { is_landless_adventurer = no }
            gold > minor_gold_value_check
        }
    }

    # Also add a cooldown as this has a negative effect (lose provisions/gold)
    # So don't want it to happen to often.
    cooldown = { years = 10 }

    immediate = {
        # Find nearby land province to recruit character from
        location = {
            random_neighboring_province = {
                limit = {
                    exists = county
                }
                save_scope_as = recruit_home
            }
        }

        # Create the recruit
        hidden_effect = {
            random_list = {
                # Fantastic!
                10 = { create_recruit_from_template_with_location = { SAVE_SCOPE = recruit TEMPLATE = regula_generated_castle_princess_character LOCATION = scope:recruit_home } }

                # Great
                5 = { create_recruit_from_template_with_location = { SAVE_SCOPE = recruit TEMPLATE = regula_orgy_invitee_character LOCATION = scope:recruit_home } }
                5 = { create_recruit_from_template_with_location = { SAVE_SCOPE = recruit TEMPLATE = regula_generated_generic_orphan_youngest LOCATION = scope:recruit_home } }

                # Good
                5 = { create_recruit_from_template_with_location = { SAVE_SCOPE = recruit TEMPLATE = regula_generated_generic_farmgirl_character LOCATION = scope:recruit_home } }
                5 = { create_recruit_from_template_with_location = { SAVE_SCOPE = recruit TEMPLATE = regula_generated_temple_gardener_character LOCATION = scope:recruit_home } }
                5 = { create_recruit_from_template_with_location = { SAVE_SCOPE = recruit TEMPLATE = regula_generated_tribal_submissive_character LOCATION = scope:recruit_home } }
                5 = { create_recruit_from_template_with_location = { SAVE_SCOPE = recruit TEMPLATE = regula_generous_welcome_lustful_indulgence_beauty_attendee LOCATION = scope:recruit_home } }
                5 = { create_recruit_from_template_with_location = { SAVE_SCOPE = recruit TEMPLATE = regula_generous_welcome_lustful_indulgence_strong_attendee LOCATION = scope:recruit_home } }
                5 = { create_recruit_from_template_with_location = { SAVE_SCOPE = recruit TEMPLATE = regula_generous_welcome_lustful_indulgence_smart_attendee LOCATION = scope:recruit_home } }

                # Okay
                35 = { create_recruit_from_template_with_location = { SAVE_SCOPE = recruit TEMPLATE = regula_generated_generic_peasant_character LOCATION = scope:recruit_home } }

                # Terrible
                5 = { create_recruit_from_template_with_location = { SAVE_SCOPE = recruit TEMPLATE = regula_generated_generic_idiot_character LOCATION = scope:recruit_home } }
            }
            scope:recruit = {
                change_current_weight = -75
            }
        }
    }

    # Recruit
    option = {
        name = regula_travel_events.3121.recruit

        add_courtier = scope:recruit

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = forgave_me_opinion
            }
        }

        hidden_effect = {
            scope:recruit = {
                change_current_weight = 25
            }
        }

        stress_impact = {
            gluttonous = medium_stress_impact_gain
            greedy = minor_stress_impact_gain
            vengeful = minor_stress_impact_gain

            generous = medium_stress_impact_loss
            compassionate = minor_stress_impact_loss
            forgiving = minor_stress_impact_loss
        }
    }

    # Feed extra to increase weight, also piety
    option = {
        name = regula_travel_events.3121.feed

        # Lose provisions/gold
        if = {
            limit = { is_landless_adventurer = yes }
            domicile = {
                change_provisions = medium_provisions_loss
            }
        }
        else = {
            remove_short_term_gold = tiny_gold_value
        }

        hidden_effect = {
            scope:recruit = {
                change_current_weight = 75
            }
        }

        add_courtier = scope:recruit
        add_piety = medium_piety_value

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = forgave_me_opinion
            }
            add_opinion = {
                target = root
                modifier = cared_for_my_health_opinion
            }
        }

        stress_impact = {
            gluttonous = major_stress_impact_gain
            greedy = medium_stress_impact_gain
            vengeful = medium_stress_impact_gain

            generous = medium_stress_impact_loss
            compassionate = medium_stress_impact_loss
            forgiving = medium_stress_impact_loss
        }
    }

    # Imprison
    option = {
        name = regula_travel_events.3121.imprison

        hidden_effect = {
            add_character_flag = {
                flag = block_imprisonment_event
                days = 1
            }
        }

        imprison = {
            target = scope:recruit
            type = dungeon
        }

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = imprisoned_me
            }
        }

        stress_impact = {
            gluttonous = medium_stress_impact_loss
            greedy = minor_stress_impact_loss
            just = minor_stress_impact_loss

            generous = medium_stress_impact_gain
            forgiving = medium_stress_impact_gain
            compassionate = minor_stress_impact_gain
        }
    }

    # Punish then imprison
    option = {
        name = regula_travel_events.3121.spank
        flavor = regula_travel_events.3121.spank.tt

        hidden_effect = {
            add_character_flag = {
                flag = block_imprisonment_event
                days = 1
            }
        }

        add_dread = torture_interaction_massive_dread_gain
        imprison = {
            target = scope:recruit
            type = dungeon
        }

        scope:recruit = {
            increase_wounds_effect = { REASON = whipping }
            add_opinion = {
                target = root
                modifier = imprisoned_me
            }
            add_opinion = {
                target = root
                modifier = whipped_me_opinion
            }
        }

        stress_impact = {
            sadistic = medium_stress_impact_loss
            wrathful = medium_stress_impact_loss
            gluttonous = minor_stress_impact_loss
            callous = minor_stress_loss

            generous = medium_stress_impact_gain
            compassionate = minor_stress_impact_gain
        }
    }

    # Nevermind
    option = {
        name = regula_travel_events.3121.cancel

        stress_impact = {
            gluttonous = minor_stress_impact_loss
            lazy = minor_stress_impact_loss
            shy = minor_stress_impact_loss

            generous = medium_stress_impact_gain
            forgiving = minor_stress_impact_gain
            compassionate = minor_stress_impact_gain
        }

        fallback = yes

        hidden_effect = {
            scope:recruit = {
                death = {
                    death_reason = death_vanished
                }
            }
        }
    }

    after = {
        # We have to do this "after" because recruit can't be checked in immediate
        # Lose provisions/gold
        # Depends on how heavy a eater the recruit is
        # Light Eater
        if = {
            limit = {
                scope:recruit = {
                    OR = {
                        has_trait = temperate
                        has_trait = generous
                        has_trait = patient
                        has_trait = calm
                    }
                }
            }
            if = {
                limit = { is_landless_adventurer = yes }
                domicile = {
                    change_provisions = minor_provisions_loss
                }
            }
            else = {
                remove_short_term_gold = tiny_gold_value
            }
        }
        # Heavy Eater
        else_if = {
            limit = {
                scope:recruit = {
                    OR = {
                        has_trait = greedy
                        has_trait = impatient
                        has_trait = gluttonous
                    }
                }
            }
            if = {
                limit = { is_landless_adventurer = yes }
                domicile = {
                    change_provisions = major_provisions_loss
                }
            }
            else = {
                remove_short_term_gold = {
                    value = tiny_gold_value
                    multiply = 3
                }
            }
        }
        # Default
        else = {
            if = {
                limit = { is_landless_adventurer = yes }
                domicile = {
                    change_provisions = medium_provisions_loss
                }
            }
            else = {
                remove_short_term_gold = {
                    value = tiny_gold_value
                    multiply = 2
                }
            }
        }

        search_for_women_event_block_with_flag = yes
    }
}

# Fisherwomen
regula_travel_events.3122 = {
    type = character_event
    title = regula_travel_events.3101.t
    desc = regula_travel_events.3101.desc
	theme = regula_theme
	override_background = {
		reference = ocean
	}

    right_portrait = {
        character = scope:recruit
        outfit_tags = { travel_cloak }
        animation = hunting_shortbow_rest_arrow_default
    }

    # Must be an empty holding
    trigger = {
        location = {
            has_holding = no
        }
    }

    immediate = {
        # Create the recruit
        hidden_effect = {
            create_character = {
                save_scope_as = recruit
                gender = female
                location = root.location
                culture = root.location.culture
                faith = root.location.faith
                template = regula_generated_castle_ranger_character
            }
            scope:recruit = {
                change_current_weight = -100
            }
        }
    }

    # Help with animal hunting
    option = {
        name = regula_travel_events.3101.hunt_attempt

        trigger = {
            prowess < very_high_skill_rating
        }

		duel = {
			skill = prowess
			value = average_skill_rating
			# Success: Nice
			50 = {		
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = regula_travel_events.convince.success
				send_interface_toast = {
					title = regula_travel_events.convince.success
					left_icon = root
					right_icon = scope:recruit
					# Yay!
                    add_courtier = scope:recruit
                    scope:recruit = {
                        add_opinion = {
                            target = root
                            modifier = thankful_opinion
                            opinion = 20
                        }
                        hidden_effect = {
                            change_current_weight = 30
                        }
                    }
				}
			}
			# Failure: Nah
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -20
				}
				desc = regula_travel_events.convince.failure
				send_interface_toast = {
					type = event_toast_text_bad
					title = regula_travel_events.convince.failure
                    desc = regula_travel_events.convince.failure.tt
					left_icon = root
					right_icon = scope:recruit

                    hidden_effect = {
                        scope:recruit = {
                            death = {
                                death_reason = death_vanished
                            }
                        }
                    }
				}
			}
		}
    }

    # If our attribute is high enough, automatic success
    option = {
        name = regula_travel_events.3101.hunt_pass

        skill = prowess

        trigger = {
            prowess >= very_high_skill_rating
        }

        add_courtier = scope:recruit

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = thankful_opinion
                opinion = 20
            }
            hidden_effect = {
                change_current_weight = 30
            }
        }
    }

    # Other Special options
    # Hunter
    option = {
        name = regula_travel_events.3101.hunter

        trigger = {
            has_trait = lifestyle_hunter
        }

        trait = lifestyle_hunter

        add_courtier = scope:recruit

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = thankful_opinion
                opinion = 20
            }
            hidden_effect = {
                change_current_weight = 30
            }
        }
    }

    # Give some food
    option = {
        name = regula_travel_events.3101.provisions

        trigger = {
            is_landless_adventurer = yes
            domicile ?= {
                provisions >= medium_provisions_value
			}
        }

        domicile = {
            change_provisions = medium_provisions_loss
        }

        add_courtier = scope:recruit

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = thankful_opinion
                opinion = 20
            }
            hidden_effect = {
                change_current_weight = 30
            }
        }
    }

    # Nevermind
    option = {
        name = regula_travel_events.3101.cancel

        stress_impact = {
            gluttonous = minor_stress_impact_loss

            generous = medium_stress_impact_gain
            compassionate = minor_stress_impact_gain
        }

        fallback = yes

        hidden_effect = {
            scope:recruit = {
                death = {
                    death_reason = death_vanished
                }
            }
        }
    }
}

# Captains Daughter
regula_travel_events.3123 = {
    type = character_event
    title = regula_travel_events.3101.t
    desc = regula_travel_events.3101.desc
	theme = regula_theme
	override_background = {
		reference = ocean
	}

    right_portrait = {
        character = scope:recruit
        outfit_tags = { travel_cloak }
        animation = hunting_shortbow_rest_arrow_default
    }

    # Must be an empty holding
    trigger = {
        location = {
            has_holding = no
        }
    }

    immediate = {
        # Create the recruit
        hidden_effect = {
            create_character = {
                save_scope_as = recruit
                gender = female
                location = root.location
                culture = root.location.culture
                faith = root.location.faith
                template = regula_generated_castle_ranger_character
            }
            scope:recruit = {
                change_current_weight = -100
            }
        }
    }

    # Help with animal hunting
    option = {
        name = regula_travel_events.3101.hunt_attempt

        trigger = {
            prowess < very_high_skill_rating
        }

		duel = {
			skill = prowess
			value = average_skill_rating
			# Success: Nice
			50 = {		
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = regula_travel_events.convince.success
				send_interface_toast = {
					title = regula_travel_events.convince.success
					left_icon = root
					right_icon = scope:recruit
					# Yay!
                    add_courtier = scope:recruit
                    scope:recruit = {
                        add_opinion = {
                            target = root
                            modifier = thankful_opinion
                            opinion = 20
                        }
                        hidden_effect = {
                            change_current_weight = 30
                        }
                    }
				}
			}
			# Failure: Nah
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -20
				}
				desc = regula_travel_events.convince.failure
				send_interface_toast = {
					type = event_toast_text_bad
					title = regula_travel_events.convince.failure
                    desc = regula_travel_events.convince.failure.tt
					left_icon = root
					right_icon = scope:recruit

                    hidden_effect = {
                        scope:recruit = {
                            death = {
                                death_reason = death_vanished
                            }
                        }
                    }
				}
			}
		}
    }

    # If our attribute is high enough, automatic success
    option = {
        name = regula_travel_events.3101.hunt_pass

        skill = prowess

        trigger = {
            prowess >= very_high_skill_rating
        }

        add_courtier = scope:recruit

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = thankful_opinion
                opinion = 20
            }
            hidden_effect = {
                change_current_weight = 30
            }
        }
    }

    # Other Special options
    # Hunter
    option = {
        name = regula_travel_events.3101.hunter

        trigger = {
            has_trait = lifestyle_hunter
        }

        trait = lifestyle_hunter

        add_courtier = scope:recruit

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = thankful_opinion
                opinion = 20
            }
            hidden_effect = {
                change_current_weight = 30
            }
        }
    }

    # Give some food
    option = {
        name = regula_travel_events.3101.provisions

        trigger = {
            is_landless_adventurer = yes
            domicile ?= {
                provisions >= medium_provisions_value
			}
        }

        domicile = {
            change_provisions = medium_provisions_loss
        }

        add_courtier = scope:recruit

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = thankful_opinion
                opinion = 20
            }
            hidden_effect = {
                change_current_weight = 30
            }
        }
    }

    # Nevermind
    option = {
        name = regula_travel_events.3101.cancel

        stress_impact = {
            gluttonous = minor_stress_impact_loss

            generous = medium_stress_impact_gain
            compassionate = minor_stress_impact_gain
        }

        fallback = yes

        hidden_effect = {
            scope:recruit = {
                death = {
                    death_reason = death_vanished
                }
            }
        }
    }
}

# Pirate Captain
regula_travel_events.3124 = {
    type = character_event
    title = regula_travel_events.3124.t
    desc = regula_travel_events.3124.desc
	theme = regula_theme
	override_background = {
		reference = ocean
	}

    left_portrait = {
        character = root
    }

    right_portrait = {
        character = scope:recruit
        outfit_tags = { travel_cloak }
        animation = hunting_shortbow_rest_arrow_default
    }

    # Must be an empty holding
    trigger = {
        location = {
            has_holding = no
        }
    }

    immediate = {
        # Create the recruit
        hidden_effect = {
            create_character = {
                save_scope_as = recruit
                gender = female
                location = root.location
                culture = root.location.culture
                faith = root.location.faith
                template = regula_generated_castle_ranger_character
            }
            scope:recruit = {
                change_current_weight = -100
            }
        }
    }

    # Help with animal hunting
    option = {
        name = regula_travel_events.3101.hunt_attempt

        trigger = {
            prowess < very_high_skill_rating
        }

		duel = {
			skill = prowess
			value = average_skill_rating
			# Success: Nice
			50 = {		
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = regula_travel_events.convince.success
				send_interface_toast = {
					title = regula_travel_events.convince.success
					left_icon = root
					right_icon = scope:recruit
					# Yay!
                    add_courtier = scope:recruit
                    scope:recruit = {
                        add_opinion = {
                            target = root
                            modifier = thankful_opinion
                            opinion = 20
                        }
                        hidden_effect = {
                            change_current_weight = 30
                        }
                    }
				}
			}
			# Failure: Nah
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -20
				}
				desc = regula_travel_events.convince.failure
				send_interface_toast = {
					type = event_toast_text_bad
					title = regula_travel_events.convince.failure
                    desc = regula_travel_events.convince.failure.tt
					left_icon = root
					right_icon = scope:recruit

                    hidden_effect = {
                        scope:recruit = {
                            death = {
                                death_reason = death_vanished
                            }
                        }
                    }
				}
			}
		}
    }

    # If our attribute is high enough, automatic success
    option = {
        name = regula_travel_events.3101.hunt_pass

        skill = prowess

        trigger = {
            prowess >= very_high_skill_rating
        }

        add_courtier = scope:recruit

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = thankful_opinion
                opinion = 20
            }
            hidden_effect = {
                change_current_weight = 30
            }
        }
    }

    # Other Special options
    # Hunter
    option = {
        name = regula_travel_events.3101.hunter

        trigger = {
            has_trait = lifestyle_hunter
        }

        trait = lifestyle_hunter

        add_courtier = scope:recruit

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = thankful_opinion
                opinion = 20
            }
            hidden_effect = {
                change_current_weight = 30
            }
        }
    }

    # Give some food
    option = {
        name = regula_travel_events.3101.provisions

        trigger = {
            is_landless_adventurer = yes
            domicile ?= {
                provisions >= medium_provisions_value
			}
        }

        domicile = {
            change_provisions = medium_provisions_loss
        }

        add_courtier = scope:recruit

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = thankful_opinion
                opinion = 20
            }
            hidden_effect = {
                change_current_weight = 30
            }
        }
    }

    # Nevermind
    option = {
        name = regula_travel_events.3101.cancel

        stress_impact = {
            gluttonous = minor_stress_impact_loss

            generous = medium_stress_impact_gain
            compassionate = minor_stress_impact_gain
        }

        fallback = yes

        hidden_effect = {
            scope:recruit = {
                death = {
                    death_reason = death_vanished
                }
            }
        }
    }
}

# War Search events
# 3201 - 3300
# Starving Begger
regula_travel_events.3201 = {
    type = character_event
    title = regula_travel_events.3201.t
    desc = regula_travel_events.3201.desc
	theme = regula_theme

	override_background = {
        trigger = {
            has_ce1_dlc_trigger = yes
        }
		reference = ce1_condemned_village
	}
    override_background = {
		reference = alley_night
	}

    right_portrait = {
        character = scope:recruit
        outfit_tags = { beggar_rags }
        animation = beg
    }

    cooldown = { years = 5 }

    trigger = {
        location = {
            county = {
                OR = {
                    any_neighboring_county = {
                        OR = {
                            any_county_province = {
                                is_occupied = yes
                            }
                            has_county_modifier = recently_sacked_modifier
                            county_control <= 50
                        }
                    }
                    any_county_province = {
                        is_occupied = yes
                    }
                    has_county_modifier = recently_sacked_modifier
                    county_control <= 50
                }
            }
            OR = {
                has_holding_type = castle_holding
                has_holding_type = city_holding
                has_holding_type = tribal_holding
            }
        }
    }

    immediate = {
        # Create the recruit
        hidden_effect = {
            random_list = {
                5 = { create_recruit_from_template = { SAVE_SCOPE = recruit TEMPLATE = regula_generated_city_merchant_character } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = recruit TEMPLATE = regula_generated_city_diplomat_character } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = recruit TEMPLATE = regula_generated_city_spy_character } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = recruit TEMPLATE = regula_generated_city_guard_character } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = recruit TEMPLATE = regula_generated_city_teacher_character } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = recruit TEMPLATE = regula_generated_generic_orphan_elder } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = recruit TEMPLATE = regula_orgy_intelligent_servant_character } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = recruit TEMPLATE = regula_generated_generic_orphan_middle } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = recruit TEMPLATE = regula_generated_temple_priestess_character } }
            }
            scope:recruit = {
                change_target_weight = -100
            }
        }
        # Make cost
        search_for_women_set_cost_effect = { CHARACTER = scope:recruit VALUE_NAME = recruit_cost }
    }

    # Hire with Provisions (Landless Adventurer)
    option = {
        name = regula_travel_events.3201.provisions

        trigger = {
            is_landless_adventurer = yes
            domicile ?= {
                provisions >= medium_provisions_value
			}
        }

        domicile = {
            change_provisions = medium_provisions_loss
        }

        add_courtier = scope:recruit

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = thankful_opinion
                opinion = 20
            }
            hidden_effect = {
                change_current_weight = 30
            }
        }
    }

    # Hire with Gold (Landed + Landless)
    option = {
        name = regula_travel_events.3201.gold

        trigger = {
            gold >= scope:recruit_cost
        }

        show_as_unavailable = { always = yes }

        remove_short_term_gold = scope:recruit_cost

        add_courtier = scope:recruit

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = thankful_opinion
                opinion = 20
            }
            hidden_effect = {
                change_current_weight = 30
            }
        }
    }

    # With high Stewardship, sort out food rationing
    option = {
        name = regula_travel_events.3201.stewardship

        trigger = {
            stewardship >= very_high_skill_rating
        }

        skill = stewardship

        add_courtier = scope:recruit

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = thankful_opinion
                opinion = 20
            }
            hidden_effect = {
                change_current_weight = 30
            }
        }
    }

    # Teach Hunting
    option = {
        name = regula_travel_events.3201.hunter

        trigger = {
            has_trait = lifestyle_hunter
        }

        trait = lifestyle_hunter

        add_courtier = scope:recruit

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = thankful_opinion
                opinion = 20
            }
            hidden_effect = {
                change_current_weight = 30
            }
        }
    }

    # Nevermind
    option = {
        name = regula_travel_events.cancel

        fallback = yes

        hidden_effect = {
            scope:recruit = {
                death = {
                    death_reason = death_vanished
                }
            }
        }
    }

    after = {
        search_for_women_event_block_with_flag = yes
    }
}

# Wounded Women
regula_travel_events.3202 = {
    type = character_event
    title = regula_travel_events.3202.t
    desc = regula_travel_events.3202.desc
	theme = regula_theme
	override_background = {
		reference = burning_building
	}

    right_portrait = {
        character = scope:recruit
        animation = severelywounded
    }

    trigger = {
        location = {
            county = {
                any_county_province = {
                    is_occupied = yes
                }
                has_county_modifier = recently_sacked_modifier
                county_control <= 40
            }
            OR = {
                has_holding_type = castle_holding
                has_holding_type = city_holding
                has_holding_type = tribal_holding
            }
        }
    }

    immediate = {
        # Play some music!
        play_music_cue = "mx_cue_stress"
        # Create the recruit
        hidden_effect = {
            random_list = {
                # Fantastic!
                10 = { create_recruit_from_template = { SAVE_SCOPE = recruit TEMPLATE = regula_generated_castle_princess_character } }

                # Great
                5 = { create_recruit_from_template = { SAVE_SCOPE = recruit TEMPLATE = regula_orgy_invitee_character } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = recruit TEMPLATE = regula_generated_generic_orphan_youngest } }

                # Good
                5 = { create_recruit_from_template = { SAVE_SCOPE = recruit TEMPLATE = regula_generated_generic_farmgirl_character } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = recruit TEMPLATE = regula_generated_temple_gardener_character } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = recruit TEMPLATE = regula_generated_tribal_submissive_character } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = recruit TEMPLATE = regula_generous_welcome_lustful_indulgence_beauty_attendee } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = recruit TEMPLATE = regula_generous_welcome_lustful_indulgence_strong_attendee } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = recruit TEMPLATE = regula_generous_welcome_lustful_indulgence_smart_attendee } }

                # Okay
                35 = { create_recruit_from_template = { SAVE_SCOPE = recruit TEMPLATE = regula_generated_generic_peasant_character } }

                # Terrible
                5 = { create_recruit_from_template = { SAVE_SCOPE = recruit TEMPLATE = regula_generated_generic_idiot_character } }
            }
            scope:recruit = {
                increase_wounds_no_death_effect = { REASON = fight }
                increase_wounds_no_death_effect = { REASON = fight }
            }
        }
    }

    # Save with Learning
    option = {
        name = regula_travel_events.convince_skill

        skill = learning

        trigger = {
            learning < very_high_skill_rating
        }

		duel = {
			skill = learning
			value = high_skill_rating
			# Success: Nice
			50 = {		
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = regula_travel_events.convince.success
				send_interface_toast = {
					title = regula_travel_events.convince.success
					left_icon = root
					right_icon = scope:recruit
					# Yay!
                    add_courtier = scope:recruit
				}
			}
			# Failure: Nah
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -20
				}	
				desc = regula_travel_events.convince.failure
				send_interface_toast = {
					type = event_toast_text_bad
					title = regula_travel_events.convince.failure
                    desc = regula_travel_events.convince.failure.tt
					left_icon = root
					right_icon = scope:recruit
                    hidden_effect = {
                        scope:recruit = {
                            death = {
                                death_reason = death_vanished
                            }
                        }
                    }
				}
			}
		}
    }

    # If our Learning is high enough, automatic success
    option = {
        name = regula_travel_events.convince_skill_great

        skill = diplomacy

        trigger = {
            diplomacy >= very_high_skill_rating
        }

        add_courtier = scope:recruit
    }

    # Use court physician
    option = {
        name = regula_travel_events.convince_gold

        trigger = {
            gold >= scope:recruit_cost
        }

        show_as_unavailable = { always = yes } 

        #Pay gold
		pay_short_term_gold = {
			target = scope:recruit
			gold = scope:recruit_cost
		}

        add_courtier = scope:recruit
    }

    # Use own physician trait
    option = {
        name = regula_travel_events.3202.physician

        trait = lifestyle_physician

        trigger = {
            has_trait = lifestyle_physician
        }

        add_courtier = scope:recruit

        scope:recruit = {
            add_hook = {
                type = saved_my_life_hook
                target = root
            }
            add_opinion = {
                target = root
                modifier = grateful_opinion
                opinion = 50
            }
        }
    }

    # Nevermind
    option = {
        name = regula_travel_events.cancel

        stress_impact = {
            base = minor_stress_impact_gain

            compassionate = medium_stress_impact_gain

            callous = minor_stress_impact_loss
            sadistic = minor_stress_impact_loss
        }

        fallback = yes

        scope:recruit = {
            death = {
                death_reason = death_wounds
            }
        }
    }

    after = {
        search_for_women_event_block_with_flag = yes
    }
}

# Caged Captives
regula_travel_events.3203 = {
    type = character_event
    title = regula_travel_events.3203.t
    desc = regula_travel_events.3203.desc
	theme = regula_theme
	override_background = {
		reference = army_camp
	}

    left_portrait = {
        character = scope:prisoner_1
        animation = prisondungeon
    }

    right_portrait = {
        character = scope:prisoner_2
        animation = prisondungeon
    }

    lower_center_portrait = {
        character = scope:prisoner_3
        animation = prisondungeon
    }

    cooldown = { years = 5 }

    trigger = {
        location = {
            county = {
                OR = {
                    has_county_modifier = recently_sacked_modifier
                    county_control <= 50
                }
            }
        }
    }

    immediate = {
        # Create the prisoners
        # 5% chance Terrible
        # 35% chance Okay
        # 30% Good
        # 20% Great
        # 10% Fantastic
        hidden_effect = {
            # First prisoner
            random_list = {
                # Fantastic!
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_1 TEMPLATE = regula_generated_generic_adventurer_princess_character } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_1 TEMPLATE = regula_generated_tribal_chieftess_character } }

                # Great
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_1 TEMPLATE = regula_orgy_beautiful_priestess_character } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_1 TEMPLATE = regula_orgy_stoic_guard_character } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_1 TEMPLATE = regula_generated_castle_noble_character } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_1 TEMPLATE = regula_generated_castle_knight_character } }

                # Good
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_1 TEMPLATE = regula_generated_city_merchant_character } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_1 TEMPLATE = regula_generated_city_diplomat_character } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_1 TEMPLATE = regula_generated_city_spy_character } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_1 TEMPLATE = regula_generated_city_guard_character } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_1 TEMPLATE = regula_generated_city_teacher_character } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_1 TEMPLATE = regula_generated_tribal_giant_character } }

                # Okay
                35 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_1 TEMPLATE = regula_generated_generic_peasant_character } }

                # Terrible
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_1 TEMPLATE = regula_generated_generic_idiot_character } }
            }
            # Second prisoner
            random_list = {
                # Fantastic!
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_2 TEMPLATE = regula_generated_temple_head_priestess_character } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_2 TEMPLATE = regula_generated_generic_orphan_elder } }

                # Great
                10 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_2 TEMPLATE = regula_orgy_intelligent_servant_character } }
                10 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_2 TEMPLATE = regula_generated_generic_orphan_middle } }

                # Good
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_2 TEMPLATE = regula_orgy_servant_character } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_2 TEMPLATE = regula_generated_generic_tavern_wench_character } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_2 TEMPLATE = regula_generated_generic_farmgirl_character } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_2 TEMPLATE = regula_generated_temple_priestess_character } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_2 TEMPLATE = regula_generated_temple_gardener_character } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_2 TEMPLATE = regula_generated_tribal_feisty_character } }

                # Okay
                35 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_2 TEMPLATE = regula_generated_generic_peasant_character } }

                # Terrible
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_2 TEMPLATE = regula_generated_generic_idiot_character } }
            }
            # Third prisoner
            random_list = {
                # Fantastic!
                10 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_3 TEMPLATE = regula_generated_castle_princess_character } }

                # Great
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_3 TEMPLATE = regula_orgy_invitee_character } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_3 TEMPLATE = regula_generated_generic_orphan_youngest } }

                # Good
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_3 TEMPLATE = regula_generated_generic_farmgirl_character } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_3 TEMPLATE = regula_generated_temple_gardener_character } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_3 TEMPLATE = regula_generated_tribal_submissive_character } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_3 TEMPLATE = regula_generous_welcome_lustful_indulgence_beauty_attendee } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_3 TEMPLATE = regula_generous_welcome_lustful_indulgence_strong_attendee } }
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_3 TEMPLATE = regula_generous_welcome_lustful_indulgence_smart_attendee } }

                # Okay
                35 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_3 TEMPLATE = regula_generated_generic_peasant_character } }

                # Terrible
                5 = { create_recruit_from_template = { SAVE_SCOPE = prisoner_3 TEMPLATE = regula_generated_generic_idiot_character } }
            }
        }

        # Topless
        scope:prisoner_1 = {
            add_character_flag = should_be_topless
            add_to_list = prisoners
        }
        scope:prisoner_2 = {
            add_character_flag = should_be_topless
            add_to_list = prisoners
        }
        scope:prisoner_3 = {
            add_character_flag = should_be_topless
            add_to_list = prisoners
        }

        # Make ransoms
        search_for_women_set_cost_effect = { CHARACTER = scope:prisoner_1 VALUE_NAME = prisoner_1_cost }
        search_for_women_set_cost_effect = { CHARACTER = scope:prisoner_2 VALUE_NAME = prisoner_2_cost }
        search_for_women_set_cost_effect = { CHARACTER = scope:prisoner_3 VALUE_NAME = prisoner_3_cost }
    }

    # Use Army
	option = {
		name = regula_travel_events.3203.army
		trigger = {
			custom_tooltip = {
				text = regula_travel_events.3203.army.tt.not_enough_troops
				current_military_strength >= 500
			}
			has_raised_armies = no
		}
		show_as_unavailable = { always = yes }

        # Copied (then edited) from laamp_base_contract_schemes_1301_roll_army_loss_effect
        # Lose some troops
        random_list = {
            # Catastrophic losses.
            25 = {
                random_maa_regiment = {
                    change_maa_troops_count = {
                        value = maa_current_troops_count
                        multiply = laamp_base_contract_schemes_1301_maa_damage_catastrophic_value
                    }
                }
                random_maa_regiment = {
                    change_maa_troops_count = {
                        value = maa_current_troops_count
                        multiply = laamp_base_contract_schemes_1301_maa_damage_catastrophic_value
                    }
                }
            }
            # Heavy losses.
            25 = {
                random_maa_regiment = {
                    change_maa_troops_count = {
                        value = maa_current_troops_count
                        multiply = laamp_base_contract_schemes_1301_maa_damage_heavy_value
                    }
                }
                random_maa_regiment = {
                    change_maa_troops_count = {
                        value = maa_current_troops_count
                        multiply = laamp_base_contract_schemes_1301_maa_damage_heavy_value
                    }
                }
            }
            # Moderate losses.
            50 = {
                random_maa_regiment = {
                    change_maa_troops_count = {
                        value = maa_current_troops_count
                        multiply = laamp_base_contract_schemes_1301_maa_damage_moderate_value
                    }
                }
                random_maa_regiment = {
                    change_maa_troops_count = {
                        value = maa_current_troops_count
                        multiply = laamp_base_contract_schemes_1301_maa_damage_moderate_value
                    }
                }
            }
            # Light losses.
            50 = {
                random_maa_regiment = {
                    change_maa_troops_count = {
                        value = maa_current_troops_count
                        multiply = laamp_base_contract_schemes_1301_maa_damage_light_value
                    }
                }
                random_maa_regiment = {
                    change_maa_troops_count = {
                        value = maa_current_troops_count
                        multiply = laamp_base_contract_schemes_1301_maa_damage_light_value
                    }
                }
            }
        }

        # Instant victory
        # Increase country control and opinion
        location = {
            county = {
                change_county_control = 20
                county_controller = {
                    if = {
                        limit = { NOT = { this = root } }
                    }
                    add_opinion = {
                        target = root
                        modifier = grateful_opinion
                        opinion = 30
                    }
                }
            }
        }

        # Save prisoners
        every_in_list = {
            list = prisoners
            root = {
                add_courtier = prev
                add_hook = {
                    type = indebted_hook
                    target = prev
                }
            }
            this = {
                add_opinion = {
                    target = root
                    modifier = grateful_opinion
                    opinion = 30
                }
            }
        }
	}

    # Use Martial to invade and rescue
    option = {
        name = regula_travel_events.3203.martial

        skill = martial

		duel = {
			skill = martial
			value = high_skill_rating
			# Success: Nice
			50 = {		
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = regula_travel_events.3203.martial.success
				send_interface_toast = {
					title = regula_travel_events.3203.martial.success
					left_icon = root
					# Yay!
                    every_in_list = {
                        list = prisoners
                        root = {
                            add_courtier = prev
                            add_hook = {
                                type = indebted_hook
                                target = prev
                            }
                        }
                        this = {
                            add_opinion = {
                                target = root
                                modifier = grateful_opinion
                                opinion = 30
                            }
                        }
                    }
				}
			}
			# Failure: Prisoners lost, you are wounded
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -20
				}
				desc = regula_travel_events.3203.martial.failure
				send_interface_toast = {
					type = event_toast_text_bad
					title = regula_travel_events.3203.martial.failure
					left_icon = root

                    increase_wounds_effect = { REASON = fight }

                    scope:prisoner_1 = {
                        death = {
                            death_reason = death_vanished
                        }
                    }
                    scope:prisoner_2 = {
                        death = {
                            death_reason = death_vanished
                        }
                    }
                    scope:prisoner_3 = {
                        death = {
                            death_reason = death_vanished
                        }
                    }
				}
			}
		}
    }

    # Use Intrigue to stealth in and rescue
    option = {
        name = regula_travel_events.3203.intrigue

        skill = intrigue

		duel = {
			skill = intrigue
			value = high_skill_rating
			# Success: Nice
			50 = {		
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = regula_travel_events.3203.intrigue.success
				send_interface_toast = {
					title = regula_travel_events.3203.intrigue.success
					left_icon = root
					# Yay!
                    every_in_list = {
                        list = prisoners
                        root = {
                            add_courtier = prev
                            add_hook = {
                                type = indebted_hook
                                target = prev
                            }
                        }
                        this = {
                            add_opinion = {
                                target = root
                                modifier = grateful_opinion
                                opinion = 30
                            }
                        }
                    }
				}
			}
			# Failure: Prisoners lost, you are wounded
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -20
				}
				desc = regula_travel_events.3203.intrigue.failure
				send_interface_toast = {
					type = event_toast_text_bad
					title = regula_travel_events.3203.intrigue.failure
					left_icon = root

                    increase_wounds_effect = { REASON = fight }

                    scope:prisoner_1 = {
                        death = {
                            death_reason = death_vanished
                        }
                    }
                    scope:prisoner_2 = {
                        death = {
                            death_reason = death_vanished
                        }
                    }
                    scope:prisoner_3 = {
                        death = {
                            death_reason = death_vanished
                        }
                    }
				}
			}
		}
    }

    # Use Diplomacy to ransom for less money
    option = {
        name = regula_travel_events.3203.diplomacy

        skill = diplomacy

        trigger = {
            gold >= {
                value = 0
                add = scope:prisoner_1_cost
                add = scope:prisoner_2_cost
                add = scope:prisoner_3_cost
            }
        }

		duel = {
			skill = diplomacy
			value = high_skill_rating
            # Success: Great
			25 = {		
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3
					min = -24
				}
				desc = regula_travel_events.3203.diplomacy.success_great
				send_interface_toast = {
					title = regula_travel_events.3203.diplomacy.success_great
					left_icon = root
					right_icon = scope:recruit

                    remove_short_term_gold = {
                        value = 0
                        add = scope:prisoner_1_cost
                        add = scope:prisoner_2_cost
                        add = scope:prisoner_3_cost
                        multiply = 0.5
                    }

                    every_in_list = {
                        list = prisoners
                        root = {
                            add_courtier = prev
                        }
                        this = {
                            add_opinion = {
                                target = root
                                modifier = grateful_opinion
                                opinion = 30
                            }
                        }
                    }
				}
			}
			# Success: Nice
			40 = {		
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -39
				}
				desc = regula_travel_events.3203.diplomacy.success_good
				send_interface_toast = {
					title = regula_travel_events.3203.diplomacy.success_good
					left_icon = root
					right_icon = scope:recruit

                    remove_short_term_gold = {
                        value = 0
                        add = scope:prisoner_1_cost
                        add = scope:prisoner_2_cost
                        add = scope:prisoner_3_cost
                        multiply = 0.75
                    }

                    every_in_list = {
                        list = prisoners
                        root = {
                            add_courtier = prev
                        }
                        this = {
                            add_opinion = {
                                target = root
                                modifier = grateful_opinion
                                opinion = 30
                            }
                        }
                    }
				}
			}
			# Failure: You still get them, but more cost
			35 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -30
				}	
				desc = regula_travel_events.3203.diplomacy.failure
				send_interface_toast = {
					type = event_toast_text_bad
					title = regula_travel_events.3203.diplomacy.failure
					left_icon = root


                    remove_short_term_gold = {
                        value = 0
                        add = scope:prisoner_1_cost
                        add = scope:prisoner_2_cost
                        add = scope:prisoner_3_cost
                        multiply = 1.25
                    }

                    every_in_list = {
                        list = prisoners
                        root = {
                            add_courtier = prev
                        }
                        this = {
                            add_opinion = {
                                target = root
                                modifier = grateful_opinion
                                opinion = 30
                            }
                        }
                    }
				}
			}
		}
    }

    # Ransom for money
    option = {
        name = regula_travel_events.3203.ransom
        flavor = regula_travel_events.3203.ransom.tt

        trigger = {
            gold >= {
                value = 0
                add = scope:prisoner_1_cost
                add = scope:prisoner_2_cost
                add = scope:prisoner_3_cost
            }
        }

        show_as_unavailable = { always = yes }

        remove_short_term_gold = {
            value = 0
            add = scope:prisoner_1_cost
            add = scope:prisoner_2_cost
            add = scope:prisoner_3_cost
        }

        every_in_list = {
            list = prisoners
            root = {
                add_courtier = prev
            }
            this = {
                add_opinion = {
                    target = root
                    modifier = grateful_opinion
                    opinion = 30
                }
            }
        }
    }

    # Knight-Errant daring resuce
    option = {
        name = regula_travel_events.3203.knight_errant
        flavor = regula_travel_events.3203.knight_errant.tt

        trigger = {
            has_trait = knight_errant
        }

        trait = knight_errant

        add_trait_xp = {
            trait = knight_errant
            value = { knight_errant_xp_minor_gain knight_errant_xp_medium_gain }
        }

        every_in_list = {
            list = prisoners
            root = {
                add_courtier = prev
                add_hook = {
                    type = indebted_hook
                    target = prev
                }
            }
            this = {
                add_opinion = {
                    target = root
                    modifier = grateful_opinion
                    opinion = 30
                }
            }
        }
    }

    # Nevermind
    option = {
        name = regula_travel_events.cancel

        fallback = yes

        stress_impact = {
            base = minor_stress_impact_gain

            brave = medium_stress_impact_gain
            just = medium_stress_impact_gain
            compassionate = minor_stress_impact_gain
            zealous = minor_stress_impact_gain
            lustful = minor_stress_impact_gain

            callous = medium_stress_impact_loss
            craven = medium_stress_impact_loss
            sadistic = minor_stress_impact_loss
            gallowsbait = minor_stress_impact_loss
        }

        hidden_effect = {
            scope:prisoner_1 = {
                death = {
                    death_reason = death_vanished
                }
            }
            scope:prisoner_2 = {
                death = {
                    death_reason = death_vanished
                }
            }
            scope:prisoner_3 = {
                death = {
                    death_reason = death_vanished
                }
            }
        }
    }

    after = {
        scope:prisoner_1 ?= {
            remove_character_flag = should_be_topless
        }
        scope:prisoner_2 ?= {
            remove_character_flag = should_be_topless
        }
        scope:prisoner_3 ?= {
            remove_character_flag = should_be_topless
        }

        search_for_women_event_block_with_flag = yes
    }
}

# Legend / Disease Search events
# 3301 - 3400
# Nurse
regula_travel_events.3301 = {
    type = character_event
    title = regula_travel_events.3301.t
    desc = regula_travel_events.3301.desc
	theme = regula_theme
	override_background = {
		reference = ce1_condemned_village
	}

    right_portrait = {
        character = scope:recruit
        animation = wailing
    }

    trigger = {
        location = {
            OR = {
                has_holding_type = castle_holding
                has_holding_type = city_holding
                has_holding_type = tribal_holding
            }
        }
    }

    immediate = {
        # Play some music!
        play_music_cue = apocalyptic_plague
        # Create the recruit
        hidden_effect = {
            create_character = {
                save_scope_as = recruit
                location = root.location
                culture = root.location.culture
                faith = root.location.faith
                template = regula_orgy_enchanting_singer_character
            }
        }

        # Make cost
        search_for_women_set_cost_effect = { CHARACTER = scope:recruit VALUE_NAME = recruit_cost }
    }

    # Attempt to convince using a attribute
    option = {
        name = regula_travel_events.convince_skill

        trigger = {
            diplomacy < very_high_skill_rating
        }

		duel = {
			skill = diplomacy
			value = average_skill_rating
			# Success: Nice
			50 = {		
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = regula_travel_events.convince.success
				send_interface_toast = {
					title = regula_travel_events.convince.success
					left_icon = root
					right_icon = scope:recruit
					# Yay!
                    add_courtier = scope:recruit
				}
			}
			# Failure: Nah
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -20
				}	
				desc = regula_travel_events.convince.failure
				send_interface_toast = {
					type = event_toast_text_bad
					title = regula_travel_events.convince.failure
                    desc = regula_travel_events.convince.failure.tt
					left_icon = root
					right_icon = scope:recruit
                    hidden_effect = {
                        scope:recruit = {
                            death = {
                                death_reason = death_vanished
                            }
                        }
                    }
				}
			}
		}
    }

    # If our attribute is high enough, automatic success
    option = {
        name = regula_travel_events.convince_skill_great

        skill = diplomacy

        trigger = {
            diplomacy >= very_high_skill_rating
        }

        add_courtier = scope:recruit
    }

    # Pay an amount of gold to hire
    option = {
        name = regula_travel_events.convince_gold

        trigger = {
            gold >= scope:recruit_cost
        }

        show_as_unavailable = { always = yes } 

        #Pay gold
		pay_short_term_gold = {
			target = scope:recruit
			gold = scope:recruit_cost
		}

        add_courtier = scope:recruit
    }

    # Other Special options
    option = {
        name = regula_travel_events.3001.poet

        trait = lifestyle_poet

        trigger = {
            has_trait = lifestyle_poet
        }

        add_courtier = scope:recruit

        scope:recruit = {
            add_opinion = {
                target = root
                modifier = impressed_opinion
                opinion = 20
            }
        }
    }

    # Nevermind
    option = {
        name = regula_travel_events.cancel

        fallback = yes

        hidden_effect = {
            scope:recruit = {
                death = {
                    death_reason = death_vanished
                }
            }
        }
    }
}