# spawn_peasant_army_effect
# spawn_peasant_reinforcements_effect
# spawn_heretic_army_effect
# spawn_heretic_reinforcements_effect
# spawn_nationalist_army_effect
# spawn_nationalist_reinforcements_effect
# spawn_religious_army_effect
# spawn_religious_reinforcements_effect

spawn_peasant_army_effect = {
	# Spawn some commanders, if necessary
	while = {
		limit = { can_grant_title = title_commander }

		create_character = {
			random_traits = yes
			dynasty = none
			religion = THIS
			culture = THIS
			female = no
			age = 23
			add_trait = peasant_leader
			add_trait = tough_soldier
		}

		new_character = {
			give_minor_title = title_commander

			random_list = {
				1 = { }
				1 = { add_age = 1 }
				1 = { add_age = 2 }
				1 = { add_age = 3 }
				1 = { add_age = 4 }
				1 = { add_age = 5 }
				1 = { add_age = 6 }
				1 = { add_age = 7 }
				1 = { add_age = 8 }
			}
		}
	}

	if = {
		limit = {
			has_game_rule = {
				name = provincial_revolt_strength
				value = default
			}
		}

		random_list = {
			# First troop composition
			17 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 0.8
					attrition = 1.0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 4 4 }
						light_infantry = { 10 10 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 0.8
						attrition = 1.0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 4 4 }
							light_infantry = { 10 10 }
						}
					}
				}
			}

			17 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 0.5
					attrition = 1.0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 4 4 }
						light_infantry = { 10 10 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 0.5
						attrition = 1.0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 4 4 }
							light_infantry = { 10 10 }
						}
					}
				}
			}

			# Second troop composition
			16 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 0.8
					attrition = 1.0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 3 3 }
						light_infantry = { 11 11 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 0.8
						attrition = 1.0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 3 3 }
							light_infantry = { 11 11 }
						}
					}
				}
			}

			17 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 0.5
					attrition = 1.0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 3 3 }
						light_infantry = { 11 11 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 0.5
						attrition = 1.0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 3 3 }
							light_infantry = { 11 11 }
						}
					}
				}
			}

			# Third troop composition
			16 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 0.8
					attrition = 1.0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_infantry = { 14 14 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 0.8
						attrition = 1.0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_infantry = { 14 14 }
						}
					}
				}
			}

			17 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 0.5
					attrition = 1.0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_infantry = { 14 14 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 0.5
						attrition = 1.0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_infantry = { 14 14 }
						}
					}
				}
			}
		}
	}
	else = {
		# Same as above, but no attrition
		random_list = {
			# First troop composition
			17 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 0.8
					attrition = 0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 4 4 }
						light_infantry = { 10 10 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 0.8
						attrition = 0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 4 4 }
							light_infantry = { 10 10 }
						}
					}
				}
			}

			17 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 0.5
					attrition = 0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 4 4 }
						light_infantry = { 10 10 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 0.5
						attrition = 0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 4 4 }
							light_infantry = { 10 10 }
						}
					}
				}
			}

			# Second troop composition
			16 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 0.8
					attrition = 0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 3 3 }
						light_infantry = { 11 11 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 0.8
						attrition = 0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 3 3 }
							light_infantry = { 11 11 }
						}
					}
				}
			}

			17 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 0.5
					attrition = 0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 3 3 }
						light_infantry = { 11 11 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 0.5
						attrition = 0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 3 3 }
							light_infantry = { 11 11 }
						}
					}
				}
			}

			# Third troop composition
			16 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 0.8
					attrition = 0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_infantry = { 14 14 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 0.8
						attrition = 0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_infantry = { 14 14 }
						}
					}
				}
			}

			17 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 0.5
					attrition = 0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_infantry = { 14 14 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 0.5
						attrition = 0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_infantry = { 14 14 }
						}
					}
				}
			}
		}
	}
}

spawn_peasant_reinforcements_effect = {
	# Spawn some commanders, if necessary
	while = {
		limit = { can_grant_title = title_commander }

		create_character = {
			random_traits = yes
			dynasty = none
			religion = THIS
			culture = THIS
			female = no
			age = 23
			add_trait = peasant_leader
			add_trait = tough_soldier
		}

		new_character = {
			give_minor_title = title_commander

			random_list = {
				1 = { }
				1 = { add_age = 1 }
				1 = { add_age = 2 }
				1 = { add_age = 3 }
				1 = { add_age = 4 }
				1 = { add_age = 5 }
				1 = { add_age = 6 }
				1 = { add_age = 7 }
				1 = { add_age = 8 }
			}
		}
	}

	if = {
		limit = {
			has_game_rule = {
				name = provincial_revolt_strength
				value = default
			}
		}

		random_list = {
			# First troop composition
			17 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 0.8
					attrition = 1.0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 4 4 }
						light_infantry = { 10 10 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 0.8
						attrition = 1.0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 4 4 }
							light_infantry = { 10 10 }
						}
					}
				}
			}

			17 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 0.5
					attrition = 1.0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 4 4 }
						light_infantry = { 10 10 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 0.5
						attrition = 1.0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 4 4 }
							light_infantry = { 10 10 }
						}
					}
				}
			}

			# Second troop composition
			16 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 0.8
					attrition = 1.0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 3 3 }
						light_infantry = { 11 11 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 0.8
						attrition = 1.0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 3 3 }
							light_infantry = { 11 11 }
						}
					}
				}
			}

			17 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 0.5
					attrition = 1.0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 3 3 }
						light_infantry = { 11 11 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 0.5
						attrition = 1.0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 3 3 }
							light_infantry = { 11 11 }
						}
					}
				}
			}

			# Third troop composition
			16 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 0.8
					attrition = 1.0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_infantry = { 14 14 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 0.8
						attrition = 1.0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_infantry = { 14 14 }
						}
					}
				}
			}

			17 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 0.5
					attrition = 1.0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_infantry = { 14 14 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 0.5
						attrition = 1.0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_infantry = { 14 14 }
						}
					}
				}
			}
		}
	}
	else = {
		# Same as above, but no attrition
		random_list = {
			# First troop compositiona
			17 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 0.8
					attrition = 0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 4 4 }
						light_infantry = { 10 10 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 0.8
						attrition = 0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 4 4 }
							light_infantry = { 10 10 }
						}
					}
				}
			}

			17 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 0.5
					attrition = 0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 4 4 }
						light_infantry = { 10 10 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 0.5
						attrition = 0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 4 4 }
							light_infantry = { 10 10 }
						}
					}
				}
			}

			# Second troop composition
			16 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 0.8
					attrition = 0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 3 3 }
						light_infantry = { 11 11 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 0.8
						attrition = 0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 3 3 }
							light_infantry = { 11 11 }
						}
					}
				}
			}

			17 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 0.5
					attrition = 0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 3 3 }
						light_infantry = { 11 11 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 0.5
						attrition = 0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 3 3 }
							light_infantry = { 11 11 }
						}
					}
				}
			}

			# Third troop composition
			16 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 0.8
					attrition = 0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_infantry = { 14 14 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 0.8
						attrition = 0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_infantry = { 14 14 }
						}
					}
				}
			}

			17 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 0.5
					attrition = 0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_infantry = { 14 14 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 0.5
						attrition = 0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_infantry = { 14 14 }
						}
					}
				}
			}
		}
	}
}

spawn_heretic_army_effect = {
	# Spawn some commanders, if necessary
	while = {
		limit = { can_grant_title = title_commander }

		create_character = {
			random_traits = yes
			dynasty = none
			religion = THIS
			culture = THIS
			female = no
			age = 23
			add_trait = peasant_leader
			add_trait = tough_soldier
		}

		new_character = {
			give_minor_title = title_commander

			random_list = {
				1 = { }
				1 = { add_age = 1 }
				1 = { add_age = 2 }
				1 = { add_age = 3 }
				1 = { add_age = 4 }
				1 = { add_age = 5 }
				1 = { add_age = 6 }
				1 = { add_age = 7 }
				1 = { add_age = 8 }
			}
		}
	}

	if = {
		limit = {
			has_game_rule = {
				name = provincial_revolt_strength
				value = default
			}
		}

		random_list = {
			# First troop composition
			34 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 1.1
					attrition = 1.0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 4 4 }
						light_infantry = { 10 10 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 1.1
						attrition = 1.0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 4 4 }
							light_infantry = { 10 10 }
						}
					}
				}
			}

			# Second troop composition
			33 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 1.1
					attrition = 1.0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 2 2 }
						light_infantry = { 12 12 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 1.1
						attrition = 1.0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 2 2 }
							light_infantry = { 12 12 }
						}
					}
				}
			}

			# Third troop composition
			33 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 1.1
					attrition = 1.0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_infantry = { 14 14 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 1.1
						attrition = 1.0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_infantry = { 14 14 }
						}
					}
				}
			}
		}
	}
	else = {
		# Same as above, but no attrition
		random_list = {
			# First troop composition
			34 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 1.1
					attrition = 0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 4 4 }
						light_infantry = { 10 10 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 1.1
						attrition = 0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 4 4 }
							light_infantry = { 10 10 }
						}
					}
				}
			}

			# Second troop composition
			33 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 1.1
					attrition = 0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 2 2 }
						light_infantry = { 12 12 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 1.1
						attrition = 0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 2 2 }
							light_infantry = { 12 12 }
						}
					}
				}
			}

			# Third troop composition
			33 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 1.1
					attrition = 0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_infantry = { 14 14 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 1.1
						attrition = 0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_infantry = { 14 14 }
						}
					}
				}
			}
		}
	}
}

spawn_heretic_reinforcements_effect = {
	# Spawn some commanders, if necessary
	while = {
		limit = { can_grant_title = title_commander }

		create_character = {
			random_traits = yes
			dynasty = none
			religion = THIS
			culture = THIS
			female = no
			age = 23
			add_trait = peasant_leader
			add_trait = tough_soldier
		}

		new_character = {
			give_minor_title = title_commander

			random_list = {
				1 = { }
				1 = { add_age = 1 }
				1 = { add_age = 2 }
				1 = { add_age = 3 }
				1 = { add_age = 4 }
				1 = { add_age = 5 }
				1 = { add_age = 6 }
				1 = { add_age = 7 }
				1 = { add_age = 8 }
			}
		}
	}

	if = {
		limit = {
			has_game_rule = {
				name = provincial_revolt_strength
				value = default
			}
		}

		random_list = {
			# First troop composition
			34 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 1.1
					attrition = 1.0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 4 4 }
						light_infantry = { 10 10 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 1.1
						attrition = 1.0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 4 4 }
							light_infantry = { 10 10 }
						}
					}
				}
			}

			# Second troop composition
			33 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 1.1
					attrition = 1.0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 2 2 }
						light_infantry = { 12 12 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 1.1
						attrition = 1.0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 2 2 }
							light_infantry = { 12 12 }
						}
					}
				}
			}

			# Third troop composition
			33 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 1.1
					attrition = 1.0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_infantry = { 14 14 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 1.1
						attrition = 1.0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_infantry = { 14 14 }
						}
					}
				}
			}
		}
	}
	else = {
		# Same as above, but no attrition
		random_list = {
			# First troop composition
			34 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 1.1
					attrition = 0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 4 4 }
						light_infantry = { 10 10 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 1.1
						attrition = 0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 4 4 }
							light_infantry = { 10 10 }
						}
					}
				}
			}

			# Second troop composition
			33 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 1.1
					attrition = 0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 2 2 }
						light_infantry = { 12 12 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 1.1
						attrition = 0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 2 2 }
							light_infantry = { 12 12 }
						}
					}
				}
			}

			# Third troop composition
			33 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 1.1
					attrition = 0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_infantry = { 14 14 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 1.1
						attrition = 0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_infantry = { 14 14 }
						}
					}
				}
			}
		}
	}
}

spawn_nationalist_army_effect = {
	# Spawn some commanders, if necessary
	while = {
		limit = { can_grant_title = title_commander }

		create_character = {
			random_traits = yes
			dynasty = none
			religion = THIS
			culture = THIS
			female = no
			age = 23
			add_trait = peasant_leader
			add_trait = tough_soldier
		}

		new_character = {
			give_minor_title = title_commander

			random_list = {
				1 = { }
				1 = { add_age = 1 }
				1 = { add_age = 2 }
				1 = { add_age = 3 }
				1 = { add_age = 4 }
				1 = { add_age = 5 }
				1 = { add_age = 6 }
				1 = { add_age = 7 }
				1 = { add_age = 8 }
			}
		}
	}

	if = {
		limit = {
			has_game_rule = {
				name = provincial_revolt_strength
				value = default
			}
		}

		random_list = {
			33 = {
				spawn_unit = {
					province = PREV
					home = PREV
					owner = ROOT
					scaled_by_biggest_garrison = 1.6
					attrition = 0.5
					maintenance_multiplier = 0
					earmark = nationalist_rebels
					disband_on_peace = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 3 3 }
						knights = { 1 1 }
						light_infantry = { 7 7 }
						heavy_infantry = { 3 3 }
					}
				}
			}

			34 = {
				spawn_unit = {
					province = PREV
					home = PREV
					owner = ROOT
					scaled_by_biggest_garrison = 1.3
					attrition = 0.5
					maintenance_multiplier = 0
					earmark = nationalist_rebels
					disband_on_peace = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 3 3 }
						knights = { 1 1 }
						light_infantry = { 7 7 }
						heavy_infantry = { 3 3 }
					}
				}
			}

			33 = {
				spawn_unit = {
					province = PREV
					home = PREV
					owner = ROOT
					scaled_by_biggest_garrison = 1
					attrition = 0.5
					maintenance_multiplier = 0
					earmark = nationalist_rebels
					disband_on_peace = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 3 3 }
						knights = { 1 1 }
						light_infantry = { 7 7 }
						heavy_infantry = { 3 3 }
					}
				}
			}
		}

	}
	else = {
		# Same as above, but no attrition
		random_list = {
			33 = {
				spawn_unit = {
					province = PREV
					home = PREV
					owner = ROOT
					scaled_by_biggest_garrison = 1.6
					attrition = 0
					maintenance_multiplier = 0
					earmark = nationalist_rebels
					disband_on_peace = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 3 3 }
						knights = { 1 1 }
						light_infantry = { 7 7 }
						heavy_infantry = { 3 3 }
					}
				}
			}

			34 = {
				spawn_unit = {
					province = PREV
					home = PREV
					owner = ROOT
					scaled_by_biggest_garrison = 1.3
					attrition = 0
					maintenance_multiplier = 0
					earmark = nationalist_rebels
					disband_on_peace = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 3 3 }
						knights = { 1 1 }
						light_infantry = { 7 7 }
						heavy_infantry = { 3 3 }
					}
				}
			}

			33 = {
				spawn_unit = {
					province = PREV
					home = PREV
					owner = ROOT
					scaled_by_biggest_garrison = 1
					attrition = 0
					maintenance_multiplier = 0
					earmark = nationalist_rebels
					disband_on_peace = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 3 3 }
						knights = { 1 1 }
						light_infantry = { 7 7 }
						heavy_infantry = { 3 3 }
					}
				}
			}
		}
	}
}

spawn_nationalist_reinforcements_effect = {
	# Spawn some commanders, if necessary
	while = {
		limit = { can_grant_title = title_commander }

		create_character = {
			random_traits = yes
			dynasty = none
			religion = THIS
			culture = THIS
			female = no
			age = 23
			add_trait = peasant_leader
			add_trait = tough_soldier
		}

		new_character = {
			give_minor_title = title_commander

			random_list = {
				1 = { }
				1 = { add_age = 1 }
				1 = { add_age = 2 }
				1 = { add_age = 3 }
				1 = { add_age = 4 }
				1 = { add_age = 5 }
				1 = { add_age = 6 }
				1 = { add_age = 7 }
				1 = { add_age = 8 }
			}
		}
	}

	while = {
		count = 3

		spawn_unit = {
			province = ROOT
			home = ROOT
			owner = THIS
			scaled_by_biggest_garrison = 1.75
			disband_on_peace = yes

			troops = {
				archers = { 6 6 }
				light_cavalry = { 3 3 }
				knights = { 1 1 }
				light_infantry = { 7 7 }
				heavy_infantry = { 3 3 }
			}
		}
	}
}

spawn_religious_army_effect = {
	# Spawn some commanders, if necessary
	while = {
		limit = { can_grant_title = title_commander }

		create_character = {
			random_traits = yes
			dynasty = none
			religion = THIS
			culture = THIS
			female = no
			age = 23
			add_trait = peasant_leader
			add_trait = tough_soldier
		}

		new_character = {
			give_minor_title = title_commander

			random_list = {
				1 = { }
				1 = { add_age = 1 }
				1 = { add_age = 2 }
				1 = { add_age = 3 }
				1 = { add_age = 4 }
				1 = { add_age = 5 }
				1 = { add_age = 6 }
				1 = { add_age = 7 }
				1 = { add_age = 8 }
			}
		}
	}

	if = {
		limit = {
			has_game_rule = {
				name = provincial_revolt_strength
				value = default
			}
		}

		random_list = {
			# First troop composition
			34 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 1.1
					attrition = 1.0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 4 4 }
						light_infantry = { 10 10 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 1.1
						attrition = 1.0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 4 4 }
							light_infantry = { 10 10 }
						}
					}
				}
			}

			# Second troop composition
			33 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 1.1
					attrition = 1.0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 2 2 }
						light_infantry = { 12 12 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 1.1
						attrition = 1.0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 2 2 }
							light_infantry = { 12 12 }
						}
					}
				}
			}

			# Third troop composition
			33 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 1.1
					attrition = 1.0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_infantry = { 14 14 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 1.1
						attrition = 1.0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_infantry = { 14 14 }
						}
					}
				}
			}
		}
	}
	else = {
		# Same as above, but no attrition
		random_list = {
			# First troop composition
			34 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 1.1
					attrition = 0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 4 4 }
						light_infantry = { 10 10 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 1.1
						attrition = 0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 4 4 }
							light_infantry = { 10 10 }
						}
					}
				}
			}

			# Second troop composition
			33 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 1.1
					attrition = 0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 2 2 }
						light_infantry = { 12 12 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 1.1
						attrition = 0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 2 2 }
							light_infantry = { 12 12 }
						}
					}
				}
			}

			# Third troop composition
			33 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 1.1
					attrition = 0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_infantry = { 14 14 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 1.1
						attrition = 0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_infantry = { 14 14 }
						}
					}
				}
			}
		}
	}
}

spawn_religious_reinforcements_effect = {
	# Spawn some commanders, if necessary
	while = {
		limit = { can_grant_title = title_commander }

		create_character = {
			random_traits = yes
			dynasty = none
			religion = THIS
			culture = THIS
			female = no
			age = 23
			add_trait = peasant_leader
			add_trait = tough_soldier
		}

		new_character = {
			give_minor_title = title_commander

			random_list = {
				1 = { }
				1 = { add_age = 1 }
				1 = { add_age = 2 }
				1 = { add_age = 3 }
				1 = { add_age = 4 }
				1 = { add_age = 5 }
				1 = { add_age = 6 }
				1 = { add_age = 7 }
				1 = { add_age = 8 }
			}
		}
	}

	if = {
		limit = {
			has_game_rule = {
				name = provincial_revolt_strength
				value = default
			}
		}

		random_list = {
			# First troop composition
			34 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 1.1
					attrition = 1.0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 4 4 }
						light_infantry = { 10 10 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 1.1
						attrition = 1.0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 4 4 }
							light_infantry = { 10 10 }
						}
					}
				}
			}

			# Second troop composition
			33 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 1.1
					attrition = 1.0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 2 2 }
						light_infantry = { 12 12 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 1.1
						attrition = 1.0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 2 2 }
							light_infantry = { 12 12 }
						}
					}
				}
			}

			# Third troop composition
			33 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 1.1
					attrition = 1.0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_infantry = { 14 14 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 1.1
						attrition = 1.0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_infantry = { 14 14 }
						}
					}
				}
			}
		}
	}
	else = {
		# Same as above, but no attrition
		random_list = {
			# Frst troop composition
			34 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 1.1
					attrition = 0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 4 4 }
						light_infantry = { 10 10 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 1.1
						attrition = 0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 4 4 }
							light_infantry = { 10 10 }
						}
					}
				}
			}

			# Second troop composition
			33 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 1.1
					attrition = 0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_cavalry = { 2 2 }
						light_infantry = { 12 12 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 1.1
						attrition = 0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_cavalry = { 2 2 }
							light_infantry = { 12 12 }
						}
					}
				}
			}

			# Third troop composition
			33 = {
				spawn_unit = {
					province = ROOT
					home = ROOT
					owner = THIS
					scaled_by_biggest_garrison = 1.1
					attrition = 0
					cannot_inherit = yes

					troops = {
						archers = { 6 6 }
						light_infantry = { 14 14 }
					}
				}

				# Additional troops disband on peace
				while = {
					count = 2

					spawn_unit = {
						province = ROOT
						home = ROOT
						owner = THIS
						scaled_by_biggest_garrison = 1.1
						attrition = 0
						disband_on_peace = yes

						troops = {
							archers = { 6 6 }
							light_infantry = { 14 14 }
						}
					}
				}
			}
		}
	}
}