#Buildings

	esbuff_cm_buildings_1 = {
		every_state = {
			limit = { is_controlled_by = ROOT }
			add_building_construction = {
				type = state_infrastructure
				level = 1
				instant_build = yes
			}
		}
	}

	esbuff_cm_buildings_2 = {
		random_state = {
			limit = { is_controlled_by = ROOT }
			add_building_construction = {
				type = office_park
				level = 2
				instant_build = yes
			}
		}
	}

	esbuff_cm_buildings_3 = {
		every_state = {
			limit = { is_controlled_by = ROOT }
			add_building_construction = {
				type = water_infrastructure
				level = 1
				instant_build = yes
			}
		}
	}

	esbuff_cm_buildings_4 = {
		random_state = {
			limit = { is_controlled_by = ROOT }
			add_building_construction = {
				type = agri_industrial_complex
				level = 2
				instant_build = yes
			}
		}
	}

	esbuff_cm_buildings_5 = {
		every_state = {
			limit = { is_controlled_by = ROOT }
			add_building_construction = {
				type = nuclear_bunker
				level = 1
				instant_build = yes
			}
		}
	}

	esbuff_cm_buildings_6 = {
		random_state = {
			limit = { is_controlled_by = ROOT }
			add_building_construction = {
				type = fossil_fuel_powerplant
				level = 2
				instant_build = yes
			}
		}
	}

	esbuff_cm_buildings_7 = {
		every_state = {
			limit = { is_controlled_by = ROOT }
			add_building_construction = {
				type = infrastructure
				level = 1
				instant_build = yes
			}
		}
	}

	esbuff_cm_buildings_8 = {
		random_state = {
			limit = { is_controlled_by = ROOT }
			add_building_construction = {
				type = renewable_powerplant
				level = 2
				instant_build = yes
			}
		}
	}

	esbuff_cm_buildings_9 = {
		every_state = {
			limit = { is_controlled_by = ROOT }
			add_building_construction = {
				type = air_base
				level = 5
				instant_build = yes
			}
		}
	}

	esbuff_cm_buildings_10 = {
		random_state = {
			limit = { is_controlled_by = ROOT }
			add_building_construction = {
				type = nuclear_powerplant
				level = 2
				instant_build = yes
			}
		}
	}

	esbuff_cm_buildings_11 = {
		every_state = {
			limit = { is_controlled_by = ROOT }
			add_building_construction = {
				type = anti_air_building
				level = 1
				instant_build = yes
			}
		}
	}

	esbuff_cm_buildings_12 = {
		random_state = {
			limit = { is_controlled_by = ROOT }
			add_building_construction = {
				type = steel_factory
				level = 5
				instant_build = yes
			}
		}
	}

	esbuff_cm_buildings_13 = {
		every_state = {
			limit = { is_controlled_by = ROOT }
			add_building_construction = {
				type = fuel_silo
				level = 2
				instant_build = yes
			}
		}
	}

	esbuff_cm_buildings_14 = {
		random_state = {
			limit = { is_controlled_by = ROOT }
			add_building_construction = {
				type = tungsten_factory
				level = 5
				instant_build = yes
			}
		}
	}

	esbuff_cm_buildings_15 = {
		every_state = {
			limit = { is_controlled_by = ROOT }
			add_building_construction = {
				type = radar_station
				level = 2
				instant_build = yes
			}
		}
	}

	esbuff_cm_buildings_16 = {
		add_offsite_building = { type = arms_factory level = 5 }
	}

	esbuff_cm_buildings_17 = {
		add_offsite_building = { type = industrial_complex level = 5 }
	}

	esbuff_cm_buildings_18 = {
		add_offsite_building = { type = dockyard level = 5 }
	}
	
	esbuff_cm_buildings_19 = {
		random_state = {
			limit = { is_controlled_by = ROOT }
			add_building_construction = {
				type = synthetic_refinery
				level = 2
				instant_build = yes
			}
		}
	}

	esbuff_cm_buildings_20 = {
		random_state = {
			limit = { is_controlled_by = ROOT }
			add_building_construction = {
				type = nuclear_reactor
				level = 2
				instant_build = yes
			}
		}
	}

	esbuff_cm_buildings_21 = {
		every_state = {
			limit = { is_controlled_by = ROOT }
			add_extra_state_shared_building_slots = 4
		}
	}

#Resources
	esbuff_cm_resources_1 = {
		every_state = {
			limit = { is_controlled_by = ROOT }
			add_resource = {
				type = rubber
				amount = 8
			}
			add_resource = {
				type = oil
				amount = 8
			}
			add_resource = {
				type = aluminium
				amount = 8
			}
			add_resource = {
				type = tungsten
				amount = 8
			}
			add_resource = {
				type = steel
				amount = 8
			}
			add_resource = {
				type = chromium
				amount = 8
			}
		}
	}
	
	esbuff_cm_resources_2 = {
		random_state = {
			limit = { 
				is_controlled_by = ROOT 
				is_capital = yes
			}
			add_resource = {
				type = rubber
				amount = 8
			}
			add_resource = {
				type = oil
				amount = 8
			}
			add_resource = {
				type = aluminium
				amount = 8
			}
			add_resource = {
				type = tungsten
				amount = 8
			}
			add_resource = {
				type = steel
				amount = 8
			}
			add_resource = {
				type = chromium
				amount = 8
			}
		}
	}

	esbuff_cm_resources_3 = {
		every_owned_state = {
			add_resource = {
				type = rubber
				amount = 8
			}
			add_resource = {
				type = oil
				amount = 8
			}
			add_resource = {
				type = aluminium
				amount = 8
			}
			add_resource = {
				type = tungsten
				amount = 8
			}
			add_resource = {
				type = steel
				amount = 8
			}
			add_resource = {
				type = chromium
				amount = 8
			}
		}
	}

	esbuff_cm_resources_4 = {
		random_state = {
			limit = { 
				is_controlled_by = ROOT 
				is_capital = yes
			}
			add_resource = {
				type = steel
				amount = 8
			}
		}
	}

	esbuff_cm_resources_5 = {
		random_state = {
			limit = { 
				is_controlled_by = ROOT 
				is_capital = yes
			}
			add_resource = {
				type = tungsten
				amount = 8
			}
		}
	}

	esbuff_cm_resources_6 = {
		random_state = {
			limit = { 
				is_controlled_by = ROOT 
				is_capital = yes
			}
			add_resource = {
				type = aluminium
				amount = 8
			}
		}
	}

	esbuff_cm_resources_7 = {
		random_state = {
			limit = { 
				is_controlled_by = ROOT 
				is_capital = yes
			}
			add_resource = {
				type = chromium
				amount = 8
			}
		}
	}

	esbuff_cm_resources_8 = {
		random_state = {
			limit = { 
				is_controlled_by = ROOT 
				is_capital = yes
			}
			add_resource = {
				type = rubber
				amount = 8
			}
		}
	}

	esbuff_cm_resources_9 = {
		random_state = {
			limit = { 
				is_controlled_by = ROOT 
				is_capital = yes
			}
			add_resource = {
				type = oil
				amount = 8
			}
		}
	}


#Tech
	esbuff_cm_tech_infantry = {
		set_technology = {
			tech_support = 1
			combat_support = 1
			tech_armor_engineers = 1
			tech_armor_engineers2 = 1
			tech_armor_engineers3 = 1
			tech_armor_engineers4 = 1
			tech_armor_engineers5 = 1
			tech_armor_engineers6 = 1
			tech_armor_engineers7 = 1
			tech_engineers = 1
			tech_engineers2 = 1
			tech_engineers3 = 1
			tech_engineers4 = 1
			tech_engineers5 = 1
			tech_engineers6 = 1
			tech_engineers7 = 1
			tech_recon = 1
			tech_recon2 = 1
			tech_recon3 = 1
			tech_recon4 = 1
			tech_recon5 = 1
			tech_recon6 = 1
			tech_recon7 = 1
			tech_mech_recon = 1
			tech_mech_recon2 = 1
			tech_mech_recon3 = 1
			tech_mech_recon4 = 1
			tech_mech_recon5 = 1
			tech_mech_recon6 = 1
			tech_mech_recon7 = 1
			tech_signal_company = 1
			tech_signal_company2 = 1
			tech_signal_company3 = 1
			tech_signal_company4 = 1
			tech_signal_company5 = 1
			tech_signal_company6 = 1
			tech_signal_company7 = 1
			tech_military_police = 1
			tech_military_police2 = 1
			tech_military_police3 = 1
			tech_military_police4 = 1
			tech_military_police5 = 1
			tech_military_police6 = 1
			tech_military_police7 = 1
			combat_service_support = 1
			tech_logistics_company = 1
			tech_logistics_company2 = 1
			tech_logistics_company3 = 1
			tech_logistics_company4 = 1
			tech_logistics_company5 = 1
			tech_logistics_company6 = 1
			tech_logistics_company7 = 1
			tech_logistics_company_helicopter3 = 1
			tech_logistics_company_helicopter4 = 1
			tech_logistics_company_helicopter5 = 1
			tech_logistics_company_helicopter6 = 1
			tech_logistics_company_helicopter7 = 1
			tech_maintenance_company = 1
			tech_maintenance_company2 = 1
			tech_maintenance_company3 = 1
			tech_maintenance_company4 = 1
			tech_maintenance_company5 = 1
			tech_maintenance_company6 = 1
			tech_maintenance_company7 = 1
			tech_field_hospital = 1
			tech_field_hospital2 = 1
			tech_field_hospital3 = 1
			tech_field_hospital4 = 1
			tech_field_hospital5 = 1
			tech_field_hospital6 = 1
			tech_field_hospital7 = 1
			tech_field_hospital_helicopter3 = 1
			tech_field_hospital_helicopter4 = 1
			tech_field_hospital_helicopter5 = 1
			tech_field_hospital_helicopter6 = 1
			tech_field_hospital_helicopter7 = 1
			basic_train = 1
			wartime_train = 1
			armored_train = 1
			infantry_equip_1 = 1
			infantry_equip_2 = 1
			infantry_equip_3 = 1
			infantry_equip_4 = 1
			infantry_equip_5 = 1
			manpats_1 = 1
			manpats_2 = 1
			manpats_3 = 1
			manpats_4 = 1
			manpats_5 = 1
			squad_weapons_1 = 1
			squad_weapons_2 = 1
			squad_weapons_3 = 1
			squad_weapons_4 = 1
			squad_weapons_5 = 1
			team_weapons_1 = 1
			team_weapons_2 = 1
			team_weapons_3 = 1
			team_weapons_4 = 1
			team_weapons_5 = 1
			hmg_1 = 1
			manpads_1 = 1
			manpads_2 = 1
			manpads_3 = 1
			manpads_4 = 1
			specialist_1 = 1
			specialist_2 = 1
			specialist_3 = 1
			specialist_4 = 1
			specialist_5 = 1
			ammo_explosives_1 = 1
			ammo_explosives_2 = 1
			ammo_explosives_3 = 1
			ammo_explosives_4 = 1
			ammo_explosives_5 = 1
			protection_equip_1 = 1
			protection_equip_2 = 1
			protection_equip_3 = 1
			protection_equip_4 = 1
			protection_equip_5 = 1
			special_operations = 1
			desert_warfare_1 = 1
			desert_warfare_2 = 1
			desert_warfare_3 = 1
			desert_warfare_4 = 1
			army_sp_forces_1 = 1
			army_sp_forces_2 = 1
			army_sp_forces_3 = 1
			army_sp_forces_4 = 1
			army_sp_forces_5 = 1
			army_sp_forces_6 = 1
			mountain_warfare_1 = 1
			mountain_warfare_2 = 1
			mountain_warfare_3 = 1
			mountain_warfare_4 = 1
			mountain_warfare_5 = 1
			mountain_warfare_6 = 1
			airborne_operations_1 = 1
			airborne_operations_2 = 1
			airborne_operations_3 = 1
			airborne_operations_4 = 1
			airborne_operations_5 = 1
			airborne_operations_6 = 1
			air_assault_operations_1 = 1
			air_assault_operations_2 = 1
			air_assault_operations_3 = 1
			cover_air_operations_1 = 1
			cover_air_operations_2 = 1
			cover_air_operations_3 = 1
			cover_air_operations_4 = 1
			cover_air_operations_5 = 1
			amphibious_warfare_1 = 1
			amphibious_warfare_2 = 1
			amphibious_warfare_3 = 1
			amphibious_warfare_4 = 1
			amphibious_warfare_5 = 1
			amphibious_warfare_6 = 1
			landing_craft_1 = 1
			landing_craft_2 = 1
			landing_craft_3 = 1
			landing_craft_4 = 1
			landing_craft_5 = 1
			landing_craft_6 = 1
			combat_divers_1 = 1
			combat_divers_2 = 1
			combat_divers_3 = 1
			combat_divers_4 = 1
			combat_divers_5 = 1
			combat_divers_6 = 1
			sf_tactics_training_1 = 1
			b_commando_1 = 1
			i_infantry_1 = 1
			b_commando_2 = 1
			i_infantry_2 = 1
			sf_tactics_training_2 = 1
			b_commando_3 = 1
			i_infantry_3 = 1
			b_commando_4 = 1
			i_infantry_4 = 1
			sf_tactics_training_3 = 1
			jungle_warfare = 1
			jungle_expertise = 1
			forest_warfare = 1
			desert_warfare_expertise = 1

			popup = no
		}
	}

	esbuff_cm_tech_armored = {
		set_technology = {
			autocannon_1 = 1
			autocannon_2 = 1
			autocannon_3 = 1
			autocannon_4 = 1
			autocannon_5 = 1
			spaag_1 = 1
			spaag_2 = 1
			spaag_3 = 1
			spaag_4 = 1
			spaag_5 = 1
			cannon_ammo_1 = 1
			cannon_ammo_2 = 1
			cannon_ammo_3 = 1
			cannon_ammo_4 = 1
			cannon_ammo_5 = 1
			aa_upgrade_1 = 1
			aa_upgrade_2 = 1
			aa_upgrade_3 = 1
			aa_upgrade_4 = 1
			aa_upgrade_5 = 1
			artillery_1 = 1
			artillery_2 = 1
			artillery_3 = 1
			artillery_4 = 1
			artillery_5 = 1
			sp_artillery_1 = 1
			sp_artillery_2 = 1
			sp_artillery_3 = 1
			sp_artillery_4 = 1
			sp_artillery_5 = 1
			light_artillery_1 = 1
			light_artillery_2 = 1
			light_artillery_3 = 1
			light_artillery_4 = 1
			light_artillery_5 = 1
			light_sp_artillery_1 = 1
			light_sp_artillery_2 = 1
			light_sp_artillery_3 = 1
			light_sp_artillery_4 = 1
			light_sp_artillery_5 = 1
			heavy_artillery_1 = 1
			heavy_artillery_2 = 1
			heavy_artillery_3 = 1
			heavy_artillery_4 = 1
			heavy_artillery_5 = 1
			heavy_sp_artillery_1 = 1
			heavy_sp_artillery_2 = 1
			heavy_sp_artillery_3 = 1
			heavy_sp_artillery_4 = 1
			heavy_sp_artillery_5 = 1
			art_ammo_1 = 1
			art_ammo_2 = 1
			art_ammo_3 = 1
			art_ammo_4 = 1
			art_ammo_5 = 1
			art_upgrade_1 = 1
			art_upgrade_2 = 1
			art_upgrade_3 = 1
			art_upgrade_4 = 1
			art_upgrade_5 = 1
			sp_rocket1 = 1
			sp_rocket2 = 1
			sp_rocket3 = 1
			sp_rocket4 = 1
			sp_rocket5 = 1
			direct_fire_gun_1 = 1
			direct_fire_gun_2 = 1
			direct_fire_gun_3 = 1
			direct_fire_gun_4 = 1
			direct_fire_gun_5 = 1
			at_ammo_1 = 1
			at_ammo_2 = 1
			at_ammo_3 = 1
			at_ammo_4 = 1
			at_ammo_5 = 1
			at_upgrade_1 = 1
			at_upgrade_2 = 1
			at_upgrade_3 = 1
			at_upgrade_4 = 1
			at_upgrade_5 = 1
			tank_destroyer_1 = 1
			tank_destroyer_2 = 1
			tank_destroyer_3 = 1
			tank_destroyer_4 = 1
			tank_destroyer_5 = 1
			iw_armored_vehicles = 1
			main_battle_tanks = 1
			main_battle_tanks_1 = 1
			main_battle_tanks_2 = 1
			main_battle_tanks_3 = 1
			main_battle_tanks_4 = 1
			main_battle_tanks_5 = 1
			main_battle_tanks_6 = 1
			main_battle_tanks_7 = 1
			main_battle_tanks_8 = 1
			main_battle_tanks_9 = 1
			heavy_tanks_1 = 1
			heavy_tanks_2 = 1
			heavy_tanks_3 = 1
			heavy_tanks_4 = 1
			heavy_tanks_5 = 1
			super_heavy_tanks_1 = 1
			super_heavy_tanks_2 = 1
			super_heavy_tanks_3 = 1
			light_tanks_1 = 1
			light_tanks_2 = 1
			light_tanks_3 = 1
			light_tanks_4 = 1
			light_tanks_5 = 1
			light_tanks_6 = 1
			mechanized_infantry = 1
			mechanized_infantry2 = 1
			mechanized_infantry3 = 1
			mechanized_infantry4 = 1
			mechanized_infantry5 = 1
			mechanized_infantry6 = 1
			mechanized_infantry7 = 1
			mechanized_infantry8 = 1
			mechanized_infantry9 = 1
			mechanized_infantry10 = 1
			mechanized_heavy_infantry = 1
			mechanized_heavy_infantry2 = 1
			mechanized_heavy_infantry3 = 1
			mechanized_heavy_infantry4 = 1
			mechanized_heavy_infantry5 = 1
			mechanized_heavy_infantry6 = 1
			mechanized_heavy_infantry7 = 1
			mechanized_heavy_infantry8 = 1
			amphibious1 = 1
			amphibious2 = 1
			amphibious3 = 1
			amphibious4 = 1
			amphibious5 = 1
			motorised_infantry = 1
			motorised_infantry_2 = 1
			motorised_infantry_3 = 1
			motorised_infantry_4 = 1
			motorised_infantry_5 = 1

			popup = no
		}
	}

	esbuff_cm_tech_navy = {
		set_technology = {
			ww_submarines = 1
			sub_hull_large_single_0 = 1
			sub_hull_large_single_1 = 1
			sub_hull_large_single_2 = 1
			sub_hull_large_single_3 = 1
			sub_hull_large_single_4 = 1
			sub_hull_small_single_0 = 1
			sub_hull_small_single_1 = 1
			sub_hull_small_single_2 = 1
			sub_hull_small_single_3 = 1
			sub_hull_small_single_4 = 1
			sub_hull_large_double_0 = 1
			sub_hull_large_double_1 = 1
			sub_hull_large_double_2 = 1
			sub_hull_large_double_3 = 1
			ww_screens = 1
			screen_hull_medium_0 = 1
			screen_hull_medium_1 = 1
			screen_hull_medium_2 = 1
			screen_hull_medium_3 = 1
			screen_hull_medium_4 = 1
			screen_hull_heavy_0 = 1
			screen_hull_heavy_1 = 1
			screen_hull_heavy_2 = 1
			screen_hull_heavy_3 = 1
			screen_hull_heavy_4 = 1
			battle_hull_light_0 = 1
			battle_hull_light_1 = 1
			battle_hull_light_2 = 1
			battle_hull_light_3 = 1
			battle_hull_light_4 = 1
			conventional_sub_engines_0 = 1
			conventional_sub_engines_1 = 1
			conventional_sub_engines_2 = 1
			conventional_sub_engines_3 = 1
			conventional_sub_engines_4 = 1
			nuclear_sub_engines_0 = 1
			nuclear_sub_engines_1 = 1
			nuclear_sub_engines_2 = 1
			sub_batteries_0 = 1
			sub_batteries_1 = 1
			sub_batteries_2 = 1
			screen_aviation_1 = 1
			screen_aviation_2 = 1
			screen_aviation_3 = 1
			screen_aviation_4 = 1
			ww_capitals = 1
			battle_hull_medium_0 = 1
			battle_hull_medium_1 = 1
			battle_hull_medium_2 = 1
			battle_hull_medium_3 = 1
			battle_hull_medium_4 = 1
			ww_carriers = 1
			carrier_hull_0 = 1
			carrier_hull_1 = 1
			carrier_hull_2 = 1
			carrier_hull_3 = 1
			carrier_hull_4 = 1
			carrier_hull_light_0 = 1
			carrier_hull_light_1 = 1
			carrier_hull_light_2 = 1
			carrier_hull_light_3 = 1
			carrier_hull_light_4 = 1
			carrier_hull_super_1 = 1
			carrier_hull_super_2 = 1
			carrier_hull_super_3 = 1
			carrier_hull_super_4 = 1
			ww_armaments = 1
			ship_armament_aa_2 = 1
			ship_armament_aa_3 = 1
			ship_armament_aa_4 = 1
			ship_armament_light_0 = 1
			ship_armament_light_1 = 1
			ship_armament_light_2 = 1
			ship_armament_light_3 = 1
			ship_armament_light_4 = 1
			ship_armament_medium_0 = 1
			ship_armament_medium_1 = 1
			ship_armament_medium_2 = 1
			ship_armament_medium_3 = 1
			ship_armament_medium_4 = 1
			ship_armament_heavy_0 = 1
			ship_armament_heavy_1 = 1
			ship_armament_heavy_2 = 1
			ship_armament_heavy_3 = 1
			ship_armament_super_heavy_0 = 1
			ship_armament_super_heavy_1 = 1
			torpedo_ww = 1
			torpedo_small_0 = 1
			torpedo_small_1 = 1
			torpedo_small_2 = 1
			torpedo_small_3 = 1
			torpedo_small_4 = 1
			torpedo_large_0 = 1
			torpedo_large_1 = 1
			torpedo_large_2 = 1
			heavy_sam_0 = 1
			heavy_sam_1 = 1
			heavy_sam_2 = 1
			heavy_sam_3 = 1
			heavy_sam_4 = 1
			light_sam_0 = 1
			light_sam_1 = 1
			light_sam_2 = 1
			dual_purpose_arm_0 = 1
			vls_0 = 1
			vls_1 = 1
			ashm_0 = 1
			ashm_1 = 1
			ashm_2 = 1
			ashm_3 = 1
			ashm_4 = 1
			detection_ww = 1
			radar_aa_0 = 1
			radar_aa_1 = 1
			radar_aa_2 = 1
			radar_aa_3 = 1
			radar_aa_4 = 1
			radar_naval_0 = 1
			radar_naval_1 = 1
			radar_naval_2 = 1
			radar_naval_3 = 1
			radar_naval_4 = 1
			radar_naval_5 = 1
			maritime_sonar_0 = 1
			maritime_sonar_1 = 1
			maritime_sonar_2 = 1
			maritime_sonar_3 = 1
			maritime_sonar_4 = 1
			countermeasures_0 = 1
			countermeasures_1 = 1
			countermeasures_2 = 1
			countermeasures_3 = 1
			countermeasures_4 = 1
			countermeasures_5 = 1
			countermeasures_6 = 1
			subkiller_0 = 1
			subkiller_1 = 1
			subkiller_2 = 1
			subkiller_3 = 1
			subkiller_4 = 1
			subkiller_5 = 1
			subkiller_6 = 1
			ww_screens_proletariat = 1
			ww_capitals_proletariat = 1
			ww_submarines_proletariat = 1
			frigate_0 = 1
			frigate_1 = 1
			frigate_2 = 1
			frigate_3 = 1
			frigate_4 = 1
			frigate_5 = 1
			destroyer_0 = 1
			destroyer_1 = 1
			destroyer_2 = 1
			destroyer_3 = 1
			destroyer_4 = 1
			destroyer_5 = 1
			cruiser_0 = 1
			cruiser_1 = 1
			cruiser_2 = 1
			cruiser_3 = 1
			cruiser_4 = 1
			cruiser_5 = 1
			battlecruiser_0 = 1
			battlecruiser_1 = 1
			battlecruiser_2 = 1
			battlecruiser_3 = 1
			battlecruiser_4 = 1
			battlecruiser_5 = 1
			carrier_0 = 1
			carrier_1 = 1
			carrier_2 = 1
			carrier_3 = 1
			carrier_4 = 1
			carrier_5 = 1
			supercarrier_0 = 1
			supercarrier_1 = 1
			supercarrier_2 = 1
			attack_submarine_0 = 1
			attack_submarine_1 = 1
			attack_submarine_2 = 1
			attack_submarine_3 = 1
			attack_submarine_4 = 1
			attack_submarine_5 = 1
			ballistic_submarine_0 = 1
			ballistic_submarine_1 = 1
			ballistic_submarine_2 = 1
			ballistic_submarine_3 = 1
			ballistic_submarine_4 = 1
			ballistic_submarine_5 = 1			
			
			popup = no
		}
	}

	esbuff_cm_tech_air = {
		set_technology = {
			early_helicopter = 1
			utility_helicopter_1 = 1
			utility_helicopter_2 = 1
			utility_helicopter_3 = 1
			utility_helicopter_4 = 1
			utility_helicopter_5 = 1
			utility_helicopter_6 = 1
			utility_helicopter_7 = 1
			naval_helicopter_1 = 1
			naval_helicopter_2 = 1
			naval_helicopter_3 = 1
			naval_helicopter_4 = 1
			naval_helicopter_5 = 1
			naval_helicopter_6 = 1
			naval_helicopter_7 = 1
			cargo_helicopter_1 = 1
			cargo_helicopter_2 = 1
			cargo_helicopter_3 = 1
			cargo_helicopter_4 = 1
			cargo_helicopter_5 = 1
			cargo_helicopter_6 = 1
			attack_helicopter_1 = 1
			attack_helicopter_2 = 1
			attack_helicopter_3 = 1
			attack_helicopter_4 = 1
			attack_helicopter_5 = 1
			scout_helicopter_1 = 1
			scout_helicopter_2 = 1
			scout_helicopter_3 = 1
			scout_helicopter_4 = 1
			scout_helicopter_5 = 1
			uav = 1
			mp_uav_1 = 1
			mp_uav_2 = 1
			cas_uav_1 = 1
			cas_uav_2 = 1
			cas_uav_3 = 1
			naval_uav_1 = 1
			naval_uav_2 = 1
			naval_uav_3 = 1
			early_fighter = 1
			heavy_fighter1 = 1
			heavy_fighter2 = 1
			heavy_fighter3 = 1
			jet_interceptor1 = 1
			jet_interceptor2 = 1
			jet_interceptor3 = 1
			jet_interceptor4 = 1
			jet_interceptor5 = 1
			jet_interceptor6 = 1
			jet_interceptor7 = 1
			jet_interceptor8 = 1
			jet_interceptor9 = 1
			fighter1 = 1
			fighter2 = 1
			fighter3 = 1
			jet_multirole1 = 1
			jet_multirole2 = 1
			jet_multirole3 = 1
			jet_multirole4 = 1
			jet_multirole5 = 1
			jet_multirole6 = 1
			jet_multirole7 = 1
			jet_multirole8 = 1
			jet_multirole9 = 1
			jet_multirole10 = 1
			mr_stealth = 1
			cv_fighter1 = 1
			cv_fighter2 = 1
			cv_fighter3 = 1
			cv_jet_multirole1 = 1
			cv_jet_multirole2 = 1
			cv_jet_multirole3 = 1
			cv_jet_multirole4 = 1
			cv_jet_multirole5 = 1
			cv_jet_multirole6 = 1
			cv_jet_multirole7 = 1
			cv_jet_multirole8 = 1
			cv_jet_multirole9 = 1
			cv_jet_multirole10 = 1
			cv_mr_stealth = 1
			stealth_fighter = 1
			jump_jet1 = 1
			jump_jet2 = 1
			jump_jet3 = 1
			jump_jet4 = 1
			jump_stealth = 1
			high_mach_jet_interceptor1 = 1
			high_mach_jet_interceptor2 = 1
			high_mach_jet_interceptor3 = 1
			high_mach_jet_interceptor4 = 1
			CAS1 = 1
			CAS2 = 1
			CAS3 = 1
			CAS4 = 1
			jet_CAS1 = 1
			jet_CAS2 = 1
			jet_CAS3 = 1
			jet_CAS4 = 1
			jet_CAS5 = 1
			jet_CAS6 = 1
			jet_CAS7 = 1
			jet_CAS8 = 1
			cas_stealth = 1
			cv_CAS1 = 1
			cv_CAS2 = 1
			cv_CAS3 = 1
			cv_jet_CAS1 = 1
			cv_jet_CAS2 = 1
			cv_jet_CAS3 = 1
			cv_jet_CAS4 = 1
			cv_jet_CAS5 = 1
			cv_jet_CAS6 = 1
			cv_jet_CAS7 = 1
			cv_jet_CAS8 = 1
			cv_jet_CAS9 = 1
			cv_jet_CAS10 = 1
			jet_light1 = 1
			jet_light2 = 1
			jet_light3 = 1
			jet_light4 = 1
			jet_light5 = 1
			recon0 = 1
			jet_recon0 = 1
			jet_recon1 = 1
			jet_recon2 = 1
			early_bomber = 1
			transport1 = 1
			transport2 = 1
			transport3 = 1
			transport4 = 1
			transport5 = 1
			transport6 = 1
			transport7 = 1
			transport8 = 1
			transport9 = 1
			naval_bomber1 = 1
			naval_bomber2 = 1
			naval_bomber3 = 1
			naval_bomber4 = 1
			naval_bomber5 = 1
			naval_bomber6 = 1
			naval_bomber7 = 1
			naval_bomber8 = 1
			tactical_bomber1 = 1
			tactical_bomber2 = 1
			tactical_bomber3 = 1
			jet_tactical_bomber1 = 1
			jet_tactical_bomber2 = 1
			jet_tactical_bomber3 = 1
			jet_tactical_bomber4 = 1
			jet_tactical_bomber5 = 1
			jet_tactical_bomber6 = 1
			jet_tactical_bomber7 = 1
			jet_tactical_bomber8 = 1
			stealth_tactical_bomber1 = 1
			stealth_tactical_bomber2 = 1
			strategic_bomber1 = 1
			strategic_bomber2 = 1
			strategic_bomber3 = 1
			jet_strategic_bomber1 = 1
			jet_strategic_bomber2 = 1
			jet_strategic_bomber3 = 1
			jet_strategic_bomber4 = 1
			nuclearstratbomber1 = 1
			nuclearstratbomber2 = 1
			jet_strategic_bomber5 = 1
			stealth_strategic_bomber1 = 1
			stealth_strategic_bomber2 = 1
			mach2stratbomber = 1
			improvedmach2stratbomber = 1
			mach2stratbomber3 = 1
			mach3stratbomber = 1
			mach6stratbomber = 1
			suicide_craft = 1

			popup = no
		}
	}

	esbuff_cm_tech_engineering = {
		set_technology = {
			ww_pc = 1
			hardware_I = 1
			hardware_II = 1
			hardware_III = 1
			hardware_IV = 1
			hardware_V = 1
			hardware_VI = 1
			hardware_VII = 1
			hardware_VIII = 1
			hardware_IX = 1
			hardware_X = 1
			hardware_XI = 1
			hardware_XII = 1
			hardware_XIII = 1
			hardware_XIV = 1
			hardware_XV = 1
			hardware_XVI = 1
			software_I = 1
			software_II = 1
			software_III = 1
			software_IV = 1
			software_V = 1
			software_VI = 1
			software_VII = 1
			software_VIII = 1
			software_IX = 1
			software_X = 1
			software_XI = 1
			software_XII = 1
			software_XIII = 1
			software_XIV = 1
			software_XV = 1
			software_XVI = 1
			radio = 1
			radar_0 = 1
			radar_I = 1
			radar_II = 1
			radar_III = 1
			radar_IV = 1
			radar_V = 1
			radar_VI = 1
			radar_VII = 1
			coms_I = 1
			coms_II = 1
			coms_III = 1
			coms_IV = 1
			coms_V = 1
			coms_VI = 1
			coms_VII = 1
			coms_VIII = 1
			consumer_electronics_I = 1
			consumer_electronics_II = 1
			consumer_electronics_III = 1
			consumer_electronics_IV = 1
			consumer_electronics_V = 1
			consumer_electronics_VI = 1
			consumer_electronics_VII = 1
			consumer_electronics_VIII = 1
			decryption_I = 1
			decryption_II = 1
			decryption_III = 1
			decryption_IV = 1
			decryption_V = 1
			decryption_VI = 1
			decryption_VII = 1
			decryption_VIII = 1
			enc_I = 1
			enc_II = 1
			enc_III = 1
			enc_IV = 1
			enc_V = 1
			enc_VI = 1
			enc_VII = 1
			enc_VIII = 1
			interwebs_I = 1
			interwebs_II = 1
			interwebs_III = 1
			interwebs_IV = 1
			interwebs_V = 1
			interwebs_VI = 1
			interwebs_VII = 1
			interwebs_VIII = 1
			interwebs_IX = 1
			interwebs_X = 1
			interwebs_XI = 1
			transistor_I = 1
			transistor_II = 1
			transistor_III = 1
			transistor_IV = 1
			transistor_V = 1
			transistor_VI = 1
			transistor_VII = 1
			transistor_VIII = 1
			transistor_IX = 1
			transistor_X = 1
			transistor_XI = 1
			transistor_XII = 1
			transistor_XIII = 1
			transistor_XIV = 1
			transistor_XV = 1
			transistor_XVI = 1
			supercomputer_I = 1
			supercomputer_II = 1
			supercomputer_III = 1
			supercomputer_IV = 1
			supercomputer_V = 1
			supercomputer_VI = 1
			supercomputer_VII = 1

			popup = no
		}
	}

	esbuff_cm_tech_industry = {
		set_technology = {
			ww_production = 1
			ww_construction = 1
			ww_oil = 1
			ww_infra = 1
			logistics_I = 1
			logistics_II = 1
			logistics_III = 1
			logistics_IV_A = 1
			logistics_IV_B = 1
			logistics_V_A = 1
			logistics_V_B = 1
			logistics_VI = 1
			logistics_VI_A = 1
			logistics_VII_A = 1
			logistics_VII_B = 1
			logistics_VIII_A = 1
			logistics_VIII_B = 1
			logistics_IX = 1
			logistics_X = 1
			logistics_XI = 1
			logistics_XII = 1
			logistics_XIII = 1
			logistics_XIV = 1
			production_efficiency_I = 1
			production_efficiency_II = 1
			production_efficiency_III = 1
			production_efficiency_IV = 1
			production_efficiency_V = 1
			production_efficiency_VI = 1
			production_efficiency_VII = 1
			production_efficiency_VIII = 1
			production_efficiency_IX = 1
			production_efficiency_X = 1
			industrial_robots_I = 1
			industrial_robots_II = 1
			industrial_robots_III = 1
			industrial_robots_IV = 1
			industrial_robots_V = 1
			factory_automation_I = 1
			factory_automation_II = 1
			factory_automation_III = 1
			factory_automation_IV = 1
			management_I = 1
			management_II = 1
			management_III_A = 1
			management_III_B = 1
			management_IV = 1
			management_IV_A = 1
			management_V_A = 1
			management_V_B = 1
			management_VI = 1
			management_VII_A = 1
			management_VII_B = 1
			management_VIII = 1
			management_IX = 1
			management_X = 1
			management_XI_A = 1
			management_XI_B = 1
			agriculture_I = 1
			agriculture_II = 1
			agriculture_III = 1
			agriculture_IV = 1
			agriculture_V = 1
			agriculture_VI = 1
			agriculture_VII = 1
			agriculture_VIII = 1
			organic_I = 1
			organic_II = 1
			organic_III = 1
			organic_IV = 1
			organic_V = 1
			organic_VI = 1
			organic_VII = 1
			water_I = 1
			water_II = 1
			water_III = 1
			water_IV = 1
			water_V = 1
			water_VI = 1
			water_VII = 1
			biofuels_II = 1
			civil_engineering_I = 1
			civil_engineering_II = 1
			civil_engineering_III = 1
			civil_engineering_IV = 1
			civil_engineering_V = 1
			civil_engineering_VI = 1
			civil_engineering_VII = 1
			civil_engineering_VIII = 1
			civil_engineering_IX = 1
			civil_engineering_X = 1
			civil_engineering_XI = 1
			civil_engineering_XII = 1
			civil_engineering_XIII = 1
			civil_engineering_XIV = 1
			civil_engineering_XV = 1
			excavation_I = 1
			excavation_II = 1
			excavation_III = 1
			excavation_IV = 1
			excavation_V = 1
			excavation_VI = 1
			excavation_VII = 1
			materials_I = 1
			materials_II = 1
			materials_III = 1
			materials_IV = 1
			materials_V = 1
			materials_VI = 1
			materials_VII = 1
			materials_VIII = 1
			chemistry_I = 1
			chemistry_II = 1
			chemistry_III = 1
			chemistry_IV = 1
			chemistry_V = 1
			chemistry_VI = 1
			chemistry_VII = 1
			plastics_I = 1
			plastics_II = 1
			plastics_III = 1
			plastics_IV = 1
			plastics_V = 1
			plastics_VI = 1
			plastics_VII = 1
			grid_I = 1
			grid_II = 1
			grid_III = 1
			grid_IV = 1
			grid_V = 1
			grid_VI = 1
			grid_VII = 1
			grid_VIII = 1
			renewables_I = 1
			renewables_II = 1
			renewables_III = 1
			renewables_IV = 1
			renewables_V = 1
			renewables_VI = 1
			renewables_VII = 1
			renewables_conversion = 1
			ecoenergy_I = 1
			ecoenergy_II = 1
			ecoenergy_III = 1
			ecoenergy_IV = 1
			ecoenergy_V = 1
			ecoenergy_VI = 1
			ecoenergy_VII = 1
			gas_I = 1
			gas_II = 1
			gas_III = 1
			gas_IV = 1
			inframanagement_I = 1
			inframanagement_II = 1
			inframanagement_III = 1
			inframanagement_IV = 1
			inframanagement_V = 1
			inframanagement_VI = 1
			inframanagement_VII = 1
			inframanagement_VIII = 1
			inframunicipal_I = 1
			inframunicipal_II = 1
			inframunicipal_III = 1
			inframunicipal_IV = 1
			inframunicipal_V = 1
			inframunicipal_VI = 1
			inframunicipal_VII = 1
			inframunicipal_VIII = 1
			infrastate_I = 1
			infrastate_II = 1
			infrastate_III = 1
			infrastate_IV = 1
			infrastate_V = 1
			infrastate_VI = 1
			infrastate_VII = 1
			electriccars = 1
			
			popup = no
		}
	}

	esbuff_cm_tech_rocketry = {
		set_technology = {
			rocket_engines = 1
			advanced_rocket_engines = 1
			jet_engines = 1
			prototype_aa = 1
			prototype_agm = 1
			sam_short_range_0 = 1
			sam_short_range_1 = 1
			sam_short_range_2 = 1
			sam_short_range_3 = 1
			sam_short_range_4 = 1
			sam_short_range_5 = 1
			sam_long_range_0 = 1
			sam_long_range_1 = 1
			sam_long_range_2 = 1
			sam_long_range_3 = 1
			sam_long_range_4 = 1
			aam_short_range_0 = 1
			aam_short_range_1 = 1
			aam_short_range_2 = 1
			aam_short_range_3 = 1
			aam_short_range_4 = 1
			aam_short_range_5 = 1
			aam_long_range_0 = 1
			aam_long_range_1 = 1
			aam_long_range_2 = 1
			aam_long_range_3 = 1
			aam_long_range_4 = 1
			atgm_0 = 1
			atgm_1 = 1
			atgm_2 = 1
			atgm_3 = 1
			atgm_4 = 1
			atgm_5 = 1
			atgm_carrier_0 = 1
			atgm_carrier_1 = 1
			atgm_carrier_2 = 1
			atgm_carrier_3 = 1
			atgm_carrier_4 = 1
			agm_0 = 1
			agm_1 = 1
			agm_2 = 1
			agm_3 = 1
			agm_4 = 1
			agm_5 = 1
			cruisemissile_0 = 1
			cruisemissile_1 = 1
			cruisemissile_2 = 1
			cruisemissile_3 = 1
			cruisemissile_4 = 1
			cruisemissile_5 = 1
			srbm1 = 1
			srbm2 = 1
			srbm3 = 1
			srbm4 = 1
			srbm5 = 1
			srbm6 = 1
			srbm7 = 1
			srbm8 = 1
			srbm9 = 1
			slbm1 = 1
			slbm2 = 1
			slbm3 = 1
			slbm4 = 1
			slbm5 = 1
			slbm6 = 1
			slbm7 = 1
			irbm1 = 1
			irbm2 = 1
			irbm3 = 1
			irbm4 = 1
			irbm5 = 1
			irbm6 = 1
			irbm7 = 1
			irbm8 = 1
			icbm1 = 1
			icbm2 = 1
			icbm3 = 1
			icbm4 = 1
			icbm5 = 1

			popup = no
		}
	}

	esbuff_cm_tech_space = {
		set_technology = {
			woodmetal_frames = 1
			pressure_vessel1 = 1
			stainless_steel = 1
			continuous_pressurization = 1
			pressure_vessel2 = 1
			common_bulkhead = 1
			balloon_tanks = 1
			pressure_vessel3 = 1 
			advanced_plumbing = 1
			anti_slosh_baffles = 1
			pressure_vessel4 = 1
			titanium_frame = 1
			temperature_control = 1
			pressure_vessel5 = 1
			carbon_fiber = 1
			external_tanks = 1
			pressure_vessel6 = 1
			aluminum_lithium = 1
			lightweight_tanks = 1
			carbon_fiber2 = 1
			helium_pressurization = 1
			orbital_construction = 1
			liquid_propellant = 1
			solid_propellant = 1
			hybrid_propellant = 1
			nuclear_pulse_propulsion = 1
			cryogenic_rocket = 1
			solid_core_rocket = 1
			pebble_core_rocket = 1
			dual_mode_rocket = 1
			liquid_core_rocket = 1
			fission_fragment = 1
			tripropellant_rocket = 1
			droplet_core_rocket = 1
			closed_core_rocket = 1
			variable_thrust_rocket = 1
			nuclear_pulse_propulsion2 = 1
			open_core_rocket = 1
			dusty_fission_fragment = 1
			precooled_rocket_engines = 1
			mercury_batteries = 1
			nickel_batteries = 1
			hydrogen_cells = 1
			radioisotope_generators = 1
			solar_panels = 1
			tracking_solar_panels = 1
			lithium_batteries = 1
			methane_fuel_cells = 1
			directional_antenna = 1
			sstv_transmission = 1
			geosynchronous_network = 1
			broadband_internet = 1
			laser_communications = 1

			popup = no
		}
	}

	esbuff_cm_tech_wmd = {
		set_technology = {
			atomic_research = 1
			atomic_weapons_armament_0 = 1
			atomic_weapons_armament_I = 1
			atomic_weapons_armament_II = 1
			atomic_weapons_delivery_I = 1
			atomic_weapons_delivery_Ia = 1
			atomic_weapons_delivery_II = 1
			atomic_weapons_delivery_III = 1
			atomic_weapons_delivery_IV = 1
			atomic_weapons_delivery_V = 1
			atomic_reactor_0 = 1
			atomic_reactor_I = 1
			atomic_reactor_II = 1
			atomic_reactor_fission_0 = 1
			atomic_reactor_fission_I = 1
			atomic_reactor_fission_II = 1
			atomic_reactor_fusion_0 = 1
			atomic_reactor_fusion_I = 1
			atomic_reactor_fusion_II = 1
			atomic_reactor_fusion_III = 1
			atomic_reactor_naval_0 = 1
			atomic_reactor_naval_I = 1
			atomic_reactor_naval_II = 1
			NBC_research = 1
			nbc_nerve_weapon_0 = 1
			nbc_nerve_weapon_1 = 1
			nbc_nerve_weapon_2 = 1
			nbc_nerve_weapon_3 = 1
			nbc_nerve_weapon_4 = 1
			nbc_nerve_weapon_5 = 1
			nbc_chemical_weapon_3 = 1
			nbc_biological_weapon_1 = 1
			nbc_biological_weapon_2 = 1
			nbc_biological_weapon_3 = 1
			nbc_biological_weapon_4 = 1

			popup = no
		}
	}

#Points and exps
	esbuff_cm_points_exps_1 = {
		army_experience = 250
	}

	esbuff_cm_points_exps_2 = {
		navy_experience = 250
	}

	esbuff_cm_points_exps_3 = {
		air_experience = 250
	}

	esbuff_cm_points_exps_4 = {
		add_political_power = 500
	}

	esbuff_cm_points_exps_5 = {
		add_manpower = 700000
	}

	esbuff_cm_points_exps_6 = {
		add_command_power = 100
	}

	esbuff_cm_points_exps_7 = {
		add_stability = 0.25
	}

	esbuff_cm_points_exps_8 = {
		add_war_support = 0.25
	}

	esbuff_cm_points_exps_9 = {
		add_named_threat = { threat = 25 }
	}

	esbuff_cm_points_exps_10 = {
		add_named_threat = { threat = -25 }
	}

#CWIC
	esbuff_cm_cwic_1 = {
		random_state = {
			limit = { 
				is_controlled_by = ROOT 
				is_capital = yes
			}
			add_resource = {
				type = electricity
				amount = 36
			}
		}
	}

	esbuff_cm_cwic_2 = {
		add_to_variable = { ROOT.currentMoney = 10000 }
	}

	esbuff_cm_cwic_3 = {
		
	}

#Faction and Parties
	esbuff_cm_factions_parties_1 = {
		random_country = {
			limit = {
				AND = {
					is_in_faction_with = SOV
					is_faction_leader = yes
				}
			}
			add_to_faction = ROOT
		}
	}

	esbuff_cm_factions_parties_2 = {
		SOV = { dismantle_faction = yes }
	}

	esbuff_cm_factions_parties_3 = {
		random_country = {
			limit = {
				AND = {
					is_in_faction_with = ROOT
					is_faction_leader = yes
				}
			}
			remove_from_faction = ROOT
		}
	}

	esbuff_cm_factions_parties_4 = {
		random_country = {
			limit = {
				AND = {
					is_in_faction_with = FRA
					is_faction_leader = yes
				}
			}
			add_to_faction = ROOT
		}
	}

	esbuff_cm_factions_parties_5 = {
		FRA = { dismantle_faction = yes }
	}

	esbuff_cm_factions_parties_6 = {
		every_country = {
			limit = { 
				AND = { 
					has_war_with = ROOT
					is_in_faction = yes
					is_faction_leader = no
				}
			}
			random_country = {
				limit = {
					AND = {
						is_in_faction_with = PREV
						is_faction_leader = yes
					}
				}
				remove_from_faction = PREV
			}
		}
	}

	esbuff_cm_factions_parties_7 = {
		
	}

	esbuff_cm_factions_parties_8 = {

	}

	esbuff_cm_factions_parties_9 = {
		
	}

	esbuff_cm_factions_parties_10 = {
		
	}


#Cores and domain
	esbuff_cm_cores_domain_cat = {
		every_state = {
			limit= {
				is_core_of = ROOT
			}
			set_state_flag = player_state
		}
		set_country_flag = player_country
	}

	esbuff_cm_cores_domain_all_disc_cores = {
		every_state = {
			limit = {
				is_core_of = ROOT
				is_controlled_by = ROOT
				is_owned_by = ROOT
			}
			every_country = {
				limit = {
					NOT = { has_country_flag = player_country }
				}
				remove_state_core = PREV
				remove_state_claim = PREV
			}
		}
	}

	esbuff_cm_cores_domain_make_rndm_states_core = {
		random_state = {
			limit = {
				AND = {
					any_neighbor_state = { owner = { tag = ROOT } }
					NOT = { is_core_of = ROOT }
				}
			}
			add_core_of = ROOT
		}
	}

	esbuff_cm_cores_domain_make_cntrld_states_core = {
		every_state = {
			limit = {
				AND = {
					is_controlled_by = ROOT
					NOT = { is_core_of = ROOT }
				}
			}
			add_core_of = ROOT
		}
	}

	esbuff_cm_cores_domain_make_claimed_states_core = {
		every_state = {
			limit = {
				AND = {
					is_claimed_by = ROOT
					NOT = { is_core_of = ROOT }
				}
			}
			add_core_of = ROOT
		}
	}

	esbuff_cm_cores_domain_lose_cores = {
		every_state = {
		limit = {
			NOT = { is_controlled_by = ROOT }
			AND = { is_core_of = ROOT }
		}
		remove_core_of = ROOT
		}
	}

	esbuff_cm_cores_domain_cntrl_core_states_cat = {
		random_state = {
			limit = {
				AND = {
					is_core_of = ROOT
					NOT = { is_controlled_by = ROOT }
				}
			}
			save_event_target_as = ROOT_state
		}
	}

	esbuff_cm_cores_domain_cntrl_core_states_rndm = {
		random_state = {
			limit = {
				AND = {
					is_core_of = ROOT
					NOT = { is_controlled_by = ROOT }
				}
			}
			ROOT = {
				transfer_state = PREV
			}
		}
	}

	esbuff_cm_cores_domain_cntrl_core_states_all = {
		every_state = {
			limit = {
				AND = {
					is_core_of = ROOT
					NOT = { is_controlled_by = ROOT }
				}
			}
			ROOT = {
				transfer_state = PREV
			}
		}
	}

	esbuff_cm_cores_domain_cntrl_nghbr_states_rndm_enemy = {
		random_state = {
			limit = {
				AND = {
					any_neighbor_state = { owner = { tag = ROOT } }
					NOT = { is_controlled_by = ROOT }
					owner = { has_war_with = ROOT }
				}
			}
			ROOT = {
				transfer_state = PREV
			}
		}
	}

	esbuff_cm_cores_domain_cntrl_nghbr_states_rndm = {
		random_state = {
			limit = {
				AND = {
					any_neighbor_state = { owner = { tag = ROOT } }
					NOT = { is_controlled_by = ROOT }
				}
			}
			ROOT = {
				transfer_state = PREV
			}
		}
	}

	esbuff_cm_cores_domain_cntrl_nghbr_states_nghbr_20divs = {
		random_state = {
			limit = {
				AND = {
					any_neighbor_state = { 
						is_owned_by = ROOT 
						ROOT = {
							divisions_in_state = {
								state = PREV
								size > 20
							}
						}
					}
					
					NOT = { is_controlled_by = ROOT }
				}
			}
			ROOT = {
				transfer_state = PREV
			}
		}
	}

	esbuff_cm_cores_domain_puppet_rndm = {
		random_country = {
			limit = {
				AND = {
					is_ai = yes
					NOT = { is_puppet_of = ROOT }
				}
			}
			ROOT = { puppet = PREV }
		}
	}

	esbuff_cm_cores_domain_puppet_nghbr = {
		random_country = {
			limit = {
				AND = {
					is_neighbor_of = ROOT
					NOT = { is_puppet_of = ROOT }
				}
			}
			ROOT = { puppet = PREV }
		}
	}

	esbuff_cm_cores_domain_puppet_enemy = {
		random_country = {
			limit = {
				AND = {
					has_war_with = ROOT
					NOT = { is_puppet_of = ROOT }
				}
			}
			ROOT = { puppet = PREV }
		}
	}

	esbuff_cm_cores_domain_capital_cat = {
		random_owned_state = {
			limit = {
				AND = {
					is_owned_by = ROOT
					ROOT = {
						divisions_in_state = {
							state = PREV
							size > 10
						}
					}
				}
			}
			save_event_target_as = cap_state          
		}
		random_owned_state = {
			limit = {
				AND = {
					is_owned_by = ROOT
					ROOT = {
						divisions_in_state = {
							state = PREV
							size > 20
						}
					}
				}
			}
			save_event_target_as = cap_states         
		}
		random_owned_state = {
			save_event_target_as = cap_statess         
		}
	} 

	esbuff_cm_cores_domain_capital_10divs = {
		set_capital = { state = event_target:cap_state }
	}

	esbuff_cm_cores_domain_capital_20divs = {
		set_capital = { state = event_target:cap_states }
	}

	esbuff_cm_cores_domain_capital_rndm = {
		set_capital = { state = event_target:cap_statess }
	}

	esbuff_cm_cores_domain_white_peace = {
		every_country = {
			limit = {
				has_war_with = ROOT
			}
			white_peace = ROOT
		} 
	}

#Static modifiers
	esbuff_cm_static_modif_1 = {
		if = {
			limit = { has_idea = de_combat_width }
			remove_ideas = de_combat_width
			else = { add_ideas = de_combat_width }
		}
	}

	esbuff_cm_static_modif_2 = {
		if = {
			limit = { has_idea = more_org }
			remove_ideas = more_org
			else = { add_ideas = more_org }
		}
	}

	esbuff_cm_static_modif_3 = {
		if = {
			limit = { has_idea = more_special }
			remove_ideas = more_special
			else = { add_ideas = more_special }
		}
	}

	esbuff_cm_static_modif_4 = {
		if = {
			limit = { has_idea = safety_eqs }
			remove_ideas = safety_eqs
			else = { add_ideas = safety_eqs }
		}
	}

	esbuff_cm_static_modif_5 = {
		if = {
			limit = { has_idea = more_speed }
			remove_ideas = more_speed
			else = { add_ideas = more_speed }
		}
	}

	esbuff_cm_static_modif_6 = {
		if = {
			limit = { has_idea = gen_mods }
			remove_ideas = gen_mods
			else = { add_ideas = gen_mods }
		}
	}

#Leaders
	esbuff_cm_leaders_1 = {
		every_army_leader = {
			add_unit_leader_trait = expert_improviser
		}
	}

	esbuff_cm_leaders_2 = {
		every_army_leader = {
			add_unit_leader_trait = lt_all_ability
		}
	}

	esbuff_cm_leaders_3 = {
		every_army_leader = {
			add_unit_leader_trait = ctrl_more_troops
		}
	}

	esbuff_cm_leaders_4 = {
		every_army_leader = {
			add_unit_leader_trait = expert_improviser
		}
	}


	