;SS 6.2 Late Era Campaign Script
;by gracul 17-01-09
;temp revised siege scripts to allow testing
;further revions as per associated text file
;experimental bulgarian and venetian and teutonic scripts
;===================== CONTENTS =========================
;---- 1)AI PART
;---- Setup AI
;---- AI Reinforcements
;---- AI Economy Script
;---- Is the AI?
;---- 2)PLAYER PART
;---- Setup Events
;---- City Reveal
;---- Major Events
;---- Player Notification
;---- Interactive Events
;---- 3)EMERGENT FACTIONS/NATIONAL UPRISINGS
;---- William Wallace Uprising
;---- Golden Horde Emergent
;========================================================
;
script
        restrict_strat_radar false
;========================================================
;====================== AI PART =========================
;========================================================

;====================== Setup AI ========================

	monitor_event FactionTurnStart FactionIsLocal
		and I_TurnNumber = 0
		and CampaignDifficulty = easy

		set_event_counter DifficultyLevel 1

		add_events
		event historic difficulty_easy 
		date 0
		end_add_events



	if I_IsFactionAIControlled england
		increment_kings_purse england 500
	end_if

	if I_IsFactionAIControlled france
		increment_kings_purse france 500
	end_if

	if I_IsFactionAIControlled hre
		increment_kings_purse hre 500
	end_if

	if I_IsFactionAIControlled spain
		increment_kings_purse spain 500
	end_if

	if I_IsFactionAIControlled venice
		increment_kings_purse venice 500
	end_if

	if I_IsFactionAIControlled sicily
		increment_kings_purse sicily 500
	end_if

	if I_IsFactionAIControlled milan
		increment_kings_purse milan 500
	end_if

	if I_IsFactionAIControlled scotland
		increment_kings_purse scotland 500
	end_if

	if I_IsFactionAIControlled denmark
		increment_kings_purse denmark 500
	end_if

	if I_IsFactionAIControlled portugal
		increment_kings_purse portugal 500
	end_if

	if I_IsFactionAIControlled poland
		increment_kings_purse poland 500
	end_if

	if I_IsFactionAIControlled hungary
		increment_kings_purse hungary 500
	end_if

	if I_IsFactionAIControlled russia
		increment_kings_purse russia 500
	end_if

	if I_IsFactionAIControlled moors
		increment_kings_purse moors 500
	end_if

	if I_IsFactionAIControlled turks
		increment_kings_purse turks 500
	end_if

	if I_IsFactionAIControlled egypt
		increment_kings_purse egypt 500
	end_if

	if I_IsFactionAIControlled byzantium
		increment_kings_purse byzantium 500
	end_if

	if I_IsFactionAIControlled jerusalem
		increment_kings_purse jerusalem 500
	end_if

	if I_IsFactionAIControlled kievan_rus
		increment_kings_purse kievan_rus 500
	end_if

	if I_IsFactionAIControlled aragon
		increment_kings_purse aragon 500
	end_if

	if I_IsFactionAIControlled timurids
		increment_kings_purse timurids 500
	end_if

	if I_IsFactionAIControlled norway
		increment_kings_purse norway 500
	end_if

	if I_IsFactionAIControlled lithuania
		increment_kings_purse lithuania 500
	end_if

	if I_IsFactionAIControlled kwarezm
		increment_kings_purse kwarezm 500
	end_if

	if I_IsFactionAIControlled teutonic_order
		increment_kings_purse teutonic_order 500
	end_if

	if I_IsFactionAIControlled mongols
		increment_kings_purse mongols 500
	end_if

	if I_IsFactionAIControlled cumans
		increment_kings_purse cumans 500
	end_if

	increment_kings_purse papal_states 200

	increment_kings_purse slave 500

		terminate_monitor
	end_monitor

	monitor_event FactionTurnStart FactionIsLocal
		and I_TurnNumber = 0
		and CampaignDifficulty = medium

		set_event_counter DifficultyLevel 2

		add_events
		event historic difficulty_medium
		date 0
		end_add_events



	if I_IsFactionAIControlled england
		increment_kings_purse england 800
	end_if

	if I_IsFactionAIControlled france
		increment_kings_purse france 800
	end_if

	if I_IsFactionAIControlled hre
		increment_kings_purse hre 800
	end_if

	if I_IsFactionAIControlled spain
		increment_kings_purse spain 800
	end_if

	if I_IsFactionAIControlled venice
		increment_kings_purse venice 800
	end_if

	if I_IsFactionAIControlled sicily
		increment_kings_purse sicily 800
	end_if

	if I_IsFactionAIControlled milan
		increment_kings_purse milan 800
	end_if

	if I_IsFactionAIControlled scotland
		increment_kings_purse scotland 800
	end_if

	if I_IsFactionAIControlled denmark
		increment_kings_purse denmark 800
	end_if

	if I_IsFactionAIControlled portugal
		increment_kings_purse portugal 800
	end_if

	if I_IsFactionAIControlled poland
		increment_kings_purse poland 800
	end_if

	if I_IsFactionAIControlled hungary
		increment_kings_purse hungary 800
	end_if

	if I_IsFactionAIControlled russia
		increment_kings_purse russia 800
	end_if

	if I_IsFactionAIControlled moors
		increment_kings_purse moors 800
	end_if

	if I_IsFactionAIControlled turks
		increment_kings_purse turks 800
	end_if

	if I_IsFactionAIControlled egypt
		increment_kings_purse egypt 800
	end_if

	if I_IsFactionAIControlled byzantium
		increment_kings_purse byzantium 800
	end_if

	if I_IsFactionAIControlled jerusalem
		increment_kings_purse jerusalem 800
	end_if

	if I_IsFactionAIControlled kievan_rus
		increment_kings_purse kievan_rus 800
	end_if

	if I_IsFactionAIControlled aragon
		increment_kings_purse aragon 800
	end_if

	if I_IsFactionAIControlled timurids
		increment_kings_purse timurids 800
	end_if

	if I_IsFactionAIControlled norway
		increment_kings_purse norway 800
	end_if

	if I_IsFactionAIControlled lithuania
		increment_kings_purse lithuania 800
	end_if

	if I_IsFactionAIControlled kwarezm
		increment_kings_purse kwarezm 800
	end_if

	if I_IsFactionAIControlled teutonic_order
		increment_kings_purse teutonic_order 800
	end_if

	if I_IsFactionAIControlled mongols
		increment_kings_purse mongols 800
	end_if

	if I_IsFactionAIControlled cumans
		increment_kings_purse cumans 800
	end_if

	increment_kings_purse papal_states 300

	increment_kings_purse slave 800

		terminate_monitor
	end_monitor

	monitor_event FactionTurnStart FactionIsLocal
		and I_TurnNumber = 0
		and CampaignDifficulty = hard

		set_event_counter DifficultyLevel 3

		add_events
		event historic difficulty_hard 
		date 0
		end_add_events



	if I_IsFactionAIControlled england
		increment_kings_purse england 1200
	end_if

	if I_IsFactionAIControlled france
		increment_kings_purse france 1200
	end_if

	if I_IsFactionAIControlled hre
		increment_kings_purse hre 1200
	end_if

	if I_IsFactionAIControlled spain
		increment_kings_purse spain 1200
	end_if

	if I_IsFactionAIControlled venice
		increment_kings_purse venice 1200
	end_if

	if I_IsFactionAIControlled sicily
		increment_kings_purse sicily 1200
	end_if

	if I_IsFactionAIControlled milan
		increment_kings_purse milan 1200
	end_if

	if I_IsFactionAIControlled scotland
		increment_kings_purse scotland 1200
	end_if

	if I_IsFactionAIControlled denmark
		increment_kings_purse denmark 1200
	end_if

	if I_IsFactionAIControlled portugal
		increment_kings_purse portugal 1200
	end_if

	if I_IsFactionAIControlled poland
		increment_kings_purse poland 1200
	end_if

	if I_IsFactionAIControlled hungary
		increment_kings_purse hungary 1200
	end_if

	if I_IsFactionAIControlled russia
		increment_kings_purse russia 1200
	end_if

	if I_IsFactionAIControlled moors
		increment_kings_purse moors 1200
	end_if

	if I_IsFactionAIControlled turks
		increment_kings_purse turks 1200
	end_if

	if I_IsFactionAIControlled egypt
		increment_kings_purse egypt 1200
	end_if

	if I_IsFactionAIControlled byzantium
		increment_kings_purse byzantium 1200
	end_if

	if I_IsFactionAIControlled jerusalem
		increment_kings_purse jerusalem 1200
	end_if

	if I_IsFactionAIControlled kievan_rus
		increment_kings_purse kievan_rus 1200
	end_if

	if I_IsFactionAIControlled aragon
		increment_kings_purse aragon 1200
	end_if

	if I_IsFactionAIControlled timurids
		increment_kings_purse timurids 1200
	end_if

	if I_IsFactionAIControlled norway
		increment_kings_purse norway 1200
	end_if

	if I_IsFactionAIControlled lithuania
		increment_kings_purse lithuania 1200
	end_if

	if I_IsFactionAIControlled kwarezm
		increment_kings_purse kwarezm 1200
	end_if

	if I_IsFactionAIControlled teutonic_order
		increment_kings_purse teutonic_order 1200
	end_if

	if I_IsFactionAIControlled mongols
		increment_kings_purse mongols 1200
	end_if

	if I_IsFactionAIControlled cumans
		increment_kings_purse cumans 1200
	end_if

	increment_kings_purse papal_states 400

	increment_kings_purse slave 1200

		terminate_monitor
	end_monitor

	monitor_event FactionTurnStart FactionIsLocal
		and I_TurnNumber = 0
		and CampaignDifficulty = very_hard

		set_event_counter DifficultyLevel 4

		add_events
		event historic difficulty_very_hard 
		date 0
		end_add_events



	if I_IsFactionAIControlled england
		increment_kings_purse england 1600
	end_if

	if I_IsFactionAIControlled france
		increment_kings_purse france 1600
	end_if

	if I_IsFactionAIControlled hre
		increment_kings_purse hre 1600
	end_if

	if I_IsFactionAIControlled spain
		increment_kings_purse spain 1600
	end_if

	if I_IsFactionAIControlled venice
		increment_kings_purse venice 1600
	end_if

	if I_IsFactionAIControlled sicily
		increment_kings_purse sicily 1600
	end_if

	if I_IsFactionAIControlled milan
		increment_kings_purse milan 1600
	end_if

	if I_IsFactionAIControlled scotland
		increment_kings_purse scotland 1600
	end_if

	if I_IsFactionAIControlled denmark
		increment_kings_purse denmark 1600
	end_if

	if I_IsFactionAIControlled portugal
		increment_kings_purse portugal 1600
	end_if

	if I_IsFactionAIControlled poland
		increment_kings_purse poland 1600
	end_if

	if I_IsFactionAIControlled hungary
		increment_kings_purse hungary 1600
	end_if

	if I_IsFactionAIControlled russia
		increment_kings_purse russia 1600
	end_if

	if I_IsFactionAIControlled moors
		increment_kings_purse moors 1600
	end_if

	if I_IsFactionAIControlled turks
		increment_kings_purse turks 1600
	end_if

	if I_IsFactionAIControlled egypt
		increment_kings_purse egypt 1600
	end_if

	if I_IsFactionAIControlled byzantium
		increment_kings_purse byzantium 1600
	end_if

	if I_IsFactionAIControlled jerusalem
		increment_kings_purse jerusalem 1600
	end_if

	if I_IsFactionAIControlled kievan_rus
		increment_kings_purse kievan_rus 1600
	end_if

	if I_IsFactionAIControlled aragon
		increment_kings_purse aragon 1600
	end_if

	if I_IsFactionAIControlled timurids
		increment_kings_purse timurids 1600
	end_if

	if I_IsFactionAIControlled norway
		increment_kings_purse norway 1600
	end_if

	if I_IsFactionAIControlled lithuania
		increment_kings_purse lithuania 1600
	end_if

	if I_IsFactionAIControlled kwarezm
		increment_kings_purse kwarezm 1600
	end_if

	if I_IsFactionAIControlled teutonic_order
		increment_kings_purse teutonic_order 1600
	end_if

	if I_IsFactionAIControlled mongols
		increment_kings_purse mongols 1600
	end_if

	if I_IsFactionAIControlled cumans
		increment_kings_purse cumans 1600
	end_if

	increment_kings_purse papal_states 400
	
	increment_kings_purse slave 1600

		terminate_monitor
	end_monitor


;********************************************************
    set_event_counter is_the_ai 0 

    monitor_event PreFactionTurnStart FactionIsLocal

        set_event_counter is_the_ai 0

    end_monitor

    monitor_event PreFactionTurnStart not FactionIsLocal

        set_event_counter is_the_ai 1

    end_monitor
;********************************************************

;-------------- BYZANTINE HUMAN/AI PLAYER

  monitor_event FactionTurnStart FactionIsLocal
		and I_LocalFaction byzantium
      
      set_event_counter byzantine_player 1
      set_event_counter byzantine_ai 0
      terminate_monitor
  end_monitor

  monitor_event FactionTurnStart FactionIsLocal
		and not I_LocalFaction byzantium
      
      set_event_counter byzantine_player 0
      set_event_counter byzantine_ai 1
      terminate_monitor
  end_monitor		
  
;-------------- BYZANTINE LEADER BATTLE MODELS----------------;

  monitor_event BecomesFactionLeader FactionType byzantium
    change_battle_model byzantium leader byzantine_emperor
  end_monitor

  monitor_event BecomesFactionHeir FactionType byzantium
    change_battle_model byzantium heir byzantine_heir
  end_monitor
  
;--------------GENOESE REINFORCEMENTS AT CAFFA----------------;

	monitor_event FactionTurnStart FactionIsLocal
		;and IsFactionAIControlled
		and I_TurnNumber = 0
		and I_LocalFaction byzantium

		spawn_army 
			faction milan
			character	Francesco, general, age 28, x 329, y 170
        unit    Feudal Knights				exp 2 armour 0 weapon_lvl 0
        unit		Armored Sergeants				exp 1 armour 1 weapon_lvl 0
        unit		Armored Sergeants				exp 0 armour 1 weapon_lvl 0
        unit		Urban Crossbow Militia				exp 2 armour 2 weapon_lvl 0
        unit		Urban Crossbow Militia				exp 2 armour 2 weapon_lvl 0
        unit		Urban Crossbow Militia				exp 2 armour 2 weapon_lvl 0
        unit		Urban Crossbow Militia				exp 1 armour 2 weapon_lvl 0
        unit		Feudal Knights				exp 2 armour 0 weapon_lvl 0
        unit    Feudal Knights				exp 2 armour 0 weapon_lvl 0
        unit    Dismounted Feudal Knights				exp 2 armour 0 weapon_lvl 0
      end
      add_money milan 10000
      terminate_monitor
		
	end_monitor

;================== AI Reinforcements ===================
;--- Startup Reinforcement
monitor_event FactionTurnStart FactionType england
	and not FactionIsLocal

	if I_EventCounter DifficultyLevel <= 2
		spawn_army
			faction england
			character	random_name, named character, age 20, x 83, y 220, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	NE Bodyguard		exp 2 armour 0 weapon_lvl 0
		end
	end_if

	if I_EventCounter DifficultyLevel >= 3
		spawn_army 
			faction england
			character	random_name, named character, age 30, x 78, y 218, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	NE Bodyguard		exp 2 armour 1 weapon_lvl 0
			unit	Norman Cavalry		exp 1 armour 0 weapon_lvl 0
			unit	Fyrd Spearmen		exp 0 armour 0 weapon_lvl 0
			unit	Norman Serjeants		exp 1 armour 0 weapon_lvl 0
			unit	Norman Serjeants		exp 0 armour 0 weapon_lvl 0
			unit	Norman Serjeants		exp 0 armour 0 weapon_lvl 0
			unit	Longbowmen		exp 2 armour 0 weapon_lvl 0
			unit	Longbowmen		exp 1 armour 0 weapon_lvl 0
			unit	Longbowmen		exp 0 armour 0 weapon_lvl 0
		end
		console_command add_money england, 5000
	end_if

terminate_monitor
end_monitor 

monitor_event FactionTurnStart FactionType france
	and not FactionIsLocal

	if I_EventCounter DifficultyLevel <= 2
		spawn_army 
			faction france
			character	random_name, named character, age 20, x 92, y 202, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	NE Bodyguard		exp 2 armour 0 weapon_lvl 0
		end
	end_if

	if I_EventCounter DifficultyLevel >= 3
		spawn_army 
			faction france
			character	random_name, named character, age 30, x 94, y 199, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	NE Bodyguard		exp 2 armour 1 weapon_lvl 0
			unit	Mailed Knights		exp 1 armour 0 weapon_lvl 0
			unit	Spear Militia		exp 0 armour 0 weapon_lvl 0
			unit	Spear Militia		exp 2 armour 0 weapon_lvl 0
			unit	Armored Sergeants		exp 0 armour 0 weapon_lvl 0
			unit	Light Men at Arms		exp 0 armour 0 weapon_lvl 0
			unit	Light Men at Arms		exp 0 armour 0 weapon_lvl 0
			unit	Crossbow Militia	exp 2 armour 0 weapon_lvl 0
			unit	Crossbow Militia	exp 1 armour 0 weapon_lvl 0
		end
		console_command add_money france, 5000
	end_if

terminate_monitor
end_monitor 

monitor_event FactionTurnStart FactionType hre
	and not FactionIsLocal

	if I_EventCounter DifficultyLevel <= 2
		spawn_army 
			faction hre
			character	random_name, named character, age 20, x 143, y 207, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	NE Bodyguard		exp 2 armour 0 weapon_lvl 0
		end
	end_if

	if I_EventCounter DifficultyLevel >= 3
		spawn_army 
			faction hre
			character	random_name, named character, age 30, x 156, y 201, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	NE Bodyguard		exp 2 armour 1 weapon_lvl 0
			unit	Mailed Knights		exp 1 armour 0 weapon_lvl 0
			unit	Light Swordsmen		exp 2 armour 0 weapon_lvl 0
			unit	Armored Sergeants		exp 1 armour 0 weapon_lvl 0
			unit	Armored Sergeants		exp 0 armour 0 weapon_lvl 0
			unit	Armored Sergeants		exp 1 armour 0 weapon_lvl 0
			unit	Armored Sergeants		exp 0 armour 0 weapon_lvl 0
			unit	Spear Militia		exp 1 armour 0 weapon_lvl 0
			unit	Spear Militia		exp 0 armour 0 weapon_lvl 0
			unit	Crossbow Militia		exp 1 armour 0 weapon_lvl 0
			unit	Crossbow Militia	exp 0 armour 0 weapon_lvl 0
		end
		console_command add_money hre, 5000
	end_if

terminate_monitor
end_monitor 

monitor_event FactionTurnStart FactionType spain
	and not FactionIsLocal

	if I_EventCounter DifficultyLevel <= 2
		spawn_army 
			faction spain
			character	random_name, named character, age 20, x 32, y 148, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	SE Bodyguard		exp 2 armour 0 weapon_lvl 0
		end
	end_if

	if I_EventCounter DifficultyLevel > 2
		spawn_army 
			faction spain
			character	random_name, named character, age 30, x 38, y 152, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	SE Bodyguard		exp 2 armour 1 weapon_lvl 0
			unit	Jinetes		exp 1 armour 0 weapon_lvl 0
			unit	Jinetes		exp 1 armour 0 weapon_lvl 0
			unit	Light Swordsmen		exp 0 armour 0 weapon_lvl 0
			unit	Spear Militia		exp 2 armour 0 weapon_lvl 0
			unit	Swordsmen Militia		exp 1 armour 0 weapon_lvl 0
			unit	Swordsmen Militia		exp 0 armour 0 weapon_lvl 0
			unit	Peasant Archers		exp 2 armour 0 weapon_lvl 0
			unit	Peasant Archers		exp 1 armour 0 weapon_lvl 0
		end
		console_command add_money spain, 5000
	end_if

terminate_monitor
end_monitor 

monitor_event FactionTurnStart FactionType venice
	and not FactionIsLocal

	if I_EventCounter DifficultyLevel <= 2
		spawn_army 
			faction venice
			character	random_name, named character, age 20, x 161, y 173, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	SE Bodyguard		exp 2 armour 0 weapon_lvl 0
		end
	end_if

	if I_EventCounter DifficultyLevel >= 3
		spawn_army 
			faction venice
			character	random_name, named character, age 30, x 165, y 173, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	SE Bodyguard		exp 2 armour 1 weapon_lvl 0
			unit	Italian Cavalry Militia	exp 1 armour 0 weapon_lvl 0
			unit	Armored Sergeants	exp 0 armour 0 weapon_lvl 0
			unit	Armored Sergeants	exp 1 armour 0 weapon_lvl 0
			unit	Pavise Spear Militia	exp 0 armour 0 weapon_lvl 0
			unit	Pavise Spear Militia	exp 0 armour 0 weapon_lvl 0
			unit	Urban Crossbow Militia	exp 2 armour 2 weapon_lvl 0
			unit	Urban Crossbow Militia	exp 1 armour 2 weapon_lvl 0
			unit	Urban Crossbow Militia	exp 1 armour 2 weapon_lvl 0
		end
		console_command add_money venice, 5000
	end_if
	
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType sicily
	and not FactionIsLocal

	if I_EventCounter DifficultyLevel <= 2
		spawn_army 
			faction sicily
			character	random_name, named character, age 20, x 177, y 114, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	SE Bodyguard		exp 2 armour 0 weapon_lvl 0
		end
	end_if

	if I_EventCounter DifficultyLevel >= 3
		spawn_army 
			faction sicily
			character	random_name, named character, age 30, x 170, y 117, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	SE Bodyguard		exp 2 armour 1 weapon_lvl 0
			unit	Norman Cavalry	exp 1 armour 0 weapon_lvl 0
			unit	Pavise Spear Militia	exp 2 armour 0 weapon_lvl 0
			unit	Pavise Spear Militia	exp 1 armour 0 weapon_lvl 0
			unit	Pavise Spear Militia	exp 0 armour 0 weapon_lvl 0
			unit	Sicilian Muslim Archers	exp 1 armour 0 weapon_lvl 0
			unit	Sicilian Muslim Archers	exp 0 armour 0 weapon_lvl 0
			unit	Urban Crossbow Militia	exp 1 armour 2 weapon_lvl 0
			unit	Urban Crossbow Militia	exp 0 armour 2 weapon_lvl 0
		end
		console_command add_money sicily, 5000
	end_if

terminate_monitor
end_monitor 

monitor_event FactionTurnStart FactionType milan
	and not FactionIsLocal

	if I_EventCounter DifficultyLevel <= 2
		spawn_army 
			faction milan
			character	random_name, named character, age 20, x 137, y 168, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	SE Bodyguard		exp 2 armour 0 weapon_lvl 0
		end
	end_if

	if I_EventCounter DifficultyLevel >= 3
		spawn_army 
			faction milan
			character	random_name, named character, age 30, x 139, y 168, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 3 , GoodCommander 2 , ReligionStarter 1
			unit	SE Bodyguard		exp 2 armour 1 weapon_lvl 0
			unit	Italian Cavalry Militia	exp 1 armour 0 weapon_lvl 0
			unit	Pavise Spear Militia	exp 1 armour 0 weapon_lvl 0
			unit	Pavise Spear Militia	exp 0 armour 0 weapon_lvl 0
			unit	Sergeant Spearmen	exp 2 armour 0 weapon_lvl 0
			unit	Sergeant Spearmen	exp 1 armour 0 weapon_lvl 0
			unit	Urban Crossbow Militia	exp 0 armour 2 weapon_lvl 0
			unit	Urban Crossbow Militia	exp 0 armour 2 weapon_lvl 0
			unit	Urban Crossbow Militia	exp 0 armour 2 weapon_lvl 0
		end
		console_command add_money milan, 5000
	end_if

terminate_monitor
end_monitor 

monitor_event FactionTurnStart FactionType scotland
	and not FactionIsLocal

	if I_EventCounter DifficultyLevel <= 2
		spawn_army 
			faction scotland
			character	random_name, named character, age 20, x 53, y 253, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	NE Bodyguard		exp 2 armour 0 weapon_lvl 0
		end
	end_if

	if I_EventCounter DifficultyLevel >= 3
		spawn_army 
			faction scotland
			character	random_name, named character, age 30, x 62, y 247, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 3 , GoodCommander 2 , ReligionStarter 1
			unit	NE Bodyguard		exp 2 armour 1 weapon_lvl 0
			unit	Border Horse		exp 1 armour 0 weapon_lvl 0
			unit	Highlanders		exp 1 armour 0 weapon_lvl 0
			unit	Highlanders		exp 0 armour 0 weapon_lvl 0
			unit	Highland Nobles		exp 1 armour 0 weapon_lvl 0
			unit	Scots Pike Militia		exp 1 armour 0 weapon_lvl 0
			unit	Scots Pike Militia		exp 2 armour 0 weapon_lvl 0
			unit	Scots Pike Militia		exp 2 armour 0 weapon_lvl 0
			unit	Highland Archers	exp 1 armour 0 weapon_lvl 0
		end
		console_command add_money scotland, 5000
	end_if

terminate_monitor
end_monitor 

monitor_event FactionTurnStart FactionType cumans
	and not FactionIsLocal

	if I_EventCounter DifficultyLevel <= 2
		spawn_army 
			faction cumans
			character	random_name, named character, age 20, x 440, y 250, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	Cuman Bodyguard		exp 2 armour 0 weapon_lvl 0
		end
	end_if

	if I_EventCounter DifficultyLevel >= 3
		spawn_army 
			faction cumans
			character	random_name, named character, age 30, x 431, y 250, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	Cuman Bodyguard		exp 2 armour 1 weapon_lvl 0
			unit	Yasi Archers	exp 1 armour 0 weapon_lvl 0
			unit	Cuman Horse Militia	exp 2 armour 0 weapon_lvl 0
			unit	Cuman Horse Militia	exp 1 armour 0 weapon_lvl 0
			unit	Cuman Horse Militia	exp 1 armour 0 weapon_lvl 0
			unit	Kasogi Senior Militia	exp 0 armour 0 weapon_lvl 0
			unit	Kasogi Senior Militia	exp 0 armour 0 weapon_lvl 0
			unit	Steppe Alans	exp 0 armour 0 weapon_lvl 0
		end
		console_command add_money cumans, 5000
	end_if

terminate_monitor
end_monitor 

monitor_event FactionTurnStart FactionType byzantium
	and not FactionIsLocal

	if I_EventCounter DifficultyLevel <= 2
		spawn_army 
			faction byzantium
			character	random_name, named character, age 20, x 278, y 148, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	Greek Bodyguard		exp 2 armour 0 weapon_lvl 0
		end
	end_if

	if I_EventCounter DifficultyLevel >= 3
		spawn_army 
			faction byzantium
			character	random_name, named character, age 30, x 282, y 143, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 3 , GoodCommander 2 , ReligionStarter 1
			unit	Greek Bodyguard		exp 2 armour 1 weapon_lvl 0
			unit	Stratiotae		exp 1 armour 0 weapon_lvl 0
			unit	Skythikoi		exp 1 armour 0 weapon_lvl 0
			unit	Scoutatoi	exp 0 armour 0 weapon_lvl 0
			unit	Scoutatoi	exp 0 armour 0 weapon_lvl 0
			unit	Scoutatoi	exp 1 armour 0 weapon_lvl 0
			unit	Scoutatoi	exp 0 armour 0 weapon_lvl 0
			unit	Scoutatoi Swordsmen	exp 1 armour 0 weapon_lvl 0
			unit	Scoutatoi Swordsmen	exp 0 armour 0 weapon_lvl 0
		end
		console_command add_money byzantium, 5000
	end_if

terminate_monitor
end_monitor 

monitor_event FactionTurnStart FactionType russia
	and not FactionIsLocal

	if I_EventCounter DifficultyLevel <= 2
		spawn_army 
			faction russia
			character	random_name, named character, age 20, x 301, y 275, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	EE Bodyguard		exp 2 armour 0 weapon_lvl 0
		end
	end_if

	if I_EventCounter DifficultyLevel >= 3
		spawn_army 
			faction russia
			character	random_name, named character, age 30, x 301, y 269, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	EE Bodyguard		exp 2 armour 1 weapon_lvl 0
			unit	Druzhina			exp 1 armour 0 weapon_lvl 0
			unit	Pechenegs			exp 1 armour 0 weapon_lvl 0
			unit	Pechenegs	exp 0 armour 0 weapon_lvl 0
			unit	Dismounted Druzhina	exp 1 armour 0 weapon_lvl 0
			unit	Smolensk Infantry	exp 0 armour 0 weapon_lvl 0
			unit	Rus Senior Militia	exp 1 armour 0 weapon_lvl 0
			unit	Rus Senior Militia	exp 0 armour 0 weapon_lvl 0
			unit	Woodsmen	exp 0 armour 0 weapon_lvl 0
			unit	Woodsmen	exp 0 armour 0 weapon_lvl 0
		end
		console_command add_money russia, 5000
	end_if

terminate_monitor
end_monitor 

monitor_event FactionTurnStart FactionType poland
	and not FactionIsLocal

	if I_EventCounter DifficultyLevel <= 2
		spawn_army 
			faction poland
			character	random_name, named character, age 20, x 222, y 213, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	NE Bodyguard		exp 2 armour 0 weapon_lvl 0
		end
	end_if

	if I_EventCounter DifficultyLevel >= 3
		spawn_army 
			faction poland
			character	random_name, named character, age 30, x 215, y 210, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 3 , ReligionStarter 1
			unit	NE Bodyguard		exp 2 armour 1 weapon_lvl 0
			unit	Polish Shooters		exp 1 armour 0 weapon_lvl 0
			unit	Polish Nobles		exp 1 armour 0 weapon_lvl 0
			unit	Light Swordsmen		exp 0 armour 0 weapon_lvl 0
			unit	Smolensk Infantry		exp 0 armour 0 weapon_lvl 0
			unit	EE Spear Militia	exp 1 armour 0 weapon_lvl 0
			unit	EE Spear Militia	exp 0 armour 0 weapon_lvl 0
			unit	Lithuanian Archers	exp 1 armour 0 weapon_lvl 0
			unit	Lithuanian Archers	exp 0 armour 0 weapon_lvl 0
		end
		console_command add_money poland, 5000
	end_if

terminate_monitor
end_monitor 

monitor_event FactionTurnStart FactionType moors
	and not FactionIsLocal

	if I_EventCounter DifficultyLevel <= 2
		spawn_army 
			faction moors
			character	random_name, named character, age 20, x 40, y 113, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	ME Bodyguard		exp 2 armour 0 weapon_lvl 0
		end
	end_if

	if I_EventCounter DifficultyLevel >= 3
		spawn_army 
			faction moors
			character	random_name, named character, age 30, x 44, y 119, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 3 , ReligionStarter 1
			unit	ME Bodyguard		exp 2 armour 1 weapon_lvl 0
			unit	Desert Cavalry	exp 1 armour 0 weapon_lvl 0
			unit	Urban Militia	exp 1 armour 0 weapon_lvl 0
			unit	Urban Militia	exp 0 armour 0 weapon_lvl 0
			unit	ME Spear Militia	exp 0 armour 0 weapon_lvl 0
			unit	Dismounted Arab Cavalry	exp 0 armour 0 weapon_lvl 0
			unit	Dismounted Arab Cavalry	exp 0 armour 0 weapon_lvl 0
			unit	Desert Archers		exp 1 armour 0 weapon_lvl 0
			unit	Desert Archers		exp 0 armour 0 weapon_lvl 0
			unit	Desert Archers		exp 1 armour 0 weapon_lvl 0
			unit	Desert Archers		exp 0 armour 0 weapon_lvl 0
			unit	Desert Archers		exp 1 armour 0 weapon_lvl 0
			unit	Desert Archers		exp 0 armour 0 weapon_lvl 0
		end
		console_command add_money moors, 5000
	end_if

terminate_monitor
end_monitor 

monitor_event FactionTurnStart FactionType turks
	and not FactionIsLocal

	if I_EventCounter DifficultyLevel <= 2
		spawn_army 
			faction turks
			character	random_name, named character, age 20, x 339, y 133, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	ME Bodyguard		exp 2 armour 0 weapon_lvl 0
		end
	end_if

	if I_EventCounter DifficultyLevel >= 3
		spawn_army 
			faction turks
			character	random_name, named character, age 30, x 312, y 119, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	ME Bodyguard		exp 2 armour 1 weapon_lvl 0
			unit	Turkomans		exp 1 armour 0 weapon_lvl 0
			unit	Turkomans		exp 1 armour 0 weapon_lvl 0
			unit	Saracen Militia		exp 1 armour 0 weapon_lvl 0
			unit	Saracen Militia		exp 0 armour 0 weapon_lvl 0
			unit	Ottoman Infantry		exp 1 armour 0 weapon_lvl 0
			unit	Ottoman Infantry		exp 0 armour 0 weapon_lvl 0
			unit	Turkish Archers		exp 0 armour 0 weapon_lvl 0
			unit	Turkish Archers		exp 0 armour 0 weapon_lvl 0
		end
		console_command add_money turks, 5000
	end_if

terminate_monitor
end_monitor 

monitor_event FactionTurnStart FactionType egypt
	and not FactionIsLocal

	if I_EventCounter DifficultyLevel <= 2
		spawn_army 
			faction egypt
			character	random_name, named character, age 20, x 309, y 60, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	ME Bodyguard		exp 2 armour 0 weapon_lvl 0
		end
	end_if

	if I_EventCounter DifficultyLevel >= 3
		spawn_army 
			faction egypt
			character	random_name, named character, age 30, x 302, y 59, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	ME Bodyguard		exp 2 armour 1 weapon_lvl 0
			unit	Arab Cavalry	exp 1 armour 0 weapon_lvl 0
			unit	Dismounted Arab Cavalry		exp 1 armour 0 weapon_lvl 0
			unit	Dismounted Arab Cavalry		exp 0 armour 0 weapon_lvl 0
			unit	ME Spear Militia	exp 0 armour 0 weapon_lvl 0
			unit	ME Archer Militia	exp 0 armour 0 weapon_lvl 0
			unit	ME Archer Militia		exp 1 armour 0 weapon_lvl 0
			unit	Desert Archers		exp 0 armour 0 weapon_lvl 0
			unit	Desert Archers		exp 0 armour 0 weapon_lvl 0
		end
		console_command add_money egypt, 5000
	end_if

terminate_monitor
end_monitor 

monitor_event FactionTurnStart FactionType denmark
	and not FactionIsLocal

	if I_EventCounter DifficultyLevel <= 2
		spawn_army 
			faction denmark
			character	random_name, named character, age 20, x 146, y 253, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	NE Bodyguard		exp 2 armour 0 weapon_lvl 0
		end
	end_if

	if I_EventCounter DifficultyLevel >= 3
		spawn_army 
			faction denmark
			character	random_name, named character, age 30, x 147, y 246, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	NE Bodyguard		exp 2 armour 1 weapon_lvl 0
			unit	Huscarls		exp 1 armour 0 weapon_lvl 0
			unit	Norse Swordsmen		exp 1 armour 0 weapon_lvl 0
			unit	Dismounted Huscarls		exp 1 armour 0 weapon_lvl 0
			unit	Spear Militia		exp 0 armour 0 weapon_lvl 0
			unit	Spear Militia		exp 0 armour 0 weapon_lvl 0
			unit	Norse Archers		exp 1 armour 0 weapon_lvl 0
			unit	Norse Archers		exp 0 armour 0 weapon_lvl 0
		end
		console_command add_money denmark, 5000
	end_if

terminate_monitor
end_monitor 

monitor_event FactionTurnStart FactionType portugal
	and not FactionIsLocal

	if I_EventCounter DifficultyLevel <= 2
		spawn_army 
			faction portugal
			character	random_name, named character, age 20, x 17, y 123, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	SE Bodyguard		exp 2 armour 0 weapon_lvl 0
		end
	end_if

	if I_EventCounter DifficultyLevel >= 3
		spawn_army 
			faction portugal
			character	random_name, named character, age 30, x 19, y 128, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	SE Bodyguard		exp 2 armour 1 weapon_lvl 0
			unit	Jinetes			exp 1 armour 0 weapon_lvl 0
			unit	Light Swordsmen			exp 1 armour 0 weapon_lvl 0
			unit	Spear Militia		exp 2 armour 0 weapon_lvl 0
			unit	Spear Militia		exp 1 armour 0 weapon_lvl 0
			unit	Lusitanian Javelinmen		exp 1 armour 0 weapon_lvl 0
			unit	Lusitanian Javelinmen		exp 0 armour 0 weapon_lvl 0
			unit	Crossbow Militia	exp 0 armour 0 weapon_lvl 0
			unit	Crossbow Militia	exp 0 armour 0 weapon_lvl 0
		end
		console_command add_money portugal, 5000
	end_if

terminate_monitor
end_monitor 

monitor_event FactionTurnStart FactionType hungary
	and not FactionIsLocal

	if I_EventCounter DifficultyLevel <= 2
		spawn_army 
			faction hungary
			character	random_name, named character, age 20, x 206, y 179, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	NE Bodyguard		exp 2 armour 0 weapon_lvl 0
		end
	end_if

	if I_EventCounter DifficultyLevel >= 3
		spawn_army 
			faction hungary
			character	random_name, named character, age 30, x 215, y 188, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	NE Bodyguard		exp 2 armour 1 weapon_lvl 0
			unit	Magyar Cavalry		exp 2 armour 0 weapon_lvl 0
			unit	Hungarian Nobles		exp 1 armour 0 weapon_lvl 0
			unit	Pavise Spearmen		exp 0 armour 0 weapon_lvl 0
			unit	Pavise Spearmen		exp 0 armour 0 weapon_lvl 0
			unit	EE Spear Militia	exp 2 armour 0 weapon_lvl 0
			unit	EE Spear Militia	exp 1 armour 0 weapon_lvl 0
			unit	Bosnian Archers	exp 0 armour 0 weapon_lvl 0
			unit	Bosnian Archers	exp 0 armour 0 weapon_lvl 0
		end
		console_command add_money hungary, 5000
	end_if

terminate_monitor
end_monitor 

monitor_event FactionTurnStart FactionType jerusalem
	and not FactionIsLocal

	if I_EventCounter DifficultyLevel <= 2
		spawn_army 
			faction jerusalem
			character	random_name, named character, age 20, x 329, y 78, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	NE Bodyguard		exp 2 armour 0 weapon_lvl 0
		end
	end_if

	if I_EventCounter DifficultyLevel >= 3
		spawn_army 
			faction jerusalem
			character	random_name, named character, age 30, x 331, y 77, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 2 , ReligionStarter 1
			unit	NE Bodyguard		exp 2 armour 1 weapon_lvl 0
			unit	Knights of Jerusalem		exp 1 armour 0 weapon_lvl 0
			unit	Mounted Sergeants	exp 1 armour 0 weapon_lvl 0
			unit	Templar Sergeant	exp 1 armour 0 weapon_lvl 0
			unit	Templar Sergeant	exp 1 armour 0 weapon_lvl 0
			unit	Templar Sergeant	exp 1 armour 0 weapon_lvl 0
			unit	Templar Sergeant	exp 1 armour 0 weapon_lvl 0
			unit	Templar Crossbowmen	exp 0 armour 0 weapon_lvl 0
			unit	Templar Crossbowmen	exp 0 armour 0 weapon_lvl 0
			unit	Dismounted Knights Of Jerusalem		exp 1 armour 0 weapon_lvl 0	   
			unit	Dismounted Knights Of Jerusalem		exp 1 armour 0 weapon_lvl 0
			unit	Dismounted Knights Of Jerusalem		exp 1 armour 0 weapon_lvl 0
		end
		console_command add_money jerusalem, 5000
	end_if

terminate_monitor
end_monitor 

monitor_event FactionTurnStart FactionType lithuania
	and not FactionIsLocal

	if I_EventCounter DifficultyLevel <= 2
		spawn_army 
			faction lithuania
			character	random_name, named character, age 20, x 262, y 240, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	Lith Bodyguard		exp 2 armour 0 weapon_lvl 0
		end
	end_if

	if I_EventCounter DifficultyLevel >= 3
		spawn_army 
			faction lithuania
			character	random_name, named character, age 30, x 258, y 239, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	Lith Bodyguard		exp 2 armour 1 weapon_lvl 0
			unit	Lithuanian Cavalry	exp 1 armour 0 weapon_lvl 0
			unit	Lithuanian Cavalry	exp 1 armour 0 weapon_lvl 0
			unit	Lithuanian Cavalry	exp 1 armour 0 weapon_lvl 0
			unit	Ducal Cavalry		exp 1 armour 0 weapon_lvl 0
			unit	Lithuanian Axemen	exp 1 armour 0 weapon_lvl 0
			unit	Lithuanian Axemen	exp 0 armour 0 weapon_lvl 0
			unit	Baltic Spearmen		exp 1 armour 0 weapon_lvl 0
			unit	Baltic Spearmen		exp 0 armour 0 weapon_lvl 0
			unit	Lithuanian Archers		exp 1 armour 0 weapon_lvl 0
			unit	Lithuanian Archers		exp 0 armour 0 weapon_lvl 0
		end
		console_command add_money lithuania, 5000
	end_if

terminate_monitor
end_monitor 

monitor_event FactionTurnStart FactionType kievan_rus
	and not FactionIsLocal

	if I_EventCounter DifficultyLevel <= 2
		spawn_army 
			faction kievan_rus
			character	random_name, named character, age 20, x 292, y 214, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	EE Bodyguard		exp 2 armour 0 weapon_lvl 0
		end
	end_if

	if I_EventCounter DifficultyLevel >= 3
		spawn_army 
			faction kievan_rus
			character	random_name, named character, age 30, x 295, y 209, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	EE Bodyguard		exp 2 armour 1 weapon_lvl 0
			unit	Pechenegs			exp 1 armour 0 weapon_lvl 0
			unit	Aldari	exp 1 armour 0 weapon_lvl 0
			unit	Berdiche Militia	exp 0 armour 0 weapon_lvl 0
			unit	Smolensk Infantry	exp 0 armour 0 weapon_lvl 0
			unit	Smolensk Infantry	exp 0 armour 0 weapon_lvl 0
			unit	EE Archer Militia	exp 0 armour 0 weapon_lvl 0
		end
		console_command add_money kievan_rus, 5000
	end_if

terminate_monitor
end_monitor 

monitor_event FactionTurnStart FactionType aragon
	and not FactionIsLocal

	if I_EventCounter DifficultyLevel <= 2
		spawn_army 
			faction aragon
			character	random_name, named character, age 20, x 83, y 150, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	SE Bodyguard		exp 2 armour 0 weapon_lvl 0
		end
	end_if

	if I_EventCounter DifficultyLevel >= 3
		spawn_army 
			faction aragon
			character	random_name, named character, age 30, x 76, y 147, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	SE Bodyguard		exp 2 armour 1 weapon_lvl 0
			unit	Mailed Knights		exp 0 armour 0 weapon_lvl 0
			unit	Almughavars		exp 1 armour 0 weapon_lvl 0
			unit	Almughavars		exp 0 armour 0 weapon_lvl 0
			unit	Light Men at Arms		exp 1 armour 0 weapon_lvl 0
			unit	Light Men at Arms		exp 0 armour 0 weapon_lvl 0
			unit	Peasant Archers		exp 1 armour 0 weapon_lvl 0
			unit	Spear Militia		exp 2 armour 0 weapon_lvl 0
			unit	Spear Militia		exp 1 armour 0 weapon_lvl 0
		end
		console_command add_money aragon, 5000
	end_if

terminate_monitor
end_monitor 


monitor_event FactionTurnStart FactionType norway
	and not FactionIsLocal

	if I_EventCounter DifficultyLevel <= 2
		spawn_army 
			faction norway
			character	random_name, named character, age 20, x 114, y 280, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	NE Bodyguard		exp 2 armour 0 weapon_lvl 0
		end
	end_if

	if I_EventCounter DifficultyLevel >= 3
		spawn_army 
			faction norway
			character	random_name, named character, age 30, x 116, y 279, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	NE Bodyguard		exp 1 armour 1 weapon_lvl 0
			unit	Svenner		exp 1 armour 1 weapon_lvl 0
			unit	Dismounted Huscarls		exp 2 armour 0 weapon_lvl 0
			unit	Norse Swordsmen		exp 2 armour 0 weapon_lvl 0
			unit	Norse Swordsmen		exp 1 armour 0 weapon_lvl 0
			unit	Viking Raiders		exp 0 armour 0 weapon_lvl 0
			unit	Spear Militia		exp 1 armour 0 weapon_lvl 0
			unit	Spear Militia		exp 0 armour 0 weapon_lvl 0
			unit	Spear Militia		exp 0 armour 0 weapon_lvl 0
			unit	Norse Archers		exp 0 armour 0 weapon_lvl 0
		end
		console_command add_money norway, 5000
	end_if

terminate_monitor
end_monitor 

monitor_event FactionTurnStart FactionType kwarezm
	and not FactionIsLocal

	if I_EventCounter DifficultyLevel <= 2
		spawn_army 
			faction kwarezm
			character	random_name, named character, age 20, x 449, y 93, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	ME Bodyguard		exp 2 armour 0 weapon_lvl 0
		end
	end_if

	if I_EventCounter DifficultyLevel >= 3
		spawn_army 
			faction kwarezm
			character	random_name, named character, age 30, x 499, y 93, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	ME Bodyguard		exp 2 armour 1 weapon_lvl 0
			unit	Turkomans		exp 1 armour 0 weapon_lvl 0
			unit	Ghulams		exp 1 armour 0 weapon_lvl 0
			unit	Persian Spearmen		exp 1 armour 0 weapon_lvl 0
			unit	Persian Spearmen		exp 0 armour 0 weapon_lvl 0
			unit	Saracen Militia		exp 2 armour 0 weapon_lvl 0
			unit	Saracen Militia		exp 1 armour 0 weapon_lvl 0
			unit	Saracen Militia		exp 0 armour 0 weapon_lvl 0
			unit	Dismounted Ghulams	exp 0 armour 0 weapon_lvl 0
		end
		console_command add_money kwarezm, 5000
	end_if

terminate_monitor
end_monitor 

monitor_event FactionTurnStart FactionType teutonic_order
	and not FactionIsLocal

	if I_EventCounter DifficultyLevel <= 2
		spawn_army 
			faction teutonic_order
			character	random_name, named character, age 20, x 232, y 237, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	TO Bodyguard		exp 2 armour 0 weapon_lvl 0
		end
	end_if

	if I_EventCounter DifficultyLevel >= 3
		spawn_army 
			faction teutonic_order
			character	random_name, named character, age 30, x 224, y 238, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	NE Bodyguard		exp 2 armour 1 weapon_lvl 0
			unit	Christ Knights		exp 2 armour 0 weapon_lvl 0
			unit	Christ Knights		exp 1 armour 0 weapon_lvl 0
			unit	Sword Brethren		exp 1 armour 0 weapon_lvl 0
			unit	Sword Brethren		exp 0 armour 0 weapon_lvl 0
			unit	Order Spearmen		exp 0 armour 0 weapon_lvl 0
			unit	Order Spearmen		exp 0 armour 0 weapon_lvl 0
			unit	Prussian Archers	exp 1 armour 0 weapon_lvl 0
			unit	Prussian Archers	exp 0 armour 0 weapon_lvl 0
		end	 
        console_command add_money teutonic_order, 5000
	end_if

terminate_monitor
end_monitor 

monitor_event FactionTurnStart FactionType mongols
	and not FactionIsLocal

	if I_EventCounter DifficultyLevel <= 2
		spawn_army 
			faction mongols
			character	random_name, named character, age 20, x 502, y 160, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit	Keshikten Bodyguard		exp 2 armour 0 weapon_lvl 0
			unit	Nukeri Horse Archers	exp 3 armour 0 weapon_lvl 0
			unit	Nukeri Horse Archers	exp 3 armour 0 weapon_lvl 0
		end
	end_if

	if I_EventCounter DifficultyLevel >= 3
		spawn_army 
			faction mongols
			character	random_name, named character, age 25, x 498, y 157, label mongols4gen, family
			traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
			unit		Keshikten Bodyguard		exp 4 armour 0 weapon_lvl 0
			unit		Disamounted Turhagut			exp 3 armour 0 weapon_lvl 0
			unit		Disamounted Turhagut			exp 3 armour 0 weapon_lvl 0
			unit		Disamounted Turhagut			exp 1 armour 0 weapon_lvl 0
			unit		Khabutu Archers		exp 3 armour 0 weapon_lvl 0
			unit		Khabutu Archers		exp 3 armour 0 weapon_lvl 0
			unit		Khabutu Archers		exp 2 armour 0 weapon_lvl 0
			unit		Nukeri Horse Archers	exp 3 armour 0 weapon_lvl 0
			unit		Nukeri Horse Archers	exp 3 armour 0 weapon_lvl 0
			unit		Turhagut Lancers	exp 2 armour 0 weapon_lvl 0
			unit		Turhagut Lancers	exp 2 armour 0 weapon_lvl 0
			unit		Hoschuchi Lancers	exp 4 armour 0 weapon_lvl 0
			unit		Hoschuchi Lancers	exp 3 armour 0 weapon_lvl 0
			unit		Hoshiga Horse Archers	exp 2 armour 0 weapon_lvl 0
			unit		Hoshiga Horse Archers	exp 3 armour 0 weapon_lvl 0
			unit		Hoshiga Horse Archers	exp 3 armour 0 weapon_lvl 0
			unit		Hoshiga Horse Archers	exp 3 armour 0 weapon_lvl 0
			unit		Hoshiga Horse Archers	exp 4 armour 0 weapon_lvl 0
			unit		ME Trebuchet			exp 2 armour 0 weapon_lvl 0
			unit		ME Trebuchet			exp 2 armour 0 weapon_lvl 0
		end
	end_if

terminate_monitor
end_monitor 

;--- Turn 10 Reinforcement
monitor_event FactionTurnStart FactionType england
	and IsFactionAIControlled
	and I_TurnNumber = 10

	spawn_army
		faction england
		character	Fulk Plantagenet, named character, age 30, x 78, y 218, family
		traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1 , Royal_Blood_English 1 , BiologicalSon 1
		unit	NE Bodyguard		exp 2 armour 1 weapon_lvl 0
		unit	Norman Cavalry		exp 1 armour 0 weapon_lvl 0
		unit	Fyrd Spearmen		exp 0 armour 0 weapon_lvl 0
		unit	Longbowmen		exp 1 armour 0 weapon_lvl 0
		unit	Longbowmen		exp 0 armour 0 weapon_lvl 0
	end
	console_command add_money england, 5000
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType france
	and IsFactionAIControlled
	and I_TurnNumber = 10

	spawn_army
		faction france
		character	Gautier Capet, named character, age 30, x 94, y 199, family
		traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1 , Royal_Blood_French 1 , BiologicalSon 1
		unit	NE Bodyguard		exp 2 armour 1 weapon_lvl 0
		unit	Mailed Knights		exp 1 armour 0 weapon_lvl 0
		unit	Spear Militia		exp 0 armour 0 weapon_lvl 0
		unit	Light Men at Arms		exp 0 armour 0 weapon_lvl 0
		unit	Light Men at Arms		exp 0 armour 0 weapon_lvl 0
	end
	console_command add_money france, 5000
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType hre
	and IsFactionAIControlled
	and I_TurnNumber = 10

	spawn_army
		faction hre
		character	Bruno von_Hohenstaufen, named character, age 30, x 156, y 201, family
		traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1 , Royal_Blood_HRE 1 , BiologicalSon 1
		unit	NE Bodyguard		exp 2 armour 1 weapon_lvl 0
		unit	Dismounted Feudal Knights		exp 5 armour 0 weapon_lvl 0
		unit	Dismounted Feudal Knights		exp 5 armour 0 weapon_lvl 0
		unit	Dismounted Feudal Knights		exp 4 armour 0 weapon_lvl 0
		unit	Dismounted Feudal Knights		exp 4 armour 0 weapon_lvl 0
		unit	Dismounted Feudal Knights		exp 5 armour 0 weapon_lvl 0
		unit	Mailed Knights				exp 5 armour 0 weapon_lvl 0
		unit	Mailed Knights				exp 5 armour 0 weapon_lvl 0
		unit	Mailed Knights				exp 4 armour 0 weapon_lvl 0
		unit	Mailed Knights				exp 3 armour 0 weapon_lvl 0
		unit	Mailed Knights				exp 3 armour 0 weapon_lvl 0
		unit	Mailed Knights				exp 3 armour 0 weapon_lvl 0
	end
	console_command add_money hre, 5000
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType spain
	and IsFactionAIControlled
	and I_TurnNumber = 10

	spawn_army
		faction spain
		character	Eusebio de_Leon, named character, age 30, x 38, y 152, family
		traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1 , Royal_Blood_Spanish 1 , BiologicalSon 1
		unit	SE Bodyguard		exp 2 armour 1 weapon_lvl 0
		unit	Jinetes		exp 1 armour 0 weapon_lvl 0
		unit	Jinetes		exp 1 armour 0 weapon_lvl 0
		unit	Swordsmen Militia		exp 1 armour 0 weapon_lvl 0
		unit	Swordsmen Militia		exp 0 armour 0 weapon_lvl 0
	end
	console_command add_money spain, 5000
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType venice
	and IsFactionAIControlled
	and I_TurnNumber = 10

	spawn_army
		faction venice
		character	Bucello Ziani, named character, age 30, x 165, y 173, family
		traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1 , Royal_Blood_Venetian 1 , BiologicalSon 1
		unit	SE Bodyguard		exp 2 armour 1 weapon_lvl 0
		unit	Italian Cavalry Militia	exp 1 armour 0 weapon_lvl 0
		unit	Armored Sergeants	exp 0 armour 0 weapon_lvl 0
		unit	Urban Crossbow Militia	exp 1 armour 0 weapon_lvl 0
		unit	Urban Crossbow Militia	exp 1 armour 0 weapon_lvl 0
	end
	console_command add_money venice, 5000
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType sicily
	and IsFactionAIControlled
	and I_TurnNumber = 10

	spawn_army
		faction sicily
		character	Guaimario d_Altavilla, named character, age 30, x 170, y 117, family
		traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1 , Royal_Blood_Sicilian 1 , BiologicalSon 1
		unit	SE Bodyguard		exp 2 armour 1 weapon_lvl 0
		unit	Norman Cavalry	exp 1 armour 0 weapon_lvl 0
		unit	Urban Spear Militia	exp 2 armour 0 weapon_lvl 0
		unit	Sicilian Muslim Archers	exp 1 armour 0 weapon_lvl 0
		unit	Sicilian Muslim Archers	exp 0 armour 0 weapon_lvl 0
	end
	console_command add_money sicily, 5000
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType milan
	and IsFactionAIControlled
	and I_TurnNumber = 10

	spawn_army
		faction milan
		character	Lapo Buvalelli, named character, age 30, x 139, y 168, family
		traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1 , Royal_Blood_Milanese 1 , BiologicalSon 1
		unit	SE Bodyguard		exp 2 armour 1 weapon_lvl 0
		unit	Italian Cavalry Militia	exp 1 armour 0 weapon_lvl 0
		unit	Urban Spear Militia	exp 1 armour 0 weapon_lvl 0
		unit	Urban Crossbow Militia	exp 0 armour 0 weapon_lvl 0
		unit	Urban Crossbow Militia	exp 0 armour 0 weapon_lvl 0
	end
	console_command add_money milan, 5000
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType scotland
	and IsFactionAIControlled
	and I_TurnNumber = 10

	spawn_army
		faction scotland
		character	Amlaib mac_Donnchada, named character, age 30, x 62, y 247, family
		traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1 , Royal_Blood_Scottish 1 , BiologicalSon 1
		unit	NE Bodyguard		exp 2 armour 1 weapon_lvl 0
		unit	Border Horse		exp 1 armour 0 weapon_lvl 0
		unit	Highlanders		exp 1 armour 0 weapon_lvl 0
		unit	Scots Pike Militia		exp 2 armour 0 weapon_lvl 0
		unit	Scots Pike Militia		exp 2 armour 0 weapon_lvl 0
	end
	console_command add_money scotland, 5000
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType cumans
	and IsFactionAIControlled
	and I_TurnNumber = 10

	spawn_army
		faction cumans
		character	Bartan of_the_Tatar, named character, age 30, x 431, y 250, family
		traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1 , Royal_Blood_Cumans 1 , BiologicalSon 1
		unit	Cuman Bodyguard		exp 2 armour 1 weapon_lvl 0
		unit	Yasi Archers	exp 1 armour 0 weapon_lvl 0
		unit	Cuman Horse Militia	exp 2 armour 0 weapon_lvl 0
		unit	Steppe Alans	exp 0 armour 0 weapon_lvl 0
		unit	Steppe Alans	exp 0 armour 0 weapon_lvl 0
	end
	console_command add_money cumans, 5000
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType byzantium
	and IsFactionAIControlled
	and I_TurnNumber = 10

	spawn_army
		faction byzantium
		character	Arsenios Laskaris, named character, age 30, x 282, y 143, family
		traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1 , Royal_Blood_Greek 1 , BiologicalSon 1
		unit	Greek Bodyguard		exp 2 armour 1 weapon_lvl 0
		unit	Cavalarii		exp 1 armour 0 weapon_lvl 0
		unit	Skythikoi		exp 1 armour 0 weapon_lvl 0
		unit	Scoutatoi Swordsmen	exp 1 armour 0 weapon_lvl 0
		unit	Scoutatoi Swordsmen	exp 0 armour 0 weapon_lvl 0
	end
	console_command add_money byzantium, 5000
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType russia
	and IsFactionAIControlled
	and I_TurnNumber = 10

	spawn_army
		faction russia
		character	Gorislav Novgorodskii, named character, age 30, x 301, y 269, family
		traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1 , Royal_Blood_Russian 1 , BiologicalSon 1
		unit	EE Bodyguard		exp 2 armour 1 weapon_lvl 0
		unit	Druzhina			exp 1 armour 0 weapon_lvl 0
		unit	Pechenegs			exp 1 armour 0 weapon_lvl 0
		unit	Dismounted Druzhina	exp 1 armour 0 weapon_lvl 0
		unit	Smolensk Infantry	exp 0 armour 0 weapon_lvl 0
		unit	Rus Senior Militia	exp 1 armour 0 weapon_lvl 0
		unit	Rus Senior Militia	exp 1 armour 0 weapon_lvl 0
		unit	Woodsmen	exp 0 armour 0 weapon_lvl 0
	end
	console_command add_money russia, 5000
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType moors
	and IsFactionAIControlled
	and I_TurnNumber = 10

	spawn_army
		faction moors
		character	Bakr al_Andalusi, named character, age 30, x 44, y 119, family
		traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1 , Royal_Blood_Moorish 1 , BiologicalSon 1
		unit	ME Bodyguard		exp 2 armour 1 weapon_lvl 0
		unit	Sipahis	exp 2 armour 0 weapon_lvl 0
		unit	Arab Cavalry	exp 2 armour 0 weapon_lvl 0
		unit	Arab Cavalry	exp 4 armour 0 weapon_lvl 0
		unit	Desert Archers	exp 3 armour 0 weapon_lvl 0
		unit	Desert Archers	exp 4 armour 0 weapon_lvl 0
		unit	Desert Archers	exp 2 armour 0 weapon_lvl 0
		unit	Desert Archers	exp 4 armour 0 weapon_lvl 0
		unit	Hashishim	exp 4 armour 0 weapon_lvl 0
		unit	Hashishim	exp 3 armour 0 weapon_lvl 0
		unit	Hashishim	exp 2 armour 0 weapon_lvl 0
		unit	Hashishim	exp 2 armour 0 weapon_lvl 0
		unit	Granadine Jinetes	exp 1 armour 0 weapon_lvl 0
		unit	Granadine Jinetes	exp 1 armour 0 weapon_lvl 0
	end
	console_command add_money moors, 5000
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType turks
	and IsFactionAIControlled
	and I_TurnNumber = 10

	spawn_army
		faction turks
		character	Ali al-Din, named character, age 30, x 312, y 119, family
		traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1 , Royal_Blood_Turkish 1 , BiologicalSon 1
		unit	ME Bodyguard		exp 2 armour 1 weapon_lvl 0
		unit	Turkomans		exp 1 armour 0 weapon_lvl 0
		unit	Turkomans		exp 1 armour 0 weapon_lvl 0
		unit	Ottoman Infantry		exp 1 armour 0 weapon_lvl 0
		unit	Ottoman Infantry		exp 0 armour 0 weapon_lvl 0
	end
	console_command add_money turks, 5000
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType egypt
	and IsFactionAIControlled
	and I_TurnNumber = 10

	spawn_army
		faction egypt
		character	Dinar al-Fatimiyyun, named character, age 30, x 302, y 59, family
		traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1 , Royal_Blood_Egyptian 1 , BiologicalSon 1
		unit	ME Bodyguard		exp 2 armour 1 weapon_lvl 0
		unit	Arab Cavalry	exp 1 armour 0 weapon_lvl 0
		unit	Dismounted Arab Cavalry		exp 1 armour 0 weapon_lvl 0
		unit	Desert Archers		exp 0 armour 0 weapon_lvl 0
		unit	Desert Archers		exp 0 armour 0 weapon_lvl 0
	end
	console_command add_money egypt, 5000
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType denmark
	and IsFactionAIControlled
	and I_TurnNumber = 10

	spawn_army
		faction denmark
		character	Bue Vermundsen, named character, age 30, x 147, y 246, family
		traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1 , Royal_Blood_Danish 1 , BiologicalSon 1
		unit	NE Bodyguard		exp 2 armour 1 weapon_lvl 0
		unit	Huscarls		exp 1 armour 0 weapon_lvl 0
		unit	Norse Swordsmen		exp 1 armour 0 weapon_lvl 0
		unit	Norse Swordsmen		exp 1 armour 0 weapon_lvl 0
		unit	Dismounted Huscarls		exp 1 armour 0 weapon_lvl 0
	end
	console_command add_money denmark, 5000
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType portugal
	and IsFactionAIControlled
	and I_TurnNumber = 10

	spawn_army
		faction portugal
		character	Baltazar de_Portugal, named character, age 30, x 19, y 128, family
		traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1 , Royal_Blood_Portuguese 1 , BiologicalSon 1
		unit	SE Bodyguard		exp 2 armour 1 weapon_lvl 0
		unit	Jinetes			exp 1 armour 0 weapon_lvl 0
		unit	Light Swordsmen			exp 1 armour 0 weapon_lvl 0
		unit	Lusitanian Javelinmen		exp 1 armour 0 weapon_lvl 0
		unit	Lusitanian Javelinmen		exp 0 armour 0 weapon_lvl 0
	end
	console_command add_money portugal, 5000
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType poland
	and IsFactionAIControlled
	and I_TurnNumber = 10

	spawn_army
		faction poland
		character	Ignacy Piast, named character, age 30, x 215, y 210, family
		traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1 , Royal_Blood_Polish 1 , BiologicalSon 1
		unit	NE Bodyguard		exp 2 armour 1 weapon_lvl 0
		unit	Polish Shooters		exp 1 armour 0 weapon_lvl 0
		unit	Polish Nobles		exp 1 armour 0 weapon_lvl 0
		unit	Light Swordsmen		exp 0 armour 0 weapon_lvl 0
		unit	Smolensk Infantry		exp 0 armour 0 weapon_lvl 0
	end
	console_command add_money poland, 5000
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType hungary
	and IsFactionAIControlled
	and I_TurnNumber = 10

	spawn_army
		faction hungary
		character	Bank Arpadhazi, named character, age 30, x 215, y 188, family
		traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1 , Royal_Blood_Hungarian 1 , BiologicalSon 1
		unit	NE Bodyguard		exp 2 armour 1 weapon_lvl 0
		unit	Magyar Cavalry		exp 2 armour 0 weapon_lvl 0
		unit	Hungarian Nobles		exp 1 armour 0 weapon_lvl 0
		unit	Pavise Spearmen		exp 0 armour 0 weapon_lvl 0
		unit	Pavise Spearmen		exp 0 armour 0 weapon_lvl 0
	end
	console_command add_money hungary, 5000
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType kievan_rus
	and IsFactionAIControlled
	and I_TurnNumber = 10

	spawn_army
		faction kievan_rus
		character	Gavriil Yaroslavich, named character, age 30, x 295, y 209, family
		traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1 , Royal_Blood_Kievan 1 , BiologicalSon 1
		unit	EE Bodyguard		exp 2 armour 1 weapon_lvl 0
		unit	Pechenegs			exp 1 armour 0 weapon_lvl 0
		unit	Aldari	exp 1 armour 0 weapon_lvl 0
		unit	Berdiche Militia	exp 0 armour 0 weapon_lvl 0
		unit	Smolensk Infantry	exp 0 armour 0 weapon_lvl 0
	end
	console_command add_money kievan_rus, 5000
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType aragon
	and IsFactionAIControlled
	and I_TurnNumber = 10

	spawn_army
		faction aragon
		character	Jimeno Ramirez, named character, age 30, x 76, y 147, family
		traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1 , Royal_Blood_Aragonese 1 , BiologicalSon 1
		unit	SE Bodyguard		exp 2 armour 1 weapon_lvl 0
		unit	Mailed Knights		exp 0 armour 0 weapon_lvl 0
		unit	Mailed Knights		exp 0 armour 0 weapon_lvl 0
		unit	Almughavars		exp 1 armour 0 weapon_lvl 0
		unit	Almughavars		exp 0 armour 0 weapon_lvl 0
		unit	Light Men at Arms		exp 1 armour 0 weapon_lvl 0
	end
	console_command add_money aragon, 5000
terminate_monitor
end_monitor


monitor_event FactionTurnStart FactionType norway
	and IsFactionAIControlled
	and I_TurnNumber = 10

	spawn_army
		faction norway
		character	Yngwie Haakonsson, named character, age 30, x 116, y 279, family
		traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1 , Royal_Blood_Norwegian 1 , BiologicalSon 1
		unit	NE Bodyguard		exp 1 armour 1 weapon_lvl 0
		unit	Dismounted Huscarls		exp 2 armour 0 weapon_lvl 0
		unit	Norse Swordsmen		exp 2 armour 0 weapon_lvl 0
		unit	Norse Swordsmen		exp 1 armour 0 weapon_lvl 0
		unit	Viking Raiders		exp 0 armour 0 weapon_lvl 0
	end
	console_command add_money norway, 5000
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType lithuania
	and IsFactionAIControlled
	and I_TurnNumber = 10

	spawn_army
		faction lithuania
		character	Vasalgas, named character, age 30, x 258, y 239, family
		traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1 , Royal_Blood_Lithuanian 1 , BiologicalSon 1
		unit	Lith Bodyguard		exp 2 armour 1 weapon_lvl 0
		unit	Lithuanian Cavalry	exp 1 armour 0 weapon_lvl 0
		unit	Ducal Cavalry		exp 2 armour 0 weapon_lvl 0
		unit	Baltic Spearmen		exp 3 armour 0 weapon_lvl 0
		unit	Baltic Spearmen		exp 2 armour 0 weapon_lvl 0
		unit	Baltic Spearmen		exp 1 armour 0 weapon_lvl 0
		unit	Baltic Spearmen		exp 5 armour 0 weapon_lvl 0
		unit	Lithuanian Cavalry	exp 3 armour 0 weapon_lvl 0
		unit	Lithuanian Cavalry	exp 4 armour 0 weapon_lvl 0
		unit	Lithuanian Cavalry	exp 3 armour 0 weapon_lvl 0
		unit	Lithuanian Cavalry	exp 2 armour 0 weapon_lvl 0
		unit	Lithuanian Archers		exp 0 armour 0 weapon_lvl 0
	end
	console_command add_money lithuania, 5000
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType kwarezm
	and IsFactionAIControlled
	and I_TurnNumber = 10

	spawn_army
		faction kwarezm
		character	Melik Khwarezmshah, named character, age 30, x 449, y 93, family
		traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1 , Royal_Blood_Kwarezm 1 , BiologicalSon 1
		unit	ME Bodyguard		exp 2 armour 1 weapon_lvl 0
		unit	Turkomans		exp 1 armour 0 weapon_lvl 0
		unit	Ghulams		exp 1 armour 0 weapon_lvl 0
		unit	Persian Spearmen		exp 1 armour 0 weapon_lvl 0
		unit	Persian Spearmen		exp 0 armour 0 weapon_lvl 0
	end
	console_command add_money kwarezm, 5000
end_monitor

monitor_event FactionTurnStart FactionType teutonic_order
	and IsFactionAIControlled
	and I_TurnNumber = 10

	spawn_army
		faction teutonic_order
		character	random_name, named character, age 30, x 224, y 238, family
		traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1
		unit	NE Bodyguard		exp 2 armour 1 weapon_lvl 0
		unit	Christ Knights		exp 2 armour 0 weapon_lvl 0
		unit	Sword Brethren		exp 1 armour 0 weapon_lvl 0
		unit	Order Spearmen		exp 0 armour 0 weapon_lvl 0
		unit	Prussian Archers	exp 1 armour 0 weapon_lvl 0
	end
 	console_command add_money teutonic_order, 5000

terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType jerusalem
	and IsFactionAIControlled
	and I_TurnNumber = 10

	spawn_army
		faction jerusalem
		character	Simon de_Brienne, named character, age 30, x 331, y 77, family
		traits Supplies 1 , Turnsaway 3 , LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1 , BiologicalSon 1
		unit	NE Bodyguard		exp 2 armour 1 weapon_lvl 0
		unit	Templar Crossbowmen	exp 0 armour 0 weapon_lvl 0
		unit	Templar Crossbowmen	exp 0 armour 0 weapon_lvl 0
		unit	Templar Crossbowmen	exp 0 armour 0 weapon_lvl 0
		unit	Templar Crossbowmen	exp 0 armour 0 weapon_lvl 0
		unit	Dismounted Knights Of Jerusalem		exp 1 armour 0 weapon_lvl 0	  
		unit	Dismounted Knights Of Jerusalem		exp 1 armour 0 weapon_lvl 0
		unit	Dismounted Knights Of Jerusalem		exp 1 armour 0 weapon_lvl 0
		unit	Knights of Jerusalem		exp 1 armour 0 weapon_lvl 0
		unit	Knights of Jerusalem		exp 1 armour 0 weapon_lvl 0
		unit	Knights of Jerusalem		exp 1 armour 0 weapon_lvl 0
	end
	console_command add_money jerusalem, 10000
terminate_monitor
end_monitor

;--- No Heir Reinforcement
monitor_event FactionTurnStart FactionType england
	and not FactionIsLocal
	and I_NumberOfHeirs england < 4

	spawn_army
		faction england
		character	random_name, named character, age 20, x 83, y 220, family
		traits MilitaryInclination 2 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , Loyal 2 , ReligionStarter 1
		unit	NE Bodyguard		exp 2 armour 0 weapon_lvl 0
	end
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType scotland
	and not FactionIsLocal
	and I_NumberOfHeirs scotland < 4

	spawn_army 
		faction scotland
		character	random_name, named character, age 20, x 53, y 253, family
		traits MilitaryInclination 2 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , Loyal 2 , ReligionStarter 1
		unit	NE Bodyguard		exp 2 armour 0 weapon_lvl 0
	end
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType timurids
	and not FactionIsLocal
	and I_NumberOfHeirs timurids < 4

	spawn_army
		faction timurids
		character 	random_name, named character, age 20, x 500, y 150, family
		traits MilitaryInclination 2 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , Loyal 2 , ReligionStarter 1
		unit 	Keshikten Bodyguard 	exp 2 armour 0 weapon_lvl 0
	end
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType denmark
	and not FactionIsLocal
	and I_NumberOfHeirs denmark < 4

	spawn_army 
		faction denmark
		character	random_name, named character, age 20, x 146, y 253, family
		traits MilitaryInclination 2 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , Loyal 2 , ReligionStarter 1
		unit	NE Bodyguard		exp 2 armour 0 weapon_lvl 0
	end
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType norway
	and not FactionIsLocal
	and I_NumberOfHeirs norway < 4

	spawn_army 
		faction norway
		character	random_name, named character, age 20, x 114, y 280, family
		traits MilitaryInclination 2 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , Loyal 2 , ReligionStarter 1
		unit	NE Bodyguard		exp 2 armour 0 weapon_lvl 0
	end
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType france
	and not FactionIsLocal
	and I_NumberOfHeirs france < 4

	spawn_army 
		faction france
		character	random_name, named character, age 20, x 92, y 202, family
		traits MilitaryInclination 2 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , Loyal 2 , ReligionStarter 1
		unit	NE Bodyguard		exp 2 armour 0 weapon_lvl 0
	end
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType hre
	and not FactionIsLocal
	and I_NumberOfHeirs hre < 4

	spawn_army 
		faction hre
		character	random_name, named character, age 20, x 143, y 207, family
		traits MilitaryInclination 2 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , Loyal 2 , ReligionStarter 1
		unit	NE Bodyguard		exp 2 armour 0 weapon_lvl 0
	end
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType milan
	and not FactionIsLocal
	and I_NumberOfHeirs milan < 4

	spawn_army 
		faction milan
		character	random_name, named character, age 20, x 137, y 168, family
		traits MilitaryInclination 2 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , Loyal 2 , ReligionStarter 1
		unit	SE Bodyguard		exp 2 armour 0 weapon_lvl 0
	end
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType aragon
	and not FactionIsLocal
	and I_NumberOfHeirs aragon < 4

	spawn_army 
		faction aragon
		character	random_name, named character, age 20, x 83, y 150, family
		traits MilitaryInclination 2 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , Loyal 2 , ReligionStarter 1
		unit	SE Bodyguard		exp 2 armour 0 weapon_lvl 0
	end
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType spain
	and not FactionIsLocal
	and I_NumberOfHeirs spain < 4

	spawn_army 
		faction spain
		character	random_name, named character, age 20, x 32, y 148, family
		traits MilitaryInclination 2 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , Loyal 2 , ReligionStarter 1
		unit	SE Bodyguard		exp 2 armour 0 weapon_lvl 0
	end
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType portugal
	and not FactionIsLocal
	and I_NumberOfHeirs portugal < 4

	spawn_army 
		faction portugal
		character	random_name, named character, age 20, x 17, y 123, family
		traits MilitaryInclination 2 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , Loyal 2 , ReligionStarter 1
		unit	SE Bodyguard		exp 2 armour 0 weapon_lvl 0
	end
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType venice
	and not FactionIsLocal
	and I_NumberOfHeirs venice < 4

	spawn_army 
		faction venice
		character	random_name, named character, age 20, x 161, y 173, family
		traits MilitaryInclination 2 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , Loyal 2 , ReligionStarter 1
		unit	SE Bodyguard		exp 2 armour 0 weapon_lvl 0
	end
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType sicily
	and not FactionIsLocal
	and I_NumberOfHeirs sicily < 4

	spawn_army 
		faction sicily
		character	random_name, named character, age 20, x 177, y 114, family
		traits MilitaryInclination 2 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , Loyal 2 , ReligionStarter 1
		unit	SE Bodyguard		exp 2 armour 0 weapon_lvl 0
	end
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType poland
	and not FactionIsLocal
	and I_NumberOfHeirs poland < 4

	spawn_army 
		faction poland
		character	random_name, named character, age 20, x 222, y 213, family
		traits MilitaryInclination 2 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , Loyal 2 , ReligionStarter 1
		unit	NE Bodyguard		exp 2 armour 0 weapon_lvl 0
	end
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType hungary
	and not FactionIsLocal
	and I_NumberOfHeirs hungary < 4

	spawn_army 
		faction hungary
		character	random_name, named character, age 20, x 206, y 179, family
		traits MilitaryInclination 2 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , Loyal 2 , ReligionStarter 1
		unit	NE Bodyguard		exp 2 armour 0 weapon_lvl 0
	end
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType kievan_rus
	and not FactionIsLocal
	and I_NumberOfHeirs kievan_rus < 4

	spawn_army 
		faction kievan_rus
		character	random_name, named character, age 20, x 292, y 214, family
		traits MilitaryInclination 2 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , Loyal 2 , ReligionStarter 1
		unit	EE Bodyguard		exp 2 armour 0 weapon_lvl 0
	end
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType russia
	and not FactionIsLocal
	and I_NumberOfHeirs russia < 4

	spawn_army 
		faction russia
		character	random_name, named character, age 20, x 301, y 275, family
		traits MilitaryInclination 2 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , Loyal 2 , ReligionStarter 1
		unit	EE Bodyguard		exp 2 armour 0 weapon_lvl 0
	end
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType byzantium
	and not FactionIsLocal
	and I_NumberOfHeirs byzantium < 4

	spawn_army 
		faction byzantium
		character	random_name, named character, age 20, x 278, y 148, family
		traits MilitaryInclination 2 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , Loyal 2 , ReligionStarter 1
		unit	Greek Bodyguard		exp 2 armour 0 weapon_lvl 0
	end
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType lithuania
	and not FactionIsLocal
	and I_NumberOfHeirs lithuania < 4

	spawn_army 
		faction lithuania
		character	random_name, named character, age 20, x 262, y 240, family
		traits MilitaryInclination 2 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , Loyal 2 , ReligionStarter 1
		unit	Lith Bodyguard		exp 2 armour 0 weapon_lvl 0
	end
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType teutonic_order
	and not FactionIsLocal
	and I_NumberOfHeirs teutonic_order < 4

	spawn_army 
		faction teutonic_order
		character	random_name, named character, age 20, x 232, y 237, family
		traits MilitaryInclination 2 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , Loyal 2 , ReligionStarter 1
		unit	TO Bodyguard		exp 2 armour 0 weapon_lvl 0
	end
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType jerusalem
	and not FactionIsLocal
	and I_NumberOfHeirs jerusalem < 4

	spawn_army 
		faction jerusalem
		character	random_name, named character, age 20, x 329, y 78, family
		traits MilitaryInclination 2 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , Loyal 2 , ReligionStarter 1
		unit	NE Bodyguard		exp 2 armour 0 weapon_lvl 0
	end
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType turks
	and not FactionIsLocal
	and I_NumberOfHeirs turks < 4

	spawn_army 
		faction turks
		character	random_name, named character, age 20, x 339, y 133, family
		traits MilitaryInclination 2 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , Loyal 2 , ReligionStarter 1
		unit	ME Bodyguard		exp 2 armour 0 weapon_lvl 0
	end
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType egypt
	and not FactionIsLocal
	and I_NumberOfHeirs egypt < 4

	spawn_army 
		faction egypt
		character	random_name, named character, age 20, x 309, y 60, family
		traits MilitaryInclination 2 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , Loyal 2 , ReligionStarter 1
		unit	ME Bodyguard		exp 2 armour 0 weapon_lvl 0
	end
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType moors
	and not FactionIsLocal
	and I_NumberOfHeirs moors < 4

	spawn_army 
		faction moors
		character	random_name, named character, age 20, x 40, y 113, family
		traits MilitaryInclination 2 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , Loyal 2 , ReligionStarter 1
		unit	ME Bodyguard		exp 2 armour 0 weapon_lvl 0
	end
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType kwarezm
	and not FactionIsLocal
	and I_NumberOfHeirs kwarezm < 4

	spawn_army 
		faction kwarezm
		character	random_name, named character, age 20, x 449, y 93, family
		traits MilitaryInclination 2 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , Loyal 2 , ReligionStarter 1
		unit	ME Bodyguard		exp 2 armour 0 weapon_lvl 0
	end
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType cumans
	and not FactionIsLocal
	and I_NumberOfHeirs cumans < 4

	spawn_army 
		faction cumans
		character	random_name, named character, age 20, x 440, y 250, family
		traits MilitaryInclination 2 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , Loyal 2 , ReligionStarter 1
		unit	Cuman Bodyguard		exp 2 armour 0 weapon_lvl 0
	end
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionType mongols
	and not FactionIsLocal
	and I_NumberOfHeirs mongols < 4

	spawn_army 
		faction mongols
		character	random_name, named character, age 20, x 502, y 160, family
		traits MilitaryInclination 2 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , Loyal 2 , ReligionStarter 1
		unit	Keshikten Bodyguard		exp 2 armour 0 weapon_lvl 0
	end
terminate_monitor
end_monitor

;================== AI Economy Script ===================
;########################### MONEY DEPT SCRIPT ##############################

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType england
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money england, 100
end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType england
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money england, 200
end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType england
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money england, 300
end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType england
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money england, 400
end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType england
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money england, 500
end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType england
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money england, 80
end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType england
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money england, 160
end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType england
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money england, 240
end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType england
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money england, 320
end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType england
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money england, 400
end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType france
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money france, 100
end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType france
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money france, 200
end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType france
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money france, 300
end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType france
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money france, 400
end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType france
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money france, 500
end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType france
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money france, 80
end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType france
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money france, 160
end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType france
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money france, 240
end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType france
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money france, 320
end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType france
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money france, 400
end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType hre
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money hre, 100
end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType hre
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money hre, 200
end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType hre
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money hre, 300
end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType hre
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money hre, 400
end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType hre
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money hre, 500
end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType hre
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money hre, 80
end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType hre
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money hre, 160
end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType hre
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money hre, 240
end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType hre
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money hre, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType hre
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money hre, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType spain
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money spain, 100
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType spain
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money spain, 200
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType spain
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money spain, 300
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType spain
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money spain, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType spain
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money spain, 500
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType spain
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money spain, 80
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType spain
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money spain, 160
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType spain
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money spain, 240
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType spain
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money spain, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType spain
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money spain, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType venice
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money venice, 100
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType venice
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money venice, 200
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType venice
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money venice, 300
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType venice
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money venice, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType venice
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money venice, 500
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType venice
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money venice, 80
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType venice
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money venice, 160
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType venice
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money venice, 240
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType venice
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money venice, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType venice
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money venice, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType sicily
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money sicily, 100
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType sicily
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money sicily, 200
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType sicily
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money sicily, 300
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType sicily
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money sicily, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType sicily
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money sicily, 500
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType sicily
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money sicily, 80
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType sicily
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money sicily, 160
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType sicily
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money sicily, 240
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType sicily
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money sicily, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType sicily
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money sicily, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType sicily
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money sicily, 100
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType sicily
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money sicily, 200
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType sicily
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money sicily, 300
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType sicily
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money sicily, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType sicily
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money sicily, 500
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType sicily
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money sicily, 80
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType sicily
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money sicily, 160
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType sicily
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money sicily, 240
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType sicily
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money sicily, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType sicily
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money sicily, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType milan
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money milan, 100
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType milan
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money milan, 200
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType milan
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money milan, 300
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType milan
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money milan, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType milan
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money milan, 500
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType milan
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money milan, 80
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType milan
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money milan, 160
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType milan
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money milan, 240
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType milan
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money milan, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType milan
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money milan, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType scotland
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money scotland, 100
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType scotland
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money scotland, 200
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType scotland
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money scotland, 300
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType scotland
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money scotland, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType scotland
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money scotland, 500
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType scotland
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money scotland, 80
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType scotland
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money scotland, 160
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType scotland
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money scotland, 240
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType scotland
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money scotland, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType scotland
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money scotland, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType moors
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money moors, 100
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType moors
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money moors, 200
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType moors
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money moors, 300
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType moors
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money moors, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType moors
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money moors, 500
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType moors
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money moors, 80
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType moors
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money moors, 160
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType moors
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money moors, 240
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType moors
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money moors, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType moors
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money moors, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType turks
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money turks, 100
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType turks
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money turks, 200
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType turks
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money turks, 300
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType turks
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money turks, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType turks
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money turks, 500
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType turks
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money turks, 80
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType turks
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money turks, 160
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType turks
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money turks, 240
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType turks
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money turks, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType turks
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money turks, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType egypt
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money egypt, 100
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType egypt
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money egypt, 200
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType egypt
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money egypt, 300
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType egypt
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money egypt, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType egypt
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money egypt, 500
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType egypt
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money egypt, 80
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType egypt
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money egypt, 160
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType egypt
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money egypt, 240
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType egypt
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money egypt, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType egypt
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money egypt, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType mongols
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money mongols, 100
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType mongols
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money mongols, 200
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType mongols
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money mongols, 300
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType mongols
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money mongols, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType mongols
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money mongols, 500
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType mongols
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money mongols, 80
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType mongols
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money mongols, 160
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType mongols
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money mongols, 240
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType mongols
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money mongols, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType mongols
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money mongols, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType papal_states
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money papal_states, 100
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType papal_states
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money papal_states, 200
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType papal_states
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money papal_states, 300
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType papal_states
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money papal_states, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType papal_states
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money papal_states, 500
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType papal_states
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money papal_states, 80
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType papal_states
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money papal_states, 160
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType papal_states
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money papal_states, 240
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType papal_states
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money papal_states, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType papal_states
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money papal_states, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType denmark
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money denmark, 100
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType denmark
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money denmark, 200
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType denmark
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money denmark, 300
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType denmark
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money denmark, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType denmark
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money denmark, 500
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType denmark
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money denmark, 80
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType denmark
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money denmark, 160
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType denmark
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money denmark, 240
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType denmark
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money denmark, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType denmark
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money denmark, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType cumans
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money cumans, 100
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType cumans
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money cumans, 200
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType cumans
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money cumans, 300
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType cumans
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money cumans, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType cumans
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money cumans, 500
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType cumans
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money cumans, 80
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType cumans
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money cumans, 160
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType cumans
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money cumans, 240
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType cumans
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money cumans, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType cumans
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money cumans, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType portugal
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money portugal, 100
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType portugal
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money portugal, 200
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType portugal
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money portugal, 300
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType portugal
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money portugal, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType portugal
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money portugal, 500
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType portugal
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money portugal, 80
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType portugal
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money portugal, 160
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType portugal
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money portugal, 240
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType portugal
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money portugal, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType portugal
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money portugal, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType poland
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money poland, 100
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType poland
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money poland, 200
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType poland
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money poland, 300
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType poland
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money poland, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType poland
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money poland, 500
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType poland
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money poland, 80
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType poland
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money poland, 160
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType poland
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money poland, 240
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType poland
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money poland, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType poland
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money poland, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType byzantium
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money byzantium, 100
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType byzantium
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money byzantium, 200
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType byzantium
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money byzantium, 300
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType byzantium
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money byzantium, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType byzantium
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money byzantium, 500
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType byzantium
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money byzantium, 80
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType byzantium
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money byzantium, 160
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType byzantium
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money byzantium, 240
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType byzantium
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money byzantium, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType byzantium
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money byzantium, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType byzantium
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money byzantium, 100
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType byzantium
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money byzantium, 200
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType byzantium
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money byzantium, 300
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType byzantium
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money byzantium, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType byzantium
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money byzantium, 500
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType byzantium
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money byzantium, 80
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType byzantium
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money byzantium, 160
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType byzantium
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money byzantium, 240
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType byzantium
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money byzantium, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType byzantium
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money byzantium, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType russia
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money russia, 100
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType russia
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money russia, 200
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType russia
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money russia, 300
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType russia
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money russia, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType russia
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money russia, 500
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType russia
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money russia, 80
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType russia
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money russia, 160
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType russia
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money russia, 240
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType russia
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money russia, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType russia
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money russia, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType hungary
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money hungary, 100
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType hungary
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money hungary, 200
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType hungary
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money hungary, 300
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType hungary
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money hungary, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType hungary
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money hungary, 500
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType hungary
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money hungary, 80
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType hungary
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money hungary, 160
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType hungary
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money hungary, 240
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType hungary
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money hungary, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType hungary
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money hungary, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType aragon
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money aragon, 100
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType aragon
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money aragon, 200
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType aragon
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money aragon, 300
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType aragon
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money aragon, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType aragon
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money aragon, 500
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType aragon
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money aragon, 80
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType aragon
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money aragon, 160
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType aragon
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money aragon, 240
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType aragon
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money aragon, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType aragon
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money aragon, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType knights_templar
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money knights_templar, 100
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType knights_templar
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money knights_templar, 200
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType knights_templar
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money knights_templar, 300
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType knights_templar
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money knights_templar, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType knights_templar
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money knights_templar, 500
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType knights_templar
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money knights_templar, 80
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType knights_templar
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money knights_templar, 160
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType knights_templar
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money knights_templar, 240
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType knights_templar
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money knights_templar, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType knights_templar
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money knights_templar, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType lithuania
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money lithuania, 100
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType lithuania
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money lithuania, 200
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType lithuania
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money lithuania, 300
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType lithuania
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money lithuania, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType lithuania
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money lithuania, 500
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType lithuania
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money lithuania, 80
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType lithuania
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money lithuania, 160
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType lithuania
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money lithuania, 240
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType lithuania
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money lithuania, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType lithuania
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money lithuania, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType kievan_rus
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money kievan_rus, 100
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType kievan_rus
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money kievan_rus, 200
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType kievan_rus
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money kievan_rus, 300
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType kievan_rus
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money kievan_rus, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType kievan_rus
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money kievan_rus, 500
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType kievan_rus
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money kievan_rus, 80
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType kievan_rus
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money kievan_rus, 160
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType kievan_rus
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money kievan_rus, 240
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType kievan_rus
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money kievan_rus, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType kievan_rus
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money kievan_rus, 400
	end_monitor

;########################### MONEY DEPT SCRIPT ##############################

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType teutonic_order
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money teutonic_order, 100
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType teutonic_order
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money teutonic_order, 200
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType teutonic_order
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money teutonic_order, 300
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType teutonic_order
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money teutonic_order, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType teutonic_order
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money teutonic_order, 500
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType teutonic_order
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money teutonic_order, 80
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType teutonic_order
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money teutonic_order, 160
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType teutonic_order
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money teutonic_order, 240
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType teutonic_order
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money teutonic_order, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType teutonic_order
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money teutonic_order, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType timurids
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money timurids, 100
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType timurids
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money timurids, 200
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType timurids
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money timurids, 300
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType timurids
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money timurids, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType timurids
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money timurids, 500
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType timurids
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money timurids, 80
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType timurids
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money timurids, 160
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType timurids
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money timurids, 240
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType timurids
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money timurids, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType timurids
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money timurids, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType norway
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money norway, 100
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType norway
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money norway, 200
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType norway
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money norway, 300
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType norway
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money norway, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType norway
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money norway, 500
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType norway
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money norway, 80
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType norway
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money norway, 160
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType norway
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money norway, 240
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType norway
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money norway, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType norway
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money norway, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType jerusalem
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money jerusalem, 100
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType jerusalem
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money jerusalem, 200
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType jerusalem
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money jerusalem, 300
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType jerusalem
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money jerusalem, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType jerusalem
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money jerusalem, 500
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType jerusalem
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money jerusalem, 80
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType jerusalem
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money jerusalem, 160
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType jerusalem
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money jerusalem, 240
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType jerusalem
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money jerusalem, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType jerusalem
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money jerusalem, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType kwarezm
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money kwarezm, 100
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType kwarezm
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money kwarezm, 200
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType kwarezm
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money kwarezm, 300
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType kwarezm
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money kwarezm, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType kwarezm
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money kwarezm, 500
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType kwarezm
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money kwarezm, 80
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType kwarezm
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money kwarezm, 160
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType kwarezm
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money kwarezm, 240
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType kwarezm
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money kwarezm, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType kwarezm
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money kwarezm, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType slave
		and SettlementType city
		and SettlementBuildingExists = wooden_pallisade
	console_command add_money slave, 100
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType slave
		and SettlementType city
		and SettlementBuildingExists = wooden_wall
	console_command add_money slave, 200
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType slave
		and SettlementType city
		and SettlementBuildingExists = stone_wall
	console_command add_money slave, 300
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType slave
		and SettlementType city
		and SettlementBuildingExists = large_stone_wall
	console_command add_money slave, 400
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType slave
		and SettlementType city
		and SettlementBuildingExists = huge_stone_wall
	console_command add_money slave, 500
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType slave
		and SettlementType castle
		and SettlementBuildingExists = motte_and_bailey
	console_command add_money slave, 80
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType slave
		and SettlementType castle
		and SettlementBuildingExists = wooden_castle
	console_command add_money slave, 160
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType slave
		and SettlementType castle
		and SettlementBuildingExists = castle
	console_command add_money slave, 240
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType slave
		and SettlementType castle
		and SettlementBuildingExists = fortress
	console_command add_money slave, 320
	end_monitor

	monitor_event SettlementTurnStart not FactionIsLocal
                and FactionType slave
		and SettlementType castle
		and SettlementBuildingExists = citadel
	console_command add_money slave, 400
	end_monitor


;---- Empire money
monitor_event FactionTurnStart FactionType hre
	and not FactionIsLocal
	and I_TurnNumber < 50
	and I_NumberOfSettlements hre < 14
	and I_NumberOfSettlements hre > 3

	console_command add_money hre, 2000

end_monitor

monitor_event FactionTurnStart FactionType moors
	and not FactionIsLocal
	and I_TurnNumber < 50
	and I_NumberOfSettlements moors < 13
	and I_NumberOfSettlements moors > 3

	console_command add_money moors, 2000

end_monitor

;==================== Is The AI? ========================


;========================================================
;==================== PLAYER PART =======================
;========================================================

;==================== Setup Events ======================
;-- Mongol invasion true
monitor_event FactionTurnStart FactionIsLocal
	historic_event mongols_invasion_warn factions { england , france , hre , denmark , spain , aragon , portugal , milan , venice , sicily , norway , scotland , cumans , byzantium , russia , moors , turks , egypt , poland , hungary , lithuania , kievan_rus , teutonic_order , jerusalem , }
	historic_event mongols_invasion_warn_mongols factions { mongols , }
	historic_event mongols_invasion_warn_kwarezm factions { kwarezm , }
	set_event_counter mongols_invasion_warn 1
terminate_monitor
end_monitor
	
monitor_conditions I_TurnNumber = 2
	historic_event the_mongols_emerge event/mongols_invade.bik factions { england , france , hre , denmark , spain , aragon , portugal , milan , venice , sicily , norway , scotland , cumans , byzantium , russia , moors , turks , egypt , poland , hungary , lithuania , kievan_rus , teutonic_order , jerusalem , }
terminate_monitor
end_monitor		  

;--- English Events
monitor_event FactionTurnStart FactionType england
	and FactionIsLocal

	;historic event!

	if I_EventCounter DifficultyLevel >= 3
		;give bad traits to any generals
	end_if

	terminate_monitor
end_monitor 

;--- French Events
monitor_event FactionTurnStart FactionType france
	and FactionIsLocal

	if I_EventCounter DifficultyLevel >= 3
		;give bad traits to any generals
	end_if

	terminate_monitor
end_monitor

;--- HRE Events
monitor_event FactionTurnStart FactionType hre
	and FactionIsLocal

	if I_EventCounter DifficultyLevel >= 3
		console_command give_trait "Frederick von_Hohenstaufen" Offensive_To_Nobles 1
		console_command diplomatic_stance hre papal_states war
	end_if

	terminate_monitor
end_monitor 

;--- Spain Events
monitor_event FactionTurnStart FactionType spain
	and FactionIsLocal

	if I_EventCounter DifficultyLevel >= 3
		;give bad traits to any generals
	end_if

	terminate_monitor
end_monitor

;--- Venice Events
monitor_event FactionTurnStart FactionType venice
	and FactionIsLocal

	if I_EventCounter DifficultyLevel >= 3
		console_command diplomatic_stance venice byzantium war
	end_if

	terminate_monitor
end_monitor

;--- Sicily Events
monitor_event FactionTurnStart FactionType sicily
	and FactionIsLocal

	if I_EventCounter DifficultyLevel >= 3
		;give bad traits to any generals
	end_if

	terminate_monitor
end_monitor

;--- Genoa Events
monitor_event FactionTurnStart FactionType milan
	and FactionIsLocal

	if I_EventCounter DifficultyLevel >= 3
		;give bad traits to any generals
	end_if

	terminate_monitor
end_monitor

;--- Scotland Events
monitor_event FactionTurnStart FactionType scotland
	and FactionIsLocal

	if I_EventCounter DifficultyLevel >= 3
		;give bad traits to any generals
	end_if

	terminate_monitor
end_monitor

;--- Cumans Events
monitor_event FactionTurnStart FactionType cumans
	and FactionIsLocal

	if I_EventCounter DifficultyLevel >= 3
		;give bad traits to any generals
	end_if

	terminate_monitor
end_monitor

;--- Byzantium Events
monitor_event FactionTurnStart FactionType byzantium
	and FactionIsLocal

	if I_EventCounter DifficultyLevel >= 3
		console_command diplomatic_stance byzantium venice war
		console_command diplomatic_stance byzantium turks war
	end_if

	terminate_monitor
end_monitor

;--- Russia Events
monitor_event FactionTurnStart FactionType russia
	and FactionIsLocal

	if I_EventCounter DifficultyLevel >= 3
		;give bad traits to any generals
	end_if

	terminate_monitor
end_monitor

;--- Moors Events
monitor_event FactionTurnStart FactionType moors
	and FactionIsLocal

	if I_EventCounter DifficultyLevel >= 3
		console_command diplomatic_stance moors spain war
		console_command diplomatic_stance moors aragon war
		console_command diplomatic_stance moors portugal war
	end_if

	terminate_monitor
end_monitor

;--- Turks Events
monitor_event FactionTurnStart FactionType turks
	and FactionIsLocal

	if I_EventCounter DifficultyLevel >= 3
		console_command diplomatic_stance turks byzantium war
	end_if

	terminate_monitor
end_monitor

;--- Egypt Events
monitor_event FactionTurnStart FactionType egypt
	and FactionIsLocal

	if I_EventCounter DifficultyLevel >= 3
		;give bad traits to any generals
	end_if

	terminate_monitor
end_monitor

;--- Denmark Events
monitor_event FactionTurnStart FactionType denmark
	and FactionIsLocal

	if I_EventCounter DifficultyLevel >= 3
		;give bad traits to any generals
	end_if

	terminate_monitor
end_monitor

;--- Portugal Events
monitor_event FactionTurnStart FactionType portugal
	and FactionIsLocal

	if I_EventCounter DifficultyLevel >= 3
		;give bad traits to any generals
	end_if

	terminate_monitor
end_monitor

;--- Hungary Events
monitor_event FactionTurnStart FactionType hungary
	and FactionIsLocal

	if I_EventCounter DifficultyLevel >= 3
		;give bad traits to any generals
	end_if

	terminate_monitor
end_monitor

;--- Jerusalem Events
monitor_event FactionTurnStart FactionType jerusalem
	and FactionIsLocal

	if I_EventCounter DifficultyLevel >= 3
		;give bad traits to any generals
	end_if

	terminate_monitor
end_monitor

;--- Lithuania Events
monitor_event FactionTurnStart FactionType lithuania
	and FactionIsLocal

	if I_EventCounter DifficultyLevel >= 3
		console_command diplomatic_stance teutonic_order lithuania war
	end_if

	terminate_monitor
end_monitor

;--- Kiev Events
monitor_event FactionTurnStart FactionType kievan_rus
	and FactionIsLocal

	if I_EventCounter DifficultyLevel >= 3
		;give bad traits to any generals
	end_if

	terminate_monitor
end_monitor

;--- Aragon Events
monitor_event FactionTurnStart FactionType aragon
	and FactionIsLocal

	if I_EventCounter DifficultyLevel >= 3
		;give bad traits to any generals
	end_if

	terminate_monitor
end_monitor

;--- timurids Events
monitor_event FactionTurnStart FactionType timurids
	and FactionIsLocal

	if I_EventCounter DifficultyLevel >= 3
		;give bad traits to any generals
	end_if

	terminate_monitor
end_monitor

;--- Norway Events
monitor_event FactionTurnStart FactionType norway
	and FactionIsLocal

	if I_EventCounter DifficultyLevel >= 3
		;give bad traits to any generals
	end_if

	terminate_monitor
end_monitor

;--- Kwarezm Events
monitor_event FactionTurnStart FactionType kwarezm
	and FactionIsLocal

	if I_EventCounter DifficultyLevel >= 3
		;give bad traits to any generals
	end_if

	terminate_monitor
end_monitor

;--- Teutonic Events
monitor_event FactionTurnStart FactionType teutonic_order
	and FactionIsLocal

	if I_EventCounter DifficultyLevel >= 3
		console_command diplomatic_stance teutonic_order lithuania war
	end_if

	terminate_monitor
end_monitor

;--- Mongols Events
monitor_event FactionTurnStart FactionType mongols
	and FactionIsLocal

	if I_EventCounter DifficultyLevel >= 3
		;give bad traits to any generals
	end_if

	terminate_monitor
end_monitor

;==================== City Reveal =======================
monitor_event FactionTurnStart FactionReligion catholic

	reveal_tile 330,74	;Jerusalem
	reveal_tile 169,146	;Rome 
	reveal_tile 37,152	;Leon - Santiago
	hide_all_revealed_tiles
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionReligion orthodox

	reveal_tile 330,74	;Jerusalem
	reveal_tile 284,142	;Constantinople
	hide_all_revealed_tiles
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionReligion islam

	reveal_tile 330,74	;Jerusalem
	reveal_tile 416,94	;Baghdad
	reveal_tile 359,23	;Medina
	reveal_tile 360,6	;Mecca
	hide_all_revealed_tiles
terminate_monitor
end_monitor

;==================== Major Events ====================== 
;--- Jerusalem Captured

set_event_counter Jerusalem_christian 0
set_event_counter Jerusalem_islam 0
set_event_counter Jerusalem_pagan 0

monitor_event GeneralCaptureSettlement SettlementName Jerusalem
	and CharacterReligion catholic
	and I_EventCounter Jerusalem_christian = 0

	historic_event jerusalem_christian event/Christians_Capture_Jerusalem.bik
	set_event_counter Jerusalem_christian 1

end_monitor

monitor_event GeneralCaptureSettlement SettlementName Jerusalem
	and CharacterReligion orthodox
	and I_EventCounter Jerusalem_christian = 0

	historic_event jerusalem_christian event/Christians_Capture_Jerusalem.bik
	set_event_counter Jerusalem_christian 1

end_monitor

monitor_event GeneralCaptureSettlement SettlementName Jerusalem
	and CharacterReligion islam
	and I_EventCounter Jerusalem_islam = 0

	historic_event jerusalem_muslim event/Muslims_Capture_Jerusalem.bik
	set_event_counter Jerusalem_islam 1

end_monitor

monitor_event GeneralCaptureSettlement SettlementName Jerusalem
	and CharacterReligion pagan
	and not FactionIsLocal
	and I_EventCounter Jerusalem_pagan = 0

	historic_event jerusalem_pagan
	set_event_counter Jerusalem_pagan 1

end_monitor

;--- World is round 
monitor_event EventCounter EventCounterType world_is_round
	and EventCounter > 0

	historic_event america_discovered event/america_discovered.bik
terminate_monitor
end_monitor

;-- Player built first great temple
monitor_event BuildingCompleted FactionIsLocal
	and SettlementBuildingFinished = huge_cathedral

	historic_event player_first_huge_cathedral event/huge_cathedral_built.bik
terminate_monitor
end_monitor

monitor_event BuildingCompleted FactionIsLocal
	and SettlementBuildingFinished = great_jama

	historic_event player_first_great_jama event/great_mosque_created.bik
terminate_monitor
end_monitor

;-- Can notre_dame be built?

set_event_counter notre_dame 1

;-- Hanseatic league
set_event_counter hanseatic_constructed 0
	
monitor_event GuildUpgraded BuildingName = hanseatic_guild

	set_event_counter hanseatic_constructed 1
	reset_guild_standing hanseatic_guild

end_monitor


monitor_event BuildingDestroyed BuildingName = hanseatic_guild

	set_event_counter hanseatic_constructed 0
	reset_guild_standing hanseatic_guild

end_monitor

;-- Capital Change
monitor_event FactionNewCapital FactionIsLocal
	and I_EventCounter DifficultyLevel >= 3

	historic_event capital_change
	console_command add_money -5000

end_monitor

monitor_event FactionNewCapital FactionIsLocal
	and I_EventCounter DifficultyLevel = 2

	historic_event capital_change
	console_command add_money -2000

end_monitor

;================= Player Notification ==================
;--- Fall of Capitals
monitor_event GeneralCaptureSettlement SettlementName Rome
	and not FactionIsLocal
 
	historic_event fall_of_rome
terminate_monitor
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Arhus
	and not FactionIsLocal

	historic_event fall_of_arhus
terminate_monitor
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Zaragoza
	and not FactionIsLocal

	historic_event fall_of_barcelona
terminate_monitor
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Pecs
	and not FactionIsLocal

	historic_event fall_of_budapest
terminate_monitor
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Cairo
	and not FactionIsLocal

	historic_event fall_of_cairo
terminate_monitor
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Constantinople
	and not FactionIsLocal

	historic_event fall_of_constantinople
terminate_monitor
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Edinburgh
	and not FactionIsLocal

	historic_event fall_of_edinburgh
terminate_monitor
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Iconium
	and not FactionIsLocal

	historic_event fall_of_iconium
terminate_monitor
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Kiev
	and not FactionIsLocal

	historic_event fall_of_kiev
terminate_monitor
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Cracow
	and not FactionIsLocal

	historic_event fall_of_krakow
terminate_monitor
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Leon
	and not FactionIsLocal

	historic_event fall_of_leon
terminate_monitor
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Lisbon
	and not FactionIsLocal

	historic_event fall_of_lisbon
terminate_monitor
end_monitor

monitor_event GeneralCaptureSettlement SettlementName London
	and not FactionIsLocal

	historic_event fall_of_london
terminate_monitor
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Cordoba
	and not FactionIsLocal

	historic_event fall_of_cordoba
terminate_monitor
end_monitor

        monitor_event GeneralCaptureSettlement SettlementName Genoa
	and not FactionIsLocal

	historic_event fall_of_genoa
terminate_monitor
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Novgorod
	and not FactionIsLocal

	historic_event fall_of_novgorod
terminate_monitor
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Nuremburg
	and not FactionIsLocal

	historic_event fall_of_nuremburg
terminate_monitor
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Palermo
	and not FactionIsLocal

	historic_event fall_of_palermo
terminate_monitor
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Paris
	and not FactionIsLocal

	historic_event fall_of_paris
terminate_monitor
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Venice
	and not FactionIsLocal

	historic_event fall_of_venice
terminate_monitor
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Galway
	and not FactionIsLocal

	historic_event fall_of_galway
terminate_monitor
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Vilnius
	and not FactionIsLocal

	historic_event fall_of_vilnius
terminate_monitor
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bergen
	and not FactionIsLocal

	historic_event fall_of_bergen
terminate_monitor
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Khiva
	and not FactionIsLocal

	historic_event fall_of_khiva
terminate_monitor
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Kazan
	and not FactionIsLocal

	historic_event fall_of_kazan
terminate_monitor
end_monitor

;--- Death of Leaders
monitor_event BecomesFactionLeader FactionType moors
	and not FactionIsLocal
	and not Trait FactionRegent > 0

	historic_event moors_king_event

end_monitor
	
monitor_event BecomesFactionLeader FactionType moors
	and not FactionIsLocal
	and Trait FactionRegent > 0

	historic_event moors_regent_event

end_monitor

monitor_event BecomesFactionLeader FactionType portugal
	and not FactionIsLocal
	and not Trait FactionRegent > 0

	historic_event portugal_king_event

end_monitor
	
monitor_event BecomesFactionLeader FactionType portugal
	and not FactionIsLocal
	and Trait FactionRegent > 0

	historic_event portugal_regent_event

end_monitor

monitor_event BecomesFactionLeader FactionType spain
	and not FactionIsLocal
	and not Trait FactionRegent > 0

	historic_event spain_king_event

end_monitor
	
monitor_event BecomesFactionLeader FactionType spain
	and not FactionIsLocal
	and Trait FactionRegent > 0

	historic_event spain_regent_event

end_monitor

monitor_event BecomesFactionLeader FactionType turks
	and not FactionIsLocal
	and not Trait FactionRegent > 0

	historic_event turks_king_event

end_monitor
	
monitor_event BecomesFactionLeader FactionType turks
	and not FactionIsLocal
	and Trait FactionRegent > 0

	historic_event turks_regent_event

end_monitor

monitor_event BecomesFactionLeader FactionType egypt
	and not FactionIsLocal
	and not Trait FactionRegent > 0

	historic_event egypt_king_event

end_monitor

monitor_event BecomesFactionLeader FactionType egypt
	and not FactionIsLocal
	and Trait FactionRegent > 0

	historic_event egypt_regent_event

end_monitor

monitor_event BecomesFactionLeader FactionType byzantium
	and not FactionIsLocal
	and not Trait FactionRegent > 0

	historic_event byzantium_king_event

end_monitor

monitor_event BecomesFactionLeader FactionType byzantium
	and not FactionIsLocal
	and Trait FactionRegent > 0

	historic_event byzantium_regent_event

end_monitor

monitor_event BecomesFactionLeader FactionType russia
	and not FactionIsLocal
	and not Trait FactionRegent > 0

	historic_event russia_king_event

end_monitor

monitor_event BecomesFactionLeader FactionType russia
	and not FactionIsLocal
	and Trait FactionRegent > 0

	historic_event russia_regent_event

end_monitor

monitor_event BecomesFactionLeader FactionType poland
	and not FactionIsLocal
	and not Trait FactionRegent > 0

	historic_event poland_king_event

end_monitor

monitor_event BecomesFactionLeader FactionType poland
	and not FactionIsLocal
	and Trait FactionRegent > 0

	historic_event poland_regent_event

end_monitor

monitor_event BecomesFactionLeader FactionType hungary
	and not FactionIsLocal
	and not Trait FactionRegent > 0

	historic_event hungary_king_event

end_monitor

monitor_event BecomesFactionLeader FactionType hungary
	and not FactionIsLocal
	and Trait FactionRegent > 0

	historic_event hungary_regent_event

end_monitor

monitor_event BecomesFactionLeader FactionType hre
	and not FactionIsLocal
	and not Trait FactionRegent > 0

	historic_event hre_king_event

end_monitor

monitor_event BecomesFactionLeader FactionType hre
	and not FactionIsLocal
	and Trait FactionRegent > 0

	historic_event hre_regent_event

end_monitor

monitor_event BecomesFactionLeader FactionType france
	and not FactionIsLocal
	and not Trait FactionRegent > 0

	historic_event france_king_event

end_monitor

monitor_event BecomesFactionLeader FactionType france
	and not FactionIsLocal
	and Trait FactionRegent > 0

	historic_event france_regent_event

end_monitor

monitor_event BecomesFactionLeader FactionType england
	and not FactionIsLocal
	and not Trait FactionRegent > 0

	historic_event england_king_event

end_monitor

monitor_event BecomesFactionLeader FactionType england
	and not FactionIsLocal
	and Trait FactionRegent > 0

	historic_event england_regent_event

end_monitor

monitor_event BecomesFactionLeader FactionType scotland
	and not FactionIsLocal
	and not Trait FactionRegent > 0

	historic_event scotland_king_event

end_monitor

monitor_event BecomesFactionLeader FactionType scotland
	and not FactionIsLocal
	and Trait FactionRegent > 0

	historic_event scotland_regent_event

end_monitor

monitor_event BecomesFactionLeader FactionType venice
	and not FactionIsLocal
	and not Trait FactionRegent > 0

	historic_event venice_king_event

end_monitor

monitor_event BecomesFactionLeader FactionType venice
	and not FactionIsLocal
	and Trait FactionRegent > 0

	historic_event venice_regent_event

end_monitor

monitor_event BecomesFactionLeader FactionType milan
	and not FactionIsLocal
	and not Trait FactionRegent > 0

	historic_event milan_king_event

end_monitor

monitor_event BecomesFactionLeader FactionType milan
	and not FactionIsLocal
	and Trait FactionRegent > 0

	historic_event milan_regent_event

end_monitor

monitor_event BecomesFactionLeader FactionType sicily
	and not FactionIsLocal
	and not Trait FactionRegent > 0

	historic_event sicily_king_event

end_monitor

monitor_event BecomesFactionLeader FactionType sicily
	and not FactionIsLocal
	and Trait FactionRegent > 0

	historic_event sicily_regent_event

end_monitor

monitor_event BecomesFactionLeader FactionType knights_templar
	and not FactionIsLocal
	and not Trait FactionRegent > 0

	historic_event knights_templar_king_event

end_monitor

monitor_event BecomesFactionLeader FactionType knights_templar
	and not FactionIsLocal
	and Trait FactionRegent > 0

	historic_event knights_templar_regent_event

end_monitor

monitor_event BecomesFactionLeader FactionType kievan_rus
	and not FactionIsLocal
	and not Trait FactionRegent > 0

	historic_event kievan_rus_king_event

end_monitor

monitor_event BecomesFactionLeader FactionType kievan_rus
	and not FactionIsLocal
	and Trait FactionRegent > 0

	historic_event kievan_rus_regent_event

end_monitor

monitor_event BecomesFactionLeader FactionType aragon
	and not FactionIsLocal
	and not Trait FactionRegent > 0

	historic_event aragon_king_event

end_monitor

monitor_event BecomesFactionLeader FactionType aragon
	and not FactionIsLocal
	and Trait FactionRegent > 0

	historic_event aragon_regent_event

end_monitor

monitor_event BecomesFactionLeader FactionType denmark
	and not FactionIsLocal
	and not Trait FactionRegent > 0

	historic_event denmark_king_event

end_monitor

monitor_event BecomesFactionLeader FactionType denmark
	and not FactionIsLocal
	and Trait FactionRegent > 0

	historic_event denmark_regent_event

end_monitor

;monitor_event BecomesFactionLeader FactionType timurids
;	and not FactionIsLocal
;	and not Trait FactionRegent > 0
;
;	historic_event timurids_king_event
;
;end_monitor

;monitor_event BecomesFactionLeader FactionType timurids
;	and not FactionIsLocal
;	and Trait FactionRegent > 0
;
;	historic_event timurids_regent_event
;
;end_monitor

monitor_event BecomesFactionLeader FactionType norway
	and not FactionIsLocal
	and not Trait FactionRegent > 0

	historic_event norway_king_event

end_monitor

monitor_event BecomesFactionLeader FactionType norway
	and not FactionIsLocal
	and Trait FactionRegent > 0

	historic_event norway_regent_event

end_monitor

monitor_event BecomesFactionLeader FactionType jerusalem
	and not FactionIsLocal
	and not Trait FactionRegent > 0

	historic_event jerusalem_king_event

end_monitor
	
monitor_event BecomesFactionLeader FactionType jerusalem
	and not FactionIsLocal
	and Trait FactionRegent > 0

	historic_event jerusalem_regent_event

end_monitor

monitor_event BecomesFactionLeader FactionType teutonic_order
	and not FactionIsLocal
	and not Trait FactionRegent > 0

	historic_event teutonic_order_king_event

end_monitor

monitor_event BecomesFactionLeader FactionType teutonic_order
	and not FactionIsLocal
	and Trait FactionRegent > 0

	historic_event teutonic_order_regent_event

end_monitor

monitor_event BecomesFactionLeader FactionType kwarezm
	and not FactionIsLocal
	and not Trait FactionRegent > 0

	historic_event kwarezm_king_event

end_monitor

monitor_event BecomesFactionLeader FactionType kwarezm
	and not FactionIsLocal
	and Trait FactionRegent > 0

	historic_event kwarezm_regent_event

end_monitor

monitor_event BecomesFactionLeader FactionType cumans
	and not FactionIsLocal
	and not Trait FactionRegent > 0

	historic_event cumans_king_event

end_monitor

monitor_event BecomesFactionLeader FactionType cumans
	and not FactionIsLocal
	and Trait FactionRegent > 0

	historic_event cumans_regent_event

end_monitor

monitor_event BecomesFactionLeader FactionType mongols
	and not FactionIsLocal
	and not Trait FactionRegent > 0

	historic_event mongols_king_event

end_monitor

monitor_event BecomesFactionLeader FactionType mongols
	and not FactionIsLocal
	and Trait FactionRegent > 0

	historic_event mongols_regent_event

end_monitor

;--- Princess Comes of Age
monitor_event CharacterComesOfAge AgentType = princess
	and FactionIsLocal

	historic_event princess_local

end_monitor

monitor_event CharacterComesOfAge AgentType = princess
	and FactionType england
	and not FactionIsLocal

	historic_event princess_england

end_monitor

monitor_event CharacterComesOfAge AgentType = princess
	and FactionType france
	and not FactionIsLocal

	historic_event princess_france

end_monitor

monitor_event CharacterComesOfAge AgentType = princess
	and FactionType hre
	and not FactionIsLocal

	historic_event princess_hre

end_monitor

monitor_event CharacterComesOfAge AgentType = princess
	and FactionType milan
	and not FactionIsLocal

	historic_event princess_milan

end_monitor

monitor_event CharacterComesOfAge AgentType = princess
	and FactionType venice
	and not FactionIsLocal

	historic_event princess_venice

end_monitor

monitor_event CharacterComesOfAge AgentType = princess
	and FactionType spain
	and not FactionIsLocal

	historic_event princess_spain

end_monitor

monitor_event CharacterComesOfAge AgentType = princess
	and FactionType portugal
	and not FactionIsLocal

	historic_event princess_portugal

end_monitor

monitor_event CharacterComesOfAge AgentType = princess
	and FactionType sicily
	and not FactionIsLocal

	historic_event princess_sicily

end_monitor

monitor_event CharacterComesOfAge AgentType = princess
	and FactionType byzantium
	and not FactionIsLocal

	historic_event princess_byzantium

end_monitor

monitor_event CharacterComesOfAge AgentType = princess
	and FactionType russia
	and not FactionIsLocal

	historic_event princess_russia

end_monitor

monitor_event CharacterComesOfAge AgentType = princess
	and FactionType denmark
	and not FactionIsLocal

	historic_event princess_denmark

end_monitor

monitor_event CharacterComesOfAge AgentType = princess
	and FactionType poland
	and not FactionIsLocal

	historic_event princess_poland

end_monitor

monitor_event CharacterComesOfAge AgentType = princess
	and FactionType hungary
	and not FactionIsLocal

	historic_event princess_hungary

end_monitor

monitor_event CharacterComesOfAge AgentType = princess
	and FactionType moors
	and not FactionIsLocal

	historic_event princess_moors

end_monitor

monitor_event CharacterComesOfAge AgentType = princess
	and FactionType turks
	and not FactionIsLocal

	historic_event princess_turks

end_monitor

monitor_event CharacterComesOfAge AgentType = princess
	and FactionType egypt
	and not FactionIsLocal

	historic_event princess_egypt

end_monitor

monitor_event CharacterComesOfAge AgentType = princess
	and FactionType jerusalem
	and not FactionIsLocal

	historic_event princess_jerusalem

end_monitor

monitor_event CharacterComesOfAge AgentType = princess
	and FactionType kievan_rus
	and not FactionIsLocal

	historic_event princess_kievan_rus

end_monitor

monitor_event CharacterComesOfAge AgentType = princess
	and FactionType aragon
	and not FactionIsLocal

	historic_event princess_aragon

end_monitor

monitor_event CharacterComesOfAge AgentType = princess
	and FactionType scotland
	and not FactionIsLocal

	historic_event princess_scotland

end_monitor


monitor_event CharacterComesOfAge AgentType = princess
	and FactionType norway
	and not FactionIsLocal

	historic_event princess_norway

end_monitor

;================= Interactive Events ===================
;--- Great Trade Fair 
monitor_event FactionTurnStart FactionIsLocal
	and FactionBuildingExists > fairground
	and RandomPercent < 10

	historic_event great_fair true

end_monitor

monitor_conditions I_EventCounter great_fair_accepted = 1
	console_command add_money -2500
	set_event_counter great_fair_accepted = 0
end_monitor

monitor_conditions I_EventCounter great_fair_declined = 1
	set_event_counter great_fair_declined = 0
end_monitor

;--- Great Tourney 
monitor_event FactionTurnStart FactionIsLocal
	and FactionBuildingExists > jousting_lists
	and RandomPercent < 10

	historic_event great_tourney true

end_monitor

monitor_conditions I_EventCounter great_tourney_accepted = 1
	console_command add_money -3000
	set_event_counter great_tourney_accepted = 0
end_monitor

monitor_conditions I_EventCounter great_tourney_declined = 1
	set_event_counter great_tourney_declined = 0
end_monitor

;--- Troubadours
monitor_event FactionTurnStart FactionIsLocal
	and FactionBuildingExists > town_hall
	and RandomPercent < 5
	and I_TurnNumber > 10

	historic_event troubadours_event true

end_monitor

monitor_conditions I_EventCounter troubadours_event_accepted = 1
	console_command add_money -1000
	set_event_counter troubadours_event_accepted = 0
end_monitor
	
monitor_conditions I_EventCounter troubadours_event_declined = 1
	set_event_counter troubadours_event_declined = 0
end_monitor

;--- Great Councils
set_event_counter had_council 0

monitor_event EventCounter EventCounterType lateran_council1
	and EventCounter > 0
	set_event_counter had_council  1
terminate_monitor
end_monitor

monitor_event EventCounter EventCounterType lateran_council2
	and EventCounter > 0
	set_event_counter had_council  1
terminate_monitor
end_monitor

monitor_event EventCounter EventCounterType lateran_council3
	and EventCounter > 0
	set_event_counter had_council  1
terminate_monitor
end_monitor

monitor_event EventCounter EventCounterType lateran_council4
	and EventCounter > 0
	set_event_counter had_council  1
terminate_monitor
end_monitor

monitor_event FactionTurnStart FactionIsLocal
	and not FactionReligion islam
	and not FactionReligion pagan
	and not FactionReligion orthodox
	and I_EventCounter had_council  1

	historic_event great_council true
	set_event_counter had_council  0

end_monitor

monitor_conditions I_EventCounter great_council_accepted = 1
	console_command add_money -1500
	set_event_counter great_council_accepted = 0
end_monitor
	
monitor_conditions I_EventCounter great_council_declined = 1
	set_event_counter great_council_declined = 0
end_monitor

;--- Pirates
monitor_event FactionTurnStart FactionIsLocal
	and Treasury > 75000
	and RandomPercent < 10
	and FactionBuildingExists >= port
	and I_TurnNumber > 10

	historic_event pirates true

end_monitor

monitor_conditions I_EventCounter pirates_accepted = 1
	console_command add_money -5000
	set_event_counter pirates_accepted = 0
end_monitor
	
monitor_conditions I_EventCounter pirates_declined = 1
	if RandomPercent < 51
		console_command add_money -12000
	end_if
	set_event_counter pirates_declined = 0
end_monitor

;========================================================
;======= EMERGENT FACTIONS/NATIONAL UPRISINGS ===========
;========================================================

;============== William Wallace Uprising ================

declare_counter wallace_spawned

monitor_event FactionTurnStart FactionType scotland
	and I_TurnNumber = 55
	and I_NumberOfSettlements scotland < 4

	set_event_counter wallace_spawned 1
	
terminate_monitor
end_monitor
	
monitor_event FactionTurnStart FactionType scotland
	and I_NumberOfSettlements scotland < 2

	set_event_counter wallace_spawned 1

terminate_monitor
end_monitor

monitor_event GeneralCaptureSettlement FactionType england
	and TargetFactionType scotland
	and I_IsFactionAIControlled scotland

	set_event_counter wallace_spawned 1

terminate_monitor
end_monitor

monitor_conditions I_EventCounter wallace_spawned = 1

	spawn_army 
		faction scotland			
		character	William Wallace, named character, age 20, x 55, y 253, direction SE, battle_model Wallace_General, portrait wallace, label scotland4wallace
		traits Supplies 1 , Turnsaway 3 , MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , ScotlandHero 1 , LoyaltyStarter 1, BattleChivalry 2 , Loyal 2 , Just 2 , Rabblerouser 3 , Hardened 1
		unit		Highland Nobles	exp 4 armour 0 weapon_lvl 0
		unit		Highland Nobles	exp 2 armour 0 weapon_lvl 0
		unit		Highlanders	exp 3 armour 1 weapon_lvl 0
		unit		Highlanders	exp 3 armour 1 weapon_lvl 0
		unit		Highlanders	exp 3 armour 1 weapon_lvl 0
		unit		Highland Pikemen	exp 4 armour 1 weapon_lvl 0
		unit		Highland Pikemen	exp 4 armour 1 weapon_lvl 0
		unit		Highland Pikemen	exp 3 armour 1 weapon_lvl 0
		unit		Highland Pikemen	exp 3 armour 1 weapon_lvl 0
		unit		Highland Nobles	exp 3 armour 0 weapon_lvl 0
		unit		Highland Nobles	exp 3 armour 0 weapon_lvl 0
		unit		Noble Highland Archers	exp 1 armour 1 weapon_lvl 0
		unit		Noble Highland Archers	exp 1 armour 1 weapon_lvl 0
		unit		Noble Highland Archers	exp 1 armour 1 weapon_lvl 0
		unit		Highland Rabble	exp 3 armour 0 weapon_lvl 0
		unit		Highland Rabble	exp 3 armour 0 weapon_lvl 0
		unit		Highland Rabble	exp 4 armour 0 weapon_lvl 0
		unit		Highland Rabble	exp 4 armour 0 weapon_lvl 0
		unit		Border Horse	exp 2 armour 0 weapon_lvl 0
		unit		Border Horse	exp 2 armour 0 weapon_lvl 0
		
	end
		console_command add_money scotland, 15000
	historic_event scotland_wallace event/william_wallace.bik
terminate_monitor
end_monitor

set_event_counter attack_wallace 0
monitor_event FactionTurnStart FactionType scotland
and IsFactionAIControlled
and I_CharacterExists scotland4wallace

  if I_SettlementOwner Edinburgh = scotland
    terminate_monitor
  end_if
  
  if I_SettlementUnderSiege Edinburgh
  and I_EventCounter attack_wallace = 0 ;if Edinburgh under siege already, avoid ctd.
        terminate_monitor
    end_if
    
    if not I_CharacterTypeNearTile scotland, named_character, 0, 55, 253 ;if scotland4wallace not standing where it should, avoid ctd
    terminate_monitor
    end_if
    
  if I_EventCounter attack_wallace = 1
    siege_settlement scotland4wallace, Edinburgh, attack
    terminate_monitor
  end_if
  
  if I_EventCounter attack_wallace = 0
    siege_settlement scotland4wallace, Edinburgh, maintain
    set_event_counter attack_wallace 1
  end_if

end_monitor

;=============== Golden Horde Emergent ==================
	monitor_event EventCounter EventCounterType mongols_invasion_warn
		and EventCounter = 1
		  
		add_events
			event	counter	mongols_invasion
		date	4
		event	counter	mongols_invasion
		date	13
		event	counter	mongols_invasion
		date	29
		event	counter	mongols_invasion
		date	50
		event	counter	mongols_invasion
		date	100
		end_add_events
		terminate_monitor
	end_monitor

;--human part
monitor_event PreFactionTurnStart FactionType mongols
	and FactionIsLocal
	and I_EventCounter mongols_invasion = 1

	spawn_army
		faction mongols
		character	random_name, named character, age 26, x 498, y 140, label mongols4flash1
		traits Supplies 1 , Turnsaway 3, MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 3 , Genocide 2 , BattleDread 2 , StrategyDread 1 , PublicFaith 1 , Loyal 2 , ContentGeneral 3
		unit	Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 1 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 2 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 1 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 2 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 2 armour 0 weapon_lvl 0
		unit	Hoshiga Horse Archers	exp 3 armour 0 weapon_lvl 0
		unit	Hoshiga Horse Archers	exp 4 armour 0 weapon_lvl 0
		unit	Hoshiga Horse Archers	exp 3 armour 0 weapon_lvl 0
		unit	Hoshiga Horse Archers	exp 3 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 3 armour 0 weapon_lvl 0
		unit	ME Trebuchet	exp 6 armour 0 weapon_lvl 0
		unit	ME Trebuchet	exp 6 armour 0 weapon_lvl 0
	end

	spawn_character mongols random_name, priest, age 31, x 497, y 140
	point_at_character mongols4flash1
	character_flash_start mongols4flash1
	move_strat_camera 498, 140
			terminate_monitor
	end_monitor

monitor_conditions I_CharacterSelected mongols4flash1
	ui_flash_stop
	character_flash_stop mongols4flash1
terminate_monitor
end_monitor

monitor_event PreFactionTurnStart FactionType mongols
	and FactionIsLocal
	and I_EventCounter mongols_invasion = 3

	spawn_army
		faction mongols
		character	random_name, named character, age 26, x 498, y 140, label mongols4flash2
		traits Supplies 1 , Turnsaway 3, MilitaryInclination 1 , Military_Edu 1 , NaturalMilitarySkill 2 , GoodCommander 2 , Loyal 2 , ContentGeneral 3
		unit	Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 1 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 2 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 1 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 2 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 2 armour 0 weapon_lvl 0
		unit	Hoshiga Horse Archers	exp 3 armour 0 weapon_lvl 0
		unit	Hoshiga Horse Archers	exp 4 armour 0 weapon_lvl 0
		unit	Hoshiga Horse Archers	exp 3 armour 0 weapon_lvl 0
		unit	Khabutu Archers		exp 1 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 3 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 3 armour 0 weapon_lvl 0
		end

	spawn_character mongols random_name, priest, age 22, x 497, y 140
	point_at_character mongols4flash2
	character_flash_start mongols4flash2
	move_strat_camera 498, 140
terminate_monitor
end_monitor

monitor_conditions I_CharacterSelected mongols4flash2
	ui_flash_stop
	character_flash_stop mongols4flash2
terminate_monitor
end_monitor

monitor_event PreFactionTurnStart FactionType mongols
	and FactionIsLocal
	and I_EventCounter mongols_invasion = 3

	spawn_army
		faction mongols
		character	random_name, named character, age 26, x 498, y 140, label mongols4flash3
		traits Supplies 1 , Turnsaway 3 , MilitaryInclination 1 , Military_Edu 3 , NaturalMilitarySkill 3 , GoodCommander 5 , Loyal 2 , ContentGeneral 3, BattleDread 3 , StrategyDread 2
		unit	Keshikten Bodyguard		exp 7 armour 0 weapon_lvl 0
		unit	Khorchi Horse Archers			exp 7 armour 0 weapon_lvl 0
		unit	Khorchi Horse Archers			exp 7 armour 0 weapon_lvl 0
		unit	Khorchi Horse Archers			exp 7 armour 0 weapon_lvl 0
		unit	Hoshiga Horse Archers	exp 3 armour 0 weapon_lvl 0
		unit	Hoshiga Horse Archers	exp 4 armour 0 weapon_lvl 0
		unit	Hoshiga Horse Archers	exp 3 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	ME Trebuchet	exp 6 armour 0 weapon_lvl 0
		unit	ME Trebuchet	exp 6 armour 0 weapon_lvl 0
	end

	spawn_character mongols random_name, priest, age 22, x 497, y 140
	point_at_character mongols4flash3
	character_flash_start mongols4flash3
	move_strat_camera 498, 140
terminate_monitor
end_monitor

monitor_conditions I_CharacterSelected mongols4flash3
	ui_flash_stop
	character_flash_stop mongols4flash3
terminate_monitor
end_monitor

;--ai part
monitor_event PreFactionTurnStart FactionType mongols ;make sure the horde will acquire their first settlement early era
	and not FactionIsLocal
	and I_EventCounter mongols_invasion = 1
	and not I_SettlementOwner Urgench = mongols
	and not I_SettlementOwner Khiva = mongols
	and not I_SettlementOwner Konjikala = mongols

	spawn_army
		faction mongols
		character	random_name, named character, age 26, x 500, y 153, label mongols4supportgen1, family
		traits Supplies 1 , Turnsaway 3, MilitaryInclination 1 , Military_Edu 3 , NaturalMilitarySkill 2 , GoodCommander 3 , Bloodthirsty 2 , BattleDread 3 , StrategyDread 2 , PublicFaith 1 , Loyal 2 , GoodCavalryGeneral 2 , ReligionStarter 1
		unit	Keshikten Bodyguard		exp 7 armour 0 weapon_lvl 0
		unit	Khorchi Horse Archers			exp 7 armour 0 weapon_lvl 0
		unit	Khorchi Horse Archers			exp 7 armour 0 weapon_lvl 0
		unit	Khorchi Horse Archers			exp 7 armour 0 weapon_lvl 0
		unit	Khorchi Horse Archers			exp 7 armour 0 weapon_lvl 0
		unit	Khorchi Horse Archers			exp 7 armour 0 weapon_lvl 0
		unit	Khorchi Horse Archers			exp 7 armour 0 weapon_lvl 0
		unit	Khorchi Horse Archers			exp 7 armour 0 weapon_lvl 0
		unit	Khorchi Horse Archers			exp 7 armour 0 weapon_lvl 0
		unit	Turhagut Lancers		exp 5 armour 0 weapon_lvl 0
		unit	Turhagut Lancers		exp 4 armour 0 weapon_lvl 0
		unit	Turhagut Lancers		exp 4 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 5 armour 0 weapon_lvl 0
		unit	Turhagut Lancers		exp 4 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 4 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 4 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 3 armour 0 weapon_lvl 0
		unit	ME Trebuchet		exp 5 armour 0 weapon_lvl 0
		unit	ME Trebuchet		exp 5 armour 0 weapon_lvl 0
		unit	ME Trebuchet		exp 5 armour 0 weapon_lvl 0

		end

	spawn_army
		faction mongols
		character	random_name, named character, age 25, x 499, y 154, label mongols4supportgen2, family
		traits Supplies 1 , Turnsaway 3, MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 3 , Anger 3 , BattleDread 3 , StrategyDread 3 , PublicFaith 2 , Loyal 2 , ContentGeneral 3 , ReligionStarter 1
		unit	Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
		unit	Merguen Archers		exp 5 armour 0 weapon_lvl 0
		unit	Merguen Archers		exp 5 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut		exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut		exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut		exp 6 armour 0 weapon_lvl 0
		unit	Lubchiten Horse Archers		exp 4 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Lubchiten Horse Archers		exp 4 armour 0 weapon_lvl 0
		unit	Lubchiten Horse Archers		exp 4 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	ME Trebuchet	exp 4 armour 0 weapon_lvl 0
		unit	ME Trebuchet		exp 5 armour 0 weapon_lvl 0
		unit	ME Trebuchet		exp 5 armour 0 weapon_lvl 0
		end

	spawn_army
		faction mongols
		character	random_name, named character, age 24, x 499, y 153, label mongols4supportgen3,
		traits Supplies 1 , Turnsaway 3, MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 3 , Anger 2 , BattleDread 2 , StrategyDread 2 , PublicFaith 4, TouchedByTheGods 1 , Loyal 2 , ContentGeneral 3 , ReligionStarter 1
		unit	Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 5 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 5 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 5 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut		exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut		exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut		exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut		exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut	exp 4 armour 0 weapon_lvl 0
		unit	Lubchiten Horse Archers		exp 4 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Lubchiten Horse Archers		exp 4 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 5 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 4 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 6 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 4 armour 0 weapon_lvl 0
		unit	ME Trebuchet	exp 6 armour 0 weapon_lvl 0
		unit	ME Trebuchet			exp 5 armour 0 weapon_lvl 0
		unit	ME Trebuchet			exp 5 armour 0 weapon_lvl 0
		end

		spawn_army
		faction mongols
		character	random_name, named character, age 25, x 501, y 153, label mongols4supportgen4,
		traits Supplies 1 , Turnsaway 3, MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 1 , GoodCommander 2 , Anger 3 , BattleDread 2 , StrategyDread 2 , PublicFaith 1 , Loyal 2 , ContentGeneral 3
		unit	Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut		exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut		exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 6 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 6 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Khorchi Horse Archers		exp 4 armour 0 weapon_lvl 0
		unit	Khorchi Horse Archers		exp 6 armour 0 weapon_lvl 0
		unit	Khorchi Horse Archers		exp 6 armour 0 weapon_lvl 0
		unit	Khorchi Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Lubchiten Horse Archers		exp 4 armour 0 weapon_lvl 0
		unit	Lubchiten Horse Archers		exp 4 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 5 armour 0 weapon_lvl 0
		unit	Turhagut Lancers		exp 4 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 4 armour 0 weapon_lvl 0
		unit	ME Trebuchet	exp 4 armour 0 weapon_lvl 0
		unit	ME Trebuchet	exp 6 armour 0 weapon_lvl 0
		unit	ME Trebuchet	exp 6 armour 0 weapon_lvl 0
		end

	if I_CharacterTypeNearTile mongols, named_character, 0, 501, 153
		siege_settlement mongols4supportgen4, Urgench, maintain
	end_if

	if I_CharacterTypeNearTile mongols, named_character, 0, 499, 154
		siege_settlement mongols4supportgen2, Urgench, maintain
	end_if

	if I_CharacterTypeNearTile mongols, named_character, 0, 499, 153
		siege_settlement mongols4supportgen3, Urgench, maintain
	end_if

	if I_CharacterTypeNearTile mongols, named_character, 0, 500, 153
		siege_settlement mongols4supportgen1, Urgench, attack
	end_if
terminate_monitor
end_monitor

monitor_event FactionTurnEnd FactionType mongols
	and not FactionIsLocal
	and I_CharacterTypeNearTile mongols, named_character, 10, 440, 194

	historic_event mongols_blue_horde_caucasus

		spawn_army
		faction mongols
		character	random_name, named character, age 25, x 430, y 195
		traits Supplies 1 , Turnsaway 3, MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 1 , GoodCommander 2 , Anger 3 , BattleDread 2 , StrategyDread 2 , PublicFaith 1 , Loyal 2 , ContentGeneral 3
		unit	Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
		unit	Hoshiga Horse Archers	exp 3 armour 0 weapon_lvl 0
		unit	Hoshiga Horse Archers	exp 4 armour 0 weapon_lvl 0
		unit	Hoshiga Horse Archers	exp 3 armour 0 weapon_lvl 0
		unit	Hoshiga Horse Archers	exp 3 armour 0 weapon_lvl 0
		unit	Hoshiga Horse Archers	exp 5 armour 0 weapon_lvl 0
		end
	console_command add_money mongols, 5000
		terminate_monitor
	end_monitor

monitor_event FactionTurnEnd FactionType mongols
	and not FactionIsLocal
	and I_CharacterTypeNearTile mongols, named_character, 10, 326, 202

	historic_event mongols_blue_horde_kiev

	spawn_army
		faction mongols
		character	random_name, named character, age 25, x 316, y 202
		traits Supplies 1 , Turnsaway 3, MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 1 , GoodCommander 2 , Anger 3 , BattleDread 2 , StrategyDread 2 , PublicFaith 1 , Loyal 2 , ContentGeneral 3
		unit	Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
		unit	Hoshiga Horse Archers	exp 3 armour 0 weapon_lvl 0
		unit	Hoshiga Horse Archers	exp 4 armour 0 weapon_lvl 0
		unit	Hoshiga Horse Archers	exp 3 armour 0 weapon_lvl 0
		unit	Hoshiga Horse Archers	exp 3 armour 0 weapon_lvl 0
		unit	Hoshiga Horse Archers	exp 5 armour 0 weapon_lvl 0
		end
	console_command add_money mongols, 5000
terminate_monitor
end_monitor

monitor_event FactionTurnEnd FactionType mongols
	and not FactionIsLocal
	and I_CharacterTypeNearTile mongols, named_character, 10, 280, 184

	historic_event mongols_blue_horde_hungary

	spawn_army
		faction mongols
		character	random_name, named character, age 25, x 290, y 190
		traits Supplies 1 , Turnsaway 3, MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 1 , GoodCommander 2 , Anger 3 , BattleDread 2 , StrategyDread 2 , PublicFaith 1 , Loyal 2 , ContentGeneral 3
		unit	Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
		unit	Hoshiga Horse Archers	exp 3 armour 0 weapon_lvl 0
		unit	Hoshiga Horse Archers	exp 4 armour 0 weapon_lvl 0
		unit	Hoshiga Horse Archers	exp 3 armour 0 weapon_lvl 0
		unit	Hoshiga Horse Archers	exp 3 armour 0 weapon_lvl 0
		unit	Hoshiga Horse Archers	exp 5 armour 0 weapon_lvl 0
		
		end
	console_command add_money mongols, 5000
terminate_monitor
end_monitor

monitor_event FactionTurnEnd FactionType mongols
	and not FactionIsLocal
	and I_CharacterTypeNearTile mongols, named_character, 5, 396, 89

	historic_event mongols_horde_baghdad

terminate_monitor
end_monitor

monitor_event PreFactionTurnStart FactionType mongols
	and I_EventCounter mongols_invasion = 1

	spawn_army
		faction mongols
		character	Chagatai, named character, age 26, x 505, y 145, family
		traits Supplies 1 , Turnsaway 3, MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 3 , Genocide 2 , BattleDread 2 , StrategyDread 1 , PublicFaith 1 , Loyal 2 , ContentGeneral 3
		unit	Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 5 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 5 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 3 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 3 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Hoschuchi Lancers		exp 5 armour 0 weapon_lvl 0
		unit	Khabutu Archers		exp 4 armour 0 weapon_lvl 0
		unit	Khabutu Archers		exp 4 armour 0 weapon_lvl 0
		unit	Lubchiten Horse Archers		exp 4 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Turhagut Lancers		exp 3 armour 0 weapon_lvl 0
		unit	Turhagut Lancers		exp 3 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 6 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 6 armour 0 weapon_lvl 0
		end
	console_command add_money mongols, 15000

		spawn_army 
		faction mongols
		character	Subutai, named character, age 25, x 507, y 140, family
		traits Supplies 1 , Turnsaway 3, MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 2 , Anger 3 , BattleDread 3 , StrategyDread 3 , PublicFaith 2 , Loyal 2 , ContentGeneral 3 , ReligionStarter 1
		unit	Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
		unit	Merguen Archers		exp 5 armour 0 weapon_lvl 0
		unit	Merguen Archers		exp 5 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut		exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut		exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut		exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut		exp 4 armour 0 weapon_lvl 0
		unit	Khabutu Archers		exp 6 armour 0 weapon_lvl 0
		unit	Hoschuchi Lancers		exp 5 armour 0 weapon_lvl 0
		unit	Khabutu Archers		exp 4 armour 0 weapon_lvl 0
		unit	Lubchiten Horse Archers		exp 4 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 4 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 4 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 4 armour 0 weapon_lvl 0
		unit	ME Trebuchet			exp 5 armour 0 weapon_lvl 0
		unit	ME Trebuchet			exp 5 armour 0 weapon_lvl 0
		end
	console_command add_money mongols, 15000

		spawn_army 
		faction mongols
		character	Berkei, named character, age 24, x 500, y 150,
		traits Supplies 1 , Turnsaway 3, MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 2 , Anger 2 , BattleDread 2 , StrategyDread 2 , PublicFaith 4, TouchedByTheGods 1 , Loyal 2 , ContentGeneral 3 , ReligionStarter 1
		unit	Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 5 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 5 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 5 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut		exp 4 armour 0 weapon_lvl 0
		unit	Khabutu Archers		exp 4 armour 0 weapon_lvl 0
		unit	Khabutu Archers		exp 4 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Lubchiten Horse Archers		exp 4 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Lubchiten Horse Archers		exp 4 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Lubchiten Horse Archers		exp 4 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Hoshiga Horse Archers	exp 6 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Hoshiga Horse Archers	exp 6 armour 0 weapon_lvl 0
		unit	ME Trebuchet			exp 5 armour 0 weapon_lvl 0
		unit	ME Trebuchet			exp 5 armour 0 weapon_lvl 0
		end
		console_command add_money mongols, 15000

	spawn_army
		faction mongols
		character	random_name, named character, age 25, x 504, y 144
		traits Supplies 1 , Turnsaway 3, MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 1 , GoodCommander 2 , Anger 3 , BattleDread 2 , StrategyDread 2 , PublicFaith 1 , Loyal 2 , ContentGeneral 3
		unit	Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 6 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 6 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Khabutu Archers		exp 6 armour 0 weapon_lvl 0
		unit	Khabutu Archers		exp 6 armour 0 weapon_lvl 0
		unit	Lubchiten Horse Archers		exp 4 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 4 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 4 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 4 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 6 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 6 armour 0 weapon_lvl 0
		end
		console_command add_money mongols, 15000

	spawn_character mongols random_name, priest, age 22, x 480, y 140
	spawn_character mongols random_name, priest, age 27, x 500, y 98
	spawn_character mongols random_name, priest, age 32, x 470, y 120
	spawn_character mongols random_name, priest, age 33, x 490, y 150
	spawn_character mongols random_name, spy, age 20, x 500, y 135
	spawn_character mongols random_name, spy, age 20, x 490, y 135
	spawn_character mongols random_name, spy, age 29, x 489, y 110 
	spawn_character mongols random_name, assassin, age 31, x 504, y 132 
	spawn_character mongols random_name, assassin, age 33, x 491, y 144 
	spawn_character mongols random_name, assassin, age 21, x 495, y 135
terminate_monitor
end_monitor

monitor_event PreFactionTurnStart FactionType mongols
	and not FactionIsLocal
	and I_EventCounter mongols_invasion = 2

	spawn_army
		faction mongols
		character	Batu, named character, age 26, x 505, y 145, family
		traits Supplies 1 , Turnsaway 3 , MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 3 , GoodCommander 3 , Genocide 2 , BattleDread 2 , StrategyDread 3 , PublicFaith 1 , Loyal 2 , ContentGeneral 3 , ReligionStarter 1
		unit	Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 5 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 5 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 3 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 3 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Hoschuchi Lancers		exp 5 armour 0 weapon_lvl 0
		unit	Khabutu Archers		exp 4 armour 0 weapon_lvl 0
		unit	Khabutu Archers		exp 4 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 3 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 3 armour 0 weapon_lvl 0
		unit	ME Trebuchet			exp 5 armour 0 weapon_lvl 0
		unit	ME Trebuchet			exp 5 armour 0 weapon_lvl 0
	end
		console_command add_money mongols, 15000

	spawn_army
		faction mongols
		character	Tsagadai, named character, age 25, x 500, y 191
		traits Supplies 1 , Turnsaway 3 , MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 1 , GoodCommander 2 , Anger 3 , BattleDread 2 , StrategyDread 2 , PublicFaith 1 , Loyal 2 , ContentGeneral 3
		unit	Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 5 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 5 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Khabutu Archers		exp 6 armour 0 weapon_lvl 0
		unit	Hoschuchi Lancers		exp 5 armour 0 weapon_lvl 0
		unit	Khabutu Archers		exp 4 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 4 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 4 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 4 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 5 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 5 armour 0 weapon_lvl 0
	end
		console_command add_money mongols, 15000

	spawn_army
		faction mongols
		character	random_name, named character, age 26, x 508, y 92
		traits Supplies 1 , Turnsaway 3 , MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 3 , GoodCommander 3 , Genocide 2 , BattleDread 2 , StrategyDread 3 , PublicFaith 1 , Loyal 2 , ContentGeneral 3 , ReligionStarter 1
		unit	Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 3 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 3 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 3 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 3 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 3 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 3 armour 0 weapon_lvl 0
	end

		console_command add_money mongols, 15000
	spawn_character mongols random_name, priest, age 22, x 480, y 140
	spawn_character mongols random_name, priest, age 27, x 500, y 98
	spawn_character mongols random_name, spy, age 20, x 500, y 135
	spawn_character mongols random_name, spy, age 20, x 490, y 135
	spawn_character mongols random_name, spy, age 29, x 489, y 110 
	spawn_character mongols random_name, assassin, age 31, x 504, y 132 
	spawn_character mongols random_name, assassin, age 33, x 491, y 144 
	spawn_character mongols random_name, assassin, age 21, x 495, y 135
	console_command add_money mongols, 20000
terminate_monitor
end_monitor

monitor_event PreFactionTurnStart FactionType mongols
	and not FactionIsLocal
	and I_EventCounter mongols_invasion = 3

	spawn_army
		faction mongols
		character	Menglai, named character, age 25, x 490, y 137
		traits Supplies 1 , Turnsaway 3 , MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 1 , GoodCommander 3 , BattleDread 2 , StrategyDread 3 , PublicFaith 2 , Loyal 2 , ContentGeneral 3
		unit	Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 5 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 5 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 3 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 3 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Hoschuchi Lancers		exp 5 armour 0 weapon_lvl 0
		unit	Khabutu Archers		exp 4 armour 0 weapon_lvl 0
		unit	Khabutu Archers		exp 4 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 3 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 3 armour 0 weapon_lvl 0
		unit	ME Trebuchet			exp 5 armour 0 weapon_lvl 0
		unit	ME Trebuchet			exp 5 armour 0 weapon_lvl 0
	end
	console_command add_money mongols, 15000

	spawn_army
		faction mongols
		character	Jagadai, named character, age 25, x 502, y 144
		traits Supplies 1 , Turnsaway 3 , MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 1 , GoodCommander 2 , Anger 3 , BattleDread 2 , StrategyDread 2 , PublicFaith 1 , Loyal 2 , ContentGeneral 3
		unit	Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 6 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 6 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Khabutu Archers		exp 6 armour 0 weapon_lvl 0
		unit	Khabutu Archers		exp 6 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 4 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 4 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 4 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 6 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 6 armour 0 weapon_lvl 0
	end
		console_command add_money mongols, 15000

	spawn_character mongols random_name, priest, age 22, x 480, y 140
	spawn_character mongols random_name, priest, age 27, x 500, y 98
	spawn_character mongols random_name, spy, age 33, x 490, y 150
	spawn_character mongols random_name, spy, age 20, x 500, y 135
	spawn_character mongols random_name, assassin, age 20, x 490, y 135
	spawn_character mongols random_name, assassin, age 21, x 495, y 135
		console_command add_money mongols, 20000		
		terminate_monitor
	end_monitor

monitor_event PreFactionTurnStart FactionType mongols
	and not FactionIsLocal
	and I_EventCounter mongols_invasion = 4

		spawn_army 
		faction mongols
		character	Hulegu, named character, age 25, x 498, y 120
		traits Supplies 1 , Turnsaway 3, MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 2 , Genocide 2 , BattleDread 2 , StrategyDread 3 , PublicFaith 3 , Loyal 2 , ContentGeneral 3 , ReligionStarter 1
		unit	Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut		exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut		exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut		exp 6 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut		exp 6 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Khabutu Archers		exp 4 armour 0 weapon_lvl 0
		unit	Khabutu Archers		exp 4 armour 0 weapon_lvl 0
		unit	Khabutu Archers		exp 6 armour 0 weapon_lvl 0
		unit	Khabutu Archers		exp 6 armour 0 weapon_lvl 0
		unit	Lubchiten Horse Archers		exp 4 armour 0 weapon_lvl 0
		unit	Lubchiten Horse Archers		exp 4 armour 0 weapon_lvl 0
		unit	Lubchiten Horse Archers		exp 4 armour 0 weapon_lvl 0
		unit	Lubchiten Horse Archers		exp 4 armour 0 weapon_lvl 0
		unit	Lubchiten Horse Archers		exp 4 armour 0 weapon_lvl 0
		unit	Turhagut Lancers		exp 4 armour 0 weapon_lvl 0
		unit	Turhagut Lancers		exp 4 armour 0 weapon_lvl 0
		unit	Turhagut Lancers		exp 4 armour 0 weapon_lvl 0
		unit	Turhagut Lancers		exp 6 armour 0 weapon_lvl 0
		unit	Turhagut Lancers		exp 6 armour 0 weapon_lvl 0
		end

		console_command add_money mongols, 15000
		spawn_army 
		faction mongols
		character	Kitbuqa, named character, age 24, x 507, y 92
		traits Supplies 1 , Turnsaway 3, MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 1 , GoodCommander 3 , BattleDread 2 , StrategyDread 2 , Loyal 2 , ContentGeneral 3
		unit	Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 6 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 6 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Disamounted Turhagut			exp 4 armour 0 weapon_lvl 0
		unit	Khabutu Archers		exp 4 armour 0 weapon_lvl 0
		unit	Khabutu Archers		exp 4 armour 0 weapon_lvl 0
		unit	Khabutu Archers		exp 6 armour 0 weapon_lvl 0
		unit	Khabutu Archers		exp 6 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Nukeri Horse Archers	exp 5 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 4 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 4 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 4 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 6 armour 0 weapon_lvl 0
		unit	Turhagut Lancers	exp 6 armour 0 weapon_lvl 0
		end

		console_command add_money mongols, 15000
	;link_faction_ai mongols pagan
	spawn_character mongols random_name, priest, age 22, x 480, y 140
	spawn_character mongols random_name, priest, age 27, x 500, y 98
	spawn_character mongols random_name, spy, age 20, x 500, y 135
	spawn_character mongols random_name, spy, age 20, x 490, y 135
	spawn_character mongols random_name, assassin, age 21, x 495, y 135
	console_command add_money mongols, 30000
		terminate_monitor
	end_monitor
	
monitor_event PreFactionTurnStart FactionType mongols
	and not FactionIsLocal
	if I_SettlementOwner Urgench = mongols
		create_unit Urgench, Khabutu Archers, num 1, exp 3, arm 0, wep 0
		create_unit Urgench, Hoshiga Horse Archers, num 2, exp 2, arm 0, wep 0
		create_unit Urgench, Hoschuchi Lancers, num 1, exp 4, arm 0, wep 0
		create_unit Urgench, Nukeri Horse Archers, num 2, exp 4, arm 0, wep 0
		create_unit Urgench, ME Trebuchet, num 2, exp 5, arm 0, wep 0
		console_command add_money mongols, 3000
		terminate_monitor
		end_if
end_monitor

monitor_event PreFactionTurnStart FactionType mongols
	and not FactionIsLocal
	if I_SettlementOwner Khiva = mongols
		create_unit Khiva, Disamounted Turhagut, num 1, exp 2, arm 0, wep 0
		create_unit Khiva, Hoshiga Horse Archers, num 1, exp 2, arm 0, wep 0
		create_unit Khiva, Nukeri Horse Archers, num 2, exp 4, arm 0, wep 0
		create_unit Khiva, Turhagut Lancers, num 1, exp 4, arm 0, wep 0
		console_command add_money mongols, 2000
		terminate_monitor
		end_if
end_monitor

monitor_event PreFactionTurnStart FactionType mongols
	and not FactionIsLocal
	if I_SettlementOwner Konjikala = mongols
		create_unit Konjikala, Khabutu Archers, num 1, exp 3, arm 0, wep 0
		create_unit Konjikala, Hoshiga Horse Archers, num 2, exp 4, arm 0, wep 0
		create_unit Konjikala, Turhagut Lancers, num 2, exp 4, arm 0, wep 0
		create_unit Konjikala, Nukeri Horse Archers, num 2, exp 4, arm 0, wep 0
		create_unit Konjikala, ME Catapult, num 1, exp 4, arm 0, wep 0
		console_command add_money mongols, 2000
		terminate_monitor
	end_if
end_monitor

monitor_event PreFactionTurnStart FactionType mongols
	and not FactionIsLocal
	if I_SettlementOwner Embi = mongols
		create_unit Embi, Khabutu Archers, num 1, exp 2, arm 0, wep 0
		create_unit Embi, Disamounted Turhagut, num 1, exp 2, arm 0, wep 0
		create_unit Embi, Hoshiga Horse Archers, num 2, exp 4, arm 0, wep 0
		create_unit Embi, ME Catapult, num 1, exp 4, arm 0, wep 0
		console_command add_money mongols, 2000
		terminate_monitor
		end_if
end_monitor

monitor_event PreFactionTurnStart FactionType mongols
	and not FactionIsLocal
	if I_EventCounter DifficultyLevel >= 2
		if I_SettlementOwner Jaiksk = mongols
			create_unit Jaiksk, Disamounted Turhagut, num 1, exp 1, arm 0, wep 0
			create_unit Jaiksk, Hoshiga Horse Archers, num 2, exp 3, arm 0, wep 0
			console_command add_money mongols, 1000
		terminate_monitor
		end_if
	end_if
end_monitor

monitor_event PreFactionTurnStart FactionType mongols
	and not FactionIsLocal
	if I_EventCounter DifficultyLevel >= 2
	if I_SettlementOwner Astrakhan = mongols
		create_unit Astrakhan, Khabutu Archers, num 1, exp 3, arm 0, wep 0
		create_unit Astrakhan, Disamounted Turhagut, num 2, exp 4, arm 0, wep 0
			create_unit Astrakhan, Hoshiga Horse Archers, num 2, exp 3, arm 0, wep 0
			create_unit Astrakhan, ME Catapult, num 1, exp 5, arm 0, wep 0
			console_command add_money mongols, 2000
		terminate_monitor
		end_if
	end_if
end_monitor

monitor_event PreFactionTurnStart FactionType mongols
	and not FactionIsLocal
	if I_EventCounter DifficultyLevel >= 3
	if I_SettlementOwner Sarkel = mongols
		create_unit Sarkel, Khabutu Archers, num 1, exp 4, arm 0, wep 0
		create_unit Sarkel, Disamounted Turhagut, num 1, exp 3, arm 0, wep 0
			create_unit Sarkel, Nukeri Horse Archers, num 1, exp 4, arm 0, wep 0
			create_unit Sarkel, Turhagut Lancers, num 1, exp 4, arm 0, wep 0
			create_unit Sarkel, ME Trebuchet, num 1, exp 5, arm 0, wep 0
			console_command add_money mongols, 4000
		terminate_monitor
		end_if
	end_if
end_monitor

monitor_event PreFactionTurnStart FactionType mongols
	and not FactionIsLocal
	if I_EventCounter DifficultyLevel >= 3
	if I_SettlementOwner Tmutarakan = mongols
		create_unit Tmutarakan, Disamounted Turhagut, num 1, exp 1, arm 0, wep 0
		create_unit Tmutarakan, Hoshiga Horse Archers, num 1, exp 4, arm 0, wep 0
			console_command add_money mongols, 1000
		terminate_monitor
		end_if
	end_if
end_monitor

monitor_event PreFactionTurnStart FactionType mongols
	and not FactionIsLocal
	if I_EventCounter DifficultyLevel = 4
	if I_SettlementOwner Kutaisi = mongols
		create_unit Kutaisi, Khabutu Archers, num 1, exp 3, arm 0, wep 0
		create_unit Kutaisi, Disamounted Turhagut, num 1, exp 3, arm 0, wep 0
		console_command add_money mongols, 1000
		terminate_monitor
	end_if
	end_if
end_monitor

monitor_event PreFactionTurnStart FactionType mongols
	and not FactionIsLocal
	if I_EventCounter DifficultyLevel = 4
	if I_SettlementOwner Tbilisi = mongols
		create_unit Tbilisi, Nukeri Horse Archers, num 1, exp 3, arm 0, wep 0
			create_unit Tbilisi, ME Trebuchet, num 1, exp 5, arm 0, wep 0
			console_command add_money mongols, 1000
		terminate_monitor
		end_if
	end_if
end_monitor

monitor_event PreFactionTurnStart FactionType mongols
	and not FactionIsLocal
	if I_EventCounter DifficultyLevel = 4
	if I_SettlementOwner Yerevan = mongols
			create_unit Yerevan, Hoshiga Horse Archers, num 1, exp 5, arm 0, wep 0
			console_command add_money mongols, 1000
		terminate_monitor
		end_if
	end_if
end_monitor

monitor_event PreFactionTurnStart FactionType mongols
	and not FactionIsLocal
	if I_SettlementOwner Gorgan = mongols
		create_unit Gorgan, Khabutu Archers, num 1, exp 3, arm 0, wep 0
		create_unit Gorgan, Disamounted Turhagut, num 1, exp 4, arm 0, wep 0
		create_unit Gorgan, Nukeri Horse Archers, num 2, exp 3, arm 0, wep 0
		create_unit Gorgan, Turhagut Lancers, num 1, exp 4, arm 0, wep 0
		console_command add_money mongols, 2000
		terminate_monitor
	end_if
end_monitor

monitor_event PreFactionTurnStart FactionType mongols
	and not FactionIsLocal
	if I_EventCounter DifficultyLevel >= 2
	if I_SettlementOwner Mashhad = mongols
			create_unit Mashhad, Khabutu Archers, num 1, exp 2, arm 0, wep 0
			create_unit Mashhad, Disamounted Turhagut, num 1, exp 3, arm 0, wep 0
			create_unit Mashhad, Hoshiga Horse Archers, num 2, exp 4, arm 0, wep 0
			console_command add_money mongols, 2000
		terminate_monitor
		end_if
	end_if
end_monitor

monitor_event PreFactionTurnStart FactionType mongols
	and not FactionIsLocal
	if I_EventCounter DifficultyLevel >= 3
	if I_SettlementOwner Damghan = mongols
		create_unit Damghan, Nukeri Horse Archers, num 1, exp 3, arm 0, wep 0
		create_unit Damghan, Turhagut Lancers, num 1, exp 2, arm 0, wep 0
			create_unit Damghan, ME Trebuchet, num 1, exp 5, arm 0, wep 0
			console_command add_money mongols, 3000
		terminate_monitor
		end_if
	end_if
end_monitor

monitor_event PreFactionTurnStart FactionType mongols
	and not FactionIsLocal
	if I_EventCounter DifficultyLevel >= 4
	if I_SettlementOwner Yazd = mongols
			create_unit Yazd, Khabutu Archers, num 1, exp 4, arm 0, wep 0
		create_unit Yazd, Disamounted Turhagut, num 1, exp 1, arm 0, wep 0
		console_command add_money mongols, 1000
			terminate_monitor
		end_if
	end_if
end_monitor


;mongols weaken and no longer are a superpower
monitor_event PreFactionTurnStart FactionType mongols
	and not FactionIsLocal
	and I_EventCounter mongols_invasion = 5

	set_event_counter is_the_ai 0  

end_monitor
	

	declare_counter timurids_konjikala
	declare_counter timurids_yazd
	declare_counter timurids_kerman

 ;-- Timurids invasion --
	monitor_event EventCounter EventCounterType timurids_invasion_warn
		and EventCounter > 0
		; ADD SCOUTING INVASION
		add_events
			event	counter	timurids_invasion
			date	2 4
		end_add_events
		if I_EventCounter timurids_invasion_warn == 2
			terminate_monitor
		end_if
	end_monitor

	monitor_event EventCounter EventCounterType timurids_invasion
		and EventCounter > 0
		if I_EventCounter timurids_invasion == 1
		;;; SCOUTING INVASION
			add_events
				event	emergent_faction	timurids
				date	0
				region	Konjikala_Province
				region	Mashad_Province
				region 	Yazd_Province
				region 	Kerman_Province
				movie	event/timurids_invade.bik
				; ADD TIMURID INVASION 1
				event	counter	timurids_invasion
				date	2
			end_add_events
		end_if
		if I_EventCounter timurids_invasion == 2
		
			;Konjikala
			if I_CharacterTypeNearTile timurids named_character, 15 505, 135
				set_counter timurids_konjikala 1
			end_if
			;Yazd
			if I_CharacterTypeNearTile timurids named_character, 10 505, 75
				set_counter timurids_yazd 1
			end_if
			;Kerman
			if I_CharacterTypeNearTile timurids named_character, 10 505, 60
				set_counter timurids_kerman 1
			end_if


		;;; TIMURID INVASION 1 SCRIPT
			spawn_army 
				faction timurids
				character	Timur, named character, age 30, x 503, y 95, family	;Command 9 Dread 9 Loyalty 6 Piety 4
				traits EasternWarlord 3 , GoodCommander 3 , Bloodthirsty 2 , BattleDread 3 , StrategyDread 2 , PublicFaith 4 , Loyal 1 , ContentGeneral 3	;command 9, dread 9, loyalty 6, piety 4
				unit		Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		Merguen Archers	exp 6 armour 1 weapon_lvl 0
				unit		Elephants				exp 6 armour 0 weapon_lvl 0
				unit		Elephants				exp 6 armour 0 weapon_lvl 0
				unit		ME Grand Bombard		exp 6 armour 0 weapon_lvl 0
				unit		ME Grand Bombard		exp 6 armour 0 weapon_lvl 0
			end
			console_command add_money timurids, 15000
			spawn_army 
				faction timurids
				character	Husayn, named character, age 24, x 504, y 95, family	;Command 7 Dread 7 Loyalty 6 Piety 4
	 			traits EasternWarlord 2 , GoodCommander 1 , Anger 3 , BattleDread 2 , StrategyDread 3 , PublicFaith 4, Loyal 1, ContentGeneral 3	;command 7, dread 7, loyalty 6, piety 4
				unit		Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		Merguen Archers	exp 6 armour 1 weapon_lvl 0
				unit		Elephants				exp 6 armour 0 weapon_lvl 0
				unit		Elephants				exp 6 armour 0 weapon_lvl 0
				unit		ME Grand Bombard		exp 6 armour 0 weapon_lvl 0
				unit		ME Grand Bombard		exp 6 armour 0 weapon_lvl 0
			end
			
			console_command add_money timurids, 15000
			
			spawn_army 
				faction timurids
				character	Umar_Shaykh, named character, age 23, x 504, y 96, family	;Command 6 Dread 7 Loyalty 6 Piety 4
	 			traits EasternWarlord 2 , Anger 3 , BattleDread 3 , StrategyDread 2 , PublicFaith 4, Loyal 1, ContentGeneral 3	;command 6, dread 7, loyalty 6, piety 4
				unit		Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		Merguen Archers	exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Naffatun				exp 6 armour 0 weapon_lvl 0
				unit		ME Grand Bombard		exp 6 armour 0 weapon_lvl 0
				unit		ME Grand Bombard		exp 6 armour 0 weapon_lvl 0
			end
			
			console_command add_money timurids, 15000
			
			spawn_army 
				faction timurids
				character	Miran, named character, age 22, x 504, y 94, family	;Command 6 Dread 7 Loyalty 6 Piety 4
	 			traits EasternWarlord 2 , Bloodthirsty 2 , GoodCommander 1 , BattleDread 2 , StrategyDread 3 , PublicFaith 4, Loyal 1, ContentGeneral 3	;command 6, dread 7, loyalty 6, piety 4
				unit		Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		Merguen Archers	exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Naffatun				exp 6 armour 0 weapon_lvl 0
				unit		AS Rocket Launcher		exp 6 armour 0 weapon_lvl 0
				unit		AS Rocket Launcher		exp 6 armour 0 weapon_lvl 0
			end
			
			console_command add_money timurids, 15000
			
			spawn_army 
				faction timurids
				character	Batutai, named character, age 30, x 505, y 97, family	;Command 9 Dread 9 Loyalty 6 Piety 4
	 			traits EasternWarlord 2 , Bloodthirsty 2 , GoodCommander 1 , BattleDread 2 , StrategyDread 3 , PublicFaith 4, Loyal 1, ContentGeneral 3	;command 6, dread 7, loyalty 6, piety 4
				unit		Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		Merguen Archers	exp 6 armour 1 weapon_lvl 0
				unit		Elephants				exp 6 armour 0 weapon_lvl 0
				unit		Elephants				exp 6 armour 0 weapon_lvl 0
				unit		ME Grand Bombard		exp 6 armour 0 weapon_lvl 0
				unit		ME Grand Bombard		exp 6 armour 0 weapon_lvl 0
			end
			
			console_command add_money timurids, 15000
			
			spawn_army 
				faction timurids
				character	Ghazatai, named character, age 24, x 505, y 93, family	;Command 7 Dread 7 Loyalty 6 Piety 4
	 			traits EasternWarlord 2 , GoodCommander 1 , Anger 3 , BattleDread 2 , StrategyDread 3 , PublicFaith 4, Loyal 1, ContentGeneral 3	;command 7, dread 7, loyalty 6, piety 4
				unit		Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		Merguen Archers	exp 6 armour 1 weapon_lvl 0
				unit		Elephants				exp 6 armour 0 weapon_lvl 0
				unit		Elephants				exp 6 armour 0 weapon_lvl 0
				unit		ME Grand Bombard		exp 6 armour 0 weapon_lvl 0
				unit		ME Grand Bombard		exp 6 armour 0 weapon_lvl 0
			end
			
			console_command add_money timurids, 15000
			
			spawn_army 
				faction timurids
				character	Irindhuk, named character, age 23, x 504, y 128, family	;Command 6 Dread 7 Loyalty 6 Piety 4
	 			traits EasternWarlord 2 , Anger 3 , BattleDread 3 , StrategyDread 2 , PublicFaith 4, Loyal 1, ContentGeneral 3	;command 6, dread 7, loyalty 6, piety 4
				unit		Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Merguen Archers				exp 6 armour 1 weapon_lvl 0
				unit		Naffatun				exp 6 armour 0 weapon_lvl 0
				unit		ME Grand Bombard		exp 6 armour 0 weapon_lvl 0
				unit		ME Grand Bombard		exp 6 armour 0 weapon_lvl 0
			end
			
			console_command add_money timurids, 15000
			
			spawn_army 
				faction timurids
				character	Khuzuk, named character, age 22, x 505, y 129, family	;Command 6 Dread 7 Loyalty 6 Piety 4
	 			traits EasternWarlord 2 , Bloodthirsty 2 , GoodCommander 1 , BattleDread 2 , StrategyDread 3 , PublicFaith 4, Loyal 1, ContentGeneral 3	;command 6, dread 7, loyalty 6, piety 4
				unit		Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Merguen Archers				exp 6 armour 1 weapon_lvl 0
				unit		Naffatun				exp 6 armour 0 weapon_lvl 0
				unit		AS Rocket Launcher		exp 6 armour 0 weapon_lvl 0
				unit		AS Rocket Launcher		exp 6 armour 0 weapon_lvl 0
			end
			
			console_command add_money timurids, 15000
			
			spawn_army 
				faction timurids
				character	Mongatai, named character, age 30, x 505, y 127, family	;Command 9 Dread 9 Loyalty 6 Piety 4
	 			traits EasternWarlord 2 , Bloodthirsty 2 , GoodCommander 1 , BattleDread 2 , StrategyDread 3 , PublicFaith 4, Loyal 1, ContentGeneral 3	;command 6, dread 7, loyalty 6, piety 4
				unit		Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		Merguen Archers	exp 6 armour 1 weapon_lvl 0
				unit		Elephants				exp 6 armour 0 weapon_lvl 0
				unit		Elephants				exp 6 armour 0 weapon_lvl 0
				unit		ME Grand Bombard		exp 6 armour 0 weapon_lvl 0
				unit		ME Grand Bombard		exp 6 armour 0 weapon_lvl 0
			end
			
			console_command add_money timurids, 15000
			
			spawn_army 
				faction timurids
				character	Ordai, named character, age 24, x 504, y 83, family	;Command 7 Dread 7 Loyalty 6 Piety 4
	 			traits EasternWarlord 2 , GoodCommander 1 , Anger 3 , BattleDread 2 , StrategyDread 3 , PublicFaith 4, Loyal 1, ContentGeneral 3	;command 7, dread 7, loyalty 6, piety 4
				unit		Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		Merguen Archers	exp 6 armour 1 weapon_lvl 0
				unit		Elephants				exp 6 armour 0 weapon_lvl 0
				unit		Elephants				exp 6 armour 0 weapon_lvl 0
				unit		ME Grand Bombard		exp 6 armour 0 weapon_lvl 0
				unit		ME Grand Bombard		exp 6 armour 0 weapon_lvl 0
			end
			
			console_command add_money timurids, 15000
			
			spawn_army 
				faction timurids
				character	Shidedai, named character, age 23, x 505, y 84, family	;Command 6 Dread 7 Loyalty 6 Piety 4
	 			traits EasternWarlord 2 , Anger 3 , BattleDread 3 , StrategyDread 2 , PublicFaith 4, Loyal 1, ContentGeneral 3	;command 6, dread 7, loyalty 6, piety 4
				unit		Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		Merguen Archers	exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Naffatun				exp 6 armour 0 weapon_lvl 0
				unit		ME Grand Bombard		exp 6 armour 0 weapon_lvl 0
				unit		ME Grand Bombard		exp 6 armour 0 weapon_lvl 0
			end
			
			console_command add_money timurids, 15000
			
			spawn_army 
				faction timurids
				character	Zhen_Jin, named character, age 22, x 505, y 82, family	;Command 6 Dread 7 Loyalty 6 Piety 4
	 			traits EasternWarlord 2 , Bloodthirsty 2 , GoodCommander 1 , BattleDread 2 , StrategyDread 3 , PublicFaith 4, Loyal 1, ContentGeneral 3	;command 6, dread 7, loyalty 6, piety 4
				unit		Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		Merguen Archers	exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Naffatun				exp 6 armour 0 weapon_lvl 0
				unit		AS Rocket Launcher		exp 6 armour 0 weapon_lvl 0
				unit		AS Rocket Launcher		exp 6 armour 0 weapon_lvl 0
			end			
		
		console_command add_money timurids, 15000
		
		
			if I_CompareCounter timurids_konjikala = 1
				reposition_character Timur, 503, 128
				reposition_character Husayn, 504, 128
				reposition_character Umar_Shaykh, 504, 129
				reposition_character Miran, 504, 127
				reposition_character Batutai, 505, 130
				reposition_character Ghazatai, 505, 126
				
				reposition_character Irindhuk, 504, 95
				reposition_character Khuzuk, 505, 95
				reposition_character Mongatai, 505, 96
				reposition_character Ordai, 505, 94
				
				reposition_character Shidedai, 504, 83
				reposition_character Zhen_Jin, 505, 83
			end_if
			if I_CompareCounter timurids_yazd = 1
				reposition_character Timur, 503, 83
				reposition_character Husayn, 504, 83
				reposition_character Umar_Shaykh, 504, 84
				reposition_character Miran, 504, 82
				reposition_character Batutai, 505, 85
				reposition_character Ghazatai, 505, 81
				
				reposition_character Irindhuk, 504, 95
				reposition_character Khuzuk, 505, 96
				reposition_character Mongatai, 505, 94
				
				reposition_character Ordai, 504, 68
				reposition_character Shidedai, 505, 69
				reposition_character Zhen_Jin, 505, 67				
			end_if
			if I_CompareCounter timurids_kerman = 1
				reposition_character Timur, 503, 68
				reposition_character Husayn, 504, 68
				reposition_character Umar_Shaykh, 504, 69
				reposition_character Miran, 504, 67
				reposition_character Batutai, 505, 70
				reposition_character Ghazatai, 506, 66
				
				reposition_character Irindhuk, 504, 83
				reposition_character Khuzuk, 505, 83
				reposition_character Mongatai, 505, 84
				reposition_character Ordai, 505, 82
				
				reposition_character Shidedai, 504, 95
				reposition_character Zhen_Jin, 505, 95				
			end_if

			; ADD TIMURID INVASION 2
			add_events
				event	counter	timurids_invasion
 				date	12 24
			end_add_events
		end_if
		if I_EventCounter timurids_invasion == 3
		;;; TIMURID INVASION 2 SCRIPT
			spawn_army 
				faction timurids
				character	Shahrukh, named character, age 22, x 503, y 95, family	;Command 7 Dread 7 Loyalty 6 Piety 4
	 			traits EasternWarlord 2 , GoodCommander 1 , Anger 3 , BattleDread 2 , StrategyDread 3 , PublicFaith 4, Loyal 1, ContentGeneral 3	;command 7, dread 7, loyalty 6, piety 4
				unit		Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		Merguen Archers	exp 6 armour 1 weapon_lvl 0
				unit		Elephants				exp 6 armour 0 weapon_lvl 0
				unit		Elephants				exp 6 armour 0 weapon_lvl 0
				unit		ME Grand Bombard		exp 6 armour 0 weapon_lvl 0
				unit		ME Grand Bombard		exp 6 armour 0 weapon_lvl 0
			end
			
			console_command add_money timurids, 15000
			
			spawn_army 
				faction timurids
				character	Pir_Muhammed, named character, age 21, x 504, y 95, family	;Command 7 Dread 7 Loyalty 6 Piety 4
	 			traits EasternWarlord 2 , GoodCommander 1 , Anger 3 , BattleDread 2 , StrategyDread 3 , PublicFaith 4, Loyal 1, ContentGeneral 3	;command 7, dread 7, loyalty 6, piety 4
				unit		Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		Merguen Archers	exp 6 armour 1 weapon_lvl 0
				unit		Elephants				exp 6 armour 0 weapon_lvl 0
				unit		Elephants				exp 6 armour 0 weapon_lvl 0
				unit		ME Grand Bombard		exp 6 armour 0 weapon_lvl 0
				unit		ME Grand Bombard		exp 6 armour 0 weapon_lvl 0
			end
			
			console_command add_money timurids, 15000
			
			spawn_army 
				faction timurids
				character	Nayaga, named character, age 20, x 504, y 96, family	;Command 6 Dread 7 Loyalty 6 Piety 4
	 			traits EasternWarlord 2 , Bloodthirsty 2 , GoodCommander 1 , BattleDread 3 , StrategyDread 2 , PublicFaith 4, Loyal 1, ContentGeneral 3	;command 6, dread 7, loyalty 6, piety 4
				unit		Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		Merguen Archers	exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Naffatun				exp 6 armour 0 weapon_lvl 0
				unit		ME Grand Bombard		exp 6 armour 0 weapon_lvl 0
				unit		ME Grand Bombard		exp 6 armour 0 weapon_lvl 0
			end
			
			console_command add_money timurids, 15000
			
			spawn_army 
				faction timurids
				character	Dayir, named character, age 19, x 504, y 94, family	;Command 6 Dread 7 Loyalty 6 Piety 4
	 			traits EasternWarlord 2 , Bloodthirsty 2 , GoodCommander 1 , BattleDread 2 , StrategyDread 3 , PublicFaith 4, Loyal 1, ContentGeneral 3	;command 6, dread 7, loyalty 6, piety 4
				unit		Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		Merguen Archers	exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Nukeri Horse Archers				exp 6 armour 1 weapon_lvl 0
				unit		Naffatun				exp 6 armour 0 weapon_lvl 0
				unit		AS Rocket Launcher		exp 6 armour 0 weapon_lvl 0
				unit		AS Rocket Launcher		exp 6 armour 0 weapon_lvl 0
			end
			
			console_command add_money timurids, 15000
			
			spawn_army 
				faction timurids
				character	Mongu, named character, age 30, x 505, y 127, family	;Command 9 Dread 9 Loyalty 6 Piety 4
	 			traits EasternWarlord 2 , Bloodthirsty 2 , GoodCommander 1 , BattleDread 2 , StrategyDread 3 , PublicFaith 4, Loyal 1, ContentGeneral 3	;command 6, dread 7, loyalty 6, piety 4
				unit		Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		Merguen Archers	exp 6 armour 1 weapon_lvl 0
				unit		Elephants				exp 6 armour 0 weapon_lvl 0
				unit		Elephants				exp 6 armour 0 weapon_lvl 0
				unit		ME Grand Bombard		exp 6 armour 0 weapon_lvl 0
				unit		ME Grand Bombard		exp 6 armour 0 weapon_lvl 0
			end			
			console_command add_money timurids, 15000
			
			spawn_army 
				faction timurids
				character	Yesublai, named character, age 24, x 504, y 83, family	;Command 7 Dread 7 Loyalty 6 Piety 4
	 			traits EasternWarlord 2 , GoodCommander 1 , Anger 3 , BattleDread 2 , StrategyDread 3 , PublicFaith 4, Loyal 1, ContentGeneral 3	;command 7, dread 7, loyalty 6, piety 4
				unit		Keshikten Bodyguard		exp 6 armour 0 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Turhagut Lancers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Khorchi Horse Archers	exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		Disamounted Turhagut			exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		ME Halberd Militia	exp 6 armour 1 weapon_lvl 0
				unit		Merguen Archers	exp 6 armour 1 weapon_lvl 0
				unit		Elephants				exp 6 armour 0 weapon_lvl 0
				unit		Elephants				exp 6 armour 0 weapon_lvl 0
				unit		ME Grand Bombard		exp 6 armour 0 weapon_lvl 0
				unit		ME Grand Bombard		exp 6 armour 0 weapon_lvl 0
			end

			console_command add_money timurids, 15000

			if I_CompareCounter timurids_konjikala = 1
				reposition_character Shahrukh, 503, 83
				reposition_character Pir_Muhammed, 504, 83
				reposition_character Nayaga, 504, 84
				reposition_character Dayir, 504, 82
				reposition_character Mongu, 505, 85
				reposition_character Yesublai, 505, 81
			end_if
			if I_CompareCounter timurids_yazd = 1
				reposition_character Shahrukh, 503, 83
				reposition_character Pir_Muhammed, 504, 83
				reposition_character Nayaga, 504, 84
				reposition_character Dayir, 504, 82
				reposition_character Mongu, 505, 85
				reposition_character Yesublai, 505, 81
			end_if
			if I_CompareCounter timurids_kerman = 1
				reposition_character Shahrukh, 503, 68
				reposition_character Pir_Muhammed, 504, 68
				reposition_character Nayaga, 504, 69
				reposition_character Dayir, 504, 67
				reposition_character Mongu, 505, 70
				reposition_character Yesublai, 506, 66
			end_if
	
			terminate_monitor
		end_if
	end_monitor
	
;------------Revolts---------------------------------

monitor_event PreFactionTurnStart FactionType slave
	and IsFactionAIControlled
	and I_TurnNumber = 249

spawn_army 
	faction slave
	character	random_name, named character, age 30, x 189, y 205
	traits LoyaltyStarter 1 , GoodCommander 3 , ReligionStarter 1
		unit	NE Bodyguard			exp 9 armour 1 weapon_lvl 0
		unit	Halberd Militia			exp 9 armour 2 weapon_lvl 0
		unit	Halberd Militia			exp 9 armour 2 weapon_lvl 0
		unit	Halberd Militia			exp 9 armour 2 weapon_lvl 0
		unit	Halberd Militia			exp 9 armour 2 weapon_lvl 0
		unit	Armored Sergeants		exp 9 armour 1 weapon_lvl 0
		unit	Armored Sergeants		exp 9 armour 1 weapon_lvl 0
		unit	Armored Sergeants		exp 9 armour 1 weapon_lvl 0
		unit	Armored Sergeants		exp 9 armour 1 weapon_lvl 0
		unit	Pavise Crossbowmen		exp 9 armour 1 weapon_lvl 0
		unit	Pavise Crossbowmen		exp 9 armour 1 weapon_lvl 0
		unit	Hussites			exp 9 armour 0 weapon_lvl 0
		unit	Hussites			exp 9 armour 0 weapon_lvl 0
		unit	Hussites			exp 9 armour 0 weapon_lvl 0
		unit	Hussites			exp 9 armour 0 weapon_lvl 0
		unit	Light Swordsmen			exp 9 armour 1 weapon_lvl 0
		unit	Light Swordsmen			exp 9 armour 1 weapon_lvl 0
		unit	Light Swordsmen			exp 9 armour 1 weapon_lvl 0

	end
	console_command add_money slave, 10000
terminate_monitor
end_monitor
;---------------------------------------------------------------

monitor_event PreFactionTurnStart FactionType slave
	and IsFactionAIControlled
	and I_TurnNumber = 260
	and CampaignDifficulty >= hard

spawn_army 
	faction slave
	character	random_name, named character, age 30, x 189, y 205
	traits LoyaltyStarter 1 , GoodCommander 3 , ReligionStarter 1
		unit	NE Bodyguard			exp 9 armour 1 weapon_lvl 0
		unit	Halberd Militia			exp 9 armour 2 weapon_lvl 0
		unit	Halberd Militia			exp 9 armour 2 weapon_lvl 0
		unit	Halberd Militia			exp 9 armour 2 weapon_lvl 0
		unit	Halberd Militia			exp 9 armour 2 weapon_lvl 0
		unit	Armored Sergeants		exp 9 armour 1 weapon_lvl 0
		unit	Armored Sergeants		exp 9 armour 1 weapon_lvl 0
		unit	Armored Sergeants		exp 9 armour 1 weapon_lvl 0
		unit	Armored Sergeants		exp 9 armour 1 weapon_lvl 0
		unit	Pavise Crossbowmen		exp 9 armour 1 weapon_lvl 0
		unit	Pavise Crossbowmen		exp 9 armour 1 weapon_lvl 0
		unit	Hussites			exp 9 armour 0 weapon_lvl 0
		unit	Hussites			exp 9 armour 0 weapon_lvl 0
		unit	Hussites			exp 9 armour 0 weapon_lvl 0
		unit	Hussites			exp 9 armour 0 weapon_lvl 0
		unit	Light Swordsmen			exp 9 armour 1 weapon_lvl 0
		unit	Light Swordsmen			exp 9 armour 1 weapon_lvl 0
		unit	Light Swordsmen			exp 9 armour 1 weapon_lvl 0

	end

	console_command add_money slave, 10000
terminate_monitor
end_monitor	

;-------------------generals--------------------------------

monitor_event PreFactionTurnStart FactionType spain
	and I_LocalFaction spain
	and I_TurnNumber = 252

spawn_army 
	faction spain
	character	Gonzalo de_Cordoba, named character, age 18, x 68, y 123
	traits LoyaltyStarter 1 , MilitaryInclination 1 , NaturalMilitarySkill 1 , GoodCommander 3 , Loyal 3 , Energetic 1 , Intelligent 1 , ReligionStarter 1
		unit	SE Bodyguard			exp 3 armour 1 weapon_lvl 0
	end

terminate_monitor
end_monitor
		
;-------------war of the roses---------------------------------------

monitor_event PreFactionTurnStart FactionType england
	and I_LocalFaction england
	and I_TurnNumber = 242

spawn_army 
	faction England
	character	Henry Tudor, named character, age 25, x 75, y 221
	traits LoyaltyStarter 1 , MilitaryInclination 1 , NaturalMilitarySkill 1 , GoodCommander 3 , Loyal 3 , Energetic 1 , Intelligent 1 , ReligionStarter 1
		unit	NE Late Bodyguard			exp 3 armour 1 weapon_lvl 0
	end

terminate_monitor
end_monitor

monitor_event PreFactionTurnStart FactionType england
	and I_LocalFaction england
	and I_TurnNumber = 240
	

spawn_army 
	faction slave
	character	random_name, named character, age 30, x 75, y 221
	traits LoyaltyStarter 1 , GoodCommander 3 , ReligionStarter 1
		unit	NE Late Bodyguard			exp 9 armour 1 weapon_lvl 0
		unit	English Knights				exp 9 armour 2 weapon_lvl 0
		unit	English Knights				exp 9 armour 2 weapon_lvl 0
		unit	Billmen					exp 6 armour 2 weapon_lvl 0
		unit	Billmen					exp 6 armour 2 weapon_lvl 0
		unit	Billmen					exp 6 armour 2 weapon_lvl 0
		unit	Billmen					exp 6 armour 2 weapon_lvl 0
		unit	Billmen					exp 6 armour 2 weapon_lvl 0
		unit	Billmen					exp 6 armour 2 weapon_lvl 0
		unit	Dismounted English Knights		exp 6 armour 2 weapon_lvl 0
		unit	Dismounted English Knights		exp 6 armour 2 weapon_lvl 0
		unit	Yeoman Archers 				exp 6 armour 2 weapon_lvl 0 
		unit	Yeoman Archers 				exp 6 armour 2 weapon_lvl 0
		unit	Yeoman Archers 				exp 6 armour 2 weapon_lvl 0
		unit	Longbowmen 				exp 6 armour 2 weapon_lvl 0
		unit	Longbowmen 				exp 6 armour 2 weapon_lvl 0
		unit	Longbowmen 				exp 6 armour 2 weapon_lvl 0
		end
		console_command add_money slave, 10000
terminate_monitor
end_monitor 

monitor_event PreFactionTurnStart FactionType england
	and I_LocalFaction england
	and I_TurnNumber = 248
	

spawn_army 
	faction slave
	character	random_name, named character, age 30, x 67, y 234
	traits LoyaltyStarter 1 , GoodCommander 3 , ReligionStarter 1
		unit	NE Late Bodyguard			exp 9 armour 1 weapon_lvl 0
		unit	English Knights				exp 9 armour 2 weapon_lvl 0
		unit	English Knights				exp 9 armour 2 weapon_lvl 0
		unit	Billmen					exp 6 armour 2 weapon_lvl 0
		unit	Billmen					exp 6 armour 2 weapon_lvl 0
		unit	Billmen					exp 6 armour 2 weapon_lvl 0
		unit	Billmen					exp 6 armour 2 weapon_lvl 0
		unit	Billmen					exp 6 armour 2 weapon_lvl 0
		unit	Billmen					exp 6 armour 2 weapon_lvl 0
		unit	Dismounted English Knights		exp 6 armour 2 weapon_lvl 0
		unit	Dismounted English Knights		exp 6 armour 2 weapon_lvl 0
		unit	Yeoman Archers 				exp 6 armour 2 weapon_lvl 0 
		unit	Yeoman Archers 				exp 6 armour 2 weapon_lvl 0
		unit	Yeoman Archers 				exp 6 armour 2 weapon_lvl 0
		unit	Longbowmen 				exp 6 armour 2 weapon_lvl 0
		unit	Longbowmen 				exp 6 armour 2 weapon_lvl 0
		unit	Longbowmen 				exp 6 armour 2 weapon_lvl 0
		end
		console_command add_money, slave, 15000

terminate_monitor
end_monitor 

monitor_event PreFactionTurnStart FactionType england
	and I_LocalFaction england
	and I_TurnNumber = 252
	

spawn_army 
	faction slave
	character	random_name, named character, age 30, x 57, y 219
	traits LoyaltyStarter 1 , GoodCommander 3 , ReligionStarter 1
		unit	NE Late Bodyguard			exp 9 armour 1 weapon_lvl 0
		unit	English Knights				exp 9 armour 2 weapon_lvl 0
		unit	English Knights				exp 9 armour 2 weapon_lvl 0
		unit	Billmen					exp 6 armour 2 weapon_lvl 0
		unit	Billmen					exp 6 armour 2 weapon_lvl 0
		unit	Billmen					exp 6 armour 2 weapon_lvl 0
		unit	Billmen					exp 6 armour 2 weapon_lvl 0
		unit	Billmen					exp 6 armour 2 weapon_lvl 0
		unit	Billmen					exp 6 armour 2 weapon_lvl 0
		unit	Dismounted English Knights		exp 6 armour 2 weapon_lvl 0
		unit	Dismounted English Knights		exp 6 armour 2 weapon_lvl 0
		unit	Yeoman Archers 				exp 6 armour 2 weapon_lvl 0 
		unit	Yeoman Archers 				exp 6 armour 2 weapon_lvl 0
		unit	Yeoman Archers 				exp 6 armour 2 weapon_lvl 0
		unit	Longbowmen 				exp 6 armour 2 weapon_lvl 0
		unit	Longbowmen 				exp 6 armour 2 weapon_lvl 0
		unit	Longbowmen 				exp 6 armour 2 weapon_lvl 0
	end
		console_command add_money slave, 15000

terminate_monitor
end_monitor 

monitor_event PreFactionTurnStart FactionType england
	and I_LocalFaction england
	and I_TurnNumber = 265
	

spawn_army 
	faction slave
	character	random_name, named character, age 30, x 75, y 221
	traits LoyaltyStarter 1 , GoodCommander 3 , ReligionStarter 1
		unit	NE Late Bodyguard			exp 9 armour 1 weapon_lvl 0
		unit	English Knights				exp 9 armour 2 weapon_lvl 0
		unit	English Knights				exp 9 armour 2 weapon_lvl 0
		unit	Billmen					exp 6 armour 2 weapon_lvl 0
		unit	Billmen					exp 6 armour 2 weapon_lvl 0
		unit	Billmen					exp 6 armour 2 weapon_lvl 0
		unit	Billmen					exp 6 armour 2 weapon_lvl 0
		unit	Billmen					exp 6 armour 2 weapon_lvl 0
		unit	Billmen					exp 6 armour 2 weapon_lvl 0
		unit	Dismounted English Knights		exp 6 armour 2 weapon_lvl 0
		unit	Dismounted English Knights		exp 6 armour 2 weapon_lvl 0
		unit	Yeoman Archers 				exp 6 armour 2 weapon_lvl 0 
		unit	Yeoman Archers 				exp 6 armour 2 weapon_lvl 0
		unit	Yeoman Archers 				exp 6 armour 2 weapon_lvl 0
		unit	Longbowmen 				exp 6 armour 2 weapon_lvl 0
		unit	Longbowmen 				exp 6 armour 2 weapon_lvl 0
		unit	Longbowmen 				exp 6 armour 2 weapon_lvl 0
		end
		console_command add_money slave, 15000
terminate_monitor
end_monitor 

;--------------------------------------------------------------------


;-------------Religion Wars---------------------------------------

monitor_event PreFactionTurnStart FactionType france
	and I_LocalFaction france
	and I_TurnNumber = 342
	

spawn_army 
	faction slave
	character	random_name, named character, age 30, x 72, y 169
	traits LoyaltyStarter 1 , GoodCommander 3 , ReligionStarter 1
		unit	NE Late Bodyguard		exp 9 armour 1 weapon_lvl 0
		unit	Chivalric Knights		exp 9 armour 2 weapon_lvl 0
		unit	Chivalric Knights		exp 9 armour 2 weapon_lvl 0
		unit	Swiss Armored Pikemen		exp 6 armour 2 weapon_lvl 0
		unit	Swiss Armored Pikemen		exp 6 armour 2 weapon_lvl 0
		unit	Swiss Pikemen			exp 6 armour 1 weapon_lvl 0
		unit	Swiss Pikemen			exp 6 armour 1 weapon_lvl 0
		unit	Swiss Pikemen			exp 6 armour 1 weapon_lvl 0
		unit	Swiss Pikemen			exp 6 armour 1 weapon_lvl 0
		unit	Swiss Halberdiers		exp 6 armour 2 weapon_lvl 0
		unit	Swiss Halberdiers		exp 6 armour 2 weapon_lvl 0
		unit	Mercenary Arquebusiers		exp 6 armour 0 weapon_lvl 0 
		unit	Mercenary Arquebusiers 		exp 6 armour 0 weapon_lvl 0
		unit	Mercenary Arquebusiers		exp 6 armour 0 weapon_lvl 0 
		unit	Mercenary Arquebusiers 		exp 6 armour 0 weapon_lvl 0
		unit	Mercenary Arquebusiers		exp 6 armour 0 weapon_lvl 0 
		unit	Mercenary Arquebusiers 		exp 6 armour 0 weapon_lvl 0
	end
	console_command add_money slave, 15000
terminate_monitor
end_monitor 

monitor_event PreFactionTurnStart FactionType france
	and I_LocalFaction france
	and I_TurnNumber = 345
	

spawn_army 
	faction slave
	character	random_name, named character, age 30, x 75, y 163
	traits LoyaltyStarter 1 , GoodCommander 3 , ReligionStarter 1
		unit	NE Late Bodyguard		exp 9 armour 1 weapon_lvl 0
		unit	Chivalric Knights		exp 9 armour 2 weapon_lvl 0
		unit	Chivalric Knights		exp 9 armour 2 weapon_lvl 0
		unit	Swiss Armored Pikemen		exp 6 armour 2 weapon_lvl 0
		unit	Swiss Armored Pikemen		exp 6 armour 2 weapon_lvl 0
		unit	Swiss Pikemen			exp 6 armour 1 weapon_lvl 0
		unit	Swiss Pikemen			exp 6 armour 1 weapon_lvl 0
		unit	Swiss Pikemen			exp 6 armour 1 weapon_lvl 0
		unit	Swiss Pikemen			exp 6 armour 1 weapon_lvl 0
		unit	Swiss Halberdiers		exp 6 armour 2 weapon_lvl 0
		unit	Swiss Halberdiers		exp 6 armour 2 weapon_lvl 0
		unit	Mercenary Arquebusiers		exp 6 armour 0 weapon_lvl 0 
		unit	Mercenary Arquebusiers 		exp 6 armour 0 weapon_lvl 0
		unit	Mercenary Arquebusiers		exp 6 armour 0 weapon_lvl 0 
		unit	Mercenary Arquebusiers 		exp 6 armour 0 weapon_lvl 0
		unit	Mercenary Arquebusiers		exp 6 armour 0 weapon_lvl 0 
		unit	Mercenary Arquebusiers 		exp 6 armour 0 weapon_lvl 0
	end
		console_command add_money slave, 15000
terminate_monitor
end_monitor 

monitor_event PreFactionTurnStart FactionType france
	and I_LocalFaction france
	and I_TurnNumber = 355
	

spawn_army 
	faction slave
	character	random_name, named character, age 30, x 94, y 177
	traits LoyaltyStarter 1 , GoodCommander 3 , ReligionStarter 1
		unit	NE Late Bodyguard		exp 9 armour 1 weapon_lvl 0
		unit	Chivalric Knights		exp 9 armour 2 weapon_lvl 0
		unit	Chivalric Knights		exp 9 armour 2 weapon_lvl 0
		unit	Swiss Armored Pikemen		exp 6 armour 2 weapon_lvl 0
		unit	Swiss Armored Pikemen		exp 6 armour 2 weapon_lvl 0
		unit	Swiss Pikemen			exp 6 armour 1 weapon_lvl 0
		unit	Swiss Pikemen			exp 6 armour 1 weapon_lvl 0
		unit	Swiss Pikemen			exp 6 armour 1 weapon_lvl 0
		unit	Swiss Pikemen			exp 6 armour 1 weapon_lvl 0
		unit	Swiss Halberdiers		exp 6 armour 2 weapon_lvl 0
		unit	Swiss Halberdiers		exp 6 armour 2 weapon_lvl 0
		unit	Mercenary Arquebusiers		exp 6 armour 0 weapon_lvl 0 
		unit	Mercenary Arquebusiers 		exp 6 armour 0 weapon_lvl 0
		unit	Mercenary Arquebusiers		exp 6 armour 0 weapon_lvl 0 
		unit	Mercenary Arquebusiers 		exp 6 armour 0 weapon_lvl 0
		unit	Mercenary Arquebusiers		exp 6 armour 0 weapon_lvl 0 
		unit	Mercenary Arquebusiers 		exp 6 armour 0 weapon_lvl 0
	end
	console_command add_money slave, 15000
terminate_monitor
end_monitor 

monitor_event PreFactionTurnStart FactionType france
	and I_LocalFaction france
	and I_TurnNumber = 367
	

spawn_army 
	faction slave
	character	random_name, named character, age 30, x 72, y 169
	traits LoyaltyStarter 1 , GoodCommander 3 , ReligionStarter 1
		unit	NE Late Bodyguard		exp 9 armour 1 weapon_lvl 0
		unit	Chivalric Knights		exp 9 armour 2 weapon_lvl 0
		unit	Chivalric Knights		exp 9 armour 2 weapon_lvl 0
		unit	Swiss Armored Pikemen		exp 6 armour 2 weapon_lvl 0
		unit	Swiss Armored Pikemen		exp 6 armour 2 weapon_lvl 0
		unit	Swiss Pikemen			exp 6 armour 1 weapon_lvl 0
		unit	Swiss Pikemen			exp 6 armour 1 weapon_lvl 0
		unit	Swiss Pikemen			exp 6 armour 1 weapon_lvl 0
		unit	Swiss Pikemen			exp 6 armour 1 weapon_lvl 0
		unit	Swiss Halberdiers		exp 6 armour 2 weapon_lvl 0
		unit	Swiss Halberdiers		exp 6 armour 2 weapon_lvl 0
		unit	Mercenary Arquebusiers		exp 6 armour 0 weapon_lvl 0 
		unit	Mercenary Arquebusiers 		exp 6 armour 0 weapon_lvl 0
		unit	Mercenary Arquebusiers		exp 6 armour 0 weapon_lvl 0 
		unit	Mercenary Arquebusiers 		exp 6 armour 0 weapon_lvl 0
		unit	Mercenary Arquebusiers		exp 6 armour 0 weapon_lvl 0 
		unit	Mercenary Arquebusiers 		exp 6 armour 0 weapon_lvl 0
	end
	console_command add_money slave, 15000
terminate_monitor
end_monitor 

monitor_event PreFactionTurnStart FactionType france
	and I_LocalFaction france
	and I_TurnNumber = 375
	

spawn_army 
	faction slave
	character	random_name, named character, age 30, x 75, y 163
	traits LoyaltyStarter 1 , GoodCommander 3 , ReligionStarter 1
		unit	NE Late Bodyguard		exp 9 armour 1 weapon_lvl 0
		unit	Chivalric Knights		exp 9 armour 2 weapon_lvl 0
		unit	Chivalric Knights		exp 9 armour 2 weapon_lvl 0
		unit	Swiss Armored Pikemen		exp 6 armour 2 weapon_lvl 0
		unit	Swiss Armored Pikemen		exp 6 armour 2 weapon_lvl 0
		unit	Swiss Pikemen			exp 6 armour 1 weapon_lvl 0
		unit	Swiss Pikemen			exp 6 armour 1 weapon_lvl 0
		unit	Swiss Pikemen			exp 6 armour 1 weapon_lvl 0
		unit	Swiss Pikemen			exp 6 armour 1 weapon_lvl 0
		unit	Swiss Halberdiers		exp 6 armour 2 weapon_lvl 0
		unit	Swiss Halberdiers		exp 6 armour 2 weapon_lvl 0
		unit	Mercenary Arquebusiers		exp 6 armour 0 weapon_lvl 0 
		unit	Mercenary Arquebusiers 		exp 6 armour 0 weapon_lvl 0
		unit	Mercenary Arquebusiers		exp 6 armour 0 weapon_lvl 0 
		unit	Mercenary Arquebusiers 		exp 6 armour 0 weapon_lvl 0
		unit	Mercenary Arquebusiers		exp 6 armour 0 weapon_lvl 0 
		unit	Mercenary Arquebusiers 		exp 6 armour 0 weapon_lvl 0
	end
		console_command add_money slave, 15000
terminate_monitor
end_monitor 

monitor_event PreFactionTurnStart FactionType france
	and I_LocalFaction france
	and I_TurnNumber = 378
	

spawn_army 
	faction slave
	character	random_name, named character, age 30, x 72, y 169
	traits LoyaltyStarter 1 , GoodCommander 3 , ReligionStarter 1
		unit	NE Late Bodyguard		exp 9 armour 1 weapon_lvl 0
		unit	Chivalric Knights		exp 9 armour 2 weapon_lvl 0
		unit	Chivalric Knights		exp 9 armour 2 weapon_lvl 0
		unit	Swiss Armored Pikemen		exp 6 armour 2 weapon_lvl 0
		unit	Swiss Armored Pikemen		exp 6 armour 2 weapon_lvl 0
		unit	Swiss Pikemen			exp 6 armour 1 weapon_lvl 0
		unit	Swiss Pikemen			exp 6 armour 1 weapon_lvl 0
		unit	Swiss Pikemen			exp 6 armour 1 weapon_lvl 0
		unit	Swiss Pikemen			exp 6 armour 1 weapon_lvl 0
		unit	Swiss Halberdiers		exp 6 armour 2 weapon_lvl 0
		unit	Swiss Halberdiers		exp 6 armour 2 weapon_lvl 0
		unit	Mercenary Arquebusiers		exp 6 armour 0 weapon_lvl 0 
		unit	Mercenary Arquebusiers 		exp 6 armour 0 weapon_lvl 0
		unit	Mercenary Arquebusiers		exp 6 armour 0 weapon_lvl 0 
		unit	Mercenary Arquebusiers 		exp 6 armour 0 weapon_lvl 0
		unit	Mercenary Arquebusiers		exp 6 armour 0 weapon_lvl 0 
		unit	Mercenary Arquebusiers 		exp 6 armour 0 weapon_lvl 0
	end
	console_command add_money slave, 15000
terminate_monitor
end_monitor 
;----------------peasant war----------------------------------------------------
monitor_event PreFactionTurnStart FactionType hre
	and I_LocalFaction hre
	and I_TurnNumber = 304
	
spawn_army 
	faction slave
	character	random_name, named character, age 50, x 150, y 202
	traits LoyaltyStarter 1 , GoodCommander 3 , ReligionStarter 1
		unit	Halberd Militia			exp 9 armour 2 weapon_lvl 0
		unit	Halberd Militia			exp 3 armour 2 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 3 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 3 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 3 armour 1 weapon_lvl 0
		unit	Arbalesters			exp 3 armour 0 weapon_lvl 0 
		unit	Arbalesters 			exp 3 armour 0 weapon_lvl 0
		unit	Halberd Militia			exp 3 armour 2 weapon_lvl 0
		unit	Halberd Militia			exp 3 armour 2 weapon_lvl 0 
		unit	Swabian Swordsmen 		exp 7 armour 0 weapon_lvl 0
		unit	Mercenary Arquebusiers		exp 3 armour 0 weapon_lvl 0 
		unit	Mercenary Arquebusiers		exp 3 armour 0 weapon_lvl 0
	end
		console_command add_money slave, 15000

terminate_monitor
end_monitor 

monitor_event PreFactionTurnStart FactionType hre
	and I_LocalFaction hre
	and I_TurnNumber = 304

spawn_army 
	faction slave
	character	random_name, named character, age 40, x 159, y 207
	traits LoyaltyStarter 1 , GoodCommander 3 , ReligionStarter 1
		unit	Halberd Militia			exp 9 armour 2 weapon_lvl 0
		unit	Halberd Militia			exp 3 armour 2 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 3 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 6 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Arbalesters			exp 3 armour 0 weapon_lvl 0 
		unit	Arbalesters 			exp 3 armour 0 weapon_lvl 0
		unit	Swabian Swordsmen 		exp 4 armour 0 weapon_lvl 0
	end
		console_command add_money slave, 15000
terminate_monitor
end_monitor 

monitor_event PreFactionTurnStart FactionType hre
	and I_LocalFaction hre
	and I_TurnNumber = 304

spawn_army 
	faction slave
	character	random_name, named character, age 30, x 162, y 201
	traits LoyaltyStarter 1 , GoodCommander 3 , ReligionStarter 1
		unit	Halberd Militia			exp 9 armour 2 weapon_lvl 0
		unit	Halberd Militia			exp 3 armour 2 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 3 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 6 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Arbalesters			exp 3 armour 1 weapon_lvl 0 
		unit	Arbalesters 			exp 3 armour 1 weapon_lvl 0
		unit	Swabian Swordsmen 		exp 4 armour 0 weapon_lvl 0		
	end
		console_command add_money slave, 15000
terminate_monitor
end_monitor 

monitor_event PreFactionTurnStart FactionType hre
	and I_LocalFaction hre
	and I_TurnNumber = 304

spawn_army 
	faction slave
	character	random_name, named character, age 50, x 168, y 195
	traits LoyaltyStarter 1 , GoodCommander 3 , ReligionStarter 1
		unit	Halberd Militia			exp 9 armour 2 weapon_lvl 0
		unit	Halberd Militia			exp 3 armour 2 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 3 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 3 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 3 armour 1 weapon_lvl 0
		unit	Arbalesters			exp 3 armour 1 weapon_lvl 0 
		unit	Arbalesters 			exp 3 armour 1 weapon_lvl 0
		unit	Halberd Militia			exp 3 armour 2 weapon_lvl 0
		unit	Halberd Militia			exp 3 armour 2 weapon_lvl 0 
		unit	Swabian Swordsmen 		exp 7 armour 0 weapon_lvl 0
		unit	Mercenary Arquebusiers		exp 3 armour 0 weapon_lvl 0 
		unit	Mercenary Arquebusiers		exp 3 armour 0 weapon_lvl 0
	end
		console_command add_money slave, 15000
terminate_monitor
end_monitor 

monitor_event PreFactionTurnStart FactionType hre
	and I_LocalFaction hre
	and I_TurnNumber = 304

spawn_army 
	faction slave
	character	random_name, named character, age 30, x 173, y 192
	traits LoyaltyStarter 1 , GoodCommander 3 , ReligionStarter 1
		unit	Halberd Militia			exp 9 armour 2 weapon_lvl 0
		unit	Halberd Militia			exp 3 armour 2 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 3 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 3 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 3 armour 1 weapon_lvl 0
		unit	Arbalesters			exp 3 armour 1 weapon_lvl 0 
		unit	Arbalesters 			exp 3 armour 1 weapon_lvl 0
		unit	Halberd Militia			exp 3 armour 2 weapon_lvl 0
		unit	Halberd Militia			exp 3 armour 2 weapon_lvl 0 
		unit	Swabian Swordsmen 		exp 7 armour 0 weapon_lvl 0
		unit	Mercenary Arquebusiers		exp 3 armour 0 weapon_lvl 0 
		unit	Mercenary Arquebusiers		exp 3 armour 0 weapon_lvl 0
	end
		console_command add_money slave, 15000
terminate_monitor
end_monitor 

monitor_event PreFactionTurnStart FactionType hre
	and I_LocalFaction hre
	and I_TurnNumber = 304

spawn_army 
	faction slave
	character	random_name, named character, age 30, x 167, y 192
	traits LoyaltyStarter 1 , GoodCommander 3 , ReligionStarter 1
		unit	Halberd Militia			exp 9 armour 2 weapon_lvl 0
		unit	Halberd Militia			exp 3 armour 2 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 3 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 6 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Arbalesters			exp 3 armour 1 weapon_lvl 0 
		unit	Arbalesters 			exp 3 armour 1 weapon_lvl 0
		unit	Swabian Swordsmen 		exp 4 armour 0 weapon_lvl 0
	end
		console_command add_money slave, 10000
terminate_monitor
end_monitor 

monitor_event PreFactionTurnStart FactionType hre
	and I_LocalFaction hre
	and I_TurnNumber = 305

spawn_army 
	faction slave
	character	random_name, named character, age 50, x 145, y 202
	traits LoyaltyStarter 1 , GoodCommander 3 , ReligionStarter 1
		unit	Halberd Militia			exp 9 armour 2 weapon_lvl 0
		unit	Halberd Militia			exp 3 armour 2 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 3 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 6 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Arbalesters			exp 3 armour 1 weapon_lvl 0 
		unit	Arbalesters 			exp 3 armour 1 weapon_lvl 0
		unit	Swabian Swordsmen 		exp 4 armour 0 weapon_lvl 0
	end
		console_command add_money slave, 10000
terminate_monitor
end_monitor

monitor_event PreFactionTurnStart FactionType hre
	and I_LocalFaction hre
	and I_TurnNumber = 305

spawn_army 
	faction slave
	character	random_name, named character, age 40, x 135, y 195
	traits LoyaltyStarter 1 , GoodCommander 3 , ReligionStarter 1
		unit	Halberd Militia			exp 9 armour 2 weapon_lvl 0
		unit	Halberd Militia			exp 3 armour 2 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 3 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 6 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Arbalesters			exp 3 armour 1 weapon_lvl 0 
		unit	Arbalesters 			exp 3 armour 1 weapon_lvl 0
		unit	Swabian Swordsmen 		exp 4 armour 0 weapon_lvl 0
	end
		console_command add_money slave, 10000
terminate_monitor
end_monitor

monitor_event PreFactionTurnStart FactionType hre
	and I_LocalFaction hre
	and I_TurnNumber = 305

spawn_army 
	faction slave
	character	random_name, named character, age 30, x 163, y 189
	traits LoyaltyStarter 1 , GoodCommander 3 , ReligionStarter 1
		unit	Halberd Militia			exp 9 armour 2 weapon_lvl 0
		unit	Halberd Militia			exp 3 armour 2 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 3 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 3 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 3 armour 1 weapon_lvl 0
		unit	Arbalesters			exp 3 armour 1 weapon_lvl 0 
		unit	Arbalesters 			exp 3 armour 1 weapon_lvl 0
		unit	Halberd Militia			exp 3 armour 2 weapon_lvl 0
		unit	Halberd Militia			exp 3 armour 2 weapon_lvl 0 
		unit	Swabian Swordsmen 		exp 7 armour 0 weapon_lvl 0
		unit	Mercenary Arquebusiers		exp 3 armour 0 weapon_lvl 0 
		unit	Mercenary Arquebusiers		exp 3 armour 0 weapon_lvl 0
	end
		console_command add_money slave, 15000
terminate_monitor
end_monitor 

monitor_event PreFactionTurnStart FactionType spain
	and I_LocalFaction spain
	and I_TurnNumber = 305

spawn_army 
	faction slave
	character	random_name, named character, age 50, x 145, y 202
	traits LoyaltyStarter 1 , GoodCommander 3 , ReligionStarter 1
		unit	Halberd Militia			exp 9 armour 2 weapon_lvl 0
		unit	Halberd Militia			exp 3 armour 2 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 3 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 6 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Arbalesters			exp 3 armour 1 weapon_lvl 0 
		unit	Arbalesters 			exp 3 armour 1 weapon_lvl 0
		unit	Swabian Swordsmen 		exp 4 armour 0 weapon_lvl 0
	end
		console_command add_money slave, 10000

terminate_monitor
end_monitor

monitor_event PreFactionTurnStart FactionType spain
	and I_LocalFaction spain
	and I_TurnNumber = 305


spawn_army 
	faction slave
	character	random_name, named character, age 40, x 135, y 195
	traits LoyaltyStarter 1 , GoodCommander 3 , ReligionStarter 1
		unit	Halberd Militia			exp 9 armour 2 weapon_lvl 0
		unit	Halberd Militia			exp 3 armour 2 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 3 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 6 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Arbalesters			exp 3 armour 1 weapon_lvl 0 
		unit	Arbalesters 			exp 3 armour 1 weapon_lvl 0
		unit	Swabian Swordsmen 		exp 4 armour 0 weapon_lvl 0
		end
	console_command add_money slave, 10000
terminate_monitor
end_monitor

monitor_event PreFactionTurnStart FactionType spain
	and I_LocalFaction spain
	and I_TurnNumber = 305


spawn_army 
	faction slave
	character	random_name, named character, age 30, x 163, y 189
	traits LoyaltyStarter 1 , GoodCommander 3 , ReligionStarter 1
		unit	Halberd Militia			exp 9 armour 2 weapon_lvl 0
		unit	Halberd Militia			exp 3 armour 2 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 3 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 3 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 3 armour 1 weapon_lvl 0
		unit	Arbalesters			exp 3 armour 1 weapon_lvl 0 
		unit	Arbalesters 			exp 3 armour 1 weapon_lvl 0
		unit	Halberd Militia			exp 3 armour 2 weapon_lvl 0
		unit	Halberd Militia			exp 3 armour 2 weapon_lvl 0 
		unit	Swabian Swordsmen 		exp 7 armour 0 weapon_lvl 0
		unit	Mercenary Arquebusiers		exp 3 armour 0 weapon_lvl 0 
		unit	Mercenary Arquebusiers		exp 3 armour 0 weapon_lvl 0
	end
		console_command add_money slave, 15000

terminate_monitor
end_monitor

monitor_event PreFactionTurnStart FactionType spain
	and I_LocalFaction spain
	and I_TurnNumber = 305


spawn_army 
	faction slave
	character	random_name, named character, age 50, x 181, y 197
	traits LoyaltyStarter 1 , GoodCommander 3 , ReligionStarter 1
		unit	Halberd Militia			exp 9 armour 2 weapon_lvl 0
		unit	Halberd Militia			exp 3 armour 2 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 3 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 3 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 5 armour 1 weapon_lvl 0
		unit	Landschneckt Pikemen		exp 3 armour 1 weapon_lvl 0
		unit	Arbalesters			exp 3 armour 1 weapon_lvl 0 
		unit	Arbalesters 			exp 3 armour 1 weapon_lvl 0
		unit	Halberd Militia			exp 3 armour 2 weapon_lvl 0
		unit	Halberd Militia			exp 3 armour 2 weapon_lvl 0 
		unit	Swabian Swordsmen 		exp 7 armour 0 weapon_lvl 0
		unit	Mercenary Arquebusiers		exp 3 armour 0 weapon_lvl 0 
		unit	Mercenary Arquebusiers		exp 3 armour 0 weapon_lvl 0
	end
		console_command add_money slave, 15000

terminate_monitor
end_monitor 

;########################## Germanicu5 Assimilation Script 1.1 ###########################

monitor_event GeneralCaptureSettlement SettlementName Inverness
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Inverness 0.01
	add_settlement_turmoil Inverness 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Inverness 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Inverness 5
	end_if

	set_event_counter Inverness_filter 1
	filter_settlement_commands off Inverness 
end_monitor

monitor_event SettlementTurnEnd SettlementName Inverness
	and SettlementIsLocal
	and I_EventCounter Inverness_filter = 1
	
	filter_settlement_commands on Inverness 
	set_event_counter Inverness_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Inverness
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Inverness 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Inverness
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Inverness 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Inverness
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Inverness 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Nykoeping
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Nykoeping 0.01
	add_settlement_turmoil Nykoeping 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Nykoeping 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Nykoeping 5
	end_if

	set_event_counter Nykoeping_filter 1
	filter_settlement_commands off Nykoeping 
end_monitor

monitor_event SettlementTurnEnd SettlementName Nykoeping
	and SettlementIsLocal
	and I_EventCounter Nykoeping_filter = 1
	
	filter_settlement_commands on Nykoeping 
	set_event_counter Nykoeping_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Nykoeping
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Nykoeping 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Nykoeping
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Nykoeping 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Nykoeping
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Nykoeping 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Moscow
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Moscow 0.01
	add_settlement_turmoil Moscow 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Moscow 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Moscow 5
	end_if

	set_event_counter Moscow_filter 1
	filter_settlement_commands off Moscow 
end_monitor

monitor_event SettlementTurnEnd SettlementName Moscow
	and SettlementIsLocal
	and I_EventCounter Moscow_filter = 1
	
	filter_settlement_commands on Moscow 
	set_event_counter Moscow_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Moscow
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Moscow 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Moscow
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Moscow 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Moscow
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Moscow 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Bulgar
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Bulgar 0.01
	add_settlement_turmoil Bulgar 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Bulgar 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Bulgar 5
	end_if

	set_event_counter Bulgar_filter 1
	filter_settlement_commands off Bulgar 
end_monitor

monitor_event SettlementTurnEnd SettlementName Bulgar
	and SettlementIsLocal
	and I_EventCounter Bulgar_filter = 1
	
	filter_settlement_commands on Bulgar 
	set_event_counter Bulgar_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bulgar
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Bulgar 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bulgar
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Bulgar 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bulgar
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Bulgar 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Smolensk
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Smolensk 0.01
	add_settlement_turmoil Smolensk 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Smolensk 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Smolensk 5
	end_if

	set_event_counter Smolensk_filter 1
	filter_settlement_commands off Smolensk 
end_monitor

monitor_event SettlementTurnEnd SettlementName Smolensk
	and SettlementIsLocal
	and I_EventCounter Smolensk_filter = 1
	
	filter_settlement_commands on Smolensk 
	set_event_counter Smolensk_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Smolensk
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Smolensk 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Smolensk
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Smolensk 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Smolensk
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Smolensk 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Dublin
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Dublin 0.01
	add_settlement_turmoil Dublin 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Dublin 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Dublin 5
	end_if

	set_event_counter Dublin_filter 1
	filter_settlement_commands off Dublin 
end_monitor

monitor_event SettlementTurnEnd SettlementName Dublin
	and SettlementIsLocal
	and I_EventCounter Dublin_filter = 1
	
	filter_settlement_commands on Dublin 
	set_event_counter Dublin_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Dublin
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Dublin 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Dublin
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Dublin 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Dublin
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Dublin 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Cork
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Cork 0.01
	add_settlement_turmoil Cork 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Cork 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Cork 5
	end_if

	set_event_counter Cork_filter 1
	filter_settlement_commands off Cork 
end_monitor

monitor_event SettlementTurnEnd SettlementName Cork
	and SettlementIsLocal
	and I_EventCounter Cork_filter = 1
	
	filter_settlement_commands on Cork 
	set_event_counter Cork_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Cork
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Cork 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Cork
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Cork 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Cork
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Cork 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName York
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate York 0.01
	add_settlement_turmoil York 3
		
	if RandomPercent < 25 
	add_settlement_turmoil York 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil York 5
	end_if

	set_event_counter York_filter 1
	filter_settlement_commands off York 
end_monitor

monitor_event SettlementTurnEnd SettlementName York
	and SettlementIsLocal
	and I_EventCounter York_filter = 1
	
	filter_settlement_commands on York 
	set_event_counter York_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName York
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate York 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName York
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil York 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName York
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil York 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Ryazan
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Ryazan 0.01
	add_settlement_turmoil Ryazan 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Ryazan 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Ryazan 5
	end_if

	set_event_counter Ryazan_filter 1
	filter_settlement_commands off Ryazan 
end_monitor

monitor_event SettlementTurnEnd SettlementName Ryazan
	and SettlementIsLocal
	and I_EventCounter Ryazan_filter = 1
	
	filter_settlement_commands on Ryazan 
	set_event_counter Ryazan_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Ryazan
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Ryazan 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Ryazan
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Ryazan 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Ryazan
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Ryazan 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Caernarvon
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Caernarvon 0.01
	add_settlement_turmoil Caernarvon 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Caernarvon 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Caernarvon 5
	end_if

	set_event_counter Caernarvon_filter 1
	filter_settlement_commands off Caernarvon 
end_monitor

monitor_event SettlementTurnEnd SettlementName Caernarvon
	and SettlementIsLocal
	and I_EventCounter Caernarvon_filter = 1
	
	filter_settlement_commands on Caernarvon 
	set_event_counter Caernarvon_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Caernarvon
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Caernarvon 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Caernarvon
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Caernarvon 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Caernarvon
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Caernarvon 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Thorn
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Thorn 0.01
	add_settlement_turmoil Thorn 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Thorn 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Thorn 5
	end_if

	set_event_counter Thorn_filter 1
	filter_settlement_commands off Thorn 
end_monitor

monitor_event SettlementTurnEnd SettlementName Thorn
	and SettlementIsLocal
	and I_EventCounter Thorn_filter = 1
	
	filter_settlement_commands on Thorn 
	set_event_counter Thorn_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Thorn
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Thorn 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Thorn
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Thorn 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Thorn
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Thorn 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Nottingham
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Nottingham 0.01
	add_settlement_turmoil Nottingham 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Nottingham 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Nottingham 5
	end_if

	set_event_counter Nottingham_filter 1
	filter_settlement_commands off Nottingham 
end_monitor

monitor_event SettlementTurnEnd SettlementName Nottingham
	and SettlementIsLocal
	and I_EventCounter Nottingham_filter = 1
	
	filter_settlement_commands on Nottingham 
	set_event_counter Nottingham_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Nottingham
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Nottingham 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Nottingham
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Nottingham 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Nottingham
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Nottingham 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Stettin
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Stettin 0.01
	add_settlement_turmoil Stettin 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Stettin 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Stettin 5
	end_if

	set_event_counter Stettin_filter 1
	filter_settlement_commands off Stettin 
end_monitor

monitor_event SettlementTurnEnd SettlementName Stettin
	and SettlementIsLocal
	and I_EventCounter Stettin_filter = 1
	
	filter_settlement_commands on Stettin 
	set_event_counter Stettin_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Stettin
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Stettin 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Stettin
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Stettin 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Stettin
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Stettin 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Hamburg
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Hamburg 0.01
	add_settlement_turmoil Hamburg 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Hamburg 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Hamburg 5
	end_if

	set_event_counter Hamburg_filter 1
	filter_settlement_commands off Hamburg 
end_monitor

monitor_event SettlementTurnEnd SettlementName Hamburg
	and SettlementIsLocal
	and I_EventCounter Hamburg_filter = 1
	
	filter_settlement_commands on Hamburg 
	set_event_counter Hamburg_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Hamburg
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Hamburg 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Hamburg
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Hamburg 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Hamburg
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Hamburg 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Sarkel
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Sarkel 0.01
	add_settlement_turmoil Sarkel 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Sarkel 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Sarkel 5
	end_if

	set_event_counter Sarkel_filter 1
	filter_settlement_commands off Sarkel 
end_monitor

monitor_event SettlementTurnEnd SettlementName Sarkel
	and SettlementIsLocal
	and I_EventCounter Sarkel_filter = 1
	
	filter_settlement_commands on Sarkel 
	set_event_counter Sarkel_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Sarkel
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Sarkel 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Sarkel
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Sarkel 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Sarkel
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Sarkel 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Antwerp
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Antwerp 0.01
	add_settlement_turmoil Antwerp 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Antwerp 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Antwerp 5
	end_if

	set_event_counter Antwerp_filter 1
	filter_settlement_commands off Antwerp 
end_monitor

monitor_event SettlementTurnEnd SettlementName Antwerp
	and SettlementIsLocal
	and I_EventCounter Antwerp_filter = 1
	
	filter_settlement_commands on Antwerp 
	set_event_counter Antwerp_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Antwerp
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Antwerp 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Antwerp
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Antwerp 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Antwerp
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Antwerp 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Magdeburg
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Magdeburg 0.01
	add_settlement_turmoil Magdeburg 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Magdeburg 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Magdeburg 5
	end_if

	set_event_counter Magdeburg_filter 1
	filter_settlement_commands off Magdeburg 
end_monitor

monitor_event SettlementTurnEnd SettlementName Magdeburg
	and SettlementIsLocal
	and I_EventCounter Magdeburg_filter = 1
	
	filter_settlement_commands on Magdeburg 
	set_event_counter Magdeburg_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Magdeburg
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Magdeburg 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Magdeburg
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Magdeburg 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Magdeburg
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Magdeburg 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Halych
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Halych 0.01
	add_settlement_turmoil Halych 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Halych 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Halych 5
	end_if

	set_event_counter Halych_filter 1
	filter_settlement_commands off Halych 
end_monitor

monitor_event SettlementTurnEnd SettlementName Halych
	and SettlementIsLocal
	and I_EventCounter Halych_filter = 1
	
	filter_settlement_commands on Halych 
	set_event_counter Halych_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Halych
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Halych 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Halych
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Halych 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Halych
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Halych 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Breslau
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Breslau 0.01
	add_settlement_turmoil Breslau 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Breslau 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Breslau 5
	end_if

	set_event_counter Breslau_filter 1
	filter_settlement_commands off Breslau 
end_monitor

monitor_event SettlementTurnEnd SettlementName Breslau
	and SettlementIsLocal
	and I_EventCounter Breslau_filter = 1
	
	filter_settlement_commands on Breslau 
	set_event_counter Breslau_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Breslau
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Breslau 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Breslau
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Breslau 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Breslau
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Breslau 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Bruges
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Bruges 0.01
	add_settlement_turmoil Bruges 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Bruges 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Bruges 5
	end_if

	set_event_counter Bruges_filter 1
	filter_settlement_commands off Bruges 
end_monitor

monitor_event SettlementTurnEnd SettlementName Bruges
	and SettlementIsLocal
	and I_EventCounter Bruges_filter = 1
	
	filter_settlement_commands on Bruges 
	set_event_counter Bruges_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bruges
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Bruges 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bruges
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Bruges 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bruges
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Bruges 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Metz
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Metz 0.01
	add_settlement_turmoil Metz 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Metz 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Metz 5
	end_if

	set_event_counter Metz_filter 1
	filter_settlement_commands off Metz 
end_monitor

monitor_event SettlementTurnEnd SettlementName Metz
	and SettlementIsLocal
	and I_EventCounter Metz_filter = 1
	
	filter_settlement_commands on Metz 
	set_event_counter Metz_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Metz
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Metz 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Metz
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Metz 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Metz
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Metz 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Caen
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Caen 0.01
	add_settlement_turmoil Caen 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Caen 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Caen 5
	end_if

	set_event_counter Caen_filter 1
	filter_settlement_commands off Caen 
end_monitor

monitor_event SettlementTurnEnd SettlementName Caen
	and SettlementIsLocal
	and I_EventCounter Caen_filter = 1
	
	filter_settlement_commands on Caen 
	set_event_counter Caen_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Caen
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Caen 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Caen
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Caen 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Caen
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Caen 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Prague
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Prague 0.01
	add_settlement_turmoil Prague 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Prague 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Prague 5
	end_if

	set_event_counter Prague_filter 1
	filter_settlement_commands off Prague 
end_monitor

monitor_event SettlementTurnEnd SettlementName Prague
	and SettlementIsLocal
	and I_EventCounter Prague_filter = 1
	
	filter_settlement_commands on Prague 
	set_event_counter Prague_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Prague
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Prague 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Prague
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Prague 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Prague
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Prague 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Rheims
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Rheims 0.01
	add_settlement_turmoil Rheims 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Rheims 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Rheims 5
	end_if

	set_event_counter Rheims_filter 1
	filter_settlement_commands off Rheims 
end_monitor

monitor_event SettlementTurnEnd SettlementName Rheims
	and SettlementIsLocal
	and I_EventCounter Rheims_filter = 1
	
	filter_settlement_commands on Rheims 
	set_event_counter Rheims_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Rheims
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Rheims 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Rheims
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Rheims 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Rheims
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Rheims 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Rennes
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Rennes 0.01
	add_settlement_turmoil Rennes 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Rennes 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Rennes 5
	end_if

	set_event_counter Rennes_filter 1
	filter_settlement_commands off Rennes 
end_monitor

monitor_event SettlementTurnEnd SettlementName Rennes
	and SettlementIsLocal
	and I_EventCounter Rennes_filter = 1
	
	filter_settlement_commands on Rennes 
	set_event_counter Rennes_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Rennes
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Rennes 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Rennes
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Rennes 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Rennes
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Rennes 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Nuremburg
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Nuremburg 0.01
	add_settlement_turmoil Nuremburg 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Nuremburg 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Nuremburg 5
	end_if

	set_event_counter Nuremburg_filter 1
	filter_settlement_commands off Nuremburg 
end_monitor

monitor_event SettlementTurnEnd SettlementName Nuremburg
	and SettlementIsLocal
	and I_EventCounter Nuremburg_filter = 1
	
	filter_settlement_commands on Nuremburg 
	set_event_counter Nuremburg_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Nuremburg
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Nuremburg 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Nuremburg
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Nuremburg 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Nuremburg
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Nuremburg 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Hohenstauffen
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Hohenstauffen 0.01
	add_settlement_turmoil Hohenstauffen 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Hohenstauffen 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Hohenstauffen 5
	end_if

	set_event_counter Hohenstauffen_filter 1
	filter_settlement_commands off Hohenstauffen 
end_monitor

monitor_event SettlementTurnEnd SettlementName Hohenstauffen
	and SettlementIsLocal
	and I_EventCounter Hohenstauffen_filter = 1
	
	filter_settlement_commands on Hohenstauffen 
	set_event_counter Hohenstauffen_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Hohenstauffen
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Hohenstauffen 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Hohenstauffen
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Hohenstauffen 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Hohenstauffen
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Hohenstauffen 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Iasi
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Iasi 0.01
	add_settlement_turmoil Iasi 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Iasi 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Iasi 5
	end_if

	set_event_counter Iasi_filter 1
	filter_settlement_commands off Iasi 
end_monitor

monitor_event SettlementTurnEnd SettlementName Iasi
	and SettlementIsLocal
	and I_EventCounter Iasi_filter = 1
	
	filter_settlement_commands on Iasi 
	set_event_counter Iasi_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Iasi
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Iasi 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Iasi
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Iasi 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Iasi
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Iasi 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Angers
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Angers 0.01
	add_settlement_turmoil Angers 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Angers 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Angers 5
	end_if

	set_event_counter Angers_filter 1
	filter_settlement_commands off Angers 
end_monitor

monitor_event SettlementTurnEnd SettlementName Angers
	and SettlementIsLocal
	and I_EventCounter Angers_filter = 1
	
	filter_settlement_commands on Angers 
	set_event_counter Angers_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Angers
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Angers 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Angers
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Angers 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Angers
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Angers 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Bran
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Bran 0.01
	add_settlement_turmoil Bran 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Bran 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Bran 5
	end_if

	set_event_counter Bran_filter 1
	filter_settlement_commands off Bran 
end_monitor

monitor_event SettlementTurnEnd SettlementName Bran
	and SettlementIsLocal
	and I_EventCounter Bran_filter = 1
	
	filter_settlement_commands on Bran 
	set_event_counter Bran_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bran
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Bran 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bran
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Bran 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bran
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Bran 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Caffa
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Caffa 0.01
	add_settlement_turmoil Caffa 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Caffa 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Caffa 5
	end_if

	set_event_counter Caffa_filter 1
	filter_settlement_commands off Caffa 
end_monitor

monitor_event SettlementTurnEnd SettlementName Caffa
	and SettlementIsLocal
	and I_EventCounter Caffa_filter = 1
	
	filter_settlement_commands on Caffa 
	set_event_counter Caffa_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Caffa
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Caffa 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Caffa
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Caffa 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Caffa
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Caffa 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Vienna
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Vienna 0.01
	add_settlement_turmoil Vienna 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Vienna 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Vienna 5
	end_if

	set_event_counter Vienna_filter 1
	filter_settlement_commands off Vienna 
end_monitor

monitor_event SettlementTurnEnd SettlementName Vienna
	and SettlementIsLocal
	and I_EventCounter Vienna_filter = 1
	
	filter_settlement_commands on Vienna 
	set_event_counter Vienna_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Vienna
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Vienna 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Vienna
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Vienna 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Vienna
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Vienna 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Dijon
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Dijon 0.01
	add_settlement_turmoil Dijon 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Dijon 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Dijon 5
	end_if

	set_event_counter Dijon_filter 1
	filter_settlement_commands off Dijon 
end_monitor

monitor_event SettlementTurnEnd SettlementName Dijon
	and SettlementIsLocal
	and I_EventCounter Dijon_filter = 1
	
	filter_settlement_commands on Dijon 
	set_event_counter Dijon_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Dijon
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Dijon 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Dijon
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Dijon 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Dijon
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Dijon 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Bern
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Bern 0.01
	add_settlement_turmoil Bern 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Bern 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Bern 5
	end_if

	set_event_counter Bern_filter 1
	filter_settlement_commands off Bern 
end_monitor

monitor_event SettlementTurnEnd SettlementName Bern
	and SettlementIsLocal
	and I_EventCounter Bern_filter = 1
	
	filter_settlement_commands on Bern 
	set_event_counter Bern_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bern
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Bern 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bern
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Bern 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bern
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Bern 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Innsbruck
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Innsbruck 0.01
	add_settlement_turmoil Innsbruck 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Innsbruck 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Innsbruck 5
	end_if

	set_event_counter Innsbruck_filter 1
	filter_settlement_commands off Innsbruck 
end_monitor

monitor_event SettlementTurnEnd SettlementName Innsbruck
	and SettlementIsLocal
	and I_EventCounter Innsbruck_filter = 1
	
	filter_settlement_commands on Innsbruck 
	set_event_counter Innsbruck_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Innsbruck
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Innsbruck 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Innsbruck
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Innsbruck 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Innsbruck
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Innsbruck 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Bordeaux
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Bordeaux 0.01
	add_settlement_turmoil Bordeaux 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Bordeaux 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Bordeaux 5
	end_if

	set_event_counter Bordeaux_filter 1
	filter_settlement_commands off Bordeaux 
end_monitor

monitor_event SettlementTurnEnd SettlementName Bordeaux
	and SettlementIsLocal
	and I_EventCounter Bordeaux_filter = 1
	
	filter_settlement_commands on Bordeaux 
	set_event_counter Bordeaux_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bordeaux
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Bordeaux 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bordeaux
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Bordeaux 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bordeaux
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Bordeaux 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Tbilisi
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Tbilisi 0.01
	add_settlement_turmoil Tbilisi 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Tbilisi 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Tbilisi 5
	end_if

	set_event_counter Tbilisi_filter 1
	filter_settlement_commands off Tbilisi 
end_monitor

monitor_event SettlementTurnEnd SettlementName Tbilisi
	and SettlementIsLocal
	and I_EventCounter Tbilisi_filter = 1
	
	filter_settlement_commands on Tbilisi 
	set_event_counter Tbilisi_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Tbilisi
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Tbilisi 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Tbilisi
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Tbilisi 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Tbilisi
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Tbilisi 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Bucharest
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Bucharest 0.01
	add_settlement_turmoil Bucharest 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Bucharest 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Bucharest 5
	end_if

	set_event_counter Bucharest_filter 1
	filter_settlement_commands off Bucharest 
end_monitor

monitor_event SettlementTurnEnd SettlementName Bucharest
	and SettlementIsLocal
	and I_EventCounter Bucharest_filter = 1
	
	filter_settlement_commands on Bucharest 
	set_event_counter Bucharest_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bucharest
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Bucharest 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bucharest
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Bucharest 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bucharest
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Bucharest 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Toulouse
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Toulouse 0.01
	add_settlement_turmoil Toulouse 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Toulouse 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Toulouse 5
	end_if

	set_event_counter Toulouse_filter 1
	filter_settlement_commands off Toulouse 
end_monitor

monitor_event SettlementTurnEnd SettlementName Toulouse
	and SettlementIsLocal
	and I_EventCounter Toulouse_filter = 1
	
	filter_settlement_commands on Toulouse 
	set_event_counter Toulouse_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Toulouse
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Toulouse 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Toulouse
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Toulouse 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Toulouse
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Toulouse 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Zagreb
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Zagreb 0.01
	add_settlement_turmoil Zagreb 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Zagreb 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Zagreb 5
	end_if

	set_event_counter Zagreb_filter 1
	filter_settlement_commands off Zagreb 
end_monitor

monitor_event SettlementTurnEnd SettlementName Zagreb
	and SettlementIsLocal
	and I_EventCounter Zagreb_filter = 1
	
	filter_settlement_commands on Zagreb 
	set_event_counter Zagreb_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Zagreb
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Zagreb 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Zagreb
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Zagreb 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Zagreb
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Zagreb 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Sofia
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Sofia 0.01
	add_settlement_turmoil Sofia 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Sofia 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Sofia 5
	end_if

	set_event_counter Sofia_filter 1
	filter_settlement_commands off Sofia 
end_monitor

monitor_event SettlementTurnEnd SettlementName Sofia
	and SettlementIsLocal
	and I_EventCounter Sofia_filter = 1
	
	filter_settlement_commands on Sofia 
	set_event_counter Sofia_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Sofia
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Sofia 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Sofia
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Sofia 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Sofia
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Sofia 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Ragusa
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Ragusa 0.01
	add_settlement_turmoil Ragusa 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Ragusa 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Ragusa 5
	end_if

	set_event_counter Ragusa_filter 1
	filter_settlement_commands off Ragusa 
end_monitor

monitor_event SettlementTurnEnd SettlementName Ragusa
	and SettlementIsLocal
	and I_EventCounter Ragusa_filter = 1
	
	filter_settlement_commands on Ragusa 
	set_event_counter Ragusa_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Ragusa
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Ragusa 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Ragusa
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Ragusa 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Ragusa
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Ragusa 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Toledo
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Toledo 0.01
	add_settlement_turmoil Toledo 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Toledo 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Toledo 5
	end_if

	set_event_counter Toledo_filter 1
	filter_settlement_commands off Toledo 
end_monitor

monitor_event SettlementTurnEnd SettlementName Toledo
	and SettlementIsLocal
	and I_EventCounter Toledo_filter = 1
	
	filter_settlement_commands on Toledo 
	set_event_counter Toledo_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Toledo
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Toledo 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Toledo
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Toledo 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Toledo
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Toledo 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Bologna
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Bologna 0.01
	add_settlement_turmoil Bologna 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Bologna 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Bologna 5
	end_if

	set_event_counter Bologna_filter 1
	filter_settlement_commands off Bologna 
end_monitor

monitor_event SettlementTurnEnd SettlementName Bologna
	and SettlementIsLocal
	and I_EventCounter Bologna_filter = 1
	
	filter_settlement_commands on Bologna 
	set_event_counter Bologna_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bologna
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Bologna 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bologna
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Bologna 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bologna
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Bologna 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Pamplona
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Pamplona 0.01
	add_settlement_turmoil Pamplona 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Pamplona 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Pamplona 5
	end_if

	set_event_counter Pamplona_filter 1
	filter_settlement_commands off Pamplona 
end_monitor

monitor_event SettlementTurnEnd SettlementName Pamplona
	and SettlementIsLocal
	and I_EventCounter Pamplona_filter = 1
	
	filter_settlement_commands on Pamplona 
	set_event_counter Pamplona_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Pamplona
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Pamplona 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Pamplona
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Pamplona 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Pamplona
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Pamplona 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Genoa
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Genoa 0.01
	add_settlement_turmoil Genoa 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Genoa 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Genoa 5
	end_if

	set_event_counter Genoa_filter 1
	filter_settlement_commands off Genoa 
end_monitor

monitor_event SettlementTurnEnd SettlementName Genoa
	and SettlementIsLocal
	and I_EventCounter Genoa_filter = 1
	
	filter_settlement_commands on Genoa 
	set_event_counter Genoa_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Genoa
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Genoa 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Genoa
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Genoa 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Genoa
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Genoa 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Florence
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Florence 0.01
	add_settlement_turmoil Florence 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Florence 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Florence 5
	end_if

	set_event_counter Florence_filter 1
	filter_settlement_commands off Florence 
end_monitor

monitor_event SettlementTurnEnd SettlementName Florence
	and SettlementIsLocal
	and I_EventCounter Florence_filter = 1
	
	filter_settlement_commands on Florence 
	set_event_counter Florence_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Florence
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Florence 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Florence
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Florence 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Florence
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Florence 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Trebizond
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Trebizond 0.01
	add_settlement_turmoil Trebizond 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Trebizond 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Trebizond 5
	end_if

	set_event_counter Trebizond_filter 1
	filter_settlement_commands off Trebizond 
end_monitor

monitor_event SettlementTurnEnd SettlementName Trebizond
	and SettlementIsLocal
	and I_EventCounter Trebizond_filter = 1
	
	filter_settlement_commands on Trebizond 
	set_event_counter Trebizond_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Trebizond
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Trebizond 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Trebizond
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Trebizond 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Trebizond
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Trebizond 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Marseille
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Marseille 0.01
	add_settlement_turmoil Marseille 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Marseille 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Marseille 5
	end_if

	set_event_counter Marseille_filter 1
	filter_settlement_commands off Marseille 
end_monitor

monitor_event SettlementTurnEnd SettlementName Marseille
	and SettlementIsLocal
	and I_EventCounter Marseille_filter = 1
	
	filter_settlement_commands on Marseille 
	set_event_counter Marseille_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Marseille
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Marseille 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Marseille
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Marseille 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Marseille
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Marseille 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Yerevan
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Yerevan 0.01
	add_settlement_turmoil Yerevan 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Yerevan 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Yerevan 5
	end_if

	set_event_counter Yerevan_filter 1
	filter_settlement_commands off Yerevan 
end_monitor

monitor_event SettlementTurnEnd SettlementName Yerevan
	and SettlementIsLocal
	and I_EventCounter Yerevan_filter = 1
	
	filter_settlement_commands on Yerevan 
	set_event_counter Yerevan_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Yerevan
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Yerevan 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Yerevan
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Yerevan 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Yerevan
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Yerevan 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Thessalonica
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Thessalonica 0.01
	add_settlement_turmoil Thessalonica 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Thessalonica 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Thessalonica 5
	end_if

	set_event_counter Thessalonica_filter 1
	filter_settlement_commands off Thessalonica 
end_monitor

monitor_event SettlementTurnEnd SettlementName Thessalonica
	and SettlementIsLocal
	and I_EventCounter Thessalonica_filter = 1
	
	filter_settlement_commands on Thessalonica 
	set_event_counter Thessalonica_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Thessalonica
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Thessalonica 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Thessalonica
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Thessalonica 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Thessalonica
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Thessalonica 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Arta
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Arta 0.01
	add_settlement_turmoil Arta 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Arta 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Arta 5
	end_if

	set_event_counter Arta_filter 1
	filter_settlement_commands off Arta 
end_monitor

monitor_event SettlementTurnEnd SettlementName Arta
	and SettlementIsLocal
	and I_EventCounter Arta_filter = 1
	
	filter_settlement_commands on Arta 
	set_event_counter Arta_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Arta
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Arta 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Arta
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Arta 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Arta
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Arta 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Ajaccio
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Ajaccio 0.01
	add_settlement_turmoil Ajaccio 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Ajaccio 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Ajaccio 5
	end_if

	set_event_counter Ajaccio_filter 1
	filter_settlement_commands off Ajaccio 
end_monitor

monitor_event SettlementTurnEnd SettlementName Ajaccio
	and SettlementIsLocal
	and I_EventCounter Ajaccio_filter = 1
	
	filter_settlement_commands on Ajaccio 
	set_event_counter Ajaccio_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Ajaccio
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Ajaccio 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Ajaccio
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Ajaccio 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Ajaccio
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Ajaccio 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Nicaea
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Nicaea 0.01
	add_settlement_turmoil Nicaea 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Nicaea 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Nicaea 5
	end_if

	set_event_counter Nicaea_filter 1
	filter_settlement_commands off Nicaea 
end_monitor

monitor_event SettlementTurnEnd SettlementName Nicaea
	and SettlementIsLocal
	and I_EventCounter Nicaea_filter = 1
	
	filter_settlement_commands on Nicaea 
	set_event_counter Nicaea_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Nicaea
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Nicaea 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Nicaea
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Nicaea 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Nicaea
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Nicaea 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Caesarea
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Caesarea 0.01
	add_settlement_turmoil Caesarea 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Caesarea 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Caesarea 5
	end_if

	set_event_counter Caesarea_filter 1
	filter_settlement_commands off Caesarea 
end_monitor

monitor_event SettlementTurnEnd SettlementName Caesarea
	and SettlementIsLocal
	and I_EventCounter Caesarea_filter = 1
	
	filter_settlement_commands on Caesarea 
	set_event_counter Caesarea_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Caesarea
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Caesarea 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Caesarea
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Caesarea 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Caesarea
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Caesarea 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Durazzo
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Durazzo 0.01
	add_settlement_turmoil Durazzo 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Durazzo 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Durazzo 5
	end_if

	set_event_counter Durazzo_filter 1
	filter_settlement_commands off Durazzo 
end_monitor

monitor_event SettlementTurnEnd SettlementName Durazzo
	and SettlementIsLocal
	and I_EventCounter Durazzo_filter = 1
	
	filter_settlement_commands on Durazzo 
	set_event_counter Durazzo_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Durazzo
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Durazzo 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Durazzo
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Durazzo 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Durazzo
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Durazzo 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Valencia
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Valencia 0.01
	add_settlement_turmoil Valencia 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Valencia 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Valencia 5
	end_if

	set_event_counter Valencia_filter 1
	filter_settlement_commands off Valencia 
end_monitor

monitor_event SettlementTurnEnd SettlementName Valencia
	and SettlementIsLocal
	and I_EventCounter Valencia_filter = 1
	
	filter_settlement_commands on Valencia 
	set_event_counter Valencia_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Valencia
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Valencia 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Valencia
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Valencia 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Valencia
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Valencia 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Adana
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Adana 0.01
	add_settlement_turmoil Adana 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Adana 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Adana 5
	end_if

	set_event_counter Adana_filter 1
	filter_settlement_commands off Adana 
end_monitor

monitor_event SettlementTurnEnd SettlementName Adana
	and SettlementIsLocal
	and I_EventCounter Adana_filter = 1
	
	filter_settlement_commands on Adana 
	set_event_counter Adana_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Adana
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Adana 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Adana
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Adana 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Adana
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Adana 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Mosul
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Mosul 0.01
	add_settlement_turmoil Mosul 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Mosul 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Mosul 5
	end_if

	set_event_counter Mosul_filter 1
	filter_settlement_commands off Mosul 
end_monitor

monitor_event SettlementTurnEnd SettlementName Mosul
	and SettlementIsLocal
	and I_EventCounter Mosul_filter = 1
	
	filter_settlement_commands on Mosul 
	set_event_counter Mosul_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Mosul
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Mosul 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Mosul
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Mosul 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Mosul
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Mosul 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Cagliari
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Cagliari 0.01
	add_settlement_turmoil Cagliari 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Cagliari 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Cagliari 5
	end_if

	set_event_counter Cagliari_filter 1
	filter_settlement_commands off Cagliari 
end_monitor

monitor_event SettlementTurnEnd SettlementName Cagliari
	and SettlementIsLocal
	and I_EventCounter Cagliari_filter = 1
	
	filter_settlement_commands on Cagliari 
	set_event_counter Cagliari_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Cagliari
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Cagliari 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Cagliari
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Cagliari 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Cagliari
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Cagliari 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Edessa
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Edessa 0.01
	add_settlement_turmoil Edessa 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Edessa 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Edessa 5
	end_if

	set_event_counter Edessa_filter 1
	filter_settlement_commands off Edessa 
end_monitor

monitor_event SettlementTurnEnd SettlementName Edessa
	and SettlementIsLocal
	and I_EventCounter Edessa_filter = 1
	
	filter_settlement_commands on Edessa 
	set_event_counter Edessa_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Edessa
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Edessa 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Edessa
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Edessa 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Edessa
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Edessa 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Smyrna
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Smyrna 0.01
	add_settlement_turmoil Smyrna 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Smyrna 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Smyrna 5
	end_if

	set_event_counter Smyrna_filter 1
	filter_settlement_commands off Smyrna 
end_monitor

monitor_event SettlementTurnEnd SettlementName Smyrna
	and SettlementIsLocal
	and I_EventCounter Smyrna_filter = 1
	
	filter_settlement_commands on Smyrna 
	set_event_counter Smyrna_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Smyrna
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Smyrna 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Smyrna
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Smyrna 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Smyrna
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Smyrna 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Antioch
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Antioch 0.01
	add_settlement_turmoil Antioch 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Antioch 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Antioch 5
	end_if

	set_event_counter Antioch_filter 1
	filter_settlement_commands off Antioch 
end_monitor

monitor_event SettlementTurnEnd SettlementName Antioch
	and SettlementIsLocal
	and I_EventCounter Antioch_filter = 1
	
	filter_settlement_commands on Antioch 
	set_event_counter Antioch_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Antioch
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Antioch 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Antioch
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Antioch 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Antioch
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Antioch 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Granada
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Granada 0.01
	add_settlement_turmoil Granada 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Granada 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Granada 5
	end_if

	set_event_counter Granada_filter 1
	filter_settlement_commands off Granada 
end_monitor

monitor_event SettlementTurnEnd SettlementName Granada
	and SettlementIsLocal
	and I_EventCounter Granada_filter = 1
	
	filter_settlement_commands on Granada 
	set_event_counter Granada_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Granada
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Granada 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Granada
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Granada 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Granada
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Granada 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Aleppo
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Aleppo 0.01
	add_settlement_turmoil Aleppo 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Aleppo 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Aleppo 5
	end_if

	set_event_counter Aleppo_filter 1
	filter_settlement_commands off Aleppo 
end_monitor

monitor_event SettlementTurnEnd SettlementName Aleppo
	and SettlementIsLocal
	and I_EventCounter Aleppo_filter = 1
	
	filter_settlement_commands on Aleppo 
	set_event_counter Aleppo_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Aleppo
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Aleppo 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Aleppo
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Aleppo 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Aleppo
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Aleppo 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Palermo
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Palermo 0.01
	add_settlement_turmoil Palermo 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Palermo 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Palermo 5
	end_if

	set_event_counter Palermo_filter 1
	filter_settlement_commands off Palermo 
end_monitor

monitor_event SettlementTurnEnd SettlementName Palermo
	and SettlementIsLocal
	and I_EventCounter Palermo_filter = 1
	
	filter_settlement_commands on Palermo 
	set_event_counter Palermo_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Palermo
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Palermo 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Palermo
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Palermo 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Palermo
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Palermo 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Marrakesh
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Marrakesh 0.01
	add_settlement_turmoil Marrakesh 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Marrakesh 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Marrakesh 5
	end_if

	set_event_counter Marrakesh_filter 1
	filter_settlement_commands off Marrakesh 
end_monitor

monitor_event SettlementTurnEnd SettlementName Marrakesh
	and SettlementIsLocal
	and I_EventCounter Marrakesh_filter = 1
	
	filter_settlement_commands on Marrakesh 
	set_event_counter Marrakesh_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Marrakesh
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Marrakesh 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Marrakesh
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Marrakesh 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Marrakesh
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Marrakesh 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Nicosia
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Nicosia 0.01
	add_settlement_turmoil Nicosia 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Nicosia 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Nicosia 5
	end_if

	set_event_counter Nicosia_filter 1
	filter_settlement_commands off Nicosia 
end_monitor

monitor_event SettlementTurnEnd SettlementName Nicosia
	and SettlementIsLocal
	and I_EventCounter Nicosia_filter = 1
	
	filter_settlement_commands on Nicosia 
	set_event_counter Nicosia_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Nicosia
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Nicosia 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Nicosia
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Nicosia 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Nicosia
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Nicosia 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Damascus
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Damascus 0.01
	add_settlement_turmoil Damascus 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Damascus 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Damascus 5
	end_if

	set_event_counter Damascus_filter 1
	filter_settlement_commands off Damascus 
end_monitor

monitor_event SettlementTurnEnd SettlementName Damascus
	and SettlementIsLocal
	and I_EventCounter Damascus_filter = 1
	
	filter_settlement_commands on Damascus 
	set_event_counter Damascus_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Damascus
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Damascus 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Damascus
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Damascus 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Damascus
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Damascus 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Algiers
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Algiers 0.01
	add_settlement_turmoil Algiers 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Algiers 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Algiers 5
	end_if

	set_event_counter Algiers_filter 1
	filter_settlement_commands off Algiers 
end_monitor

monitor_event SettlementTurnEnd SettlementName Algiers
	and SettlementIsLocal
	and I_EventCounter Algiers_filter = 1
	
	filter_settlement_commands on Algiers 
	set_event_counter Algiers_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Algiers
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Algiers 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Algiers
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Algiers 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Algiers
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Algiers 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Tunis
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Tunis 0.01
	add_settlement_turmoil Tunis 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Tunis 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Tunis 5
	end_if

	set_event_counter Tunis_filter 1
	filter_settlement_commands off Tunis 
end_monitor

monitor_event SettlementTurnEnd SettlementName Tunis
	and SettlementIsLocal
	and I_EventCounter Tunis_filter = 1
	
	filter_settlement_commands on Tunis 
	set_event_counter Tunis_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Tunis
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Tunis 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Tunis
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Tunis 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Tunis
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Tunis 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Acre
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Acre 0.01
	add_settlement_turmoil Acre 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Acre 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Acre 5
	end_if

	set_event_counter Acre_filter 1
	filter_settlement_commands off Acre 
end_monitor

monitor_event SettlementTurnEnd SettlementName Acre
	and SettlementIsLocal
	and I_EventCounter Acre_filter = 1
	
	filter_settlement_commands on Acre 
	set_event_counter Acre_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Acre
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Acre 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Acre
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Acre 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Acre
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Acre 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Iraklion
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Iraklion 0.01
	add_settlement_turmoil Iraklion 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Iraklion 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Iraklion 5
	end_if

	set_event_counter Iraklion_filter 1
	filter_settlement_commands off Iraklion 
end_monitor

monitor_event SettlementTurnEnd SettlementName Iraklion
	and SettlementIsLocal
	and I_EventCounter Iraklion_filter = 1
	
	filter_settlement_commands on Iraklion 
	set_event_counter Iraklion_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Iraklion
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Iraklion 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Iraklion
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Iraklion 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Iraklion
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Iraklion 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Gaza
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Gaza 0.01
	add_settlement_turmoil Gaza 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Gaza 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Gaza 5
	end_if

	set_event_counter Gaza_filter 1
	filter_settlement_commands off Gaza 
end_monitor

monitor_event SettlementTurnEnd SettlementName Gaza
	and SettlementIsLocal
	and I_EventCounter Gaza_filter = 1
	
	filter_settlement_commands on Gaza 
	set_event_counter Gaza_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Gaza
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Gaza 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Gaza
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Gaza 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Gaza
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Gaza 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Tripoli
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Tripoli 0.01
	add_settlement_turmoil Tripoli 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Tripoli 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Tripoli 5
	end_if

	set_event_counter Tripoli_filter 1
	filter_settlement_commands off Tripoli 
end_monitor

monitor_event SettlementTurnEnd SettlementName Tripoli
	and SettlementIsLocal
	and I_EventCounter Tripoli_filter = 1
	
	filter_settlement_commands on Tripoli 
	set_event_counter Tripoli_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Tripoli
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Tripoli 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Tripoli
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Tripoli 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Tripoli
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Tripoli 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Alexandria
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Alexandria 0.01
	add_settlement_turmoil Alexandria 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Alexandria 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Alexandria 5
	end_if

	set_event_counter Alexandria_filter 1
	filter_settlement_commands off Alexandria 
end_monitor

monitor_event SettlementTurnEnd SettlementName Alexandria
	and SettlementIsLocal
	and I_EventCounter Alexandria_filter = 1
	
	filter_settlement_commands on Alexandria 
	set_event_counter Alexandria_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Alexandria
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Alexandria 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Alexandria
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Alexandria 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Alexandria
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Alexandria 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Timbuktu
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Timbuktu 0.01
	add_settlement_turmoil Timbuktu 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Timbuktu 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Timbuktu 5
	end_if

	set_event_counter Timbuktu_filter 1
	filter_settlement_commands off Timbuktu 
end_monitor

monitor_event SettlementTurnEnd SettlementName Timbuktu
	and SettlementIsLocal
	and I_EventCounter Timbuktu_filter = 1
	
	filter_settlement_commands on Timbuktu 
	set_event_counter Timbuktu_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Timbuktu
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Timbuktu 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Timbuktu
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Timbuktu 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Timbuktu
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Timbuktu 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Qarisiya
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Qarisiya 0.01
	add_settlement_turmoil Qarisiya 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Qarisiya 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Qarisiya 5
	end_if

	set_event_counter Qarisiya_filter 1
	filter_settlement_commands off Qarisiya 
end_monitor

monitor_event SettlementTurnEnd SettlementName Qarisiya
	and SettlementIsLocal
	and I_EventCounter Qarisiya_filter = 1
	
	filter_settlement_commands on Qarisiya 
	set_event_counter Qarisiya_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Qarisiya
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Qarisiya 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Qarisiya
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Qarisiya 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Qarisiya
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Qarisiya 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Basra
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Basra 0.01
	add_settlement_turmoil Basra 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Basra 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Basra 5
	end_if

	set_event_counter Basra_filter 1
	filter_settlement_commands off Basra 
end_monitor

monitor_event SettlementTurnEnd SettlementName Basra
	and SettlementIsLocal
	and I_EventCounter Basra_filter = 1
	
	filter_settlement_commands on Basra 
	set_event_counter Basra_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Basra
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Basra 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Basra
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Basra 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Basra
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Basra 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Benghazi
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Benghazi 0.01
	add_settlement_turmoil Benghazi 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Benghazi 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Benghazi 5
	end_if

	set_event_counter Benghazi_filter 1
	filter_settlement_commands off Benghazi 
end_monitor

monitor_event SettlementTurnEnd SettlementName Benghazi
	and SettlementIsLocal
	and I_EventCounter Benghazi_filter = 1
	
	filter_settlement_commands on Benghazi 
	set_event_counter Benghazi_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Benghazi
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Benghazi 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Benghazi
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Benghazi 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Benghazi
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Benghazi 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Bryansk
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Bryansk 0.01
	add_settlement_turmoil Bryansk 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Bryansk 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Bryansk 5
	end_if

	set_event_counter Bryansk_filter 1
	filter_settlement_commands off Bryansk 
end_monitor

monitor_event SettlementTurnEnd SettlementName Bryansk
	and SettlementIsLocal
	and I_EventCounter Bryansk_filter = 1
	
	filter_settlement_commands on Bryansk 
	set_event_counter Bryansk_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bryansk
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Bryansk 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bryansk
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Bryansk 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bryansk
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Bryansk 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Lyon
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Lyon 0.01
	add_settlement_turmoil Lyon 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Lyon 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Lyon 5
	end_if

	set_event_counter Lyon_filter 1
	filter_settlement_commands off Lyon 
end_monitor

monitor_event SettlementTurnEnd SettlementName Lyon
	and SettlementIsLocal
	and I_EventCounter Lyon_filter = 1
	
	filter_settlement_commands on Lyon 
	set_event_counter Lyon_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Lyon
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Lyon 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Lyon
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Lyon 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Lyon
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Lyon 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Sinop
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Sinop 0.01
	add_settlement_turmoil Sinop 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Sinop 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Sinop 5
	end_if

	set_event_counter Sinop_filter 1
	filter_settlement_commands off Sinop 
end_monitor

monitor_event SettlementTurnEnd SettlementName Sinop
	and SettlementIsLocal
	and I_EventCounter Sinop_filter = 1
	
	filter_settlement_commands on Sinop 
	set_event_counter Sinop_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Sinop
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Sinop 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Sinop
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Sinop 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Sinop
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Sinop 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Belgrade
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Belgrade 0.01
	add_settlement_turmoil Belgrade 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Belgrade 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Belgrade 5
	end_if

	set_event_counter Belgrade_filter 1
	filter_settlement_commands off Belgrade 
end_monitor

monitor_event SettlementTurnEnd SettlementName Belgrade
	and SettlementIsLocal
	and I_EventCounter Belgrade_filter = 1
	
	filter_settlement_commands on Belgrade 
	set_event_counter Belgrade_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Belgrade
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Belgrade 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Belgrade
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Belgrade 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Belgrade
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Belgrade 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Barcelona
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Barcelona 0.01
	add_settlement_turmoil Barcelona 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Barcelona 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Barcelona 5
	end_if

	set_event_counter Barcelona_filter 1
	filter_settlement_commands off Barcelona 
end_monitor

monitor_event SettlementTurnEnd SettlementName Barcelona
	and SettlementIsLocal
	and I_EventCounter Barcelona_filter = 1
	
	filter_settlement_commands on Barcelona 
	set_event_counter Barcelona_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Barcelona
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Barcelona 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Barcelona
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Barcelona 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Barcelona
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Barcelona 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Palma
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Palma 0.01
	add_settlement_turmoil Palma 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Palma 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Palma 5
	end_if

	set_event_counter Palma_filter 1
	filter_settlement_commands off Palma 
end_monitor

monitor_event SettlementTurnEnd SettlementName Palma
	and SettlementIsLocal
	and I_EventCounter Palma_filter = 1
	
	filter_settlement_commands on Palma 
	set_event_counter Palma_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Palma
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Palma 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Palma
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Palma 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Palma
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Palma 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Bari
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Bari 0.01
	add_settlement_turmoil Bari 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Bari 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Bari 5
	end_if

	set_event_counter Bari_filter 1
	filter_settlement_commands off Bari 
end_monitor

monitor_event SettlementTurnEnd SettlementName Bari
	and SettlementIsLocal
	and I_EventCounter Bari_filter = 1
	
	filter_settlement_commands on Bari 
	set_event_counter Bari_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bari
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Bari 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bari
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Bari 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bari
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Bari 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Skara
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Skara 0.01
	add_settlement_turmoil Skara 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Skara 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Skara 5
	end_if

	set_event_counter Skara_filter 1
	filter_settlement_commands off Skara 
end_monitor

monitor_event SettlementTurnEnd SettlementName Skara
	and SettlementIsLocal
	and I_EventCounter Skara_filter = 1
	
	filter_settlement_commands on Skara 
	set_event_counter Skara_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Skara
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Skara 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Skara
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Skara 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Skara
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Skara 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Exeter
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Exeter 0.01
	add_settlement_turmoil Exeter 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Exeter 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Exeter 5
	end_if

	set_event_counter Exeter_filter 1
	filter_settlement_commands off Exeter 
end_monitor

monitor_event SettlementTurnEnd SettlementName Exeter
	and SettlementIsLocal
	and I_EventCounter Exeter_filter = 1
	
	filter_settlement_commands on Exeter 
	set_event_counter Exeter_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Exeter
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Exeter 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Exeter
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Exeter 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Exeter
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Exeter 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Oporto
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Oporto 0.01
	add_settlement_turmoil Oporto 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Oporto 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Oporto 5
	end_if

	set_event_counter Oporto_filter 1
	filter_settlement_commands off Oporto 
end_monitor

monitor_event SettlementTurnEnd SettlementName Oporto
	and SettlementIsLocal
	and I_EventCounter Oporto_filter = 1
	
	filter_settlement_commands on Oporto 
	set_event_counter Oporto_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Oporto
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Oporto 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Oporto
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Oporto 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Oporto
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Oporto 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Beleb_el_Anab
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Beleb_el_Anab 0.01
	add_settlement_turmoil Beleb_el_Anab 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Beleb_el_Anab 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Beleb_el_Anab 5
	end_if

	set_event_counter Beleb_el_Anab_filter 1
	filter_settlement_commands off Beleb_el_Anab 
end_monitor

monitor_event SettlementTurnEnd SettlementName Beleb_el_Anab
	and SettlementIsLocal
	and I_EventCounter Beleb_el_Anab_filter = 1
	
	filter_settlement_commands on Beleb_el_Anab 
	set_event_counter Beleb_el_Anab_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Beleb_el_Anab
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Beleb_el_Anab 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Beleb_el_Anab
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Beleb_el_Anab 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Beleb_el_Anab
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Beleb_el_Anab 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Tortosa
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Tortosa 0.01
	add_settlement_turmoil Tortosa 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Tortosa 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Tortosa 5
	end_if

	set_event_counter Tortosa_filter 1
	filter_settlement_commands off Tortosa 
end_monitor

monitor_event SettlementTurnEnd SettlementName Tortosa
	and SettlementIsLocal
	and I_EventCounter Tortosa_filter = 1
	
	filter_settlement_commands on Tortosa 
	set_event_counter Tortosa_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Tortosa
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Tortosa 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Tortosa
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Tortosa 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Tortosa
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Tortosa 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Astrakhan
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Astrakhan 0.01
	add_settlement_turmoil Astrakhan 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Astrakhan 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Astrakhan 5
	end_if

	set_event_counter Astrakhan_filter 1
	filter_settlement_commands off Astrakhan 
end_monitor

monitor_event SettlementTurnEnd SettlementName Astrakhan
	and SettlementIsLocal
	and I_EventCounter Astrakhan_filter = 1
	
	filter_settlement_commands on Astrakhan 
	set_event_counter Astrakhan_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Astrakhan
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Astrakhan 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Astrakhan
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Astrakhan 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Astrakhan
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Astrakhan 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Luxor
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Luxor 0.01
	add_settlement_turmoil Luxor 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Luxor 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Luxor 5
	end_if

	set_event_counter Luxor_filter 1
	filter_settlement_commands off Luxor 
end_monitor

monitor_event SettlementTurnEnd SettlementName Luxor
	and SettlementIsLocal
	and I_EventCounter Luxor_filter = 1
	
	filter_settlement_commands on Luxor 
	set_event_counter Luxor_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Luxor
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Luxor 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Luxor
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Luxor 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Luxor
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Luxor 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Clermont
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Clermont 0.01
	add_settlement_turmoil Clermont 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Clermont 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Clermont 5
	end_if

	set_event_counter Clermont_filter 1
	filter_settlement_commands off Clermont 
end_monitor

monitor_event SettlementTurnEnd SettlementName Clermont
	and SettlementIsLocal
	and I_EventCounter Clermont_filter = 1
	
	filter_settlement_commands on Clermont 
	set_event_counter Clermont_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Clermont
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Clermont 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Clermont
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Clermont 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Clermont
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Clermont 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Groningen
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Groningen 0.01
	add_settlement_turmoil Groningen 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Groningen 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Groningen 5
	end_if

	set_event_counter Groningen_filter 1
	filter_settlement_commands off Groningen 
end_monitor

monitor_event SettlementTurnEnd SettlementName Groningen
	and SettlementIsLocal
	and I_EventCounter Groningen_filter = 1
	
	filter_settlement_commands on Groningen 
	set_event_counter Groningen_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Groningen
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Groningen 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Groningen
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Groningen 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Groningen
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Groningen 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Salamanca
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Salamanca 0.01
	add_settlement_turmoil Salamanca 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Salamanca 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Salamanca 5
	end_if

	set_event_counter Salamanca_filter 1
	filter_settlement_commands off Salamanca 
end_monitor

monitor_event SettlementTurnEnd SettlementName Salamanca
	and SettlementIsLocal
	and I_EventCounter Salamanca_filter = 1
	
	filter_settlement_commands on Salamanca 
	set_event_counter Salamanca_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Salamanca
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Salamanca 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Salamanca
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Salamanca 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Salamanca
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Salamanca 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Melilla
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Melilla 0.01
	add_settlement_turmoil Melilla 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Melilla 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Melilla 5
	end_if

	set_event_counter Melilla_filter 1
	filter_settlement_commands off Melilla 
end_monitor

monitor_event SettlementTurnEnd SettlementName Melilla
	and SettlementIsLocal
	and I_EventCounter Melilla_filter = 1
	
	filter_settlement_commands on Melilla 
	set_event_counter Melilla_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Melilla
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Melilla 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Melilla
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Melilla 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Melilla
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Melilla 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Vjatka
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Vjatka 0.01
	add_settlement_turmoil Vjatka 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Vjatka 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Vjatka 5
	end_if

	set_event_counter Vjatka_filter 1
	filter_settlement_commands off Vjatka 
end_monitor

monitor_event SettlementTurnEnd SettlementName Vjatka
	and SettlementIsLocal
	and I_EventCounter Vjatka_filter = 1
	
	filter_settlement_commands on Vjatka 
	set_event_counter Vjatka_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Vjatka
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Vjatka 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Vjatka
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Vjatka 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Vjatka
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Vjatka 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Salzburg
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Salzburg 0.01
	add_settlement_turmoil Salzburg 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Salzburg 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Salzburg 5
	end_if

	set_event_counter Salzburg_filter 1
	filter_settlement_commands off Salzburg 
end_monitor

monitor_event SettlementTurnEnd SettlementName Salzburg
	and SettlementIsLocal
	and I_EventCounter Salzburg_filter = 1
	
	filter_settlement_commands on Salzburg 
	set_event_counter Salzburg_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Salzburg
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Salzburg 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Salzburg
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Salzburg 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Salzburg
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Salzburg 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Diyarbakir
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Diyarbakir 0.01
	add_settlement_turmoil Diyarbakir 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Diyarbakir 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Diyarbakir 5
	end_if

	set_event_counter Diyarbakir_filter 1
	filter_settlement_commands off Diyarbakir 
end_monitor

monitor_event SettlementTurnEnd SettlementName Diyarbakir
	and SettlementIsLocal
	and I_EventCounter Diyarbakir_filter = 1
	
	filter_settlement_commands on Diyarbakir 
	set_event_counter Diyarbakir_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Diyarbakir
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Diyarbakir 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Diyarbakir
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Diyarbakir 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Diyarbakir
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Diyarbakir 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Warsaw
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Warsaw 0.01
	add_settlement_turmoil Warsaw 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Warsaw 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Warsaw 5
	end_if

	set_event_counter Warsaw_filter 1
	filter_settlement_commands off Warsaw 
end_monitor

monitor_event SettlementTurnEnd SettlementName Warsaw
	and SettlementIsLocal
	and I_EventCounter Warsaw_filter = 1
	
	filter_settlement_commands on Warsaw 
	set_event_counter Warsaw_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Warsaw
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Warsaw 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Warsaw
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Warsaw 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Warsaw
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Warsaw 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Ancona
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Ancona 0.01
	add_settlement_turmoil Ancona 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Ancona 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Ancona 5
	end_if

	set_event_counter Ancona_filter 1
	filter_settlement_commands off Ancona 
end_monitor

monitor_event SettlementTurnEnd SettlementName Ancona
	and SettlementIsLocal
	and I_EventCounter Ancona_filter = 1
	
	filter_settlement_commands on Ancona 
	set_event_counter Ancona_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Ancona
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Ancona 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Ancona
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Ancona 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Ancona
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Ancona 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Athens
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Athens 0.01
	add_settlement_turmoil Athens 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Athens 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Athens 5
	end_if

	set_event_counter Athens_filter 1
	filter_settlement_commands off Athens 
end_monitor

monitor_event SettlementTurnEnd SettlementName Athens
	and SettlementIsLocal
	and I_EventCounter Athens_filter = 1
	
	filter_settlement_commands on Athens 
	set_event_counter Athens_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Athens
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Athens 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Athens
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Athens 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Athens
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Athens 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Canakkale
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Canakkale 0.01
	add_settlement_turmoil Canakkale 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Canakkale 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Canakkale 5
	end_if

	set_event_counter Canakkale_filter 1
	filter_settlement_commands off Canakkale 
end_monitor

monitor_event SettlementTurnEnd SettlementName Canakkale
	and SettlementIsLocal
	and I_EventCounter Canakkale_filter = 1
	
	filter_settlement_commands on Canakkale 
	set_event_counter Canakkale_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Canakkale
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Canakkale 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Canakkale
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Canakkale 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Canakkale
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Canakkale 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Bergen
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Bergen 0.01
	add_settlement_turmoil Bergen 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Bergen 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Bergen 5
	end_if

	set_event_counter Bergen_filter 1
	filter_settlement_commands off Bergen 
end_monitor

monitor_event SettlementTurnEnd SettlementName Bergen
	and SettlementIsLocal
	and I_EventCounter Bergen_filter = 1
	
	filter_settlement_commands on Bergen 
	set_event_counter Bergen_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bergen
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Bergen 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bergen
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Bergen 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Bergen
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Bergen 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Tmutarakan
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Tmutarakan 0.01
	add_settlement_turmoil Tmutarakan 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Tmutarakan 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Tmutarakan 5
	end_if

	set_event_counter Tmutarakan_filter 1
	filter_settlement_commands off Tmutarakan 
end_monitor

monitor_event SettlementTurnEnd SettlementName Tmutarakan
	and SettlementIsLocal
	and I_EventCounter Tmutarakan_filter = 1
	
	filter_settlement_commands on Tmutarakan 
	set_event_counter Tmutarakan_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Tmutarakan
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Tmutarakan 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Tmutarakan
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Tmutarakan 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Tmutarakan
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Tmutarakan 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Uppsala
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Uppsala 0.01
	add_settlement_turmoil Uppsala 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Uppsala 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Uppsala 5
	end_if

	set_event_counter Uppsala_filter 1
	filter_settlement_commands off Uppsala 
end_monitor

monitor_event SettlementTurnEnd SettlementName Uppsala
	and SettlementIsLocal
	and I_EventCounter Uppsala_filter = 1
	
	filter_settlement_commands on Uppsala 
	set_event_counter Uppsala_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Uppsala
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Uppsala 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Uppsala
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Uppsala 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Uppsala
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Uppsala 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Satu_Mare
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Satu_Mare 0.01
	add_settlement_turmoil Satu_Mare 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Satu_Mare 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Satu_Mare 5
	end_if

	set_event_counter Satu_Mare_filter 1
	filter_settlement_commands off Satu_Mare 
end_monitor

monitor_event SettlementTurnEnd SettlementName Satu_Mare
	and SettlementIsLocal
	and I_EventCounter Satu_Mare_filter = 1
	
	filter_settlement_commands on Satu_Mare 
	set_event_counter Satu_Mare_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Satu_Mare
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Satu_Mare 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Satu_Mare
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Satu_Mare 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Satu_Mare
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Satu_Mare 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Silves
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Silves 0.01
	add_settlement_turmoil Silves 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Silves 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Silves 5
	end_if

	set_event_counter Silves_filter 1
	filter_settlement_commands off Silves 
end_monitor

monitor_event SettlementTurnEnd SettlementName Silves
	and SettlementIsLocal
	and I_EventCounter Silves_filter = 1
	
	filter_settlement_commands on Silves 
	set_event_counter Silves_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Silves
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Silves 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Silves
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Silves 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Silves
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Silves 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Scopia
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Scopia 0.01
	add_settlement_turmoil Scopia 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Scopia 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Scopia 5
	end_if

	set_event_counter Scopia_filter 1
	filter_settlement_commands off Scopia 
end_monitor

monitor_event SettlementTurnEnd SettlementName Scopia
	and SettlementIsLocal
	and I_EventCounter Scopia_filter = 1
	
	filter_settlement_commands on Scopia 
	set_event_counter Scopia_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Scopia
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Scopia 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Scopia
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Scopia 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Scopia
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Scopia 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Winchester
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Winchester 0.01
	add_settlement_turmoil Winchester 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Winchester 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Winchester 5
	end_if

	set_event_counter Winchester_filter 1
	filter_settlement_commands off Winchester 
end_monitor

monitor_event SettlementTurnEnd SettlementName Winchester
	and SettlementIsLocal
	and I_EventCounter Winchester_filter = 1
	
	filter_settlement_commands on Winchester 
	set_event_counter Winchester_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Winchester
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Winchester 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Winchester
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Winchester 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Winchester
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Winchester 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Baku
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Baku 0.01
	add_settlement_turmoil Baku 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Baku 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Baku 5
	end_if

	set_event_counter Baku_filter 1
	filter_settlement_commands off Baku 
end_monitor

monitor_event SettlementTurnEnd SettlementName Baku
	and SettlementIsLocal
	and I_EventCounter Baku_filter = 1
	
	filter_settlement_commands on Baku 
	set_event_counter Baku_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Baku
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Baku 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Baku
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Baku 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Baku
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Baku 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Murcia
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Murcia 0.01
	add_settlement_turmoil Murcia 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Murcia 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Murcia 5
	end_if

	set_event_counter Murcia_filter 1
	filter_settlement_commands off Murcia 
end_monitor

monitor_event SettlementTurnEnd SettlementName Murcia
	and SettlementIsLocal
	and I_EventCounter Murcia_filter = 1
	
	filter_settlement_commands on Murcia 
	set_event_counter Murcia_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Murcia
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Murcia 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Murcia
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Murcia 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Murcia
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Murcia 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Syracuse
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Syracuse 0.01
	add_settlement_turmoil Syracuse 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Syracuse 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Syracuse 5
	end_if

	set_event_counter Syracuse_filter 1
	filter_settlement_commands off Syracuse 
end_monitor

monitor_event SettlementTurnEnd SettlementName Syracuse
	and SettlementIsLocal
	and I_EventCounter Syracuse_filter = 1
	
	filter_settlement_commands on Syracuse 
	set_event_counter Syracuse_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Syracuse
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Syracuse 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Syracuse
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Syracuse 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Syracuse
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Syracuse 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Al-Mu'miniya
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Al-Mu'miniya 0.01
	add_settlement_turmoil Al-Mu'miniya 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Al-Mu'miniya 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Al-Mu'miniya 5
	end_if

	set_event_counter Al-Mu'miniya_filter 1
	filter_settlement_commands off Al-Mu'miniya 
end_monitor

monitor_event SettlementTurnEnd SettlementName Al-Mu'miniya
	and SettlementIsLocal
	and I_EventCounter Al-Mu'miniya_filter = 1
	
	filter_settlement_commands on Al-Mu'miniya 
	set_event_counter Al-Mu'miniya_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Al-Mu'miniya
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Al-Mu'miniya 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Al-Mu'miniya
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Al-Mu'miniya 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Al-Mu'miniya
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Al-Mu'miniya 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Burgos
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Burgos 0.01
	add_settlement_turmoil Burgos 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Burgos 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Burgos 5
	end_if

	set_event_counter Burgos_filter 1
	filter_settlement_commands off Burgos 
end_monitor

monitor_event SettlementTurnEnd SettlementName Burgos
	and SettlementIsLocal
	and I_EventCounter Burgos_filter = 1
	
	filter_settlement_commands on Burgos 
	set_event_counter Burgos_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Burgos
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Burgos 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Burgos
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Burgos 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Burgos
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Burgos 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Worms
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Worms 0.01
	add_settlement_turmoil Worms 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Worms 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Worms 5
	end_if

	set_event_counter Worms_filter 1
	filter_settlement_commands off Worms 
end_monitor

monitor_event SettlementTurnEnd SettlementName Worms
	and SettlementIsLocal
	and I_EventCounter Worms_filter = 1
	
	filter_settlement_commands on Worms 
	set_event_counter Worms_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Worms
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Worms 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Worms
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Worms 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Worms
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Worms 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Yaroslavl
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Yaroslavl 0.01
	add_settlement_turmoil Yaroslavl 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Yaroslavl 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Yaroslavl 5
	end_if

	set_event_counter Yaroslavl_filter 1
	filter_settlement_commands off Yaroslavl 
end_monitor

monitor_event SettlementTurnEnd SettlementName Yaroslavl
	and SettlementIsLocal
	and I_EventCounter Yaroslavl_filter = 1
	
	filter_settlement_commands on Yaroslavl 
	set_event_counter Yaroslavl_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Yaroslavl
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Yaroslavl 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Yaroslavl
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Yaroslavl 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Yaroslavl
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Yaroslavl 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Al_Aqaba
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Al_Aqaba 0.01
	add_settlement_turmoil Al_Aqaba 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Al_Aqaba 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Al_Aqaba 5
	end_if

	set_event_counter Al_Aqaba_filter 1
	filter_settlement_commands off Al_Aqaba 
end_monitor

monitor_event SettlementTurnEnd SettlementName Al_Aqaba
	and SettlementIsLocal
	and I_EventCounter Al_Aqaba_filter = 1
	
	filter_settlement_commands on Al_Aqaba 
	set_event_counter Al_Aqaba_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Al_Aqaba
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Al_Aqaba 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Al_Aqaba
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Al_Aqaba 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Al_Aqaba
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Al_Aqaba 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Ankara
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Ankara 0.01
	add_settlement_turmoil Ankara 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Ankara 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Ankara 5
	end_if

	set_event_counter Ankara_filter 1
	filter_settlement_commands off Ankara 
end_monitor

monitor_event SettlementTurnEnd SettlementName Ankara
	and SettlementIsLocal
	and I_EventCounter Ankara_filter = 1
	
	filter_settlement_commands on Ankara 
	set_event_counter Ankara_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Ankara
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Ankara 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Ankara
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Ankara 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Ankara
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Ankara 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Kerak
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Kerak 0.01
	add_settlement_turmoil Kerak 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Kerak 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Kerak 5
	end_if

	set_event_counter Kerak_filter 1
	filter_settlement_commands off Kerak 
end_monitor

monitor_event SettlementTurnEnd SettlementName Kerak
	and SettlementIsLocal
	and I_EventCounter Kerak_filter = 1
	
	filter_settlement_commands on Kerak 
	set_event_counter Kerak_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Kerak
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Kerak 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Kerak
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Kerak 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Kerak
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Kerak 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Eikundarsund
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Eikundarsund 0.01
	add_settlement_turmoil Eikundarsund 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Eikundarsund 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Eikundarsund 5
	end_if

	set_event_counter Eikundarsund_filter 1
	filter_settlement_commands off Eikundarsund 
end_monitor

monitor_event SettlementTurnEnd SettlementName Eikundarsund
	and SettlementIsLocal
	and I_EventCounter Eikundarsund_filter = 1
	
	filter_settlement_commands on Eikundarsund 
	set_event_counter Eikundarsund_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Eikundarsund
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Eikundarsund 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Eikundarsund
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Eikundarsund 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Eikundarsund
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Eikundarsund 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Galway
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Galway 0.01
	add_settlement_turmoil Galway 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Galway 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Galway 5
	end_if

	set_event_counter Galway_filter 1
	filter_settlement_commands off Galway 
end_monitor

monitor_event SettlementTurnEnd SettlementName Galway
	and SettlementIsLocal
	and I_EventCounter Galway_filter = 1
	
	filter_settlement_commands on Galway 
	set_event_counter Galway_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Galway
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Galway 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Galway
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Galway 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Galway
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Galway 9
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Pskov
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Pskov 0.01
	add_settlement_turmoil Pskov 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Pskov 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Pskov 5
	end_if

	set_event_counter Pskov_filter 1
	filter_settlement_commands off Pskov 
end_monitor

monitor_event SettlementTurnEnd SettlementName Pskov
	and SettlementIsLocal
	and I_EventCounter Pskov_filter = 1
	
	filter_settlement_commands on Pskov 
	set_event_counter Pskov_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Pskov
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Pskov 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Pskov
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Pskov 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Pskov
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Pskov 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Visby
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Visby 0.01
	add_settlement_turmoil Visby 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Visby 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Visby 5
	end_if

	set_event_counter Visby_filter 1
	filter_settlement_commands off Visby 
end_monitor

monitor_event SettlementTurnEnd SettlementName Visby
	and SettlementIsLocal
	and I_EventCounter Visby_filter = 1
	
	filter_settlement_commands on Visby 
	set_event_counter Visby_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Visby
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Visby 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Visby
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Visby 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Visby
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Visby 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Roskilde
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Roskilde 0.01
	add_settlement_turmoil Roskilde 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Roskilde 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Roskilde 5
	end_if

	set_event_counter Roskilde_filter 1
	filter_settlement_commands off Roskilde 
end_monitor

monitor_event SettlementTurnEnd SettlementName Roskilde
	and SettlementIsLocal
	and I_EventCounter Roskilde_filter = 1
	
	filter_settlement_commands on Roskilde 
	set_event_counter Roskilde_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Roskilde
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Roskilde 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Roskilde
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Roskilde 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Roskilde
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Roskilde 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Lund
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Lund 0.01
	add_settlement_turmoil Lund 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Lund 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Lund 5
	end_if

	set_event_counter Lund_filter 1
	filter_settlement_commands off Lund 
end_monitor

monitor_event SettlementTurnEnd SettlementName Lund
	and SettlementIsLocal
	and I_EventCounter Lund_filter = 1
	
	filter_settlement_commands on Lund 
	set_event_counter Lund_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Lund
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Lund 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Lund
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Lund 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Lund
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Lund 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Mashhad
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Mashhad 0.01
	add_settlement_turmoil Mashhad 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Mashhad 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Mashhad 5
	end_if

	set_event_counter Mashhad_filter 1
	filter_settlement_commands off Mashhad 
end_monitor

monitor_event SettlementTurnEnd SettlementName Mashhad
	and SettlementIsLocal
	and I_EventCounter Mashhad_filter = 1
	
	filter_settlement_commands on Mashhad 
	set_event_counter Mashhad_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Mashhad
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Mashhad 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Mashhad
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Mashhad 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Mashhad
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Mashhad 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Kerman
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Kerman 0.01
	add_settlement_turmoil Kerman 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Kerman 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Kerman 5
	end_if

	set_event_counter Kerman_filter 1
	filter_settlement_commands off Kerman 
end_monitor

monitor_event SettlementTurnEnd SettlementName Kerman
	and SettlementIsLocal
	and I_EventCounter Kerman_filter = 1
	
	filter_settlement_commands on Kerman 
	set_event_counter Kerman_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Kerman
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Kerman 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Kerman
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Kerman 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Kerman
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Kerman 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Ray
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Ray 0.01
	add_settlement_turmoil Ray 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Ray 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Ray 5
	end_if

	set_event_counter Ray_filter 1
	filter_settlement_commands off Ray 
end_monitor

monitor_event SettlementTurnEnd SettlementName Ray
	and SettlementIsLocal
	and I_EventCounter Ray_filter = 1
	
	filter_settlement_commands on Ray 
	set_event_counter Ray_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Ray
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Ray 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Ray
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Ray 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Ray
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Ray 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Isfahan
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Isfahan 0.01
	add_settlement_turmoil Isfahan 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Isfahan 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Isfahan 5
	end_if

	set_event_counter Isfahan_filter 1
	filter_settlement_commands off Isfahan 
end_monitor

monitor_event SettlementTurnEnd SettlementName Isfahan
	and SettlementIsLocal
	and I_EventCounter Isfahan_filter = 1
	
	filter_settlement_commands on Isfahan 
	set_event_counter Isfahan_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Isfahan
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Isfahan 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Isfahan
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Isfahan 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Isfahan
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Isfahan 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Shiraz
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Shiraz 0.01
	add_settlement_turmoil Shiraz 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Shiraz 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Shiraz 5
	end_if

	set_event_counter Shiraz_filter 1
	filter_settlement_commands off Shiraz 
end_monitor

monitor_event SettlementTurnEnd SettlementName Shiraz
	and SettlementIsLocal
	and I_EventCounter Shiraz_filter = 1
	
	filter_settlement_commands on Shiraz 
	set_event_counter Shiraz_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Shiraz
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Shiraz 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Shiraz
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Shiraz 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Shiraz
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Shiraz 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Sharjah
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Sharjah 0.01
	add_settlement_turmoil Sharjah 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Sharjah 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Sharjah 5
	end_if

	set_event_counter Sharjah_filter 1
	filter_settlement_commands off Sharjah 
end_monitor

monitor_event SettlementTurnEnd SettlementName Sharjah
	and SettlementIsLocal
	and I_EventCounter Sharjah_filter = 1
	
	filter_settlement_commands on Sharjah 
	set_event_counter Sharjah_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Sharjah
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Sharjah 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Sharjah
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Sharjah 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Sharjah
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Sharjah 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Gorgan
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Gorgan 0.01
	add_settlement_turmoil Gorgan 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Gorgan 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Gorgan 5
	end_if

	set_event_counter Gorgan_filter 1
	filter_settlement_commands off Gorgan 
end_monitor

monitor_event SettlementTurnEnd SettlementName Gorgan
	and SettlementIsLocal
	and I_EventCounter Gorgan_filter = 1
	
	filter_settlement_commands on Gorgan 
	set_event_counter Gorgan_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Gorgan
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Gorgan 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Gorgan
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Gorgan 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Gorgan
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Gorgan 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Khiva
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Khiva 0.01
	add_settlement_turmoil Khiva 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Khiva 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Khiva 5
	end_if

	set_event_counter Khiva_filter 1
	filter_settlement_commands off Khiva 
end_monitor

monitor_event SettlementTurnEnd SettlementName Khiva
	and SettlementIsLocal
	and I_EventCounter Khiva_filter = 1
	
	filter_settlement_commands on Khiva 
	set_event_counter Khiva_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Khiva
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Khiva 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Khiva
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Khiva 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Khiva
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Khiva 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Tayma
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Tayma 0.01
	add_settlement_turmoil Tayma 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Tayma 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Tayma 5
	end_if

	set_event_counter Tayma_filter 1
	filter_settlement_commands off Tayma 
end_monitor

monitor_event SettlementTurnEnd SettlementName Tayma
	and SettlementIsLocal
	and I_EventCounter Tayma_filter = 1
	
	filter_settlement_commands on Tayma 
	set_event_counter Tayma_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Tayma
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Tayma 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Tayma
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Tayma 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Tayma
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Tayma 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Jaiksk
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Jaiksk 0.01
	add_settlement_turmoil Jaiksk 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Jaiksk 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Jaiksk 5
	end_if

	set_event_counter Jaiksk_filter 1
	filter_settlement_commands off Jaiksk 
end_monitor

monitor_event SettlementTurnEnd SettlementName Jaiksk
	and SettlementIsLocal
	and I_EventCounter Jaiksk_filter = 1
	
	filter_settlement_commands on Jaiksk 
	set_event_counter Jaiksk_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Jaiksk
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Jaiksk 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Jaiksk
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Jaiksk 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Jaiksk
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Jaiksk 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Konjikala
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Konjikala 0.01
	add_settlement_turmoil Konjikala 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Konjikala 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Konjikala 5
	end_if

	set_event_counter Konjikala_filter 1
	filter_settlement_commands off Konjikala 
end_monitor

monitor_event SettlementTurnEnd SettlementName Konjikala
	and SettlementIsLocal
	and I_EventCounter Konjikala_filter = 1
	
	filter_settlement_commands on Konjikala 
	set_event_counter Konjikala_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Konjikala
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Konjikala 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Konjikala
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Konjikala 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Konjikala
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Konjikala 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Yazd
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Yazd 0.01
	add_settlement_turmoil Yazd 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Yazd 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Yazd 5
	end_if

	set_event_counter Yazd_filter 1
	filter_settlement_commands off Yazd 
end_monitor

monitor_event SettlementTurnEnd SettlementName Yazd
	and SettlementIsLocal
	and I_EventCounter Yazd_filter = 1
	
	filter_settlement_commands on Yazd 
	set_event_counter Yazd_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Yazd
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Yazd 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Yazd
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Yazd 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Yazd
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Yazd 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Al-Mahdiya
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Al-Mahdiya 0.01
	add_settlement_turmoil Al-Mahdiya 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Al-Mahdiya 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Al-Mahdiya 5
	end_if

	set_event_counter Al-Mahdiya_filter 1
	filter_settlement_commands off Al-Mahdiya 
end_monitor

monitor_event SettlementTurnEnd SettlementName Al-Mahdiya
	and SettlementIsLocal
	and I_EventCounter Al-Mahdiya_filter = 1
	
	filter_settlement_commands on Al-Mahdiya 
	set_event_counter Al-Mahdiya_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Al-Mahdiya
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Al-Mahdiya 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Al-Mahdiya
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Al-Mahdiya 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Al-Mahdiya
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Al-Mahdiya 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Zhytomyr
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Zhytomyr 0.01
	add_settlement_turmoil Zhytomyr 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Zhytomyr 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Zhytomyr 5
	end_if

	set_event_counter Zhytomyr_filter 1
	filter_settlement_commands off Zhytomyr 
end_monitor

monitor_event SettlementTurnEnd SettlementName Zhytomyr
	and SettlementIsLocal
	and I_EventCounter Zhytomyr_filter = 1
	
	filter_settlement_commands on Zhytomyr 
	set_event_counter Zhytomyr_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Zhytomyr
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Zhytomyr 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Zhytomyr
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Zhytomyr 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Zhytomyr
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Zhytomyr 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Polotsk
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Polotsk 0.01
	add_settlement_turmoil Polotsk 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Polotsk 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Polotsk 5
	end_if

	set_event_counter Polotsk_filter 1
	filter_settlement_commands off Polotsk 
end_monitor

monitor_event SettlementTurnEnd SettlementName Polotsk
	and SettlementIsLocal
	and I_EventCounter Polotsk_filter = 1
	
	filter_settlement_commands on Polotsk 
	set_event_counter Polotsk_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Polotsk
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Polotsk 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Polotsk
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Polotsk 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Polotsk
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Polotsk 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Embi
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Embi 0.01
	add_settlement_turmoil Embi 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Embi 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Embi 5
	end_if

	set_event_counter Embi_filter 1
	filter_settlement_commands off Embi 
end_monitor

monitor_event SettlementTurnEnd SettlementName Embi
	and SettlementIsLocal
	and I_EventCounter Embi_filter = 1
	
	filter_settlement_commands on Embi 
	set_event_counter Embi_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Embi
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Embi 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Embi
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Embi 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Embi
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Embi 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Damghan
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Damghan 0.01
	add_settlement_turmoil Damghan 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Damghan 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Damghan 5
	end_if

	set_event_counter Damghan_filter 1
	filter_settlement_commands off Damghan 
end_monitor

monitor_event SettlementTurnEnd SettlementName Damghan
	and SettlementIsLocal
	and I_EventCounter Damghan_filter = 1
	
	filter_settlement_commands on Damghan 
	set_event_counter Damghan_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Damghan
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Damghan 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Damghan
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Damghan 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Damghan
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Damghan 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Turku
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Turku 0.01
	add_settlement_turmoil Turku 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Turku 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Turku 5
	end_if

	set_event_counter Turku_filter 1
	filter_settlement_commands off Turku 
end_monitor

monitor_event SettlementTurnEnd SettlementName Turku
	and SettlementIsLocal
	and I_EventCounter Turku_filter = 1
	
	filter_settlement_commands on Turku 
	set_event_counter Turku_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Turku
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Turku 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Turku
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Turku 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Turku
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Turku 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Fes
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Fes 0.01
	add_settlement_turmoil Fes 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Fes 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Fes 5
	end_if

	set_event_counter Fes_filter 1
	filter_settlement_commands off Fes 
end_monitor

monitor_event SettlementTurnEnd SettlementName Fes
	and SettlementIsLocal
	and I_EventCounter Fes_filter = 1
	
	filter_settlement_commands on Fes 
	set_event_counter Fes_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Fes
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Fes 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Fes
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Fes 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Fes
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Fes 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Rhodes
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Rhodes 0.01
	add_settlement_turmoil Rhodes 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Rhodes 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Rhodes 5
	end_if

	set_event_counter Rhodes_filter 1
	filter_settlement_commands off Rhodes 
end_monitor

monitor_event SettlementTurnEnd SettlementName Rhodes
	and SettlementIsLocal
	and I_EventCounter Rhodes_filter = 1
	
	filter_settlement_commands on Rhodes 
	set_event_counter Rhodes_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Rhodes
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Rhodes 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Rhodes
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Rhodes 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Rhodes
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Rhodes 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Kermanshah
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Kermanshah 0.01
	add_settlement_turmoil Kermanshah 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Kermanshah 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Kermanshah 5
	end_if

	set_event_counter Kermanshah_filter 1
	filter_settlement_commands off Kermanshah 
end_monitor

monitor_event SettlementTurnEnd SettlementName Kermanshah
	and SettlementIsLocal
	and I_EventCounter Kermanshah_filter = 1
	
	filter_settlement_commands on Kermanshah 
	set_event_counter Kermanshah_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Kermanshah
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Kermanshah 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Kermanshah
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Kermanshah 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Kermanshah
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Kermanshah 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Tabriz
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Tabriz 0.01
	add_settlement_turmoil Tabriz 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Tabriz 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Tabriz 5
	end_if

	set_event_counter Tabriz_filter 1
	filter_settlement_commands off Tabriz 
end_monitor

monitor_event SettlementTurnEnd SettlementName Tabriz
	and SettlementIsLocal
	and I_EventCounter Tabriz_filter = 1
	
	filter_settlement_commands on Tabriz 
	set_event_counter Tabriz_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Tabriz
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Tabriz 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Tabriz
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Tabriz 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Tabriz
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Tabriz 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Poltava
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Poltava 0.01
	add_settlement_turmoil Poltava 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Poltava 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Poltava 5
	end_if

	set_event_counter Poltava_filter 1
	filter_settlement_commands off Poltava 
end_monitor

monitor_event SettlementTurnEnd SettlementName Poltava
	and SettlementIsLocal
	and I_EventCounter Poltava_filter = 1
	
	filter_settlement_commands on Poltava 
	set_event_counter Poltava_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Poltava
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Poltava 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Poltava
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Poltava 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Poltava
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Poltava 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Adrianople
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Adrianople 0.01
	add_settlement_turmoil Adrianople 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Adrianople 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Adrianople 5
	end_if

	set_event_counter Adrianople_filter 1
	filter_settlement_commands off Adrianople 
end_monitor

monitor_event SettlementTurnEnd SettlementName Adrianople
	and SettlementIsLocal
	and I_EventCounter Adrianople_filter = 1
	
	filter_settlement_commands on Adrianople 
	set_event_counter Adrianople_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Adrianople
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Adrianople 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Adrianople
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Adrianople 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Adrianople
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Adrianople 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Badajoz
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Badajoz 0.01
	add_settlement_turmoil Badajoz 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Badajoz 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Badajoz 5
	end_if

	set_event_counter Badajoz_filter 1
	filter_settlement_commands off Badajoz 
end_monitor

monitor_event SettlementTurnEnd SettlementName Badajoz
	and SettlementIsLocal
	and I_EventCounter Badajoz_filter = 1
	
	filter_settlement_commands on Badajoz 
	set_event_counter Badajoz_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Badajoz
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Badajoz 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Badajoz
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Badajoz 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Badajoz
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Badajoz 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Aberdeen
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Aberdeen 0.01
	add_settlement_turmoil Aberdeen 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Aberdeen 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Aberdeen 5
	end_if

	set_event_counter Aberdeen_filter 1
	filter_settlement_commands off Aberdeen 
end_monitor

monitor_event SettlementTurnEnd SettlementName Aberdeen
	and SettlementIsLocal
	and I_EventCounter Aberdeen_filter = 1
	
	filter_settlement_commands on Aberdeen 
	set_event_counter Aberdeen_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Aberdeen
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Aberdeen 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Aberdeen
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Aberdeen 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Aberdeen
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Aberdeen 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Oran
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Oran 0.01
	add_settlement_turmoil Oran 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Oran 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Oran 5
	end_if

	set_event_counter Oran_filter 1
	filter_settlement_commands off Oran 
end_monitor

monitor_event SettlementTurnEnd SettlementName Oran
	and SettlementIsLocal
	and I_EventCounter Oran_filter = 1
	
	filter_settlement_commands on Oran 
	set_event_counter Oran_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Oran
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Oran 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Oran
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Oran 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Oran
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Oran 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Azaq
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Azaq 0.01
	add_settlement_turmoil Azaq 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Azaq 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Azaq 5
	end_if

	set_event_counter Azaq_filter 1
	filter_settlement_commands off Azaq 
end_monitor

monitor_event SettlementTurnEnd SettlementName Azaq
	and SettlementIsLocal
	and I_EventCounter Azaq_filter = 1
	
	filter_settlement_commands on Azaq 
	set_event_counter Azaq_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Azaq
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Azaq 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Azaq
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Azaq 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Azaq
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Azaq 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Talinn
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Talinn 0.01
	add_settlement_turmoil Talinn 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Talinn 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Talinn 5
	end_if

	set_event_counter Talinn_filter 1
	filter_settlement_commands off Talinn 
end_monitor

monitor_event SettlementTurnEnd SettlementName Talinn
	and SettlementIsLocal
	and I_EventCounter Talinn_filter = 1
	
	filter_settlement_commands on Talinn 
	set_event_counter Talinn_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Talinn
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Talinn 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Talinn
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Talinn 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Talinn
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Talinn 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Pecs
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Pecs 0.01
	add_settlement_turmoil Pecs 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Pecs 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Pecs 5
	end_if

	set_event_counter Pecs_filter 1
	filter_settlement_commands off Pecs 
end_monitor

monitor_event SettlementTurnEnd SettlementName Pecs
	and SettlementIsLocal
	and I_EventCounter Pecs_filter = 1
	
	filter_settlement_commands on Pecs 
	set_event_counter Pecs_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Pecs
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Pecs 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Pecs
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Pecs 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Pecs
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Pecs 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Kalmar
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Kalmar 0.01
	add_settlement_turmoil Kalmar 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Kalmar 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Kalmar 5
	end_if

	set_event_counter Kalmar_filter 1
	filter_settlement_commands off Kalmar 
end_monitor

monitor_event SettlementTurnEnd SettlementName Kalmar
	and SettlementIsLocal
	and I_EventCounter Kalmar_filter = 1
	
	filter_settlement_commands on Kalmar 
	set_event_counter Kalmar_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Kalmar
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Kalmar 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Kalmar
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Kalmar 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Kalmar
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Kalmar 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Yelabuga
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Yelabuga 0.01
	add_settlement_turmoil Yelabuga 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Yelabuga 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Yelabuga 5
	end_if

	set_event_counter Yelabuga_filter 1
	filter_settlement_commands off Yelabuga 
end_monitor

monitor_event SettlementTurnEnd SettlementName Yelabuga
	and SettlementIsLocal
	and I_EventCounter Yelabuga_filter = 1
	
	filter_settlement_commands on Yelabuga 
	set_event_counter Yelabuga_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Yelabuga
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Yelabuga 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Yelabuga
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Yelabuga 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Yelabuga
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Yelabuga 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Alamut
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Alamut 0.01
	add_settlement_turmoil Alamut 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Alamut 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Alamut 5
	end_if

	set_event_counter Alamut_filter 1
	filter_settlement_commands off Alamut 
end_monitor

monitor_event SettlementTurnEnd SettlementName Alamut
	and SettlementIsLocal
	and I_EventCounter Alamut_filter = 1
	
	filter_settlement_commands on Alamut 
	set_event_counter Alamut_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Alamut
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Alamut 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Alamut
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Alamut 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Alamut
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Alamut 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Murom
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Murom 0.01
	add_settlement_turmoil Murom 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Murom 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Murom 5
	end_if

	set_event_counter Murom_filter 1
	filter_settlement_commands off Murom 
end_monitor

monitor_event SettlementTurnEnd SettlementName Murom
	and SettlementIsLocal
	and I_EventCounter Murom_filter = 1
	
	filter_settlement_commands on Murom 
	set_event_counter Murom_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Murom
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Murom 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Murom
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Murom 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Murom
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Murom 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Isparta
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Isparta 0.01
	add_settlement_turmoil Isparta 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Isparta 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Isparta 5
	end_if

	set_event_counter Isparta_filter 1
	filter_settlement_commands off Isparta 
end_monitor

monitor_event SettlementTurnEnd SettlementName Isparta
	and SettlementIsLocal
	and I_EventCounter Isparta_filter = 1
	
	filter_settlement_commands on Isparta 
	set_event_counter Isparta_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Isparta
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Isparta 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Isparta
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Isparta 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Isparta
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Isparta 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Batumi
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Batumi 0.01
	add_settlement_turmoil Batumi 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Batumi 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Batumi 5
	end_if

	set_event_counter Batumi_filter 1
	filter_settlement_commands off Batumi 
end_monitor

monitor_event SettlementTurnEnd SettlementName Batumi
	and SettlementIsLocal
	and I_EventCounter Batumi_filter = 1
	
	filter_settlement_commands on Batumi 
	set_event_counter Batumi_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Batumi
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Batumi 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Batumi
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Batumi 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Batumi
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Batumi 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Ahvaz
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Ahvaz 0.01
	add_settlement_turmoil Ahvaz 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Ahvaz 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Ahvaz 5
	end_if

	set_event_counter Ahvaz_filter 1
	filter_settlement_commands off Ahvaz 
end_monitor

monitor_event SettlementTurnEnd SettlementName Ahvaz
	and SettlementIsLocal
	and I_EventCounter Ahvaz_filter = 1
	
	filter_settlement_commands on Ahvaz 
	set_event_counter Ahvaz_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Ahvaz
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Ahvaz 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Ahvaz
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Ahvaz 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Ahvaz
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Ahvaz 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Serdobinskaya
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Serdobinskaya 0.01
	add_settlement_turmoil Serdobinskaya 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Serdobinskaya 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Serdobinskaya 5
	end_if

	set_event_counter Serdobinskaya_filter 1
	filter_settlement_commands off Serdobinskaya 
end_monitor

monitor_event SettlementTurnEnd SettlementName Serdobinskaya
	and SettlementIsLocal
	and I_EventCounter Serdobinskaya_filter = 1
	
	filter_settlement_commands on Serdobinskaya 
	set_event_counter Serdobinskaya_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Serdobinskaya
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Serdobinskaya 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Serdobinskaya
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Serdobinskaya 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Serdobinskaya
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Serdobinskaya 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Mystras
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Mystras 0.01
	add_settlement_turmoil Mystras 3
		
	if RandomPercent < 25 
	add_settlement_turmoil Mystras 4
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Mystras 5
	end_if

	set_event_counter Mystras_filter 1
	filter_settlement_commands off Mystras 
end_monitor

monitor_event SettlementTurnEnd SettlementName Mystras
	and SettlementIsLocal
	and I_EventCounter Mystras_filter = 1
	
	filter_settlement_commands on Mystras 
	set_event_counter Mystras_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Mystras
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Mystras 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Mystras
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Mystras 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Mystras
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Mystras 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Oslo
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Oslo 0.005
	add_settlement_turmoil Oslo 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Oslo 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Oslo 6
	end_if

	set_event_counter Oslo_filter 1
	filter_settlement_commands off Oslo 
end_monitor

monitor_event SettlementTurnEnd SettlementName Oslo
	and SettlementIsLocal
	and I_EventCounter Oslo_filter = 1
	
	filter_settlement_commands on Oslo 
	set_event_counter Oslo_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Oslo
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Oslo 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Oslo
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Oslo 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Oslo
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Oslo 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Novgorod
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Novgorod 0.005
	add_settlement_turmoil Novgorod 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Novgorod 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Novgorod 6
	end_if

	set_event_counter Novgorod_filter 1
	filter_settlement_commands off Novgorod 
end_monitor

monitor_event SettlementTurnEnd SettlementName Novgorod
	and SettlementIsLocal
	and I_EventCounter Novgorod_filter = 1
	
	filter_settlement_commands on Novgorod 
	set_event_counter Novgorod_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Novgorod
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Novgorod 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Novgorod
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Novgorod 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Novgorod
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Novgorod 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Arhus
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Arhus 0.005
	add_settlement_turmoil Arhus 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Arhus 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Arhus 6
	end_if

	set_event_counter Arhus_filter 1
	filter_settlement_commands off Arhus 
end_monitor

monitor_event SettlementTurnEnd SettlementName Arhus
	and SettlementIsLocal
	and I_EventCounter Arhus_filter = 1
	
	filter_settlement_commands on Arhus 
	set_event_counter Arhus_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Arhus
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Arhus 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Arhus
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Arhus 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Arhus
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Arhus 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Edinburgh
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Edinburgh 0.005
	add_settlement_turmoil Edinburgh 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Edinburgh 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Edinburgh 6
	end_if

	set_event_counter Edinburgh_filter 1
	filter_settlement_commands off Edinburgh 
end_monitor

monitor_event SettlementTurnEnd SettlementName Edinburgh
	and SettlementIsLocal
	and I_EventCounter Edinburgh_filter = 1
	
	filter_settlement_commands on Edinburgh 
	set_event_counter Edinburgh_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Edinburgh
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Edinburgh 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Edinburgh
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Edinburgh 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Edinburgh
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Edinburgh 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Cracow
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Cracow 0.005
	add_settlement_turmoil Cracow 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Cracow 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Cracow 6
	end_if

	set_event_counter Cracow_filter 1
	filter_settlement_commands off Cracow 
end_monitor

monitor_event SettlementTurnEnd SettlementName Cracow
	and SettlementIsLocal
	and I_EventCounter Cracow_filter = 1
	
	filter_settlement_commands on Cracow 
	set_event_counter Cracow_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Cracow
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Cracow 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Cracow
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Cracow 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Cracow
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Cracow 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName London
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate London 0.005
	add_settlement_turmoil London 4
		
	if RandomPercent < 25 
	add_settlement_turmoil London 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil London 6
	end_if

	set_event_counter London_filter 1
	filter_settlement_commands off London 
end_monitor

monitor_event SettlementTurnEnd SettlementName London
	and SettlementIsLocal
	and I_EventCounter London_filter = 1
	
	filter_settlement_commands on London 
	set_event_counter London_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName London
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate London 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName London
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil London 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName London
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil London 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Kiev
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Kiev 0.005
	add_settlement_turmoil Kiev 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Kiev 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Kiev 6
	end_if

	set_event_counter Kiev_filter 1
	filter_settlement_commands off Kiev 
end_monitor

monitor_event SettlementTurnEnd SettlementName Kiev
	and SettlementIsLocal
	and I_EventCounter Kiev_filter = 1
	
	filter_settlement_commands on Kiev 
	set_event_counter Kiev_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Kiev
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Kiev 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Kiev
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Kiev 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Kiev
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Kiev 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Frankfurt
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Frankfurt 0.005
	add_settlement_turmoil Frankfurt 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Frankfurt 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Frankfurt 6
	end_if

	set_event_counter Frankfurt_filter 1
	filter_settlement_commands off Frankfurt 
end_monitor

monitor_event SettlementTurnEnd SettlementName Frankfurt
	and SettlementIsLocal
	and I_EventCounter Frankfurt_filter = 1
	
	filter_settlement_commands on Frankfurt 
	set_event_counter Frankfurt_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Frankfurt
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Frankfurt 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Frankfurt
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Frankfurt 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Frankfurt
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Frankfurt 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Paris
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Paris 0.005
	add_settlement_turmoil Paris 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Paris 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Paris 6
	end_if

	set_event_counter Paris_filter 1
	filter_settlement_commands off Paris 
end_monitor

monitor_event SettlementTurnEnd SettlementName Paris
	and SettlementIsLocal
	and I_EventCounter Paris_filter = 1
	
	filter_settlement_commands on Paris 
	set_event_counter Paris_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Paris
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Paris 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Paris
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Paris 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Paris
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Paris 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Budapest
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Budapest 0.005
	add_settlement_turmoil Budapest 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Budapest 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Budapest 6
	end_if

	set_event_counter Budapest_filter 1
	filter_settlement_commands off Budapest 
end_monitor

monitor_event SettlementTurnEnd SettlementName Budapest
	and SettlementIsLocal
	and I_EventCounter Budapest_filter = 1
	
	filter_settlement_commands on Budapest 
	set_event_counter Budapest_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Budapest
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Budapest 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Budapest
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Budapest 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Budapest
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Budapest 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Milan
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Milan 0.005
	add_settlement_turmoil Milan 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Milan 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Milan 6
	end_if

	set_event_counter Milan_filter 1
	filter_settlement_commands off Milan 
end_monitor

monitor_event SettlementTurnEnd SettlementName Milan
	and SettlementIsLocal
	and I_EventCounter Milan_filter = 1
	
	filter_settlement_commands on Milan 
	set_event_counter Milan_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Milan
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Milan 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Milan
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Milan 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Milan
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Milan 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Venice
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Venice 0.005
	add_settlement_turmoil Venice 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Venice 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Venice 6
	end_if

	set_event_counter Venice_filter 1
	filter_settlement_commands off Venice 
end_monitor

monitor_event SettlementTurnEnd SettlementName Venice
	and SettlementIsLocal
	and I_EventCounter Venice_filter = 1
	
	filter_settlement_commands on Venice 
	set_event_counter Venice_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Venice
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Venice 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Venice
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Venice 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Venice
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Venice 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Leon
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Leon 0.005
	add_settlement_turmoil Leon 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Leon 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Leon 6
	end_if

	set_event_counter Leon_filter 1
	filter_settlement_commands off Leon 
end_monitor

monitor_event SettlementTurnEnd SettlementName Leon
	and SettlementIsLocal
	and I_EventCounter Leon_filter = 1
	
	filter_settlement_commands on Leon 
	set_event_counter Leon_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Leon
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Leon 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Leon
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Leon 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Leon
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Leon 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Zaragoza
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Zaragoza 0.005
	add_settlement_turmoil Zaragoza 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Zaragoza 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Zaragoza 6
	end_if

	set_event_counter Zaragoza_filter 1
	filter_settlement_commands off Zaragoza 
end_monitor

monitor_event SettlementTurnEnd SettlementName Zaragoza
	and SettlementIsLocal
	and I_EventCounter Zaragoza_filter = 1
	
	filter_settlement_commands on Zaragoza 
	set_event_counter Zaragoza_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Zaragoza
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Zaragoza 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Zaragoza
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Zaragoza 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Zaragoza
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Zaragoza 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Lisbon
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Lisbon 0.005
	add_settlement_turmoil Lisbon 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Lisbon 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Lisbon 6
	end_if

	set_event_counter Lisbon_filter 1
	filter_settlement_commands off Lisbon 
end_monitor

monitor_event SettlementTurnEnd SettlementName Lisbon
	and SettlementIsLocal
	and I_EventCounter Lisbon_filter = 1
	
	filter_settlement_commands on Lisbon 
	set_event_counter Lisbon_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Lisbon
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Lisbon 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Lisbon
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Lisbon 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Lisbon
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Lisbon 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Naples
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Naples 0.005
	add_settlement_turmoil Naples 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Naples 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Naples 6
	end_if

	set_event_counter Naples_filter 1
	filter_settlement_commands off Naples 
end_monitor

monitor_event SettlementTurnEnd SettlementName Naples
	and SettlementIsLocal
	and I_EventCounter Naples_filter = 1
	
	filter_settlement_commands on Naples 
	set_event_counter Naples_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Naples
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Naples 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Naples
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Naples 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Naples
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Naples 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Cordoba
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Cordoba 0.005
	add_settlement_turmoil Cordoba 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Cordoba 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Cordoba 6
	end_if

	set_event_counter Cordoba_filter 1
	filter_settlement_commands off Cordoba 
end_monitor

monitor_event SettlementTurnEnd SettlementName Cordoba
	and SettlementIsLocal
	and I_EventCounter Cordoba_filter = 1
	
	filter_settlement_commands on Cordoba 
	set_event_counter Cordoba_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Cordoba
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Cordoba 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Cordoba
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Cordoba 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Cordoba
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Cordoba 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Iconium
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Iconium 0.005
	add_settlement_turmoil Iconium 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Iconium 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Iconium 6
	end_if

	set_event_counter Iconium_filter 1
	filter_settlement_commands off Iconium 
end_monitor

monitor_event SettlementTurnEnd SettlementName Iconium
	and SettlementIsLocal
	and I_EventCounter Iconium_filter = 1
	
	filter_settlement_commands on Iconium 
	set_event_counter Iconium_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Iconium
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Iconium 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Iconium
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Iconium 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Iconium
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Iconium 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Cairo
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Cairo 0.005
	add_settlement_turmoil Cairo 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Cairo 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Cairo 6
	end_if

	set_event_counter Cairo_filter 1
	filter_settlement_commands off Cairo 
end_monitor

monitor_event SettlementTurnEnd SettlementName Cairo
	and SettlementIsLocal
	and I_EventCounter Cairo_filter = 1
	
	filter_settlement_commands on Cairo 
	set_event_counter Cairo_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Cairo
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Cairo 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Cairo
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Cairo 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Cairo
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Cairo 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Urgench
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Urgench 0.005
	add_settlement_turmoil Urgench 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Urgench 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Urgench 6
	end_if

	set_event_counter Urgench_filter 1
	filter_settlement_commands off Urgench 
end_monitor

monitor_event SettlementTurnEnd SettlementName Urgench
	and SettlementIsLocal
	and I_EventCounter Urgench_filter = 1
	
	filter_settlement_commands on Urgench 
	set_event_counter Urgench_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Urgench
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Urgench 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Urgench
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Urgench 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Urgench
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Urgench 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Kazan
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Kazan 0.005
	add_settlement_turmoil Kazan 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Kazan 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Kazan 6
	end_if

	set_event_counter Kazan_filter 1
	filter_settlement_commands off Kazan 
end_monitor

monitor_event SettlementTurnEnd SettlementName Kazan
	and SettlementIsLocal
	and I_EventCounter Kazan_filter = 1
	
	filter_settlement_commands on Kazan 
	set_event_counter Kazan_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Kazan
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Kazan 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Kazan
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Kazan 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Kazan
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Kazan 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Riga
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Riga 0.005
	add_settlement_turmoil Riga 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Riga 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Riga 6
	end_if

	set_event_counter Riga_filter 1
	filter_settlement_commands off Riga 
end_monitor

monitor_event SettlementTurnEnd SettlementName Riga
	and SettlementIsLocal
	and I_EventCounter Riga_filter = 1
	
	filter_settlement_commands on Riga 
	set_event_counter Riga_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Riga
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Riga 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Riga
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Riga 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Riga
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Riga 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Vilnius
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Vilnius 0.005
	add_settlement_turmoil Vilnius 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Vilnius 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Vilnius 6
	end_if

	set_event_counter Vilnius_filter 1
	filter_settlement_commands off Vilnius 
end_monitor

monitor_event SettlementTurnEnd SettlementName Vilnius
	and SettlementIsLocal
	and I_EventCounter Vilnius_filter = 1
	
	filter_settlement_commands on Vilnius 
	set_event_counter Vilnius_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Vilnius
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Vilnius 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Vilnius
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Vilnius 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Vilnius
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Vilnius 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Hrodna
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Hrodna 0.005
	add_settlement_turmoil Hrodna 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Hrodna 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Hrodna 6
	end_if

	set_event_counter Hrodna_filter 1
	filter_settlement_commands off Hrodna 
end_monitor

monitor_event SettlementTurnEnd SettlementName Hrodna
	and SettlementIsLocal
	and I_EventCounter Hrodna_filter = 1
	
	filter_settlement_commands on Hrodna 
	set_event_counter Hrodna_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Hrodna
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Hrodna 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Hrodna
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Hrodna 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Hrodna
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Hrodna 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Mensk
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Mensk 0.005
	add_settlement_turmoil Mensk 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Mensk 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Mensk 6
	end_if

	set_event_counter Mensk_filter 1
	filter_settlement_commands off Mensk 
end_monitor

monitor_event SettlementTurnEnd SettlementName Mensk
	and SettlementIsLocal
	and I_EventCounter Mensk_filter = 1
	
	filter_settlement_commands on Mensk 
	set_event_counter Mensk_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Mensk
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Mensk 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Mensk
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Mensk 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Mensk
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Mensk 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Konigsberg
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Konigsberg 0.005
	add_settlement_turmoil Konigsberg 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Konigsberg 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Konigsberg 6
	end_if

	set_event_counter Konigsberg_filter 1
	filter_settlement_commands off Konigsberg 
end_monitor

monitor_event SettlementTurnEnd SettlementName Konigsberg
	and SettlementIsLocal
	and I_EventCounter Konigsberg_filter = 1
	
	filter_settlement_commands on Konigsberg 
	set_event_counter Konigsberg_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Konigsberg
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Konigsberg 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Konigsberg
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Konigsberg 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Konigsberg
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Konigsberg 9
	end_if
end_monitor



monitor_event GeneralCaptureSettlement SettlementName Constantinople
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Constantinople 0.001
	add_settlement_turmoil Constantinople 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Constantinople 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Constantinople 6
	end_if

	set_event_counter Constantinople_filter 1
	filter_settlement_commands off Constantinople 
end_monitor

monitor_event SettlementTurnEnd SettlementName Constantinople
	and SettlementIsLocal
	and I_EventCounter Constantinople_filter = 1
	
	filter_settlement_commands on Constantinople 
	set_event_counter Constantinople_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Constantinople
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Constantinople 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Constantinople
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Constantinople 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Constantinople
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Constantinople 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Rome
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Rome 0.001
	add_settlement_turmoil Rome 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Rome 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Rome 6
	end_if

	set_event_counter Rome_filter 1
	filter_settlement_commands off Rome 
end_monitor

monitor_event SettlementTurnEnd SettlementName Rome
	and SettlementIsLocal
	and I_EventCounter Rome_filter = 1
	
	filter_settlement_commands on Rome 
	set_event_counter Rome_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Rome
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Rome 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Rome
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Rome 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Rome
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Rome 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Baghdad
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Baghdad 0.001
	add_settlement_turmoil Baghdad 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Baghdad 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Baghdad 6
	end_if

	set_event_counter Baghdad_filter 1
	filter_settlement_commands off Baghdad 
end_monitor

monitor_event SettlementTurnEnd SettlementName Baghdad
	and SettlementIsLocal
	and I_EventCounter Baghdad_filter = 1
	
	filter_settlement_commands on Baghdad 
	set_event_counter Baghdad_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Baghdad
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Baghdad 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Baghdad
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Baghdad 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Baghdad
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Baghdad 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Mecca
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Mecca 0.001
	add_settlement_turmoil Mecca 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Mecca 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Mecca 6
	end_if

	set_event_counter Mecca_filter 1
	filter_settlement_commands off Mecca 
end_monitor

monitor_event SettlementTurnEnd SettlementName Mecca
	and SettlementIsLocal
	and I_EventCounter Mecca_filter = 1
	
	filter_settlement_commands on Mecca 
	set_event_counter Mecca_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Mecca
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Mecca 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Mecca
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Mecca 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Mecca
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Mecca 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Medina
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Medina 0.001
	add_settlement_turmoil Medina 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Medina 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Medina 6
	end_if

	set_event_counter Medina_filter 1
	filter_settlement_commands off Medina 
end_monitor

monitor_event SettlementTurnEnd SettlementName Medina
	and SettlementIsLocal
	and I_EventCounter Medina_filter = 1
	
	filter_settlement_commands on Medina 
	set_event_counter Medina_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Medina
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Medina 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Medina
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Medina 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Medina
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Medina 9
	end_if
end_monitor


monitor_event GeneralCaptureSettlement SettlementName Jerusalem
	and FactionIsLocal
	
   	set_owner_founding_conversion_rate Jerusalem 0.001
	add_settlement_turmoil Jerusalem 4
		
	if RandomPercent < 25 
	add_settlement_turmoil Jerusalem 5
	end_if
	
	if RandomPercent > 75
	add_settlement_turmoil Jerusalem 6
	end_if

	set_event_counter Jerusalem_filter 1
	filter_settlement_commands off Jerusalem 
end_monitor

monitor_event SettlementTurnEnd SettlementName Jerusalem
	and SettlementIsLocal
	and I_EventCounter Jerusalem_filter = 1
	
	filter_settlement_commands on Jerusalem 
	set_event_counter Jerusalem_filter 0
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Jerusalem
	and TargetSettlementIsLocal
	
   	set_owner_founding_conversion_rate Jerusalem 0.02
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Jerusalem
	and FactionIsLocal
	and PopulationOwnReligion < 60

	if RandomPercent < 75 
	add_settlement_turmoil Jerusalem 7
	end_if
end_monitor

monitor_event GeneralCaptureSettlement SettlementName Jerusalem
	and FactionIsLocal
	and PopulationOwnReligion < 30

	if RandomPercent > 25 
	add_settlement_turmoil Jerusalem 9
	end_if
end_monitor

;########################## Germanicu5 Looting Script 1.02 beta  ###########################

declare_counter small_army
declare_counter medium_army
declare_counter large_army
declare_counter small_armypl
declare_counter medium_armypl
declare_counter large_armypl

declare_counter purse_venice1
declare_counter purse_venice2
declare_counter purse_venice3
declare_counter purse_venice4
declare_counter purse_venice5
declare_counter purse_venice6
declare_counter purse_sicily1
declare_counter purse_sicily2
declare_counter purse_sicily3
declare_counter purse_sicily4
declare_counter purse_sicily5
declare_counter purse_sicily6
declare_counter purse_milan1
declare_counter purse_milan2
declare_counter purse_milan3
declare_counter purse_milan4
declare_counter purse_milan5
declare_counter purse_milan6
declare_counter purse_papal_states1
declare_counter purse_papal_states2
declare_counter purse_papal_states3
declare_counter purse_papal_states4
declare_counter purse_papal_states5
declare_counter purse_papal_states6
declare_counter purse_denmark1
declare_counter purse_denmark2
declare_counter purse_denmark3
declare_counter purse_denmark4
declare_counter purse_denmark5
declare_counter purse_denmark6
declare_counter purse_egypt1
declare_counter purse_egypt2
declare_counter purse_egypt3
declare_counter purse_egypt4
declare_counter purse_egypt5
declare_counter purse_egypt6
declare_counter purse_scotland1
declare_counter purse_scotland2
declare_counter purse_scotland3
declare_counter purse_scotland4
declare_counter purse_scotland5
declare_counter purse_scotland6
declare_counter purse_cumans1
declare_counter purse_cumans2
declare_counter purse_cumans3
declare_counter purse_cumans4
declare_counter purse_cumans5
declare_counter purse_cumans6
declare_counter purse_mongols1
declare_counter purse_mongols2
declare_counter purse_mongols3
declare_counter purse_mongols4
declare_counter purse_mongols5
declare_counter purse_mongols6
declare_counter purse_turks1
declare_counter purse_turks2
declare_counter purse_turks3
declare_counter purse_turks4
declare_counter purse_turks5
declare_counter purse_turks6
declare_counter purse_france1
declare_counter purse_france2
declare_counter purse_france3
declare_counter purse_france4
declare_counter purse_france5
declare_counter purse_france6
declare_counter purse_hre1
declare_counter purse_hre2
declare_counter purse_hre3
declare_counter purse_hre4
declare_counter purse_hre5
declare_counter purse_hre6
declare_counter purse_england1
declare_counter purse_england2
declare_counter purse_england3
declare_counter purse_england4
declare_counter purse_england5
declare_counter purse_england6
declare_counter purse_portugal1
declare_counter purse_portugal2
declare_counter purse_portugal3
declare_counter purse_portugal4
declare_counter purse_portugal5
declare_counter purse_portugal6
declare_counter purse_poland1
declare_counter purse_poland2
declare_counter purse_poland3
declare_counter purse_poland4
declare_counter purse_poland5
declare_counter purse_poland6
declare_counter purse_byzantium1
declare_counter purse_byzantium2
declare_counter purse_byzantium3
declare_counter purse_byzantium4
declare_counter purse_byzantium5
declare_counter purse_byzantium6
declare_counter purse_moors1
declare_counter purse_moors2
declare_counter purse_moors3
declare_counter purse_moors4
declare_counter purse_moors5
declare_counter purse_moors6
declare_counter purse_russia1
declare_counter purse_russia2
declare_counter purse_russia3
declare_counter purse_russia4
declare_counter purse_russia5
declare_counter purse_russia6
declare_counter purse_spain1
declare_counter purse_spain2
declare_counter purse_spain3
declare_counter purse_spain4
declare_counter purse_spain5
declare_counter purse_spain6
declare_counter purse_hungary1
declare_counter purse_hungary2
declare_counter purse_hungary3
declare_counter purse_hungary4
declare_counter purse_hungary5
declare_counter purse_hungary6
declare_counter purse_aragon1
declare_counter purse_aragon2
declare_counter purse_aragon3
declare_counter purse_aragon4
declare_counter purse_aragon5
declare_counter purse_aragon6
declare_counter purse_knights_templar1
declare_counter purse_knights_templar2
declare_counter purse_knights_templar3
declare_counter purse_knights_templar4
declare_counter purse_knights_templar5
declare_counter purse_knights_templar6
declare_counter purse_lithuania1
declare_counter purse_lithuania2
declare_counter purse_lithuania3
declare_counter purse_lithuania4
declare_counter purse_lithuania5
declare_counter purse_lithuania6
declare_counter purse_kievan_rus1
declare_counter purse_kievan_rus2
declare_counter purse_kievan_rus3
declare_counter purse_kievan_rus4
declare_counter purse_kievan_rus5
declare_counter purse_kievan_rus6
declare_counter purse_teutonic_order1
declare_counter purse_teutonic_order2
declare_counter purse_teutonic_order3
declare_counter purse_teutonic_order4
declare_counter purse_teutonic_order5
declare_counter purse_teutonic_order6
declare_counter purse_timurids1
declare_counter purse_timurids2
declare_counter purse_timurids3
declare_counter purse_timurids4
declare_counter purse_timurids5
declare_counter purse_timurids6
declare_counter purse_norway1
declare_counter purse_norway2
declare_counter purse_norway3
declare_counter purse_norway4
declare_counter purse_norway5
declare_counter purse_norway6
declare_counter purse_jerusalem1
declare_counter purse_jerusalem2
declare_counter purse_jerusalem3
declare_counter purse_jerusalem4
declare_counter purse_jerusalem5
declare_counter purse_jerusalem6
declare_counter purse_kwarezm1
declare_counter purse_kwarezm2
declare_counter purse_kwarezm3
declare_counter purse_kwarezm4
declare_counter purse_kwarezm5
declare_counter purse_kwarezm6

monitor_event BattleConflictPhaseCommenced FactionIsLocal

 	if I_BattleEnemyArmyNumberOfUnits < 9
	and I_BattleEnemyArmyNumberOfUnits > 2
	set_counter small_army 1
	end_if
	
	if I_BattleEnemyArmyNumberOfUnits > 8
	and I_BattleEnemyArmyNumberOfUnits < 15
	set_counter medium_army 1
	end_if
	
	if I_BattleEnemyArmyNumberOfUnits > 14
	set_counter large_army 1
	end_if
	
	if I_BattlePlayerArmyNumberOfUnits < 8
	set_counter small_armypl 1
	end_if
	
	if I_BattlePlayerArmyNumberOfUnits > 7
	and I_BattlePlayerArmyNumberOfUnits < 15
	set_counter medium_armypl 1
	end_if
	
	if I_BattlePlayerArmyNumberOfUnits > 14
	set_counter large_armypl 1
	end_if
end_monitor

monitor_event PostBattle FactionType venice
	and WonBattle
	and BattleSuccess < crushing

	if I_LocalFaction venice
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money venice 100
	historic_event sack_ai
	end_if

	if I_LocalFaction venice
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money venice 250
	historic_event sack_ai
	end_if
	
	if I_LocalFaction venice
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money venice 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction venice
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money venice 600
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled venice
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money venice 400
	end_if

	if I_IsFactionAIControlled venice
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse venice 900
	inc_counter purse_venice1 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled venice
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse venice 1100
	inc_counter purse_venice2 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled venice
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse venice 1300
	inc_counter purse_venice3 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled venice
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money venice 300
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor	

monitor_event PostBattle FactionType venice
	and WonBattle
	and BattleSuccess = crushing

	if I_LocalFaction venice
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money venice 200
	historic_event sack_ai
	end_if

	if I_LocalFaction venice
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money venice 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction venice
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money venice 600
	historic_event sack_ai
	end_if
	
	if I_LocalFaction venice
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money venice 800
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled venice
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money venice 600
	end_if

	if I_IsFactionAIControlled venice
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse venice 1800
	inc_counter purse_venice4 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled venice
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse venice 2200
	inc_counter purse_venice5 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled venice
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse venice 2600
	inc_counter purse_venice6 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled venice
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money venice 450
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor


monitor_event PostBattle FactionType sicily
	and WonBattle
	and BattleSuccess < crushing

	if I_LocalFaction sicily
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money sicily 100
	historic_event sack_ai
	end_if

	if I_LocalFaction sicily
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money sicily 250
	historic_event sack_ai
	end_if
	
	if I_LocalFaction sicily
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money sicily 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction sicily
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money sicily 600
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled sicily
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money sicily 400
	end_if

	if I_IsFactionAIControlled sicily
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse sicily 900
	inc_counter purse_sicily1 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled sicily
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse sicily 1100
	inc_counter purse_sicily2 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled sicily
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse sicily 1300
	inc_counter purse_sicily3 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled sicily
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money sicily 300
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor	

monitor_event PostBattle FactionType sicily
	and WonBattle
	and BattleSuccess = crushing

	if I_LocalFaction sicily
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money sicily 200
	historic_event sack_ai
	end_if

	if I_LocalFaction sicily
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money sicily 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction sicily
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money sicily 600
	historic_event sack_ai
	end_if
	
	if I_LocalFaction sicily
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money sicily 800
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled sicily
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money sicily 600
	end_if

	if I_IsFactionAIControlled sicily
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse sicily 1800
	inc_counter purse_sicily4 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled sicily
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse sicily 2200
	inc_counter purse_sicily5 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled sicily
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse sicily 2600
	inc_counter purse_sicily6 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled sicily
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money sicily 450
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor


monitor_event PostBattle FactionType milan
	and WonBattle
	and BattleSuccess < crushing

	if I_LocalFaction milan
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money milan 100
	historic_event sack_ai
	end_if

	if I_LocalFaction milan
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money milan 250
	historic_event sack_ai
	end_if
	
	if I_LocalFaction milan
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money milan 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction milan
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money milan 600
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled milan
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money milan 400
	end_if

	if I_IsFactionAIControlled milan
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse milan 900
	inc_counter purse_milan1 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled milan
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse milan 1100
	inc_counter purse_milan2 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled milan
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse milan 1300
	inc_counter purse_milan3 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled milan
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money milan 300
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor	

monitor_event PostBattle FactionType milan
	and WonBattle
	and BattleSuccess = crushing

	if I_LocalFaction milan
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money milan 200
	historic_event sack_ai
	end_if

	if I_LocalFaction milan
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money milan 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction milan
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money milan 600
	historic_event sack_ai
	end_if
	
	if I_LocalFaction milan
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money milan 800
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled milan
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money milan 600
	end_if

	if I_IsFactionAIControlled milan
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse milan 1800
	inc_counter purse_milan4 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled milan
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse milan 2200
	inc_counter purse_milan5 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled milan
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse milan 2600
	inc_counter purse_milan6 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled milan
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money milan 450
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor


monitor_event PostBattle FactionType papal_states
	and WonBattle
	and BattleSuccess < crushing

	if I_LocalFaction papal_states
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money papal_states 100
	historic_event sack_ai
	end_if

	if I_LocalFaction papal_states
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money papal_states 250
	historic_event sack_ai
	end_if
	
	if I_LocalFaction papal_states
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money papal_states 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction papal_states
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money papal_states 600
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled papal_states
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money papal_states 400
	end_if

	if I_IsFactionAIControlled papal_states
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse papal_states 900
	inc_counter purse_papal_states1 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled papal_states
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse papal_states 1100
	inc_counter purse_papal_states2 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled papal_states
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse papal_states 1300
	inc_counter purse_papal_states3 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled papal_states
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money papal_states 300
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor	

monitor_event PostBattle FactionType papal_states
	and WonBattle
	and BattleSuccess = crushing

	if I_LocalFaction papal_states
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money papal_states 200
	historic_event sack_ai
	end_if

	if I_LocalFaction papal_states
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money papal_states 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction papal_states
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money papal_states 600
	historic_event sack_ai
	end_if
	
	if I_LocalFaction papal_states
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money papal_states 800
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled papal_states
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money papal_states 600
	end_if

	if I_IsFactionAIControlled papal_states
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse papal_states 1800
	inc_counter purse_papal_states4 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled papal_states
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse papal_states 2200
	inc_counter purse_papal_states5 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled papal_states
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse papal_states 2600
	inc_counter purse_papal_states6 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled papal_states
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money papal_states 450
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor


monitor_event PostBattle FactionType denmark
	and WonBattle
	and BattleSuccess < crushing

	if I_LocalFaction denmark
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money denmark 100
	historic_event sack_ai
	end_if

	if I_LocalFaction denmark
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money denmark 250
	historic_event sack_ai
	end_if
	
	if I_LocalFaction denmark
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money denmark 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction denmark
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money denmark 600
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled denmark
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money denmark 400
	end_if

	if I_IsFactionAIControlled denmark
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse denmark 900
	inc_counter purse_denmark1 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled denmark
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse denmark 1100
	inc_counter purse_denmark2 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled denmark
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse denmark 1300
	inc_counter purse_denmark3 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled denmark
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money denmark 300
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor	

monitor_event PostBattle FactionType denmark
	and WonBattle
	and BattleSuccess = crushing

	if I_LocalFaction denmark
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money denmark 200
	historic_event sack_ai
	end_if

	if I_LocalFaction denmark
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money denmark 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction denmark
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money denmark 600
	historic_event sack_ai
	end_if
	
	if I_LocalFaction denmark
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money denmark 800
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled denmark
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money denmark 600
	end_if

	if I_IsFactionAIControlled denmark
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse denmark 1800
	inc_counter purse_denmark4 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled denmark
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse denmark 2200
	inc_counter purse_denmark5 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled denmark
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse denmark 2600
	inc_counter purse_denmark6 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled denmark
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money denmark 450
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor


monitor_event PostBattle FactionType egypt
	and WonBattle
	and BattleSuccess < crushing

	if I_LocalFaction egypt
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money egypt 100
	historic_event sack_ai
	end_if

	if I_LocalFaction egypt
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money egypt 250
	historic_event sack_ai
	end_if
	
	if I_LocalFaction egypt
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money egypt 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction egypt
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money egypt 600
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled egypt
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money egypt 400
	end_if

	if I_IsFactionAIControlled egypt
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse egypt 900
	inc_counter purse_egypt1 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled egypt
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse egypt 1100
	inc_counter purse_egypt2 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled egypt
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse egypt 1300
	inc_counter purse_egypt3 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled egypt
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money egypt 300
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor	

monitor_event PostBattle FactionType egypt
	and WonBattle
	and BattleSuccess = crushing

	if I_LocalFaction egypt
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money egypt 200
	historic_event sack_ai
	end_if

	if I_LocalFaction egypt
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money egypt 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction egypt
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money egypt 600
	historic_event sack_ai
	end_if
	
	if I_LocalFaction egypt
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money egypt 800
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled egypt
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money egypt 600
	end_if

	if I_IsFactionAIControlled egypt
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse egypt 1800
	inc_counter purse_egypt4 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled egypt
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse egypt 2200
	inc_counter purse_egypt5 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled egypt
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse egypt 2600
	inc_counter purse_egypt6 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled egypt
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money egypt 450
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor


monitor_event PostBattle FactionType scotland
	and WonBattle
	and BattleSuccess < crushing

	if I_LocalFaction scotland
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money scotland 100
	historic_event sack_ai
	end_if

	if I_LocalFaction scotland
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money scotland 250
	historic_event sack_ai
	end_if
	
	if I_LocalFaction scotland
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money scotland 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction scotland
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money scotland 600
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled scotland
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money scotland 400
	end_if

	if I_IsFactionAIControlled scotland
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse scotland 900
	inc_counter purse_scotland1 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled scotland
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse scotland 1100
	inc_counter purse_scotland2 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled scotland
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse scotland 1300
	inc_counter purse_scotland3 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled scotland
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money scotland 300
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor	

monitor_event PostBattle FactionType scotland
	and WonBattle
	and BattleSuccess = crushing

	if I_LocalFaction scotland
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money scotland 200
	historic_event sack_ai
	end_if

	if I_LocalFaction scotland
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money scotland 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction scotland
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money scotland 600
	historic_event sack_ai
	end_if
	
	if I_LocalFaction scotland
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money scotland 800
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled scotland
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money scotland 600
	end_if

	if I_IsFactionAIControlled scotland
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse scotland 1800
	inc_counter purse_scotland4 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled scotland
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse scotland 2200
	inc_counter purse_scotland5 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled scotland
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse scotland 2600
	inc_counter purse_scotland6 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled scotland
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money scotland 450
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor


monitor_event PostBattle FactionType cumans
	and WonBattle
	and BattleSuccess < crushing

	if I_LocalFaction cumans
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money cumans 100
	historic_event sack_ai
	end_if

	if I_LocalFaction cumans
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money cumans 250
	historic_event sack_ai
	end_if
	
	if I_LocalFaction cumans
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money cumans 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction cumans
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money cumans 600
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled cumans
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money cumans 400
	end_if

	if I_IsFactionAIControlled cumans
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse cumans 900
	inc_counter purse_cumans1 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled cumans
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse cumans 1100
	inc_counter purse_cumans2 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled cumans
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse cumans 1300
	inc_counter purse_cumans3 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled cumans
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money cumans 300
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor	

monitor_event PostBattle FactionType cumans
	and WonBattle
	and BattleSuccess = crushing

	if I_LocalFaction cumans
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money cumans 200
	historic_event sack_ai
	end_if

	if I_LocalFaction cumans
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money cumans 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction cumans
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money cumans 600
	historic_event sack_ai
	end_if
	
	if I_LocalFaction cumans
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money cumans 800
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled cumans
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money cumans 600
	end_if

	if I_IsFactionAIControlled cumans
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse cumans 1800
	inc_counter purse_cumans4 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled cumans
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse cumans 2200
	inc_counter purse_cumans5 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled cumans
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse cumans 2600
	inc_counter purse_cumans6 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled cumans
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money cumans 450
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor


monitor_event PostBattle FactionType mongols
	and WonBattle
	and BattleSuccess < crushing

	if I_LocalFaction mongols
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money mongols 100
	historic_event sack_ai
	end_if

	if I_LocalFaction mongols
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money mongols 250
	historic_event sack_ai
	end_if
	
	if I_LocalFaction mongols
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money mongols 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction mongols
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money mongols 600
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled mongols
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money mongols 400
	end_if

	if I_IsFactionAIControlled mongols
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse mongols 900
	inc_counter purse_mongols1 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled mongols
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse mongols 1100
	inc_counter purse_mongols2 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled mongols
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse mongols 1300
	inc_counter purse_mongols3 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled mongols
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money mongols 300
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor	

monitor_event PostBattle FactionType mongols
	and WonBattle
	and BattleSuccess = crushing

	if I_LocalFaction mongols
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money mongols 200
	historic_event sack_ai
	end_if

	if I_LocalFaction mongols
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money mongols 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction mongols
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money mongols 600
	historic_event sack_ai
	end_if
	
	if I_LocalFaction mongols
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money mongols 800
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled mongols
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money mongols 600
	end_if

	if I_IsFactionAIControlled mongols
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse mongols 1800
	inc_counter purse_mongols4 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled mongols
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse mongols 2200
	inc_counter purse_mongols5 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled mongols
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse mongols 2600
	inc_counter purse_mongols6 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled mongols
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money mongols 450
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor


monitor_event PostBattle FactionType turks
	and WonBattle
	and BattleSuccess < crushing

	if I_LocalFaction turks
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money turks 100
	historic_event sack_ai
	end_if

	if I_LocalFaction turks
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money turks 250
	historic_event sack_ai
	end_if
	
	if I_LocalFaction turks
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money turks 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction turks
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money turks 600
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled turks
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money turks 400
	end_if

	if I_IsFactionAIControlled turks
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse turks 900
	inc_counter purse_turks1 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled turks
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse turks 1100
	inc_counter purse_turks2 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled turks
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse turks 1300
	inc_counter purse_turks3 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled turks
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money turks 300
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor	

monitor_event PostBattle FactionType turks
	and WonBattle
	and BattleSuccess = crushing

	if I_LocalFaction turks
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money turks 200
	historic_event sack_ai
	end_if

	if I_LocalFaction turks
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money turks 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction turks
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money turks 600
	historic_event sack_ai
	end_if
	
	if I_LocalFaction turks
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money turks 800
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled turks
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money turks 600
	end_if

	if I_IsFactionAIControlled turks
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse turks 1800
	inc_counter purse_turks4 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled turks
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse turks 2200
	inc_counter purse_turks5 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled turks
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse turks 2600
	inc_counter purse_turks6 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled turks
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money turks 450
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor


monitor_event PostBattle FactionType france
	and WonBattle
	and BattleSuccess < crushing

	if I_LocalFaction france
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money france 100
	historic_event sack_ai
	end_if

	if I_LocalFaction france
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money france 250
	historic_event sack_ai
	end_if
	
	if I_LocalFaction france
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money france 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction france
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money france 600
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled france
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money france 400
	end_if

	if I_IsFactionAIControlled france
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse france 900
	inc_counter purse_france1 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled france
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse france 1100
	inc_counter purse_france2 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled france
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse france 1300
	inc_counter purse_france3 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled france
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money france 300
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor	

monitor_event PostBattle FactionType france
	and WonBattle
	and BattleSuccess = crushing

	if I_LocalFaction france
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money france 200
	historic_event sack_ai
	end_if

	if I_LocalFaction france
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money france 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction france
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money france 600
	historic_event sack_ai
	end_if
	
	if I_LocalFaction france
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money france 800
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled france
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money france 600
	end_if

	if I_IsFactionAIControlled france
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse france 1800
	inc_counter purse_france4 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled france
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse france 2200
	inc_counter purse_france5 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled france
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse france 2600
	inc_counter purse_france6 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled france
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money france 450
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor


monitor_event PostBattle FactionType hre
	and WonBattle
	and BattleSuccess < crushing

	if I_LocalFaction hre
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money hre 100
	historic_event sack_ai
	end_if

	if I_LocalFaction hre
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money hre 250
	historic_event sack_ai
	end_if
	
	if I_LocalFaction hre
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money hre 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction hre
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money hre 600
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled hre
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money hre 400
	end_if

	if I_IsFactionAIControlled hre
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse hre 900
	inc_counter purse_hre1 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled hre
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse hre 1100
	inc_counter purse_hre2 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled hre
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse hre 1300
	inc_counter purse_hre3 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled hre
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money hre 300
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor	

monitor_event PostBattle FactionType hre
	and WonBattle
	and BattleSuccess = crushing

	if I_LocalFaction hre
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money hre 200
	historic_event sack_ai
	end_if

	if I_LocalFaction hre
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money hre 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction hre
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money hre 600
	historic_event sack_ai
	end_if
	
	if I_LocalFaction hre
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money hre 800
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled hre
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money hre 600
	end_if

	if I_IsFactionAIControlled hre
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse hre 1800
	inc_counter purse_hre4 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled hre
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse hre 2200
	inc_counter purse_hre5 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled hre
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse hre 2600
	inc_counter purse_hre6 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled hre
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money hre 450
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor


monitor_event PostBattle FactionType england
	and WonBattle
	and BattleSuccess < crushing

	if I_LocalFaction england
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money england 100
	historic_event sack_ai
	end_if

	if I_LocalFaction england
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money england 250
	historic_event sack_ai
	end_if
	
	if I_LocalFaction england
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money england 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction england
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money england 600
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled england
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money england 400
	end_if

	if I_IsFactionAIControlled england
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse england 900
	inc_counter purse_england1 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled england
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse england 1100
	inc_counter purse_england2 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled england
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse england 1300
	inc_counter purse_england3 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled england
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money england 300
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor	

monitor_event PostBattle FactionType england
	and WonBattle
	and BattleSuccess = crushing

	if I_LocalFaction england
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money england 200
	historic_event sack_ai
	end_if

	if I_LocalFaction england
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money england 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction england
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money england 600
	historic_event sack_ai
	end_if
	
	if I_LocalFaction england
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money england 800
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled england
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money england 600
	end_if

	if I_IsFactionAIControlled england
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse england 1800
	inc_counter purse_england4 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled england
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse england 2200
	inc_counter purse_england5 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled england
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse england 2600
	inc_counter purse_england6 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled england
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money england 450
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor


monitor_event PostBattle FactionType portugal
	and WonBattle
	and BattleSuccess < crushing

	if I_LocalFaction portugal
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money portugal 100
	historic_event sack_ai
	end_if

	if I_LocalFaction portugal
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money portugal 250
	historic_event sack_ai
	end_if
	
	if I_LocalFaction portugal
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money portugal 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction portugal
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money portugal 600
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled portugal
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money portugal 400
	end_if

	if I_IsFactionAIControlled portugal
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse portugal 900
	inc_counter purse_portugal1 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled portugal
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse portugal 1100
	inc_counter purse_portugal2 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled portugal
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse portugal 1300
	inc_counter purse_portugal3 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled portugal
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money portugal 300
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor	

monitor_event PostBattle FactionType portugal
	and WonBattle
	and BattleSuccess = crushing

	if I_LocalFaction portugal
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money portugal 200
	historic_event sack_ai
	end_if

	if I_LocalFaction portugal
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money portugal 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction portugal
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money portugal 600
	historic_event sack_ai
	end_if
	
	if I_LocalFaction portugal
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money portugal 800
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled portugal
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money portugal 600
	end_if

	if I_IsFactionAIControlled portugal
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse portugal 1800
	inc_counter purse_portugal4 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled portugal
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse portugal 2200
	inc_counter purse_portugal5 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled portugal
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse portugal 2600
	inc_counter purse_portugal6 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled portugal
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money portugal 450
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor


monitor_event PostBattle FactionType poland
	and WonBattle
	and BattleSuccess < crushing

	if I_LocalFaction poland
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money poland 100
	historic_event sack_ai
	end_if

	if I_LocalFaction poland
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money poland 250
	historic_event sack_ai
	end_if
	
	if I_LocalFaction poland
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money poland 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction poland
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money poland 600
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled poland
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money poland 400
	end_if

	if I_IsFactionAIControlled poland
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse poland 900
	inc_counter purse_poland1 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled poland
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse poland 1100
	inc_counter purse_poland2 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled poland
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse poland 1300
	inc_counter purse_poland3 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled poland
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money poland 300
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor	

monitor_event PostBattle FactionType poland
	and WonBattle
	and BattleSuccess = crushing

	if I_LocalFaction poland
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money poland 200
	historic_event sack_ai
	end_if

	if I_LocalFaction poland
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money poland 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction poland
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money poland 600
	historic_event sack_ai
	end_if
	
	if I_LocalFaction poland
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money poland 800
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled poland
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money poland 600
	end_if

	if I_IsFactionAIControlled poland
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse poland 1800
	inc_counter purse_poland4 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled poland
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse poland 2200
	inc_counter purse_poland5 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled poland
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse poland 2600
	inc_counter purse_poland6 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled poland
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money poland 450
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor


monitor_event PostBattle FactionType byzantium
	and WonBattle
	and BattleSuccess < crushing

	if I_LocalFaction byzantium
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money byzantium 100
	historic_event sack_ai
	end_if

	if I_LocalFaction byzantium
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money byzantium 250
	historic_event sack_ai
	end_if
	
	if I_LocalFaction byzantium
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money byzantium 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction byzantium
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money byzantium 600
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled byzantium
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money byzantium 400
	end_if

	if I_IsFactionAIControlled byzantium
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse byzantium 900
	inc_counter purse_byzantium1 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled byzantium
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse byzantium 1100
	inc_counter purse_byzantium2 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled byzantium
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse byzantium 1300
	inc_counter purse_byzantium3 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled byzantium
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money byzantium 300
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor	

monitor_event PostBattle FactionType byzantium
	and WonBattle
	and BattleSuccess = crushing

	if I_LocalFaction byzantium
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money byzantium 200
	historic_event sack_ai
	end_if

	if I_LocalFaction byzantium
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money byzantium 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction byzantium
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money byzantium 600
	historic_event sack_ai
	end_if
	
	if I_LocalFaction byzantium
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money byzantium 800
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled byzantium
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money byzantium 600
	end_if

	if I_IsFactionAIControlled byzantium
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse byzantium 1800
	inc_counter purse_byzantium4 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled byzantium
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse byzantium 2200
	inc_counter purse_byzantium5 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled byzantium
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse byzantium 2600
	inc_counter purse_byzantium6 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled byzantium
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money byzantium 450
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor


monitor_event PostBattle FactionType moors
	and WonBattle
	and BattleSuccess < crushing

	if I_LocalFaction moors
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money moors 100
	historic_event sack_ai
	end_if

	if I_LocalFaction moors
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money moors 250
	historic_event sack_ai
	end_if
	
	if I_LocalFaction moors
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money moors 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction moors
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money moors 600
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled moors
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money moors 400
	end_if

	if I_IsFactionAIControlled moors
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse moors 900
	inc_counter purse_moors1 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled moors
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse moors 1100
	inc_counter purse_moors2 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled moors
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse moors 1300
	inc_counter purse_moors3 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled moors
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money moors 300
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor	

monitor_event PostBattle FactionType moors
	and WonBattle
	and BattleSuccess = crushing

	if I_LocalFaction moors
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money moors 200
	historic_event sack_ai
	end_if

	if I_LocalFaction moors
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money moors 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction moors
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money moors 600
	historic_event sack_ai
	end_if
	
	if I_LocalFaction moors
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money moors 800
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled moors
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money moors 600
	end_if

	if I_IsFactionAIControlled moors
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse moors 1800
	inc_counter purse_moors4 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled moors
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse moors 2200
	inc_counter purse_moors5 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled moors
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse moors 2600
	inc_counter purse_moors6 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled moors
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money moors 450
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor


monitor_event PostBattle FactionType russia
	and WonBattle
	and BattleSuccess < crushing

	if I_LocalFaction russia
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money russia 100
	historic_event sack_ai
	end_if

	if I_LocalFaction russia
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money russia 250
	historic_event sack_ai
	end_if
	
	if I_LocalFaction russia
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money russia 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction russia
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money russia 600
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled russia
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money russia 400
	end_if

	if I_IsFactionAIControlled russia
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse russia 900
	inc_counter purse_russia1 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled russia
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse russia 1100
	inc_counter purse_russia2 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled russia
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse russia 1300
	inc_counter purse_russia3 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled russia
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money russia 300
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor	

monitor_event PostBattle FactionType russia
	and WonBattle
	and BattleSuccess = crushing

	if I_LocalFaction russia
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money russia 200
	historic_event sack_ai
	end_if

	if I_LocalFaction russia
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money russia 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction russia
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money russia 600
	historic_event sack_ai
	end_if
	
	if I_LocalFaction russia
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money russia 800
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled russia
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money russia 600
	end_if

	if I_IsFactionAIControlled russia
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse russia 1800
	inc_counter purse_russia4 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled russia
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse russia 2200
	inc_counter purse_russia5 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled russia
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse russia 2600
	inc_counter purse_russia6 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled russia
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money russia 450
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor


monitor_event PostBattle FactionType spain
	and WonBattle
	and BattleSuccess < crushing

	if I_LocalFaction spain
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money spain 100
	historic_event sack_ai
	end_if

	if I_LocalFaction spain
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money spain 250
	historic_event sack_ai
	end_if
	
	if I_LocalFaction spain
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money spain 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction spain
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money spain 600
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled spain
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money spain 400
	end_if

	if I_IsFactionAIControlled spain
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse spain 900
	inc_counter purse_spain1 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled spain
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse spain 1100
	inc_counter purse_spain2 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled spain
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse spain 1300
	inc_counter purse_spain3 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled spain
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money spain 300
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor	

monitor_event PostBattle FactionType spain
	and WonBattle
	and BattleSuccess = crushing

	if I_LocalFaction spain
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money spain 200
	historic_event sack_ai
	end_if

	if I_LocalFaction spain
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money spain 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction spain
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money spain 600
	historic_event sack_ai
	end_if
	
	if I_LocalFaction spain
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money spain 800
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled spain
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money spain 600
	end_if

	if I_IsFactionAIControlled spain
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse spain 1800
	inc_counter purse_spain4 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled spain
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse spain 2200
	inc_counter purse_spain5 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled spain
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse spain 2600
	inc_counter purse_spain6 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled spain
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money spain 450
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor


monitor_event PostBattle FactionType hungary
	and WonBattle
	and BattleSuccess < crushing

	if I_LocalFaction hungary
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money hungary 100
	historic_event sack_ai
	end_if

	if I_LocalFaction hungary
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money hungary 250
	historic_event sack_ai
	end_if
	
	if I_LocalFaction hungary
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money hungary 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction hungary
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money hungary 600
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled hungary
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money hungary 400
	end_if

	if I_IsFactionAIControlled hungary
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse hungary 900
	inc_counter purse_hungary1 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled hungary
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse hungary 1100
	inc_counter purse_hungary2 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled hungary
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse hungary 1300
	inc_counter purse_hungary3 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled hungary
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money hungary 300
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor	

monitor_event PostBattle FactionType hungary
	and WonBattle
	and BattleSuccess = crushing

	if I_LocalFaction hungary
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money hungary 200
	historic_event sack_ai
	end_if

	if I_LocalFaction hungary
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money hungary 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction hungary
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money hungary 600
	historic_event sack_ai
	end_if
	
	if I_LocalFaction hungary
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money hungary 800
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled hungary
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money hungary 600
	end_if

	if I_IsFactionAIControlled hungary
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse hungary 1800
	inc_counter purse_hungary4 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled hungary
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse hungary 2200
	inc_counter purse_hungary5 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled hungary
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse hungary 2600
	inc_counter purse_hungary6 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled hungary
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money hungary 450
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor


monitor_event PostBattle FactionType aragon
	and WonBattle
	and BattleSuccess < crushing

	if I_LocalFaction aragon
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money aragon 100
	historic_event sack_ai
	end_if

	if I_LocalFaction aragon
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money aragon 250
	historic_event sack_ai
	end_if
	
	if I_LocalFaction aragon
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money aragon 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction aragon
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money aragon 600
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled aragon
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money aragon 400
	end_if

	if I_IsFactionAIControlled aragon
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse aragon 900
	inc_counter purse_aragon1 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled aragon
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse aragon 1100
	inc_counter purse_aragon2 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled aragon
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse aragon 1300
	inc_counter purse_aragon3 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled aragon
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money aragon 300
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor	

monitor_event PostBattle FactionType aragon
	and WonBattle
	and BattleSuccess = crushing

	if I_LocalFaction aragon
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money aragon 200
	historic_event sack_ai
	end_if

	if I_LocalFaction aragon
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money aragon 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction aragon
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money aragon 600
	historic_event sack_ai
	end_if
	
	if I_LocalFaction aragon
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money aragon 800
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled aragon
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money aragon 600
	end_if

	if I_IsFactionAIControlled aragon
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse aragon 1800
	inc_counter purse_aragon4 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled aragon
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse aragon 2200
	inc_counter purse_aragon5 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled aragon
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse aragon 2600
	inc_counter purse_aragon6 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled aragon
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money aragon 450
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor


monitor_event PostBattle FactionType knights_templar
	and WonBattle
	and BattleSuccess < crushing

	if I_LocalFaction knights_templar
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money knights_templar 100
	historic_event sack_ai
	end_if

	if I_LocalFaction knights_templar
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money knights_templar 250
	historic_event sack_ai
	end_if
	
	if I_LocalFaction knights_templar
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money knights_templar 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction knights_templar
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money knights_templar 600
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled knights_templar
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money knights_templar 400
	end_if

	if I_IsFactionAIControlled knights_templar
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse knights_templar 900
	inc_counter purse_knights_templar1 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled knights_templar
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse knights_templar 1100
	inc_counter purse_knights_templar2 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled knights_templar
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse knights_templar 1300
	inc_counter purse_knights_templar3 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled knights_templar
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money knights_templar 300
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor	

monitor_event PostBattle FactionType knights_templar
	and WonBattle
	and BattleSuccess = crushing

	if I_LocalFaction knights_templar
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money knights_templar 200
	historic_event sack_ai
	end_if

	if I_LocalFaction knights_templar
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money knights_templar 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction knights_templar
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money knights_templar 600
	historic_event sack_ai
	end_if
	
	if I_LocalFaction knights_templar
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money knights_templar 800
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled knights_templar
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money knights_templar 600
	end_if

	if I_IsFactionAIControlled knights_templar
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse knights_templar 1800
	inc_counter purse_knights_templar4 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled knights_templar
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse knights_templar 2200
	inc_counter purse_knights_templar5 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled knights_templar
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse knights_templar 2600
	inc_counter purse_knights_templar6 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled knights_templar
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money knights_templar 450
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor


monitor_event PostBattle FactionType lithuania
	and WonBattle
	and BattleSuccess < crushing

	if I_LocalFaction lithuania
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money lithuania 100
	historic_event sack_ai
	end_if

	if I_LocalFaction lithuania
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money lithuania 250
	historic_event sack_ai
	end_if
	
	if I_LocalFaction lithuania
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money lithuania 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction lithuania
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money lithuania 600
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled lithuania
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money lithuania 400
	end_if

	if I_IsFactionAIControlled lithuania
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse lithuania 900
	inc_counter purse_lithuania1 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled lithuania
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse lithuania 1100
	inc_counter purse_lithuania2 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled lithuania
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse lithuania 1300
	inc_counter purse_lithuania3 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled lithuania
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money lithuania 300
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor	

monitor_event PostBattle FactionType lithuania
	and WonBattle
	and BattleSuccess = crushing

	if I_LocalFaction lithuania
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money lithuania 200
	historic_event sack_ai
	end_if

	if I_LocalFaction lithuania
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money lithuania 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction lithuania
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money lithuania 600
	historic_event sack_ai
	end_if
	
	if I_LocalFaction lithuania
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money lithuania 800
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled lithuania
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money lithuania 600
	end_if

	if I_IsFactionAIControlled lithuania
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse lithuania 1800
	inc_counter purse_lithuania4 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled lithuania
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse lithuania 2200
	inc_counter purse_lithuania5 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled lithuania
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse lithuania 2600
	inc_counter purse_lithuania6 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled lithuania
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money lithuania 450
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor


monitor_event PostBattle FactionType kievan_rus
	and WonBattle
	and BattleSuccess < crushing

	if I_LocalFaction kievan_rus
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money kievan_rus 100
	historic_event sack_ai
	end_if

	if I_LocalFaction kievan_rus
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money kievan_rus 250
	historic_event sack_ai
	end_if
	
	if I_LocalFaction kievan_rus
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money kievan_rus 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction kievan_rus
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money kievan_rus 600
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled kievan_rus
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money kievan_rus 400
	end_if

	if I_IsFactionAIControlled kievan_rus
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse kievan_rus 900
	inc_counter purse_kievan_rus1 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled kievan_rus
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse kievan_rus 1100
	inc_counter purse_kievan_rus2 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled kievan_rus
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse kievan_rus 1300
	inc_counter purse_kievan_rus3 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled kievan_rus
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money kievan_rus 300
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor	

monitor_event PostBattle FactionType kievan_rus
	and WonBattle
	and BattleSuccess = crushing

	if I_LocalFaction kievan_rus
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money kievan_rus 200
	historic_event sack_ai
	end_if

	if I_LocalFaction kievan_rus
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money kievan_rus 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction kievan_rus
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money kievan_rus 600
	historic_event sack_ai
	end_if
	
	if I_LocalFaction kievan_rus
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money kievan_rus 800
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled kievan_rus
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money kievan_rus 600
	end_if

	if I_IsFactionAIControlled kievan_rus
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse kievan_rus 1800
	inc_counter purse_kievan_rus4 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled kievan_rus
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse kievan_rus 2200
	inc_counter purse_kievan_rus5 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled kievan_rus
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse kievan_rus 2600
	inc_counter purse_kievan_rus6 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled kievan_rus
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money kievan_rus 450
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor


monitor_event PostBattle FactionType teutonic_order
	and WonBattle
	and BattleSuccess < crushing

	if I_LocalFaction teutonic_order
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money teutonic_order 100
	historic_event sack_ai
	end_if

	if I_LocalFaction teutonic_order
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money teutonic_order 250
	historic_event sack_ai
	end_if
	
	if I_LocalFaction teutonic_order
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money teutonic_order 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction teutonic_order
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money teutonic_order 600
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled teutonic_order
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money teutonic_order 400
	end_if

	if I_IsFactionAIControlled teutonic_order
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse teutonic_order 900
	inc_counter purse_teutonic_order1 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled teutonic_order
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse teutonic_order 1100
	inc_counter purse_teutonic_order2 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled teutonic_order
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse teutonic_order 1300
	inc_counter purse_teutonic_order3 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled teutonic_order
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money teutonic_order 300
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor	

monitor_event PostBattle FactionType teutonic_order
	and WonBattle
	and BattleSuccess = crushing

	if I_LocalFaction teutonic_order
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money teutonic_order 200
	historic_event sack_ai
	end_if

	if I_LocalFaction teutonic_order
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money teutonic_order 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction teutonic_order
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money teutonic_order 600
	historic_event sack_ai
	end_if
	
	if I_LocalFaction teutonic_order
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money teutonic_order 800
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled teutonic_order
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money teutonic_order 600
	end_if

	if I_IsFactionAIControlled teutonic_order
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse teutonic_order 1800
	inc_counter purse_teutonic_order4 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled teutonic_order
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse teutonic_order 2200
	inc_counter purse_teutonic_order5 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled teutonic_order
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse teutonic_order 2600
	inc_counter purse_teutonic_order6 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled teutonic_order
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money teutonic_order 450
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor


monitor_event PostBattle FactionType timurids
	and WonBattle
	and BattleSuccess < crushing

	if I_LocalFaction timurids
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money timurids 100
	historic_event sack_ai
	end_if

	if I_LocalFaction timurids
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money timurids 250
	historic_event sack_ai
	end_if
	
	if I_LocalFaction timurids
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money timurids 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction timurids
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money timurids 600
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled timurids
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money timurids 400
	end_if

	if I_IsFactionAIControlled timurids
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse timurids 900
	inc_counter purse_timurids1 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled timurids
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse timurids 1100
	inc_counter purse_timurids2 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled timurids
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse timurids 1300
	inc_counter purse_timurids3 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled timurids
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money timurids 300
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor	

monitor_event PostBattle FactionType timurids
	and WonBattle
	and BattleSuccess = crushing

	if I_LocalFaction timurids
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money timurids 200
	historic_event sack_ai
	end_if

	if I_LocalFaction timurids
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money timurids 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction timurids
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money timurids 600
	historic_event sack_ai
	end_if
	
	if I_LocalFaction timurids
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money timurids 800
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled timurids
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money timurids 600
	end_if

	if I_IsFactionAIControlled timurids
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse timurids 1800
	inc_counter purse_timurids4 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled timurids
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse timurids 2200
	inc_counter purse_timurids5 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled timurids
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse timurids 2600
	inc_counter purse_timurids6 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled timurids
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money timurids 450
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor


monitor_event PostBattle FactionType norway
	and WonBattle
	and BattleSuccess < crushing

	if I_LocalFaction norway
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money norway 100
	historic_event sack_ai
	end_if

	if I_LocalFaction norway
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money norway 250
	historic_event sack_ai
	end_if
	
	if I_LocalFaction norway
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money norway 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction norway
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money norway 600
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled norway
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money norway 400
	end_if

	if I_IsFactionAIControlled norway
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse norway 900
	inc_counter purse_norway1 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled norway
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse norway 1100
	inc_counter purse_norway2 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled norway
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse norway 1300
	inc_counter purse_norway3 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled norway
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money norway 300
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor	

monitor_event PostBattle FactionType norway
	and WonBattle
	and BattleSuccess = crushing

	if I_LocalFaction norway
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money norway 200
	historic_event sack_ai
	end_if

	if I_LocalFaction norway
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money norway 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction norway
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money norway 600
	historic_event sack_ai
	end_if
	
	if I_LocalFaction norway
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money norway 800
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled norway
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money norway 600
	end_if

	if I_IsFactionAIControlled norway
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse norway 1800
	inc_counter purse_norway4 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled norway
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse norway 2200
	inc_counter purse_norway5 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled norway
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse norway 2600
	inc_counter purse_norway6 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled norway
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money norway 450
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor


monitor_event PostBattle FactionType jerusalem
	and WonBattle
	and BattleSuccess < crushing

	if I_LocalFaction jerusalem
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money jerusalem 100
	historic_event sack_ai
	end_if

	if I_LocalFaction jerusalem
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money jerusalem 250
	historic_event sack_ai
	end_if
	
	if I_LocalFaction jerusalem
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money jerusalem 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction jerusalem
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money jerusalem 600
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled jerusalem
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money jerusalem 400
	end_if

	if I_IsFactionAIControlled jerusalem
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse jerusalem 900
	inc_counter purse_jerusalem1 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled jerusalem
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse jerusalem 1100
	inc_counter purse_jerusalem2 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled jerusalem
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse jerusalem 1300
	inc_counter purse_jerusalem3 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled jerusalem
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money jerusalem 300
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor	

monitor_event PostBattle FactionType jerusalem
	and WonBattle
	and BattleSuccess = crushing

	if I_LocalFaction jerusalem
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money jerusalem 200
	historic_event sack_ai
	end_if

	if I_LocalFaction jerusalem
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money jerusalem 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction jerusalem
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money jerusalem 600
	historic_event sack_ai
	end_if
	
	if I_LocalFaction jerusalem
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money jerusalem 800
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled jerusalem
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money jerusalem 600
	end_if

	if I_IsFactionAIControlled jerusalem
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse jerusalem 1800
	inc_counter purse_jerusalem4 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled jerusalem
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse jerusalem 2200
	inc_counter purse_jerusalem5 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled jerusalem
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse jerusalem 2600
	inc_counter purse_jerusalem6 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled jerusalem
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money jerusalem 450
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor


monitor_event PostBattle FactionType kwarezm
	and WonBattle
	and BattleSuccess < crushing

	if I_LocalFaction kwarezm
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money kwarezm 100
	historic_event sack_ai
	end_if

	if I_LocalFaction kwarezm
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money kwarezm 250
	historic_event sack_ai
	end_if
	
	if I_LocalFaction kwarezm
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money kwarezm 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction kwarezm
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money kwarezm 600
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled kwarezm
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money kwarezm 400
	end_if

	if I_IsFactionAIControlled kwarezm
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse kwarezm 900
	inc_counter purse_kwarezm1 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled kwarezm
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse kwarezm 1100
	inc_counter purse_kwarezm2 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled kwarezm
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse kwarezm 1300
	inc_counter purse_kwarezm3 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled kwarezm
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money kwarezm 300
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor	

monitor_event PostBattle FactionType kwarezm
	and WonBattle
	and BattleSuccess = crushing

	if I_LocalFaction kwarezm
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 0
	and I_CompareCounter medium_army = 0
	and I_CompareCounter large_army = 0
	and RandomPercent > 25 
	add_money kwarezm 200
	historic_event sack_ai
	end_if

	if I_LocalFaction kwarezm
	and ! I_ConflictType Naval
	and I_CompareCounter small_army = 1
	and RandomPercent > 25 
	add_money kwarezm 400
	historic_event sack_ai
	end_if
	
	if I_LocalFaction kwarezm
	and ! I_ConflictType Naval
	and I_CompareCounter medium_army = 1
	and RandomPercent > 25 
	add_money kwarezm 600
	historic_event sack_ai
	end_if
	
	if I_LocalFaction kwarezm
	and ! I_ConflictType Naval
	and I_CompareCounter large_army = 1
	and RandomPercent > 25 
	add_money kwarezm 800
	historic_event sack_ai
	end_if

	if I_IsFactionAIControlled kwarezm
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 0
	and I_CompareCounter medium_armypl = 0
	and I_CompareCounter large_armypl = 0
	and RandomPercent > 15 
	add_money kwarezm 600
	end_if

	if I_IsFactionAIControlled kwarezm
	and ! I_ConflictType Naval
	and I_CompareCounter small_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse kwarezm 1800
	inc_counter purse_kwarezm4 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled kwarezm
	and ! I_ConflictType Naval
	and I_CompareCounter medium_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse kwarezm 2200
	inc_counter purse_kwarezm5 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled kwarezm
	and ! I_ConflictType Naval
	and I_CompareCounter large_armypl = 1
	and RandomPercent > 15 
	increment_kings_purse kwarezm 2600
	inc_counter purse_kwarezm6 1
	historic_event sack_player
	end_if
	
	if I_IsFactionAIControlled kwarezm
	and I_ConflictType Naval
	and RandomPercent > 15 
	add_money kwarezm 450
	end_if
	
	set_counter small_army 0
	set_counter medium_army 0
	set_counter large_army 0
	set_counter small_armypl 0
	set_counter medium_armypl 0
	set_counter large_armypl 0
end_monitor

monitor_event FactionTurnStart FactionType venice

	while I_CompareCounter purse_venice1 > 0
	increment_kings_purse venice -900
	inc_counter purse_venice1 -1
	end_while

	while I_CompareCounter purse_venice2 > 0
	increment_kings_purse venice -1100
	inc_counter purse_venice2 -1
	end_while

	while I_CompareCounter purse_venice3 > 0
	increment_kings_purse venice -1300
	inc_counter purse_venice3 -1
	end_while

	while I_CompareCounter purse_venice4 > 0
	increment_kings_purse venice -1800
	inc_counter purse_venice4 -1
	end_while

	while I_CompareCounter purse_venice5 > 0
	increment_kings_purse venice -2200
	inc_counter purse_venice5 -1
	end_while

	while I_CompareCounter purse_venice6 > 0
	increment_kings_purse venice -2600
	inc_counter purse_venice6 -1
	end_while
end_monitor


monitor_event FactionTurnStart FactionType sicily

	while I_CompareCounter purse_sicily1 > 0
	increment_kings_purse sicily -900
	inc_counter purse_sicily1 -1
	end_while

	while I_CompareCounter purse_sicily2 > 0
	increment_kings_purse sicily -1100
	inc_counter purse_sicily2 -1
	end_while

	while I_CompareCounter purse_sicily3 > 0
	increment_kings_purse sicily -1300
	inc_counter purse_sicily3 -1
	end_while

	while I_CompareCounter purse_sicily4 > 0
	increment_kings_purse sicily -1800
	inc_counter purse_sicily4 -1
	end_while

	while I_CompareCounter purse_sicily5 > 0
	increment_kings_purse sicily -2200
	inc_counter purse_sicily5 -1
	end_while

	while I_CompareCounter purse_sicily6 > 0
	increment_kings_purse sicily -2600
	inc_counter purse_sicily6 -1
	end_while
end_monitor


monitor_event FactionTurnStart FactionType milan

	while I_CompareCounter purse_milan1 > 0
	increment_kings_purse milan -900
	inc_counter purse_milan1 -1
	end_while

	while I_CompareCounter purse_milan2 > 0
	increment_kings_purse milan -1100
	inc_counter purse_milan2 -1
	end_while

	while I_CompareCounter purse_milan3 > 0
	increment_kings_purse milan -1300
	inc_counter purse_milan3 -1
	end_while

	while I_CompareCounter purse_milan4 > 0
	increment_kings_purse milan -1800
	inc_counter purse_milan4 -1
	end_while

	while I_CompareCounter purse_milan5 > 0
	increment_kings_purse milan -2200
	inc_counter purse_milan5 -1
	end_while

	while I_CompareCounter purse_milan6 > 0
	increment_kings_purse milan -2600
	inc_counter purse_milan6 -1
	end_while
end_monitor


monitor_event FactionTurnStart FactionType papal_states

	while I_CompareCounter purse_papal_states1 > 0
	increment_kings_purse papal_states -900
	inc_counter purse_papal_states1 -1
	end_while

	while I_CompareCounter purse_papal_states2 > 0
	increment_kings_purse papal_states -1100
	inc_counter purse_papal_states2 -1
	end_while

	while I_CompareCounter purse_papal_states3 > 0
	increment_kings_purse papal_states -1300
	inc_counter purse_papal_states3 -1
	end_while

	while I_CompareCounter purse_papal_states4 > 0
	increment_kings_purse papal_states -1800
	inc_counter purse_papal_states4 -1
	end_while

	while I_CompareCounter purse_papal_states5 > 0
	increment_kings_purse papal_states -2200
	inc_counter purse_papal_states5 -1
	end_while

	while I_CompareCounter purse_papal_states6 > 0
	increment_kings_purse papal_states -2600
	inc_counter purse_papal_states6 -1
	end_while
end_monitor


monitor_event FactionTurnStart FactionType denmark

	while I_CompareCounter purse_denmark1 > 0
	increment_kings_purse denmark -900
	inc_counter purse_denmark1 -1
	end_while

	while I_CompareCounter purse_denmark2 > 0
	increment_kings_purse denmark -1100
	inc_counter purse_denmark2 -1
	end_while

	while I_CompareCounter purse_denmark3 > 0
	increment_kings_purse denmark -1300
	inc_counter purse_denmark3 -1
	end_while

	while I_CompareCounter purse_denmark4 > 0
	increment_kings_purse denmark -1800
	inc_counter purse_denmark4 -1
	end_while

	while I_CompareCounter purse_denmark5 > 0
	increment_kings_purse denmark -2200
	inc_counter purse_denmark5 -1
	end_while

	while I_CompareCounter purse_denmark6 > 0
	increment_kings_purse denmark -2600
	inc_counter purse_denmark6 -1
	end_while
end_monitor


monitor_event FactionTurnStart FactionType egypt

	while I_CompareCounter purse_egypt1 > 0
	increment_kings_purse egypt -900
	inc_counter purse_egypt1 -1
	end_while

	while I_CompareCounter purse_egypt2 > 0
	increment_kings_purse egypt -1100
	inc_counter purse_egypt2 -1
	end_while

	while I_CompareCounter purse_egypt3 > 0
	increment_kings_purse egypt -1300
	inc_counter purse_egypt3 -1
	end_while

	while I_CompareCounter purse_egypt4 > 0
	increment_kings_purse egypt -1800
	inc_counter purse_egypt4 -1
	end_while

	while I_CompareCounter purse_egypt5 > 0
	increment_kings_purse egypt -2200
	inc_counter purse_egypt5 -1
	end_while

	while I_CompareCounter purse_egypt6 > 0
	increment_kings_purse egypt -2600
	inc_counter purse_egypt6 -1
	end_while
end_monitor


monitor_event FactionTurnStart FactionType scotland

	while I_CompareCounter purse_scotland1 > 0
	increment_kings_purse scotland -900
	inc_counter purse_scotland1 -1
	end_while

	while I_CompareCounter purse_scotland2 > 0
	increment_kings_purse scotland -1100
	inc_counter purse_scotland2 -1
	end_while

	while I_CompareCounter purse_scotland3 > 0
	increment_kings_purse scotland -1300
	inc_counter purse_scotland3 -1
	end_while

	while I_CompareCounter purse_scotland4 > 0
	increment_kings_purse scotland -1800
	inc_counter purse_scotland4 -1
	end_while

	while I_CompareCounter purse_scotland5 > 0
	increment_kings_purse scotland -2200
	inc_counter purse_scotland5 -1
	end_while

	while I_CompareCounter purse_scotland6 > 0
	increment_kings_purse scotland -2600
	inc_counter purse_scotland6 -1
	end_while
end_monitor


monitor_event FactionTurnStart FactionType cumans

	while I_CompareCounter purse_cumans1 > 0
	increment_kings_purse cumans -900
	inc_counter purse_cumans1 -1
	end_while

	while I_CompareCounter purse_cumans2 > 0
	increment_kings_purse cumans -1100
	inc_counter purse_cumans2 -1
	end_while

	while I_CompareCounter purse_cumans3 > 0
	increment_kings_purse cumans -1300
	inc_counter purse_cumans3 -1
	end_while

	while I_CompareCounter purse_cumans4 > 0
	increment_kings_purse cumans -1800
	inc_counter purse_cumans4 -1
	end_while

	while I_CompareCounter purse_cumans5 > 0
	increment_kings_purse cumans -2200
	inc_counter purse_cumans5 -1
	end_while

	while I_CompareCounter purse_cumans6 > 0
	increment_kings_purse cumans -2600
	inc_counter purse_cumans6 -1
	end_while
end_monitor


monitor_event FactionTurnStart FactionType mongols

	while I_CompareCounter purse_mongols1 > 0
	increment_kings_purse mongols -900
	inc_counter purse_mongols1 -1
	end_while

	while I_CompareCounter purse_mongols2 > 0
	increment_kings_purse mongols -1100
	inc_counter purse_mongols2 -1
	end_while

	while I_CompareCounter purse_mongols3 > 0
	increment_kings_purse mongols -1300
	inc_counter purse_mongols3 -1
	end_while

	while I_CompareCounter purse_mongols4 > 0
	increment_kings_purse mongols -1800
	inc_counter purse_mongols4 -1
	end_while

	while I_CompareCounter purse_mongols5 > 0
	increment_kings_purse mongols -2200
	inc_counter purse_mongols5 -1
	end_while

	while I_CompareCounter purse_mongols6 > 0
	increment_kings_purse mongols -2600
	inc_counter purse_mongols6 -1
	end_while
end_monitor


monitor_event FactionTurnStart FactionType turks

	while I_CompareCounter purse_turks1 > 0
	increment_kings_purse turks -900
	inc_counter purse_turks1 -1
	end_while

	while I_CompareCounter purse_turks2 > 0
	increment_kings_purse turks -1100
	inc_counter purse_turks2 -1
	end_while

	while I_CompareCounter purse_turks3 > 0
	increment_kings_purse turks -1300
	inc_counter purse_turks3 -1
	end_while

	while I_CompareCounter purse_turks4 > 0
	increment_kings_purse turks -1800
	inc_counter purse_turks4 -1
	end_while

	while I_CompareCounter purse_turks5 > 0
	increment_kings_purse turks -2200
	inc_counter purse_turks5 -1
	end_while

	while I_CompareCounter purse_turks6 > 0
	increment_kings_purse turks -2600
	inc_counter purse_turks6 -1
	end_while
end_monitor


monitor_event FactionTurnStart FactionType france

	while I_CompareCounter purse_france1 > 0
	increment_kings_purse france -900
	inc_counter purse_france1 -1
	end_while

	while I_CompareCounter purse_france2 > 0
	increment_kings_purse france -1100
	inc_counter purse_france2 -1
	end_while

	while I_CompareCounter purse_france3 > 0
	increment_kings_purse france -1300
	inc_counter purse_france3 -1
	end_while

	while I_CompareCounter purse_france4 > 0
	increment_kings_purse france -1800
	inc_counter purse_france4 -1
	end_while

	while I_CompareCounter purse_france5 > 0
	increment_kings_purse france -2200
	inc_counter purse_france5 -1
	end_while

	while I_CompareCounter purse_france6 > 0
	increment_kings_purse france -2600
	inc_counter purse_france6 -1
	end_while
end_monitor


monitor_event FactionTurnStart FactionType hre

	while I_CompareCounter purse_hre1 > 0
	increment_kings_purse hre -900
	inc_counter purse_hre1 -1
	end_while

	while I_CompareCounter purse_hre2 > 0
	increment_kings_purse hre -1100
	inc_counter purse_hre2 -1
	end_while

	while I_CompareCounter purse_hre3 > 0
	increment_kings_purse hre -1300
	inc_counter purse_hre3 -1
	end_while

	while I_CompareCounter purse_hre4 > 0
	increment_kings_purse hre -1800
	inc_counter purse_hre4 -1
	end_while

	while I_CompareCounter purse_hre5 > 0
	increment_kings_purse hre -2200
	inc_counter purse_hre5 -1
	end_while

	while I_CompareCounter purse_hre6 > 0
	increment_kings_purse hre -2600
	inc_counter purse_hre6 -1
	end_while
end_monitor


monitor_event FactionTurnStart FactionType england

	while I_CompareCounter purse_england1 > 0
	increment_kings_purse england -900
	inc_counter purse_england1 -1
	end_while

	while I_CompareCounter purse_england2 > 0
	increment_kings_purse england -1100
	inc_counter purse_england2 -1
	end_while

	while I_CompareCounter purse_england3 > 0
	increment_kings_purse england -1300
	inc_counter purse_england3 -1
	end_while

	while I_CompareCounter purse_england4 > 0
	increment_kings_purse england -1800
	inc_counter purse_england4 -1
	end_while

	while I_CompareCounter purse_england5 > 0
	increment_kings_purse england -2200
	inc_counter purse_england5 -1
	end_while

	while I_CompareCounter purse_england6 > 0
	increment_kings_purse england -2600
	inc_counter purse_england6 -1
	end_while
end_monitor


monitor_event FactionTurnStart FactionType portugal

	while I_CompareCounter purse_portugal1 > 0
	increment_kings_purse portugal -900
	inc_counter purse_portugal1 -1
	end_while

	while I_CompareCounter purse_portugal2 > 0
	increment_kings_purse portugal -1100
	inc_counter purse_portugal2 -1
	end_while

	while I_CompareCounter purse_portugal3 > 0
	increment_kings_purse portugal -1300
	inc_counter purse_portugal3 -1
	end_while

	while I_CompareCounter purse_portugal4 > 0
	increment_kings_purse portugal -1800
	inc_counter purse_portugal4 -1
	end_while

	while I_CompareCounter purse_portugal5 > 0
	increment_kings_purse portugal -2200
	inc_counter purse_portugal5 -1
	end_while

	while I_CompareCounter purse_portugal6 > 0
	increment_kings_purse portugal -2600
	inc_counter purse_portugal6 -1
	end_while
end_monitor


monitor_event FactionTurnStart FactionType poland

	while I_CompareCounter purse_poland1 > 0
	increment_kings_purse poland -900
	inc_counter purse_poland1 -1
	end_while

	while I_CompareCounter purse_poland2 > 0
	increment_kings_purse poland -1100
	inc_counter purse_poland2 -1
	end_while

	while I_CompareCounter purse_poland3 > 0
	increment_kings_purse poland -1300
	inc_counter purse_poland3 -1
	end_while

	while I_CompareCounter purse_poland4 > 0
	increment_kings_purse poland -1800
	inc_counter purse_poland4 -1
	end_while

	while I_CompareCounter purse_poland5 > 0
	increment_kings_purse poland -2200
	inc_counter purse_poland5 -1
	end_while

	while I_CompareCounter purse_poland6 > 0
	increment_kings_purse poland -2600
	inc_counter purse_poland6 -1
	end_while
end_monitor


monitor_event FactionTurnStart FactionType byzantium

	while I_CompareCounter purse_byzantium1 > 0
	increment_kings_purse byzantium -900
	inc_counter purse_byzantium1 -1
	end_while

	while I_CompareCounter purse_byzantium2 > 0
	increment_kings_purse byzantium -1100
	inc_counter purse_byzantium2 -1
	end_while

	while I_CompareCounter purse_byzantium3 > 0
	increment_kings_purse byzantium -1300
	inc_counter purse_byzantium3 -1
	end_while

	while I_CompareCounter purse_byzantium4 > 0
	increment_kings_purse byzantium -1800
	inc_counter purse_byzantium4 -1
	end_while

	while I_CompareCounter purse_byzantium5 > 0
	increment_kings_purse byzantium -2200
	inc_counter purse_byzantium5 -1
	end_while

	while I_CompareCounter purse_byzantium6 > 0
	increment_kings_purse byzantium -2600
	inc_counter purse_byzantium6 -1
	end_while
end_monitor


monitor_event FactionTurnStart FactionType moors

	while I_CompareCounter purse_moors1 > 0
	increment_kings_purse moors -900
	inc_counter purse_moors1 -1
	end_while

	while I_CompareCounter purse_moors2 > 0
	increment_kings_purse moors -1100
	inc_counter purse_moors2 -1
	end_while

	while I_CompareCounter purse_moors3 > 0
	increment_kings_purse moors -1300
	inc_counter purse_moors3 -1
	end_while

	while I_CompareCounter purse_moors4 > 0
	increment_kings_purse moors -1800
	inc_counter purse_moors4 -1
	end_while

	while I_CompareCounter purse_moors5 > 0
	increment_kings_purse moors -2200
	inc_counter purse_moors5 -1
	end_while

	while I_CompareCounter purse_moors6 > 0
	increment_kings_purse moors -2600
	inc_counter purse_moors6 -1
	end_while
end_monitor


monitor_event FactionTurnStart FactionType russia

	while I_CompareCounter purse_russia1 > 0
	increment_kings_purse russia -900
	inc_counter purse_russia1 -1
	end_while

	while I_CompareCounter purse_russia2 > 0
	increment_kings_purse russia -1100
	inc_counter purse_russia2 -1
	end_while

	while I_CompareCounter purse_russia3 > 0
	increment_kings_purse russia -1300
	inc_counter purse_russia3 -1
	end_while

	while I_CompareCounter purse_russia4 > 0
	increment_kings_purse russia -1800
	inc_counter purse_russia4 -1
	end_while

	while I_CompareCounter purse_russia5 > 0
	increment_kings_purse russia -2200
	inc_counter purse_russia5 -1
	end_while

	while I_CompareCounter purse_russia6 > 0
	increment_kings_purse russia -2600
	inc_counter purse_russia6 -1
	end_while
end_monitor


monitor_event FactionTurnStart FactionType spain

	while I_CompareCounter purse_spain1 > 0
	increment_kings_purse spain -900
	inc_counter purse_spain1 -1
	end_while

	while I_CompareCounter purse_spain2 > 0
	increment_kings_purse spain -1100
	inc_counter purse_spain2 -1
	end_while

	while I_CompareCounter purse_spain3 > 0
	increment_kings_purse spain -1300
	inc_counter purse_spain3 -1
	end_while

	while I_CompareCounter purse_spain4 > 0
	increment_kings_purse spain -1800
	inc_counter purse_spain4 -1
	end_while

	while I_CompareCounter purse_spain5 > 0
	increment_kings_purse spain -2200
	inc_counter purse_spain5 -1
	end_while

	while I_CompareCounter purse_spain6 > 0
	increment_kings_purse spain -2600
	inc_counter purse_spain6 -1
	end_while
end_monitor


monitor_event FactionTurnStart FactionType hungary

	while I_CompareCounter purse_hungary1 > 0
	increment_kings_purse hungary -900
	inc_counter purse_hungary1 -1
	end_while

	while I_CompareCounter purse_hungary2 > 0
	increment_kings_purse hungary -1100
	inc_counter purse_hungary2 -1
	end_while

	while I_CompareCounter purse_hungary3 > 0
	increment_kings_purse hungary -1300
	inc_counter purse_hungary3 -1
	end_while

	while I_CompareCounter purse_hungary4 > 0
	increment_kings_purse hungary -1800
	inc_counter purse_hungary4 -1
	end_while

	while I_CompareCounter purse_hungary5 > 0
	increment_kings_purse hungary -2200
	inc_counter purse_hungary5 -1
	end_while

	while I_CompareCounter purse_hungary6 > 0
	increment_kings_purse hungary -2600
	inc_counter purse_hungary6 -1
	end_while
end_monitor


monitor_event FactionTurnStart FactionType aragon

	while I_CompareCounter purse_aragon1 > 0
	increment_kings_purse aragon -900
	inc_counter purse_aragon1 -1
	end_while

	while I_CompareCounter purse_aragon2 > 0
	increment_kings_purse aragon -1100
	inc_counter purse_aragon2 -1
	end_while

	while I_CompareCounter purse_aragon3 > 0
	increment_kings_purse aragon -1300
	inc_counter purse_aragon3 -1
	end_while

	while I_CompareCounter purse_aragon4 > 0
	increment_kings_purse aragon -1800
	inc_counter purse_aragon4 -1
	end_while

	while I_CompareCounter purse_aragon5 > 0
	increment_kings_purse aragon -2200
	inc_counter purse_aragon5 -1
	end_while

	while I_CompareCounter purse_aragon6 > 0
	increment_kings_purse aragon -2600
	inc_counter purse_aragon6 -1
	end_while
end_monitor


monitor_event FactionTurnStart FactionType knights_templar

	while I_CompareCounter purse_knights_templar1 > 0
	increment_kings_purse knights_templar -900
	inc_counter purse_knights_templar1 -1
	end_while

	while I_CompareCounter purse_knights_templar2 > 0
	increment_kings_purse knights_templar -1100
	inc_counter purse_knights_templar2 -1
	end_while

	while I_CompareCounter purse_knights_templar3 > 0
	increment_kings_purse knights_templar -1300
	inc_counter purse_knights_templar3 -1
	end_while

	while I_CompareCounter purse_knights_templar4 > 0
	increment_kings_purse knights_templar -1800
	inc_counter purse_knights_templar4 -1
	end_while

	while I_CompareCounter purse_knights_templar5 > 0
	increment_kings_purse knights_templar -2200
	inc_counter purse_knights_templar5 -1
	end_while

	while I_CompareCounter purse_knights_templar6 > 0
	increment_kings_purse knights_templar -2600
	inc_counter purse_knights_templar6 -1
	end_while
end_monitor


monitor_event FactionTurnStart FactionType lithuania

	while I_CompareCounter purse_lithuania1 > 0
	increment_kings_purse lithuania -900
	inc_counter purse_lithuania1 -1
	end_while

	while I_CompareCounter purse_lithuania2 > 0
	increment_kings_purse lithuania -1100
	inc_counter purse_lithuania2 -1
	end_while

	while I_CompareCounter purse_lithuania3 > 0
	increment_kings_purse lithuania -1300
	inc_counter purse_lithuania3 -1
	end_while

	while I_CompareCounter purse_lithuania4 > 0
	increment_kings_purse lithuania -1800
	inc_counter purse_lithuania4 -1
	end_while

	while I_CompareCounter purse_lithuania5 > 0
	increment_kings_purse lithuania -2200
	inc_counter purse_lithuania5 -1
	end_while

	while I_CompareCounter purse_lithuania6 > 0
	increment_kings_purse lithuania -2600
	inc_counter purse_lithuania6 -1
	end_while
end_monitor


monitor_event FactionTurnStart FactionType kievan_rus

	while I_CompareCounter purse_kievan_rus1 > 0
	increment_kings_purse kievan_rus -900
	inc_counter purse_kievan_rus1 -1
	end_while

	while I_CompareCounter purse_kievan_rus2 > 0
	increment_kings_purse kievan_rus -1100
	inc_counter purse_kievan_rus2 -1
	end_while

	while I_CompareCounter purse_kievan_rus3 > 0
	increment_kings_purse kievan_rus -1300
	inc_counter purse_kievan_rus3 -1
	end_while

	while I_CompareCounter purse_kievan_rus4 > 0
	increment_kings_purse kievan_rus -1800
	inc_counter purse_kievan_rus4 -1
	end_while

	while I_CompareCounter purse_kievan_rus5 > 0
	increment_kings_purse kievan_rus -2200
	inc_counter purse_kievan_rus5 -1
	end_while

	while I_CompareCounter purse_kievan_rus6 > 0
	increment_kings_purse kievan_rus -2600
	inc_counter purse_kievan_rus6 -1
	end_while
end_monitor


monitor_event FactionTurnStart FactionType teutonic_order

	while I_CompareCounter purse_teutonic_order1 > 0
	increment_kings_purse teutonic_order -900
	inc_counter purse_teutonic_order1 -1
	end_while

	while I_CompareCounter purse_teutonic_order2 > 0
	increment_kings_purse teutonic_order -1100
	inc_counter purse_teutonic_order2 -1
	end_while

	while I_CompareCounter purse_teutonic_order3 > 0
	increment_kings_purse teutonic_order -1300
	inc_counter purse_teutonic_order3 -1
	end_while

	while I_CompareCounter purse_teutonic_order4 > 0
	increment_kings_purse teutonic_order -1800
	inc_counter purse_teutonic_order4 -1
	end_while

	while I_CompareCounter purse_teutonic_order5 > 0
	increment_kings_purse teutonic_order -2200
	inc_counter purse_teutonic_order5 -1
	end_while

	while I_CompareCounter purse_teutonic_order6 > 0
	increment_kings_purse teutonic_order -2600
	inc_counter purse_teutonic_order6 -1
	end_while
end_monitor


monitor_event FactionTurnStart FactionType timurids

	while I_CompareCounter purse_timurids1 > 0
	increment_kings_purse timurids -900
	inc_counter purse_timurids1 -1
	end_while

	while I_CompareCounter purse_timurids2 > 0
	increment_kings_purse timurids -1100
	inc_counter purse_timurids2 -1
	end_while

	while I_CompareCounter purse_timurids3 > 0
	increment_kings_purse timurids -1300
	inc_counter purse_timurids3 -1
	end_while

	while I_CompareCounter purse_timurids4 > 0
	increment_kings_purse timurids -1800
	inc_counter purse_timurids4 -1
	end_while

	while I_CompareCounter purse_timurids5 > 0
	increment_kings_purse timurids -2200
	inc_counter purse_timurids5 -1
	end_while

	while I_CompareCounter purse_timurids6 > 0
	increment_kings_purse timurids -2600
	inc_counter purse_timurids6 -1
	end_while
end_monitor


monitor_event FactionTurnStart FactionType norway

	while I_CompareCounter purse_norway1 > 0
	increment_kings_purse norway -900
	inc_counter purse_norway1 -1
	end_while

	while I_CompareCounter purse_norway2 > 0
	increment_kings_purse norway -1100
	inc_counter purse_norway2 -1
	end_while

	while I_CompareCounter purse_norway3 > 0
	increment_kings_purse norway -1300
	inc_counter purse_norway3 -1
	end_while

	while I_CompareCounter purse_norway4 > 0
	increment_kings_purse norway -1800
	inc_counter purse_norway4 -1
	end_while

	while I_CompareCounter purse_norway5 > 0
	increment_kings_purse norway -2200
	inc_counter purse_norway5 -1
	end_while

	while I_CompareCounter purse_norway6 > 0
	increment_kings_purse norway -2600
	inc_counter purse_norway6 -1
	end_while
end_monitor


monitor_event FactionTurnStart FactionType jerusalem

	while I_CompareCounter purse_jerusalem1 > 0
	increment_kings_purse jerusalem -900
	inc_counter purse_jerusalem1 -1
	end_while

	while I_CompareCounter purse_jerusalem2 > 0
	increment_kings_purse jerusalem -1100
	inc_counter purse_jerusalem2 -1
	end_while

	while I_CompareCounter purse_jerusalem3 > 0
	increment_kings_purse jerusalem -1300
	inc_counter purse_jerusalem3 -1
	end_while

	while I_CompareCounter purse_jerusalem4 > 0
	increment_kings_purse jerusalem -1800
	inc_counter purse_jerusalem4 -1
	end_while

	while I_CompareCounter purse_jerusalem5 > 0
	increment_kings_purse jerusalem -2200
	inc_counter purse_jerusalem5 -1
	end_while

	while I_CompareCounter purse_jerusalem6 > 0
	increment_kings_purse jerusalem -2600
	inc_counter purse_jerusalem6 -1
	end_while
end_monitor


monitor_event FactionTurnStart FactionType kwarezm

	while I_CompareCounter purse_kwarezm1 > 0
	increment_kings_purse kwarezm -900
	inc_counter purse_kwarezm1 -1
	end_while

	while I_CompareCounter purse_kwarezm2 > 0
	increment_kings_purse kwarezm -1100
	inc_counter purse_kwarezm2 -1
	end_while

	while I_CompareCounter purse_kwarezm3 > 0
	increment_kings_purse kwarezm -1300
	inc_counter purse_kwarezm3 -1
	end_while

	while I_CompareCounter purse_kwarezm4 > 0
	increment_kings_purse kwarezm -1800
	inc_counter purse_kwarezm4 -1
	end_while

	while I_CompareCounter purse_kwarezm5 > 0
	increment_kings_purse kwarezm -2200
	inc_counter purse_kwarezm5 -1
	end_while

	while I_CompareCounter purse_kwarezm6 > 0
	increment_kings_purse kwarezm -2600
	inc_counter purse_kwarezm6 -1
	end_while
end_monitor	  

;##########ReallyBadAI BAttle System launching code #######

set_event_counter show_me_how 1

monitor_event GameReloaded TrueCondition

set_event_counter show_me_how 1
end_monitor

monitor_event PreBattlePanelOpen TrueCondition
and I_EventCounter show_me_how = 1

console_command clear_messages
advance_advice_thread G5Script_Thread
wait 1
select_ui_element advisor_portrait_button
simulate_mouse_click lclick_down
simulate_mouse_click lclick_up

wait 2
select_ui_element advisor_show_me_button
simulate_mouse_click lclick_down
simulate_mouse_click lclick_up

select_ui_element advisor_dismiss_button

simulate_mouse_click lclick_down
simulate_mouse_click lclick_up

set_event_counter show_me_how 2
end_monitor

	 

;-------------------------------------------------------------
wait_monitors
end_script