﻿# AUTO-GENERATED Men-at-Arms scripted_guis — do not edit by hand
# One spawner effect per MAA key

### Longbowmen Spawner
DI_longbowmen_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = longbowmen
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = longbowmen
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = longbowmen
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = longbowmen
			}
		}
	}
}

### Horse Archers Spawner
DI_horse_archers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = horse_archers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = horse_archers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = horse_archers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = horse_archers
			}
		}
	}
}

### Asawira Spawner
DI_asawira_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = asawira
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = asawira
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = asawira
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = asawira
			}
		}
	}
}

### Tarkhan Spawner
DI_tarkhan_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = tarkhan
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = tarkhan
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = tarkhan
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = tarkhan
			}
		}
	}
}

### Zupin Warrior Spawner
DI_zupin_warrior_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = zupin_warrior
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = zupin_warrior
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = zupin_warrior
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = zupin_warrior
			}
		}
	}
}

### Tawashi Spawner
DI_tawashi_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = tawashi
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = tawashi
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = tawashi
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = tawashi
			}
		}
	}
}

### Light Footmen Spawner
DI_light_footmen_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = light_footmen
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = light_footmen
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = light_footmen
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = light_footmen
			}
		}
	}
}

### Bowmen Spawner
DI_bowmen_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = bowmen
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = bowmen
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = bowmen
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = bowmen
			}
		}
	}
}

### Light Horsemen Spawner
DI_light_horsemen_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = light_horsemen
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = light_horsemen
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = light_horsemen
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = light_horsemen
			}
		}
	}
}

### Pikemen Unit Spawner
DI_pikemen_unit_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = pikemen_unit
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = pikemen_unit
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = pikemen_unit
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = pikemen_unit
			}
		}
	}
}

### Armored Footmen Spawner
DI_armored_footmen_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = armored_footmen
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = armored_footmen
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = armored_footmen
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = armored_footmen
			}
		}
	}
}

### Onager Spawner
DI_onager_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = onager
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = onager
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = onager
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = onager
			}
		}
	}
}

### Armored Horsemen Spawner
DI_armored_horsemen_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = armored_horsemen
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = armored_horsemen
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = armored_horsemen
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = armored_horsemen
			}
		}
	}
}

### Mangonel Spawner
DI_mangonel_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = mangonel
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = mangonel
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = mangonel
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = mangonel
			}
		}
	}
}

### Crossbowmen Spawner
DI_crossbowmen_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = crossbowmen
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = crossbowmen
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = crossbowmen
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = crossbowmen
			}
		}
	}
}

### Trebuchet Spawner
DI_trebuchet_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = trebuchet
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = trebuchet
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = trebuchet
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = trebuchet
			}
		}
	}
}

### House Guard Spawner
DI_house_guard_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = house_guard
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = house_guard
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = house_guard
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = house_guard
			}
		}
	}
}

### Pikemen Militia Spawner
DI_pikemen_militia_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = pikemen_militia
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = pikemen_militia
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = pikemen_militia
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = pikemen_militia
			}
		}
	}
}

### Camel Rider Spawner
DI_camel_rider_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = camel_rider
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = camel_rider
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = camel_rider
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = camel_rider
			}
		}
	}
}

### War Elephant Spawner
DI_war_elephant_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = war_elephant
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = war_elephant
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = war_elephant
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = war_elephant
			}
		}
	}
}

### Accolade Maa Archers Spawner
DI_accolade_maa_archers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = accolade_maa_archers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = accolade_maa_archers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = accolade_maa_archers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = accolade_maa_archers
			}
		}
	}
}

### Accolade Maa Skirmishers Spawner
DI_accolade_maa_skirmishers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = accolade_maa_skirmishers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = accolade_maa_skirmishers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = accolade_maa_skirmishers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = accolade_maa_skirmishers
			}
		}
	}
}

### Accolade Maa Pikes Spawner
DI_accolade_maa_pikes_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = accolade_maa_pikes
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = accolade_maa_pikes
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = accolade_maa_pikes
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = accolade_maa_pikes
			}
		}
	}
}

### Accolade Maa Outriders Spawner
DI_accolade_maa_outriders_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = accolade_maa_outriders
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = accolade_maa_outriders
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = accolade_maa_outriders
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = accolade_maa_outriders
			}
		}
	}
}

### Accolade Maa Vanguards Spawner
DI_accolade_maa_vanguards_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = accolade_maa_vanguards
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = accolade_maa_vanguards
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = accolade_maa_vanguards
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = accolade_maa_vanguards
			}
		}
	}
}

### Accolade Maa Lancers Spawner
DI_accolade_maa_lancers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = accolade_maa_lancers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = accolade_maa_lancers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = accolade_maa_lancers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = accolade_maa_lancers
			}
		}
	}
}

### Accolade Maa Crossbowers Spawner
DI_accolade_maa_crossbowers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = accolade_maa_crossbowers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = accolade_maa_crossbowers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = accolade_maa_crossbowers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = accolade_maa_crossbowers
			}
		}
	}
}

### Accolade Maa Cameliers Spawner
DI_accolade_maa_cameliers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = accolade_maa_cameliers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = accolade_maa_cameliers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = accolade_maa_cameliers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = accolade_maa_cameliers
			}
		}
	}
}

### Accolade Maa Elephantiers Spawner
DI_accolade_maa_elephantiers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = accolade_maa_elephantiers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = accolade_maa_elephantiers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = accolade_maa_elephantiers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = accolade_maa_elephantiers
			}
		}
	}
}

### Accolade Maa Horse Archers Spawner
DI_accolade_maa_horse_archers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = accolade_maa_horse_archers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = accolade_maa_horse_archers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = accolade_maa_horse_archers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = accolade_maa_horse_archers
			}
		}
	}
}

### Ayrudzi Spawner
DI_ayrudzi_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = ayrudzi
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = ayrudzi
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = ayrudzi
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = ayrudzi
			}
		}
	}
}

### Conrois Spawner
DI_conrois_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = conrois
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = conrois
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = conrois
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = conrois
			}
		}
	}
}

### Akritai Spawner
DI_akritai_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = akritai
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = akritai
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = akritai
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = akritai
			}
		}
	}
}

### Ballistrai Spawner
DI_ballistrai_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = ballistrai
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = ballistrai
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = ballistrai
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = ballistrai
			}
		}
	}
}

### Skoutatoi Spawner
DI_skoutatoi_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = skoutatoi
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = skoutatoi
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = skoutatoi
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = skoutatoi
			}
		}
	}
}

### Handpicked Faithful Spawner
DI_handpicked_faithful_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = handpicked_faithful
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = handpicked_faithful
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = handpicked_faithful
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = handpicked_faithful
			}
		}
	}
}

### Maa Bandits Spawner
DI_maa_bandits_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = maa_bandits
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = maa_bandits
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = maa_bandits
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = maa_bandits
			}
		}
	}
}

### Maa Poachers Spawner
DI_maa_poachers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = maa_poachers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = maa_poachers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = maa_poachers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = maa_poachers
			}
		}
	}
}

### Maa Marauders Spawner
DI_maa_marauders_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = maa_marauders
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = maa_marauders
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = maa_marauders
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = maa_marauders
			}
		}
	}
}

### Maa Thieves Spawner
DI_maa_thieves_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = maa_thieves
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = maa_thieves
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = maa_thieves
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = maa_thieves
			}
		}
	}
}

### Nomadic Riders Spawner
DI_nomadic_riders_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = nomadic_riders
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = nomadic_riders
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = nomadic_riders
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = nomadic_riders
			}
		}
	}
}

### Torch Bearers Spawner
DI_torch_bearers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = torch_bearers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = torch_bearers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = torch_bearers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = torch_bearers
			}
		}
	}
}

### Kheshig Spawner
DI_kheshig_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = kheshig
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = kheshig
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = kheshig
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = kheshig
			}
		}
	}
}

### Steppe Raiders Spawner
DI_steppe_raiders_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = steppe_raiders
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = steppe_raiders
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = steppe_raiders
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = steppe_raiders
			}
		}
	}
}

### Heavy Horse Archers Spawner
DI_heavy_horse_archers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = heavy_horse_archers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = heavy_horse_archers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = heavy_horse_archers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = heavy_horse_archers
			}
		}
	}
}

### Nomad Lancers Spawner
DI_nomad_lancers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = nomad_lancers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = nomad_lancers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = nomad_lancers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = nomad_lancers
			}
		}
	}
}

### Cataphract Archers Spawner
DI_cataphract_archers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = cataphract_archers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = cataphract_archers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = cataphract_archers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = cataphract_archers
			}
		}
	}
}

### Warrior Monks Spawner
DI_warrior_monks_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = warrior_monks
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = warrior_monks
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = warrior_monks
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = warrior_monks
			}
		}
	}
}

### Ballista Elephant Spawner
DI_ballista_elephant_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = ballista_elephant
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = ballista_elephant
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = ballista_elephant
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = ballista_elephant
			}
		}
	}
}

### Lions Of Night Spawner
DI_lions_of_night_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = lions_of_night
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = lions_of_night
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = lions_of_night
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = lions_of_night
			}
		}
	}
}

### Vassals In Yellow Spawner
DI_vassals_in_yellow_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = vassals_in_yellow
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = vassals_in_yellow
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = vassals_in_yellow
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = vassals_in_yellow
			}
		}
	}
}

### Dream Questors Spawner
DI_dream_questors_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = dream_questors
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = dream_questors
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = dream_questors
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = dream_questors
			}
		}
	}
}

### Drainers Spawner
DI_drainers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = drainers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = drainers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = drainers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = drainers
			}
		}
	}
}

### Waste Raiders Spawner
DI_waste_raiders_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = waste_raiders
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = waste_raiders
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = waste_raiders
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = waste_raiders
			}
		}
	}
}

### Wind Demons Spawner
DI_wind_demons_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = wind_demons
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = wind_demons
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = wind_demons
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = wind_demons
			}
		}
	}
}

### Venom Bites Spawner
DI_venom_bites_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = venom_bites
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = venom_bites
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = venom_bites
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = venom_bites
			}
		}
	}
}

### Marsh Walkers Spawner
DI_marsh_walkers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = marsh_walkers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = marsh_walkers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = marsh_walkers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = marsh_walkers
			}
		}
	}
}

### Royal Crossbowmen Spawner
DI_royal_crossbowmen_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = royal_crossbowmen
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = royal_crossbowmen
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = royal_crossbowmen
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = royal_crossbowmen
			}
		}
	}
}

### Dragonguard Spawner
DI_dragonguard_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = dragonguard
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = dragonguard
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = dragonguard
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = dragonguard
			}
		}
	}
}

### Sea Snakes Spawner
DI_sea_snakes_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = sea_snakes
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = sea_snakes
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = sea_snakes
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = sea_snakes
			}
		}
	}
}

### Slave Legion Spawner
DI_slave_legion_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = slave_legion
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = slave_legion
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = slave_legion
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = slave_legion
			}
		}
	}
}

### Tiger Cloaks Spawner
DI_tiger_cloaks_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = tiger_cloaks
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = tiger_cloaks
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = tiger_cloaks
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = tiger_cloaks
			}
		}
	}
}

### Black Wall Chariots Spawner
DI_black_wall_chariots_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = black_wall_chariots
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = black_wall_chariots
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = black_wall_chariots
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = black_wall_chariots
			}
		}
	}
}

### Dragonsworn Spawner
DI_dragonsworn_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = dragonsworn
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = dragonsworn
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = dragonsworn
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = dragonsworn
			}
		}
	}
}

### Demon Guards Spawner
DI_demon_guards_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = demon_guards
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = demon_guards
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = demon_guards
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = demon_guards
			}
		}
	}
}

### Greenblood Oars Spawner
DI_greenblood_oars_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = greenblood_oars
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = greenblood_oars
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = greenblood_oars
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = greenblood_oars
			}
		}
	}
}

### Sun Spears Spawner
DI_sun_spears_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = sun_spears
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = sun_spears
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = sun_spears
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = sun_spears
			}
		}
	}
}

### Sand Steeds Spawner
DI_sand_steeds_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = sand_steeds
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = sand_steeds
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = sand_steeds
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = sand_steeds
			}
		}
	}
}

### Pass Pikes Spawner
DI_pass_pikes_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = pass_pikes
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = pass_pikes
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = pass_pikes
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = pass_pikes
			}
		}
	}
}

### Star Carved Spawner
DI_star_carved_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = star_carved
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = star_carved
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = star_carved
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = star_carved
			}
		}
	}
}

### Qarlons Fallen Spawner
DI_qarlons_fallen_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = qarlons_fallen
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = qarlons_fallen
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = qarlons_fallen
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = qarlons_fallen
			}
		}
	}
}

### Smiths Axes Spawner
DI_smiths_axes_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = smiths_axes
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = smiths_axes
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = smiths_axes
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = smiths_axes
			}
		}
	}
}

### Lockstep Legion Spawner
DI_lockstep_legion_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = lockstep_legion
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = lockstep_legion
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = lockstep_legion
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = lockstep_legion
			}
		}
	}
}

### Iron Legion Spawner
DI_iron_legion_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = iron_legion
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = iron_legion
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = iron_legion
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = iron_legion
			}
		}
	}
}

### Market Guard Spawner
DI_market_guard_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = market_guard
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = market_guard
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = market_guard
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = market_guard
			}
		}
	}
}

### Skahazdahn Wardens Spawner
DI_skahazdahn_wardens_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = skahazdahn_wardens
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = skahazdahn_wardens
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = skahazdahn_wardens
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = skahazdahn_wardens
			}
		}
	}
}

### Dothraki Archers Spawner
DI_dothraki_archers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = dothraki_archers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = dothraki_archers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = dothraki_archers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = dothraki_archers
			}
		}
	}
}

### Shepherds Spawner
DI_shepherds_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = shepherds
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = shepherds
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = shepherds
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = shepherds
			}
		}
	}
}

### Tribute Guards Spawner
DI_tribute_guards_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = tribute_guards
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = tribute_guards
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = tribute_guards
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = tribute_guards
			}
		}
	}
}

### Port Guard Spawner
DI_port_guard_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = port_guard
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = port_guard
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = port_guard
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = port_guard
			}
		}
	}
}

### Mountain Spears Spawner
DI_mountain_spears_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = mountain_spears
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = mountain_spears
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = mountain_spears
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = mountain_spears
			}
		}
	}
}

### Sar Wardens Spawner
DI_sar_wardens_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = sar_wardens
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = sar_wardens
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = sar_wardens
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = sar_wardens
			}
		}
	}
}

### Patriarchal Guard Spawner
DI_patriarchal_guard_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = patriarchal_guard
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = patriarchal_guard
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = patriarchal_guard
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = patriarchal_guard
			}
		}
	}
}

### Bone Collectors Spawner
DI_bone_collectors_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = bone_collectors
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = bone_collectors
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = bone_collectors
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = bone_collectors
			}
		}
	}
}

### Stone Shields Spawner
DI_stone_shields_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = stone_shields
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = stone_shields
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = stone_shields
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = stone_shields
			}
		}
	}
}

### Sand Couriers Spawner
DI_sand_couriers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = sand_couriers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = sand_couriers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = sand_couriers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = sand_couriers
			}
		}
	}
}

### Asa Scouts Spawner
DI_asa_scouts_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = asa_scouts
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = asa_scouts
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = asa_scouts
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = asa_scouts
			}
		}
	}
}

### Ironborn Reavers Spawner
DI_ironborn_reavers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = ironborn_reavers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = ironborn_reavers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = ironborn_reavers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = ironborn_reavers
			}
		}
	}
}

### Black Blood Cavalry Spawner
DI_black_blood_cavalry_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = black_blood_cavalry
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = black_blood_cavalry
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = black_blood_cavalry
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = black_blood_cavalry
			}
		}
	}
}

### Depth Killers Spawner
DI_depth_killers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = depth_killers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = depth_killers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = depth_killers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = depth_killers
			}
		}
	}
}

### Jade Sailors Spawner
DI_jade_sailors_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = jade_sailors
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = jade_sailors
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = jade_sailors
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = jade_sailors
			}
		}
	}
}

### Poison Stings Spawner
DI_poison_stings_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = poison_stings
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = poison_stings
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = poison_stings
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = poison_stings
			}
		}
	}
}

### Crescent Blades Spawner
DI_crescent_blades_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = crescent_blades
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = crescent_blades
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = crescent_blades
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = crescent_blades
			}
		}
	}
}

### Moraqi Elephants Spawner
DI_moraqi_elephants_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = moraqi_elephants
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = moraqi_elephants
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = moraqi_elephants
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = moraqi_elephants
			}
		}
	}
}

### Shans Herd Spawner
DI_shans_herd_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = shans_herd
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = shans_herd
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = shans_herd
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = shans_herd
			}
		}
	}
}

### Blue Eyes Spawner
DI_blue_eyes_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = blue_eyes
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = blue_eyes
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = blue_eyes
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = blue_eyes
			}
		}
	}
}

### Stone Ranchers Spawner
DI_stone_ranchers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = stone_ranchers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = stone_ranchers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = stone_ranchers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = stone_ranchers
			}
		}
	}
}

### Barrow Knights Spawner
DI_barrow_knights_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = barrow_knights
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = barrow_knights
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = barrow_knights
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = barrow_knights
			}
		}
	}
}

### Frog Spears Spawner
DI_frog_spears_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = frog_spears
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = frog_spears
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = frog_spears
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = frog_spears
			}
		}
	}
}

### Cape Watch Spawner
DI_cape_watch_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = cape_watch
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = cape_watch
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = cape_watch
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = cape_watch
			}
		}
	}
}

### Green Hand Spawner
DI_green_hand_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = green_hand
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = green_hand
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = green_hand
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = green_hand
			}
		}
	}
}

### Clan Champions Spawner
DI_clan_champions_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = clan_champions
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = clan_champions
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = clan_champions
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = clan_champions
			}
		}
	}
}

### Winter Wolves Spawner
DI_winter_wolves_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = winter_wolves
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = winter_wolves
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = winter_wolves
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = winter_wolves
			}
		}
	}
}

### She Bears Spawner
DI_she_bears_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = she_bears
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = she_bears
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = she_bears
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = she_bears
			}
		}
	}
}

### Unicorn Riders Spawner
DI_unicorn_riders_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = unicorn_riders
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = unicorn_riders
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = unicorn_riders
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = unicorn_riders
			}
		}
	}
}

### Wolfswood Hunters Spawner
DI_wolfswood_hunters_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = wolfswood_hunters
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = wolfswood_hunters
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = wolfswood_hunters
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = wolfswood_hunters
			}
		}
	}
}

### Bronze Cavalry Spawner
DI_bronze_cavalry_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = bronze_cavalry
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = bronze_cavalry
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = bronze_cavalry
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = bronze_cavalry
			}
		}
	}
}

### Purple Marines Spawner
DI_purple_marines_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = purple_marines
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = purple_marines
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = purple_marines
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = purple_marines
			}
		}
	}
}

### Indentured Legion Spawner
DI_indentured_legion_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = indentured_legion
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = indentured_legion
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = indentured_legion
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = indentured_legion
			}
		}
	}
}

### Ar Archers Spawner
DI_ar_archers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = ar_archers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = ar_archers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = ar_archers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = ar_archers
			}
		}
	}
}

### Sun Guard Spawner
DI_sun_guard_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = sun_guard
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = sun_guard
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = sun_guard
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = sun_guard
			}
		}
	}
}

### Moroshi Pikes Spawner
DI_moroshi_pikes_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = moroshi_pikes
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = moroshi_pikes
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = moroshi_pikes
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = moroshi_pikes
			}
		}
	}
}

### Stair Guard Spawner
DI_stair_guard_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = stair_guard
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = stair_guard
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = stair_guard
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = stair_guard
			}
		}
	}
}

### Cohort Of The Three Thousand Spawner
DI_cohort_of_the_three_thousand_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = cohort_of_the_three_thousand
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = cohort_of_the_three_thousand
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = cohort_of_the_three_thousand
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = cohort_of_the_three_thousand
			}
		}
	}
}

### Pale Cavalry Spawner
DI_pale_cavalry_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = pale_cavalry
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = pale_cavalry
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = pale_cavalry
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = pale_cavalry
			}
		}
	}
}

### Gate Sailors Spawner
DI_gate_sailors_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = gate_sailors
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = gate_sailors
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = gate_sailors
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = gate_sailors
			}
		}
	}
}

### Civic Guard Spawner
DI_civic_guard_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = civic_guard
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = civic_guard
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = civic_guard
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = civic_guard
			}
		}
	}
}

### Summer Knights Spawner
DI_summer_knights_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = summer_knights
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = summer_knights
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = summer_knights
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = summer_knights
			}
		}
	}
}

### Honeywine Quirrels Spawner
DI_honeywine_quirrels_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = honeywine_quirrels
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = honeywine_quirrels
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = honeywine_quirrels
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = honeywine_quirrels
			}
		}
	}
}

### Misty Shields Spawner
DI_misty_shields_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = misty_shields
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = misty_shields
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = misty_shields
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = misty_shields
			}
		}
	}
}

### Arbor Marines Spawner
DI_arbor_marines_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = arbor_marines
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = arbor_marines
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = arbor_marines
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = arbor_marines
			}
		}
	}
}

### Mother Sworn Spawner
DI_mother_sworn_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = mother_sworn
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = mother_sworn
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = mother_sworn
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = mother_sworn
			}
		}
	}
}

### Festival Guards Spawner
DI_festival_guards_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = festival_guards
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = festival_guards
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = festival_guards
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = festival_guards
			}
		}
	}
}

### Shrouded Guard Spawner
DI_shrouded_guard_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = shrouded_guard
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = shrouded_guard
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = shrouded_guard
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = shrouded_guard
			}
		}
	}
}

### Flower Spears Spawner
DI_flower_spears_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = flower_spears
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = flower_spears
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = flower_spears
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = flower_spears
			}
		}
	}
}

### Green Daggers Spawner
DI_green_daggers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = green_daggers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = green_daggers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = green_daggers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = green_daggers
			}
		}
	}
}

### Garden Guard Spawner
DI_garden_guard_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = garden_guard
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = garden_guard
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = garden_guard
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = garden_guard
			}
		}
	}
}

### Grey Spears Spawner
DI_grey_spears_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = grey_spears
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = grey_spears
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = grey_spears
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = grey_spears
			}
		}
	}
}

### River Bows Spawner
DI_river_bows_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = river_bows
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = river_bows
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = river_bows
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = river_bows
			}
		}
	}
}

### Caravan Guards Spawner
DI_caravan_guards_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = caravan_guards
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = caravan_guards
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = caravan_guards
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = caravan_guards
			}
		}
	}
}

### Cymmeri Iron Shirts Spawner
DI_cymmeri_iron_shirts_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = cymmeri_iron_shirts
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = cymmeri_iron_shirts
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = cymmeri_iron_shirts
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = cymmeri_iron_shirts
			}
		}
	}
}

### Gipp Wicker Shields Spawner
DI_gipp_wicker_shields_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = gipp_wicker_shields
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = gipp_wicker_shields
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = gipp_wicker_shields
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = gipp_wicker_shields
			}
		}
	}
}

### Zoqora Chariots Spawner
DI_zoqora_chariots_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = zoqora_chariots
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = zoqora_chariots
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = zoqora_chariots
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = zoqora_chariots
			}
		}
	}
}

### Lake Wardens Spawner
DI_lake_wardens_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = lake_wardens
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = lake_wardens
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = lake_wardens
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = lake_wardens
			}
		}
	}
}

### Library Guard Spawner
DI_library_guard_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = library_guard
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = library_guard
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = library_guard
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = library_guard
			}
		}
	}
}

### Silver Shields Spawner
DI_silver_shields_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = silver_shields
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = silver_shields
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = silver_shields
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = silver_shields
			}
		}
	}
}

### Scythed Chariots Spawner
DI_scythed_chariots_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = scythed_chariots
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = scythed_chariots
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = scythed_chariots
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = scythed_chariots
			}
		}
	}
}

### Shining Cataphracts Spawner
DI_shining_cataphracts_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = shining_cataphracts
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = shining_cataphracts
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = shining_cataphracts
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = shining_cataphracts
			}
		}
	}
}

### Coin Collectors Spawner
DI_coin_collectors_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = coin_collectors
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = coin_collectors
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = coin_collectors
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = coin_collectors
			}
		}
	}
}

### Temple Guardians Spawner
DI_temple_guardians_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = temple_guardians
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = temple_guardians
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = temple_guardians
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = temple_guardians
			}
		}
	}
}

### Hill Runners Spawner
DI_hill_runners_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = hill_runners
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = hill_runners
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = hill_runners
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = hill_runners
			}
		}
	}
}

### Firstborne Spawner
DI_firstborne_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = firstborne
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = firstborne
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = firstborne
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = firstborne
			}
		}
	}
}

### Lastborne Spawner
DI_lastborne_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = lastborne
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = lastborne
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = lastborne
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = lastborne
			}
		}
	}
}

### Shadow Raiders Spawner
DI_shadow_raiders_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = shadow_raiders
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = shadow_raiders
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = shadow_raiders
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = shadow_raiders
			}
		}
	}
}

### Ash Wardens Spawner
DI_ash_wardens_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = ash_wardens
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = ash_wardens
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = ash_wardens
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = ash_wardens
			}
		}
	}
}

### Elyrian Sailors Spawner
DI_elyrian_sailors_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = elyrian_sailors
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = elyrian_sailors
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = elyrian_sailors
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = elyrian_sailors
			}
		}
	}
}

### Tolosi Slingers Spawner
DI_tolosi_slingers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = tolosi_slingers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = tolosi_slingers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = tolosi_slingers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = tolosi_slingers
			}
		}
	}
}

### Pit Fighters Spawner
DI_pit_fighters_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = pit_fighters
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = pit_fighters
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = pit_fighters
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = pit_fighters
			}
		}
	}
}

### Collared Bows Spawner
DI_collared_bows_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = collared_bows
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = collared_bows
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = collared_bows
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = collared_bows
			}
		}
	}
}

### Unsullied Spawner
DI_unsullied_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = unsullied
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = unsullied
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = unsullied
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = unsullied
			}
		}
	}
}

### Tear Sailors Spawner
DI_tear_sailors_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = tear_sailors
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = tear_sailors
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = tear_sailors
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = tear_sailors
			}
		}
	}
}

### Wyven Hunters Spawner
DI_wyven_hunters_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = wyven_hunters
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = wyven_hunters
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = wyven_hunters
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = wyven_hunters
			}
		}
	}
}

### Zamoyos Sailors Spawner
DI_zamoyos_sailors_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = zamoyos_sailors
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = zamoyos_sailors
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = zamoyos_sailors
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = zamoyos_sailors
			}
		}
	}
}

### Brindled Warriors Spawner
DI_brindled_warriors_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = brindled_warriors
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = brindled_warriors
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = brindled_warriors
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = brindled_warriors
			}
		}
	}
}

### Corsairs Spawner
DI_corsairs_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = corsairs
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = corsairs
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = corsairs
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = corsairs
			}
		}
	}
}

### Pen Guards Spawner
DI_pen_guards_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = pen_guards
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = pen_guards
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = pen_guards
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = pen_guards
			}
		}
	}
}

### Marcher Longbowmen Spawner
DI_marcher_longbowmen_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = marcher_longbowmen
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = marcher_longbowmen
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = marcher_longbowmen
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = marcher_longbowmen
			}
		}
	}
}

### Storm Knights Spawner
DI_storm_knights_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = storm_knights
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = storm_knights
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = storm_knights
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = storm_knights
			}
		}
	}
}

### Collar Breakers Spawner
DI_collar_breakers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = collar_breakers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = collar_breakers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = collar_breakers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = collar_breakers
			}
		}
	}
}

### Sunset Feathers Spawner
DI_sunset_feathers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = sunset_feathers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = sunset_feathers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = sunset_feathers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = sunset_feathers
			}
		}
	}
}

### Indigo Spears Spawner
DI_indigo_spears_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = indigo_spears
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = indigo_spears
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = indigo_spears
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = indigo_spears
			}
		}
	}
}

### Tree Speakers Spawner
DI_tree_speakers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = tree_speakers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = tree_speakers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = tree_speakers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = tree_speakers
			}
		}
	}
}

### Abulu Spears Spawner
DI_abulu_spears_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = abulu_spears
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = abulu_spears
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = abulu_spears
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = abulu_spears
			}
		}
	}
}

### Butterflies Spawner
DI_butterflies_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = butterflies
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = butterflies
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = butterflies
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = butterflies
			}
		}
	}
}

### Disputant Scouts Spawner
DI_disputant_scouts_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = disputant_scouts
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = disputant_scouts
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = disputant_scouts
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = disputant_scouts
			}
		}
	}
}

### Weeping Guard Spawner
DI_weeping_guard_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = weeping_guard
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = weeping_guard
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = weeping_guard
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = weeping_guard
			}
		}
	}
}

### Myrish Crossbows Spawner
DI_myrish_crossbows_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = myrish_crossbows
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = myrish_crossbows
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = myrish_crossbows
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = myrish_crossbows
			}
		}
	}
}

### Ornate Helms Spawner
DI_ornate_helms_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = ornate_helms
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = ornate_helms
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = ornate_helms
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = ornate_helms
			}
		}
	}
}

### Finger Scouts Spawner
DI_finger_scouts_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = finger_scouts
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = finger_scouts
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = finger_scouts
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = finger_scouts
			}
		}
	}
}

### Hunters Of The Moon Spawner
DI_hunters_of_the_moon_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = hunters_of_the_moon
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = hunters_of_the_moon
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = hunters_of_the_moon
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = hunters_of_the_moon
			}
		}
	}
}

### Sistermen Pirates Spawner
DI_sistermen_pirates_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = sistermen_pirates
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = sistermen_pirates
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = sistermen_pirates
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = sistermen_pirates
			}
		}
	}
}

### Winged Knights Spawner
DI_winged_knights_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = winged_knights
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = winged_knights
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = winged_knights
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = winged_knights
			}
		}
	}
}

### Rain Bringers Spawner
DI_rain_bringers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = rain_bringers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = rain_bringers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = rain_bringers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = rain_bringers
			}
		}
	}
}

### Clan Raiders Spawner
DI_clan_raiders_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = clan_raiders
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = clan_raiders
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = clan_raiders
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = clan_raiders
			}
		}
	}
}

### Bronze Raiders Spawner
DI_bronze_raiders_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = bronze_raiders
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = bronze_raiders
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = bronze_raiders
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = bronze_raiders
			}
		}
	}
}

### Sons Of Gendel Spawner
DI_sons_of_gendel_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = sons_of_gendel
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = sons_of_gendel
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = sons_of_gendel
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = sons_of_gendel
			}
		}
	}
}

### Fire Flingers Spawner
DI_fire_flingers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = fire_flingers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = fire_flingers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = fire_flingers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = fire_flingers
			}
		}
	}
}

### Cannibal Bows Spawner
DI_cannibal_bows_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = cannibal_bows
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = cannibal_bows
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = cannibal_bows
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = cannibal_bows
			}
		}
	}
}

### Bat Catchers Spawner
DI_bat_catchers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = bat_catchers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = bat_catchers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = bat_catchers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = bat_catchers
			}
		}
	}
}

### Ice Skatters Spawner
DI_ice_skatters_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = ice_skatters
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = ice_skatters
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = ice_skatters
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = ice_skatters
			}
		}
	}
}

### Cairn Wardens Spawner
DI_cairn_wardens_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = cairn_wardens
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = cairn_wardens
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = cairn_wardens
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = cairn_wardens
			}
		}
	}
}

### Wildling Raiders Spawner
DI_wildling_raiders_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = wildling_raiders
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = wildling_raiders
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = wildling_raiders
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = wildling_raiders
			}
		}
	}
}

### Dogsled Chariots Spawner
DI_dogsled_chariots_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = dogsled_chariots
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = dogsled_chariots
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = dogsled_chariots
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = dogsled_chariots
			}
		}
	}
}

### Black Soles Spawner
DI_black_soles_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = black_soles
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = black_soles
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = black_soles
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = black_soles
			}
		}
	}
}

### Stolen Spears Spawner
DI_stolen_spears_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = stolen_spears
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = stolen_spears
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = stolen_spears
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = stolen_spears
			}
		}
	}
}

### Pearl Phoenixes Spawner
DI_pearl_phoenixes_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = pearl_phoenixes
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = pearl_phoenixes
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = pearl_phoenixes
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = pearl_phoenixes
			}
		}
	}
}

### Jade Dragons Spawner
DI_jade_dragons_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = jade_dragons
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = jade_dragons
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = jade_dragons
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = jade_dragons
			}
		}
	}
}

### Tourmaline Tortoises Spawner
DI_tourmaline_tortoises_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = tourmaline_tortoises
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = tourmaline_tortoises
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = tourmaline_tortoises
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = tourmaline_tortoises
			}
		}
	}
}

### Onyx Crows Spawner
DI_onyx_crows_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = onyx_crows
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = onyx_crows
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = onyx_crows
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = onyx_crows
			}
		}
	}
}

### Topaz Tigers Spawner
DI_topaz_tigers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = topaz_tigers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = topaz_tigers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = topaz_tigers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = topaz_tigers
			}
		}
	}
}

### Opal Cranes Spawner
DI_opal_cranes_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = opal_cranes
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = opal_cranes
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = opal_cranes
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = opal_cranes
			}
		}
	}
}

### Scorpions Spawner
DI_scorpions_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = scorpions
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = scorpions
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = scorpions
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = scorpions
			}
		}
	}
}

### Water Wizards Spawner
DI_water_wizards_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = water_wizards
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = water_wizards
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = water_wizards
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = water_wizards
			}
		}
	}
}

### Dragons Regiment Spawner
DI_dragons_regiment_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = dragons_regiment
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = dragons_regiment
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = dragons_regiment
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = dragons_regiment
			}
		}
	}
}

### Shrikes Spawner
DI_shrikes_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = shrikes
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = shrikes
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = shrikes
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = shrikes
			}
		}
	}
}

### Poorfellow Skirmishers Spawner
DI_poorfellow_skirmishers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = poorfellow_skirmishers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = poorfellow_skirmishers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = poorfellow_skirmishers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = poorfellow_skirmishers
			}
		}
	}
}

### Warriors Sons Heavy Infantry Spawner
DI_warriors_sons_heavy_infantry_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = warriors_sons_heavy_infantry
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = warriors_sons_heavy_infantry
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = warriors_sons_heavy_infantry
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = warriors_sons_heavy_infantry
			}
		}
	}
}

### Warriors Sons Heavy Cav Spawner
DI_warriors_sons_heavy_cav_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = warriors_sons_heavy_cav
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = warriors_sons_heavy_cav
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = warriors_sons_heavy_cav
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = warriors_sons_heavy_cav
			}
		}
	}
}

### Holy Guard Spawner
DI_holy_guard_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = holy_guard
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = holy_guard
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = holy_guard
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = holy_guard
			}
		}
	}
}

### Fiery Hand Spawner
DI_fiery_hand_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = fiery_hand
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = fiery_hand
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = fiery_hand
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = fiery_hand
			}
		}
	}
}

### Dothraki Screamers Spawner
DI_dothraki_screamers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = dothraki_screamers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = dothraki_screamers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = dothraki_screamers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = dothraki_screamers
			}
		}
	}
}

### Knights Of The Dragon Spawner
DI_knights_of_the_dragon_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = knights_of_the_dragon
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = knights_of_the_dragon
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = knights_of_the_dragon
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = knights_of_the_dragon
			}
		}
	}
}

### Northern Spears Spawner
DI_northern_spears_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = northern_spears
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = northern_spears
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = northern_spears
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = northern_spears
			}
		}
	}
}

### Dornish Crossbows Spawner
DI_dornish_crossbows_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = dornish_crossbows
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = dornish_crossbows
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = dornish_crossbows
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = dornish_crossbows
			}
		}
	}
}

### Vale Heavy Infantry Spawner
DI_vale_heavy_infantry_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = vale_heavy_infantry
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = vale_heavy_infantry
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = vale_heavy_infantry
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = vale_heavy_infantry
			}
		}
	}
}

### Crownlands Spears Spawner
DI_crownlands_spears_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = crownlands_spears
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = crownlands_spears
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = crownlands_spears
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = crownlands_spears
			}
		}
	}
}

### Reach Light Cavalry Spawner
DI_reach_light_cavalry_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = reach_light_cavalry
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = reach_light_cavalry
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = reach_light_cavalry
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = reach_light_cavalry
			}
		}
	}
}

### Riverlands Light Infantry Spawner
DI_riverlands_light_infantry_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = riverlands_light_infantry
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = riverlands_light_infantry
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = riverlands_light_infantry
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = riverlands_light_infantry
			}
		}
	}
}

### Westerlands Knights Spawner
DI_westerlands_knights_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = westerlands_knights
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = westerlands_knights
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = westerlands_knights
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = westerlands_knights
			}
		}
	}
}

### Stormlands Heavy Infantry Spawner
DI_stormlands_heavy_infantry_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = stormlands_heavy_infantry
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = stormlands_heavy_infantry
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = stormlands_heavy_infantry
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = stormlands_heavy_infantry
			}
		}
	}
}

### Stepstone Sailors Spawner
DI_stepstone_sailors_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = stepstone_sailors
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = stepstone_sailors
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = stepstone_sailors
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = stepstone_sailors
			}
		}
	}
}

### Westerosi Sellswords Spawner
DI_westerosi_sellswords_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = westerosi_sellswords
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = westerosi_sellswords
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = westerosi_sellswords
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = westerosi_sellswords
			}
		}
	}
}

### Giant Regiment Spawner
DI_giant_regiment_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = giant_regiment
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = giant_regiment
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = giant_regiment
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = giant_regiment
			}
		}
	}
}

### Goldenheart Bowmen Spawner
DI_goldenheart_bowmen_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = goldenheart_bowmen
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = goldenheart_bowmen
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = goldenheart_bowmen
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = goldenheart_bowmen
			}
		}
	}
}

### Ruby Spearwomen Spawner
DI_ruby_spearwomen_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = ruby_spearwomen
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = ruby_spearwomen
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = ruby_spearwomen
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = ruby_spearwomen
			}
		}
	}
}

### Battering Ram Spawner
DI_battering_ram_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = battering_ram
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = battering_ram
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = battering_ram
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = battering_ram
			}
		}
	}
}

### Sarsfield Horse Archers Spawner
DI_sarsfield_horse_archers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = sarsfield_horse_archers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = sarsfield_horse_archers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = sarsfield_horse_archers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = sarsfield_horse_archers
			}
		}
	}
}

### Nw Rangers Spawner
DI_nw_rangers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = nw_rangers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = nw_rangers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = nw_rangers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = nw_rangers
			}
		}
	}
}

### Nw Trackers Spawner
DI_nw_trackers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = nw_trackers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = nw_trackers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = nw_trackers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = nw_trackers
			}
		}
	}
}

### Sworn Brothers Spawner
DI_sworn_brothers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = sworn_brothers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = sworn_brothers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = sworn_brothers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = sworn_brothers
			}
		}
	}
}

### Shadow Spears Spawner
DI_shadow_spears_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = shadow_spears
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = shadow_spears
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = shadow_spears
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = shadow_spears
			}
		}
	}
}

### Eastwatch Sailors Spawner
DI_eastwatch_sailors_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = eastwatch_sailors
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = eastwatch_sailors
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = eastwatch_sailors
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = eastwatch_sailors
			}
		}
	}
}

### Pirate Archers Spawner
DI_pirate_archers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = pirate_archers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = pirate_archers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = pirate_archers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = pirate_archers
			}
		}
	}
}

### Pirate Pikemen Spawner
DI_pirate_pikemen_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = pirate_pikemen
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = pirate_pikemen
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = pirate_pikemen
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = pirate_pikemen
			}
		}
	}
}

### Pirate Skirmishers Spawner
DI_pirate_skirmishers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = pirate_skirmishers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = pirate_skirmishers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = pirate_skirmishers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = pirate_skirmishers
			}
		}
	}
}

### Laamp Settler Maa Spawner
DI_laamp_settler_maa_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = laamp_settler_maa
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = laamp_settler_maa
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = laamp_settler_maa
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = laamp_settler_maa
			}
		}
	}
}

### Goldcloaks Spawner
DI_goldcloaks_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = goldcloaks
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = goldcloaks
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = goldcloaks
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = goldcloaks
			}
		}
	}
}

### Sea Watch Spawner
DI_sea_watch_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = sea_watch
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = sea_watch
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = sea_watch
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = sea_watch
			}
		}
	}
}

### Redcloaks Spawner
DI_redcloaks_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = redcloaks
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = redcloaks
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = redcloaks
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = redcloaks
			}
		}
	}
}

### Greycloaks Spawner
DI_greycloaks_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = greycloaks
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = greycloaks
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = greycloaks
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = greycloaks
			}
		}
	}
}

### Cailin Archers Spawner
DI_cailin_archers_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = cailin_archers
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = cailin_archers
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = cailin_archers
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = cailin_archers
			}
		}
	}
}

### Grey Wolves Spawner
DI_grey_wolves_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = grey_wolves
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = grey_wolves
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = grey_wolves
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = grey_wolves
			}
		}
	}
}

### Hammers Of Justice Spawner
DI_hammers_of_justice_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = hammers_of_justice
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = hammers_of_justice
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = hammers_of_justice
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = hammers_of_justice
			}
		}
	}
}

### Morne Guardians Spawner
DI_morne_guardians_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = morne_guardians
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = morne_guardians
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = morne_guardians
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = morne_guardians
			}
		}
	}
}

### Dust Devils Spawner
DI_dust_devils_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = dust_devils
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = dust_devils
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = dust_devils
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = dust_devils
			}
		}
	}
}

### Head Collectors Spawner
DI_head_collectors_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = head_collectors
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = head_collectors
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = head_collectors
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = head_collectors
			}
		}
	}
}

### Cruel Chains Spawner
DI_cruel_chains_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = cruel_chains
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = cruel_chains
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = cruel_chains
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = cruel_chains
			}
		}
	}
}

### Bloody Blades Spawner
DI_bloody_blades_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = bloody_blades
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = bloody_blades
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = bloody_blades
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = bloody_blades
			}
		}
	}
}

### Sharp Claws Spawner
DI_sharp_claws_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = sharp_claws
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = sharp_claws
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = sharp_claws
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = sharp_claws
			}
		}
	}
}

### Ursulas Screams Spawner
DI_ursulas_screams_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = ursulas_screams
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = ursulas_screams
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = ursulas_screams
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = ursulas_screams
			}
		}
	}
}

### Wildling Cavalry Spawner
DI_wildling_cavalry_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = wildling_cavalry
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = wildling_cavalry
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = wildling_cavalry
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = wildling_cavalry
			}
		}
	}
}

### Triarchs Herd Spawner
DI_triarchs_herd_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = triarchs_herd
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = triarchs_herd
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = triarchs_herd
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = triarchs_herd
			}
		}
	}
}

### Wights Spawner
DI_wights_effect = {
	scope = character

	effect = {
		random_owned_story = {
			limit = {
				story_type = DI_misc_variables_story
			}
			save_scope_as = DI_story
		}
		
		if = {
			limit = {
				scope:DI_story = { has_variable = DI_pinned_char_var }
			}
			every_living_character = {
				limit = { has_character_flag = pinned_for_edit }
				save_scope_as = target

				spawn_army = {
					men_at_arms = {
						type = wights
						men = scope:DI_story.var:DI_army_spawner_increment_value
					}
					location = scope:target.location
					inheritable = no
					name = wights
				}
			}
		}
		else = {
			spawn_army = {
				men_at_arms = {
					type = wights
					men = scope:DI_story.var:DI_army_spawner_increment_value
				}
				location = root.location
				inheritable = no
				name = wights
			}
		}
	}
}
