<?xml version="1.0" encoding="utf-8"?>
<Defs>

	<!--

		Summary of how this works:

		========= stats
		<gunStats> are the verbprops that are gived to the patched def
		Mass, Bulk, Spread and Sway values are just the other base stats for it. If you add the stat curves, or special gun specs in <specialGuns> they will be overriden with those specified in the curves/specialguns

		========= matching
		for a gun to be autopatched they need to match the def. Only one of the determiners are needed for the def to be patched. The determiners are:
		- names. Just a list of names (labels) the guns can have
			** DiscardDesignations can be used to ignore shit like A1 **
		- tags. If a gun has one of these tags the gun matches the preset.
		- <DamageRange>, <ProjSpeedRange>, <RangeRange> and <WarmupRange>. If a gun has the projectile and verb properties values included in ALL of these ranges the gun matches the preset.
		- special guns. If one of the special gun specs includes the name of the gun the gun matches the preset BUT their stats will be taken from the special gun spec

		======== special guns and caliber ranges
		- special guns - description WiP, most of it is explained in special guns section in ========matching 
		- caliber ranges. DOES NOT take a part in matching. All this does is it makes the gun's caliber the one specified if the damage AND speed ranges include BOTH the damage and speed
		
	-->

	<CombatExtended.GunPatcherPresetDef>
		<defName>SMGs</defName>
		<gunStats>
			<recoilAmount>1.50</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_9x19mmPara_FMJ</defaultProjectile>
			<warmupTime>0.6</warmupTime>
			<range>26</range>
			<burstShotCount>6</burstShotCount>
			<ticksBetweenBurstShots>5</ticksBetweenBurstShots>
			<soundCast>Shot_MachinePistol</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</gunStats>
		<Mass>2.5</Mass>
		<Bulk>4.5</Bulk>
		<Spread>0.14</Spread>
		<Sway>0.93</Sway>

		<addTags>
			<li>CE_AI_BROOM</li>
		</addTags>

		<fireModes>
			<aiUseBurstMode>FALSE</aiUseBurstMode>
			<aiAimMode>Snapshot</aiAimMode>
			<aimedBurstShotCount>3</aimedBurstShotCount>
		</fireModes>
		<setCaliber>AmmoSet_9x19mmPara</setCaliber>
		<AmmoCapacity>30</AmmoCapacity>
		<ReloadTime>4</ReloadTime>

		<!-- ==================================== -->
		<!-- Currently examples are from MP5A2 and MP7 -->
		<!-- If you're trying to make stats for certain guns, like the mentioned MP7 and MP5 just use specialguns -->
		<rangeCurve>
			<points>
				<li>25, 26</li>
				<li>22.5, 25</li>
			</points>
		</rangeCurve>
		<warmupCurve>
			<points>
				<!-- same for both mp7 and mp5 -->
				<li>0.5, 0.6</li>
			</points>
		</warmupCurve>
		<cooldownCurve>
			<points>
				<!-- same for both mp7 and mp5 -->
				<li>0.9, 0.36</li>
			</points>
		</cooldownCurve>
		<MassCurve>
			<points>
				<li>2, 1.96</li>
				<li>2.1, 2.7</li>
			</points>
		</MassCurve>

		<!-- ==== DEF MATCHING ==== -->
		<names>
			<!-- all stuff is non capitalised -->
		</names>

		<tags>
			<!-- this stuff IS capitalised -->
		</tags>

		<!--
			 this basically makes matcher ignore stuff like "A1" if it's not separated (for example MP5A2)
			 DONT use this to determine guns with capital A-s in name (like AK74)
		 -->
		<DiscardDesignations>true</DiscardDesignations>

		<!-- Verb properties values determiners -->
		<RangeRange>20~25</RangeRange>
		<WarmupRange>0.4~0.81</WarmupRange>

		<!-- Projectile properties values determiners -->
		<damageRange>6~15</damageRange>
		<projSpeedRange>54~70</projSpeedRange>

		<!-- ==== Special gun specifications ==== -->
		<specialGuns>
			<li>
				<magCap>50</magCap>
				<reloadTime>4.5</reloadTime>
				<mass>2.5</mass>
				<bulk>6.5</bulk>
				<caliber>AmmoSet_FN57x28mm</caliber>
				<names>
					<li>p90</li>
				</names>
				<!-- Any stats you wanna put in. Mass and bulk can be ovewritten with this-->
				<stats>

				</stats>
			</li>
		</specialGuns>

		<!-- ==== Caliber determination ==== -->
		<CaliberRanges>
			<li>
				<DamageRange>9~9</DamageRange>
				<SpeedRange>56~60</SpeedRange>
				<AmmoSet>AmmoSet_9x19mmPara</AmmoSet>
			</li>
			<li>
				<DamageRange>11~14</DamageRange>
				<SpeedRange>46~54</SpeedRange>
				<AmmoSet>AmmoSet_45ACP</AmmoSet>
			</li>
			<li>
				<DamageRange>6~6</DamageRange>
				<SpeedRange>61~65</SpeedRange>
				<AmmoSet>AmmoSet_46x30mm</AmmoSet>
			</li>
			<li>
				<DamageRange>7~7</DamageRange>
				<SpeedRange>61~65</SpeedRange>
				<AmmoSet>AmmoSet_FN57x28mm</AmmoSet>
			</li>
		</CaliberRanges>
		<DetermineCaliber>true</DetermineCaliber>
	</CombatExtended.GunPatcherPresetDef>

</Defs>