on_actions = {
    on_game_start = {
        effect = {

            every_player = {
                add_character_modifier = {
                    modifier = performance_mode_modifier
                    days = -1
                }
            }
        }
    }

    on_yearly_pulse = {
        effect = {
            if = {
                limit = {
                    is_ai = yes
                    is_alive = yes
                }
                random = {
                    chance = 10
                    trigger_event = { id = perf_patch.1 }
                }
            }
        }
    }

    on_five_year_pulse = {
        random_events = {
            100 = nothing
            10 = perf_cull.1     # Character culling
            10 = perf_debug.1    # Log culling actions
            50 = perf_cull.2     # AI plot throttling
        }
    }

    on_birth = {
        effect = {
            if = {
                limit = {
                    mother = {
                        is_ai = yes
                        num_of_living_children >= 10
                        NOT = { has_trait = trait_intellect_good_3 }
                        NOT = { has_trait = fertile }
                    }
                }
                mother = {
                    set_fertility = 0
                }
            }
        }
    }
}
