on_actions = { on_startup = { effect = { if = { limit = { has_game_rule = { rule = zombie_mode_enabled option = yes } } # Load division templates ZOM = { # Delayed spawn - activate countdown mission for all human players if = { limit = { has_game_rule = { rule = zombie_spawn_delay option = ONE_YEAR } } set_global_flag = ZOM_apocalypse_countdown every_country = { limit = { is_ai = no } activate_mission = ZOM_apocalypse_countdown_1yr } } else_if = { limit = { has_game_rule = { rule = zombie_spawn_delay option = TWO_YEARS } } set_global_flag = ZOM_apocalypse_countdown every_country = { limit = { is_ai = no } activate_mission = ZOM_apocalypse_countdown_2yr } } else_if = { limit = { has_game_rule = { rule = zombie_spawn_delay option = THREE_YEARS } } set_global_flag = ZOM_apocalypse_countdown every_country = { limit = { is_ai = no } activate_mission = ZOM_apocalypse_countdown_3yr } } # No delay (default) - spawn immediately else = { ZOM_execute_zombie_spawn = yes } } } } } on_weekly_ZOM = { random_events = { 1000 = 0 50 = zombie.1 50 = zombie.2 50 = zombie.3 50 = zombie.4 50 = zombie.5 50 = zombie.6 50 = zombie.7 50 = zombie.12 50 = zombie.13 50 = zombie.14 } effect = { # Zombies do not believe in stocks bonds or your pitiful attempts at economy! if = { limit = { check_variable = { treasury < 0 } } set_variable = { treasury = 1000000 } } # Zombies Core What they control every week every_controlled_state = { limit = { NOT = { is_core_of = ZOM } } add_core_of = ZOM } # Declare War on Neighbors every_neighbor_country = { limit = { NOT = { has_war_with = ZOM } NOT = { is_subject_of = ZOM } } if = { limit = { is_in_faction = yes } leave_faction = yes } if = { limit = { ZOM_coalition_can_form = yes } random_country = { limit = { has_faction_template = faction_template_anti_zombie_coalition is_faction_leader = yes } add_to_faction = PREV PREV = { add_to_war = { targeted_alliance = PREV enemy = ZOM hostility_reason = the_horde_spreads } } } } } if = { limit = { any_neighbor_country = { NOT = { has_war_with = ZOM } NOT = { is_subject_of = ZOM } } } every_neighbor_country = { limit = { NOT = { has_war_with = ZOM } NOT = { is_subject_of = ZOM } } ZOM = { declare_war_on = { target = PREV type = annex_everything } } } } # Annex All Subjects if we have subjects if = { limit = { num_subjects > 0 } every_subject_country = { ZOM = { annex_country = { target = PREV transfer_troops = no } } } } # Propagate cure bonus to late-joining war participants if = { limit = { has_country_flag = ZOM_cure_distributed } every_enemy_country = { limit = { NOT = { has_idea = ZOM_cure_developed } } add_ideas = ZOM_cure_developed } } # Last Ditch Effort if = { limit = { NOT = { has_country_flag = ZOM_last_ditch_effort } has_capitulated = no has_army_manpower = { size < 4000000 } } set_country_flag = ZOM_last_ditch_effort capital_scope = { create_unit = { division = "name = \"Zombie Horde\" division_template = \"Zombie Horde\" start_experience_factor = 0.3" count = 30 owner = ZOM } } } } } on_monthly_ZOM = { effect = { ZOM_purge_captured_equipment = yes add_manpower = -100000 capital_scope = { create_unit = { division = "name = \"Zombie Horde\" division_template = \"Zombie Horde\" start_experience_factor = 0.3" count = 25 owner = ZOM } } # Difficulty scaling: each tier adds +15 units and -100k manpower # HARD: +15, EXTREME: +30, INSANE: +45 if = { limit = { ZOM_difficulty_at_least_hard = yes } add_manpower = -100000 capital_scope = { create_unit = { division = "name = \"Zombie Horde\" division_template = \"Zombie Horde\" start_experience_factor = 0.3" count = 15 owner = ZOM } } } if = { limit = { ZOM_difficulty_at_least_extreme = yes } add_manpower = -100000 capital_scope = { create_unit = { division = "name = \"Zombie Horde\" division_template = \"Zombie Horde\" start_experience_factor = 0.3" count = 15 owner = ZOM } } } if = { limit = { ZOM_difficulty_insane = yes } add_manpower = -100000 capital_scope = { create_unit = { division = "name = \"Zombie Horde\" division_template = \"Zombie Horde\" start_experience_factor = 0.3" count = 15 owner = ZOM } } } # Horde Evolution - unlock Runner Packs and Brute Vanguards after significant expansion or 2 years if = { limit = { NOT = { has_global_flag = ZOM_horde_evolved } OR = { check_variable = { num_owned_states > 24 } date > 2002.1.1 } } country_event = zombie.15 } # Outbreak Random Chance - fires every month random = { chance = 33 random_other_country = { limit = { NOT = { has_war_with = ZOM } NOT = { has_country_flag = has_had_outbreak_event } } country_event = { id = zombie.10 days = 3 random_days = 3 } } } random = { chance = 15 random_other_country = { limit = { NOT = { has_war_with = ZOM } NOT = { has_country_flag = has_had_outbreak_event } } country_event = { id = zombie.10 days = 5 random_days = 5 } } } if = { limit = { ZOM_difficulty_at_least_hard = yes } random = { chance = 17 random_other_country = { limit = { NOT = { has_war_with = ZOM } NOT = { has_country_flag = has_had_outbreak_event } } country_event = { id = zombie.10 days = 3 random_days = 3 } } } random = { chance = 10 random_other_country = { limit = { NOT = { has_war_with = ZOM } NOT = { has_country_flag = has_had_outbreak_event } } country_event = { id = zombie.10 days = 5 random_days = 5 } } } } } } on_capitulation_immediate = { effect = { if = { limit = { FROM = { original_tag = ZOM } } if = { limit = { ROOT = { original_tag = CHI } } news_event = zombie_capitulation.1 } if = { limit = { ROOT = { original_tag = SOV } } news_event = zombie_capitulation.2 } if = { limit = { ROOT = { original_tag = USA } } news_event = zombie_capitulation.3 } } if = { limit = { has_game_rule = { rule = zombie_mode_enabled option = yes } ROOT = { original_tag = ZOM } NOT = { has_global_flag = ZOM_defeated } } set_global_flag = ZOM_defeated news_event = zombie_capitulation.4 } } } }