siema mam tutaj kod do europy universalis 4:
country_event = {
    id = wwu_zandalar_pandaria_invasion.20
    title = wwu_zandalar_pandaria_invasion.20.title
    desc = wwu_zandalar_pandaria_invasion.20.desc
    picture = ZANDALAR_12_eventPicture

    is_triggered_only = yes
		trigger = {
			tag = A78
			has_country_flag = zandalar_war_against_pandaria_started
			is_at_war = no
			OR = {
				AND = {
					has_country_flag = zandalar_war_against_pandaria_win
					any_country = {
						has_country_flag = zandalar_defender_for_resolution
					}
				}
				AND = {
				has_country_flag = zandalar_war_against_pandaria_lost
				NOT = { has_country_flag = zandalar_war_against_pandaria_lost_end }
				}
			}
		}


	immediate = {
		random_country = {
			limit = {
				has_country_flag = zandalar_defender_for_resolution
			}
			save_event_target_as = current_defender
		}
	}

	option = {
	trigger = {
	has_country_flag = zandalar_war_against_pandaria_win
	}
		name = "wwu_zandalar_pandaria_invasion.20.option.a"
		ai_chance = { factor = 10 }
		
		if = {
		limit = {
		NOT = { has_country_flag = zandalar_enterprise_zul }
		}
		create_subject = {  
			subject_type = commercial_enterprise
			subject = ZFC
		}
		set_country_flag = zandalar_enterprise_zul
		ZFC = {
		override_country_name = zandalar_enterprise
		remove_country_modifier = zandalar_invasion_force_upgrade
		change_government = republic
		add_republican_tradition = 100
		set_government_rank = 2
		}
		custom_tooltip = zandalari_zfc_enterprise_claim
		hidden_effect = {
		every_province = {
		limit = {
		superregion = pandaria_superregion
		NOT = {
			owner = ROOT
		}
		}
		add_permanent_claim = ZFC
		}
		}
		}
		
		
		event_target:current_defender = {
		clr_country_flag = zandalar_defender_for_resolution
		}
		
		ZFC = {
		inherit = event_target:current_defender
		}

		if = {
		limit = {
		event_target:current_defender = {
		NOT = { total_development = 33 }
		}
		}
		custom_tooltip = zandalari_zfc_8_2
		}
		
		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 33
		NOT = { total_development = 66 }
		}
		}
		custom_tooltip = zandalari_zfc_16_4
		}
		
		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 66
		NOT = { total_development = 100 }
		}
		}
		custom_tooltip = zandalari_zfc_24_6
		}
		
		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 100
		NOT = { total_development = 133 }
		}
		}
		custom_tooltip = zandalari_zfc_32_8
		}

		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 133
		NOT = { total_development = 166 }
		}
		}
		custom_tooltip = zandalari_zfc_40_10
		}
		
		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 166
		NOT = { total_development = 200 }
		}
		}
		custom_tooltip = zandalari_zfc_48_12
		}

		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 200
		NOT = { total_development = 233 }
		}
		}
		custom_tooltip = zandalari_zfc_56_14
		}
		
		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 233
		NOT = { total_development = 266 }
		}
		}
		custom_tooltip = zandalari_zfc_64_16
		}
		
		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 266
		NOT = { total_development = 300 }
		}
		}
		custom_tooltip = zandalari_zfc_72_18
		}
		
		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 300
		}
		}
		custom_tooltip = zandalari_zfc_80_20
		}



		hidden_effect = {
		ZFC = {
		every_owned_province = {
		kill_units = {
			who = ZFC   # optional, only affect <scope>'s units. Scopes enemy, owner and controller work here.
			amount = 100
		}
		}
		}
		# AE lokalna
		if = {
		limit = {
		event_target:current_defender = {
		NOT = { total_development = 33 }
		}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				capital_scope = {
					superregion = pandaria_superregion
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 8 
			}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				NOT = {
					capital_scope = {
						superregion = pandaria_superregion
					}
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 2
			}
		}
		}
		
		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 33
		NOT = { total_development = 66 }
		}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				capital_scope = {
					superregion = pandaria_superregion
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 16 
			}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				NOT = {
					capital_scope = {
						superregion = pandaria_superregion
					}
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 4
			}
		}
		}
		
		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 66
		NOT = { total_development = 100 }
		}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				capital_scope = {
					superregion = pandaria_superregion
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 24 
			}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				NOT = {
					capital_scope = {
						superregion = pandaria_superregion
					}
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 6
			}
		}
		}
		
		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 100
		NOT = { total_development = 133 }
		}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				capital_scope = {
					superregion = pandaria_superregion
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 32
			}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				NOT = {
					capital_scope = {
						superregion = pandaria_superregion
					}
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 8
			}
		}
		}

		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 133
		NOT = { total_development = 166 }
		}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				capital_scope = {
					superregion = pandaria_superregion
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 40
			}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				NOT = {
					capital_scope = {
						superregion = pandaria_superregion
					}
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 10
			}
		}
		}
		
		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 166
		NOT = { total_development = 200 }
		}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				capital_scope = {
					superregion = pandaria_superregion
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 48
			}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				NOT = {
					capital_scope = {
						superregion = pandaria_superregion
					}
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 12
			}
		}
		}

		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 200
		NOT = { total_development = 233 }
		}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				capital_scope = {
					superregion = pandaria_superregion
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 54
			}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				NOT = {
					capital_scope = {
						superregion = pandaria_superregion
					}
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 14
			}
		}
		}
		
		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 233
		NOT = { total_development = 266 }
		}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				capital_scope = {
					superregion = pandaria_superregion
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 62
			}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				NOT = {
					capital_scope = {
						superregion = pandaria_superregion
					}
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 16
			}
		}
		}
		
		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 266
		NOT = { total_development = 300 }
		}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				capital_scope = {
					superregion = pandaria_superregion
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 70
			}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				NOT = {
					capital_scope = {
						superregion = pandaria_superregion
					}
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 18
			}
		}
		}
		
		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 300
		}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				capital_scope = {
					superregion = pandaria_superregion
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 78
			}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				NOT = {
					capital_scope = {
						superregion = pandaria_superregion
					}
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 20
			}
		}
		}
		
		}

		# Zapętl event, jeśli są kolejni
		if = {
			limit = {
				any_country = { has_country_flag = zandalar_defender_for_resolution }
			}
			country_event = { id = wwu_zandalar_pandaria_invasion.20 }
		}
	}

	option = {
	trigger = {
	has_country_flag = zandalar_war_against_pandaria_win
	}
		name = "wwu_zandalar_pandaria_invasion.20.option.b"
		ai_chance = { factor = 5 }
		
		if = {
		limit = {
		NOT = { has_country_flag = zandalar_enterprise_zul }
		}
		create_subject = {  
			subject_type = commercial_enterprise
			subject = ZFC
		}
		set_country_flag = zandalar_enterprise_zul
		ZFC = {
		override_country_name = zandalar_enterprise
		remove_country_modifier = zandalar_invasion_force_upgrade
		change_government = republic
		add_republican_tradition = 100
		set_government_rank = 2
		}
		custom_tooltip = zandalari_zfc_enterprise_claim
		hidden_effect = {
		every_province = {
		limit = {
		superregion = pandaria_superregion
		NOT = {
			owner = ROOT
		}
		}
		add_permanent_claim = ZFC
		}
		}
		}
		
		event_target:current_defender = {
		clr_country_flag = zandalar_defender_for_resolution
		}

		hidden_effect = {
		every_country = {
		white_peace = event_target:current_defender
		}
		}
		
		ZFC = {
			create_subject = {              
				subject_type = vassal      
				subject = event_target:current_defender          
			}
		}
		
		if = {
		limit = {
		event_target:current_defender = {
		NOT = { total_development = 33 }
		}
		}
		custom_tooltip = zandalari_zfc_5_1
		}
		
		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 33
		NOT = { total_development = 66 }
		}
		}
		custom_tooltip = zandalari_zfc_10_2
		}
		
		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 66
		NOT = { total_development = 100 }
		}
		}
		custom_tooltip = zandalari_zfc_15_3
		}
		
		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 100
		NOT = { total_development = 133 }
		}
		}
		custom_tooltip = zandalari_zfc_20_4
		}

		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 133
		NOT = { total_development = 166 }
		}
		}
		custom_tooltip = zandalari_zfc_25_5
		}
		
		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 166
		NOT = { total_development = 200 }
		}
		}
		custom_tooltip = zandalari_zfc_30_6
		}

		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 200
		NOT = { total_development = 233 }
		}
		}
		custom_tooltip = zandalari_zfc_35_7
		}
		
		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 233
		NOT = { total_development = 266 }
		}
		}
		custom_tooltip = zandalari_zfc_40_8
		}
		
		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 266
		NOT = { total_development = 300 }
		}
		}
		custom_tooltip = zandalari_zfc_45_9
		}
		
		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 300
		}
		}
		custom_tooltip = zandalari_zfc_50_10
		}
		

		
		hidden_effect = {
		ZFC = {
		every_owned_province = {
		kill_units = {
			who = ZFC   # optional, only affect <scope>'s units. Scopes enemy, owner and controller work here.
			amount = 100
		}
		}
		}
		if = {
		limit = {
		event_target:current_defender = {
		NOT = { total_development = 33 }
		}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				capital_scope = {
					superregion = pandaria_superregion
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 5 
			}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				NOT = {
					capital_scope = {
						superregion = pandaria_superregion
					}
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 1
			}
		}
		}
		
		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 33
		NOT = { total_development = 66 }
		}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				capital_scope = {
					superregion = pandaria_superregion
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 10
			}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				NOT = {
					capital_scope = {
						superregion = pandaria_superregion
					}
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 2
			}
		}
		}
		
		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 66
		NOT = { total_development = 100 }
		}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				capital_scope = {
					superregion = pandaria_superregion
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 15
			}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				NOT = {
					capital_scope = {
						superregion = pandaria_superregion
					}
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 3
			}
		}
		}
		
		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 100
		NOT = { total_development = 133 }
		}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				capital_scope = {
					superregion = pandaria_superregion
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 20
			}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				NOT = {
					capital_scope = {
						superregion = pandaria_superregion
					}
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 4
			}
		}
		}

		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 133
		NOT = { total_development = 166 }
		}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				capital_scope = {
					superregion = pandaria_superregion
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 25
			}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				NOT = {
					capital_scope = {
						superregion = pandaria_superregion
					}
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 5
			}
		}
		}
		
		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 166
		NOT = { total_development = 200 }
		}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				capital_scope = {
					superregion = pandaria_superregion
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 30
			}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				NOT = {
					capital_scope = {
						superregion = pandaria_superregion
					}
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 6
			}
		}
		}

		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 200
		NOT = { total_development = 233 }
		}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				capital_scope = {
					superregion = pandaria_superregion
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 35
			}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				NOT = {
					capital_scope = {
						superregion = pandaria_superregion
					}
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 7
			}
		}
		}
		
		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 233
		NOT = { total_development = 266 }
		}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				capital_scope = {
					superregion = pandaria_superregion
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 40
			}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				NOT = {
					capital_scope = {
						superregion = pandaria_superregion
					}
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 8
			}
		}
		}
		
		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 266
		NOT = { total_development = 300 }
		}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				capital_scope = {
					superregion = pandaria_superregion
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 45
			}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				NOT = {
					capital_scope = {
						superregion = pandaria_superregion
					}
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 9
			}
		}
		}
		
		else_if = {
		limit = {
		event_target:current_defender = {
		total_development = 300
		}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				capital_scope = {
					superregion = pandaria_superregion
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 50
			}
		}
		every_country = {
			limit = {
				NOT = { is_subject = yes }
				NOT = { alliance_with = ROOT }
				NOT = {
					capital_scope = {
						superregion = pandaria_superregion
					}
				}
			}
			add_aggressive_expansion = {
				who = ROOT
				value = 10
			}
		}
		}
		}

		if = {
			limit = {
				any_country = { has_country_flag = zandalar_defender_for_resolution }
			}
			country_event = { id = wwu_zandalar_pandaria_invasion.20 }
		}
	}

	option = {
	trigger = {
	has_country_flag = zandalar_war_against_pandaria_win
	}
		name = "wwu_zandalar_pandaria_invasion.20.option.c"
		
		if = {
		limit = {
		NOT = { has_country_flag = zandalar_enterprise_zul }
		}
		create_subject = {  
			subject_type = commercial_enterprise
			subject = ZFC
		}
		set_country_flag = zandalar_enterprise_zul
		ZFC = {
		override_country_name = zandalar_enterprise
		remove_country_modifier = zandalar_invasion_force_upgrade
		change_government = republic
		add_republican_tradition = 100
		set_government_rank = 2
		}
		custom_tooltip = zandalari_zfc_enterprise_claim
		hidden_effect = {
		every_province = {
		limit = {
		superregion = pandaria_superregion
		NOT = {
			owner = ROOT
		}
		}
		add_permanent_claim = ZFC
		}
		}
		}
		
		ai_chance = { factor = 3 }
		
		hidden_effect = {
		ZFC = {
		every_owned_province = {
		kill_units = {
			who = ZFC   # optional, only affect <scope>'s units. Scopes enemy, owner and controller work here.
			amount = 100
		}
		}
		}
		}

		event_target:current_defender = {
			add_treasury = -300 # zamień na scripted_variable, jeśli chcesz dokładnie od dev
			clr_country_flag = zandalar_defender_for_resolution
		}
		add_treasury = 300

		if = {
			limit = {
				any_country = { has_country_flag = zandalar_defender_for_resolution }
			}
			country_event = { id = wwu_zandalar_pandaria_invasion.20 }
		}
	}

    option = {
	trigger = {
	has_country_flag = zandalar_war_against_pandaria_lost
	}
        name = "wwu_zandalar_pandaria_invasion.20.option.d"
            add_stability = -1
            increase_zul_power_by_10 = yes
            increase_zul_influence_by_10 = yes
			ZFC = {
			remove_country_modifier = zandalar_invasion_force_upgrade
			}
			set_country_flag = zandalar_war_against_pandaria_lost_end
    }
	
	after = {
		if = {
			limit = {
				any_country = { has_country_flag = zandalar_defender_for_resolution }
			}
			country_event = { id = wwu_zandalar_pandaria_invasion.101 }
		}
	}
}


sprawa jest taka, ze w pierwszej opcji rozprowadzanie agresywnej ekspansji nie działa, za to w drugiej opcji działa już tak jak należy z uwzględnieniem jeżeli ktoś ma więcej developmentu. Kody te wydają się być takie same a jednak w pierwszej opcji zatrzymuje się na pierwszym if.