<?xml version="1.0" encoding="utf-8"?>
<Items>
  <!-- Shared Effects -->
  <Item name="" identifier="ekgunnery_smallflare_effect" tags="decoy,light,provocative" Scale="0.5" impactsoundtag="impact_soft" sonarsize="5" hideinmenus="true">
    <Sprite texture="%ModDir%/Items/Weapons/ekgunnery_new_loaders.png" depth="0.8" sourcerect="0,0,112,112" origin="0.5,0.5" />
    <Body width="50" height="50" density="10.5" />
    <AiTarget sightrange="6000.0" maxsoundrange="8000" minsoundrange="0" fadeouttime="15" sonardisruption="0.4" />
    <LightComponent characterusable="false" LightColor="255,50,50,255" Flicker="0.5" range="2048" IsOn="true" shadows="false" drawbehindsubs="true">
      <LightTexture texture="%ModDir%/Lights/pointlight_bright_q4.png" origin="0.0,0.0" size="1.1,1.1" />
      <sound file="Content/Items/Tools/FlareLoop.ogg" type="OnActive" range="2048.0" loop="true" />
      <StatusEffect type="OnActive" target="This" Condition="-1">
        <Conditional PhysicsBodyActive="eq true" />
        <ParticleEmitter particle="flare" particlespersecond="5" scalemin="5" scalemax="5" />
        <ParticleEmitter particle="ekgunneryflarelight1" particlespersecond="30" scalemin="2.0" scalemax="2.75" velocitymin="0" velocitymax="35" distancemin="0" distancemax="32" />
        <ParticleEmitter particle="ekgunneryflarebubbles" particlespersecond="6" />
      </StatusEffect>
    </LightComponent>
    <LightComponent characterusable="false" LightColor="255,50,50,255" Flicker="0.4" range="2048" IsOn="true" shadows="false" drawbehindsubs="true">
      <LightTexture texture="%ModDir%/Lights/pointlight_bright_q3.png" origin="1.0,0.0" size="1.1,1.1" />
    </LightComponent>
    <LightComponent characterusable="false" LightColor="255,50,50,255" Flicker="0.4" range="2048" IsOn="true" shadows="false" drawbehindsubs="true">
      <LightTexture texture="%ModDir%/Lights/pointlight_bright_q2.png" origin="0.0,1.0" size="1.1,1.1" />
    </LightComponent>
    <LightComponent characterusable="false" LightColor="255,50,50,255" Flicker="0.4" range="2048" IsOn="true" shadows="false" drawbehindsubs="true">
      <LightTexture texture="%ModDir%/Lights/pointlight_bright_q1.png" origin="1.0,1.0" size="1.1,1.1" />
    </LightComponent>
    <ItemComponent>
      <StatusEffect type="OnBroken" target="This">
        <Remove />
      </StatusEffect>
    </ItemComponent>
  </Item>
  <Item name="" identifier="ekgunnery_megaflare_effect" Scale="0.5" impactsoundtag="impact_soft" sonarsize="5" hideinmenus="true">
    <Sprite texture="%ModDir%/Items/Weapons/ekgunnery_new_loaders.png" depth="0.8" sourcerect="0,0,112,112" origin="0.5,0.5" />
    <Body width="50" height="50" density="10.7" />
    <AiTarget sightrange="6000.0" maxsoundrange="8000" minsoundrange="0" fadeouttime="15" sonardisruption="5" />
    <LightComponent characterusable="false" LightColor="255,200,165,255" Flicker="0.2" range="2048" IsOn="true" shadows="false" drawbehindsubs="true">
      <LightTexture texture="%ModDir%/Lights/pointlight_bright_q4.png" origin="0.0,0.0" size="1.1,1.1" />
      <sound file="Content/Items/Tools/FlareLoop.ogg" type="OnActive" range="2048.0" loop="true" />
      <StatusEffect type="OnActive" target="This" Condition="-1">
        <Conditional PhysicsBodyActive="eq true" />
        <ParticleEmitter particle="ekgunneryflarelight3" particlespersecond="30" scalemin="2.25" scalemax="2.50" velocitymin="0" velocitymax="35" distancemin="-32,-32" distancemax="32,32" />
        <ParticleEmitter particle="ekgunneryflarebubbles" particlespersecond="6" />
      </StatusEffect>
    </LightComponent>
    <LightComponent characterusable="false" LightColor="255,200,165,255" Flicker="0.2" range="2048" IsOn="true" shadows="false" drawbehindsubs="true">
      <LightTexture texture="%ModDir%/Lights/pointlight_bright_q3.png" origin="1.0,0.0" size="1.1,1.1" />
    </LightComponent>
    <LightComponent characterusable="false" LightColor="255,200,165,255" Flicker="0.2" range="2048" IsOn="true" shadows="false" drawbehindsubs="true">
      <LightTexture texture="%ModDir%/Lights/pointlight_bright_q2.png" origin="0.0,1.0" size="1.1,1.1" />
    </LightComponent>
    <LightComponent characterusable="false" LightColor="255,200,165,255" Flicker="0.2" range="2048" IsOn="true" shadows="false" drawbehindsubs="true">
      <LightTexture texture="%ModDir%/Lights/pointlight_bright_q1.png" origin="1.0,1.0" size="1.1,1.1" />
    </LightComponent>
    <ItemComponent>
      <StatusEffect type="OnBroken" target="This">
        <Remove />
      </StatusEffect>
    </ItemComponent>
  </Item>
  <!-- Test workaround for particle editor being broken -->
  <!--
  <Item name="ekgunnerydebug_impactmedium" identifier="ekgunnerydebug_impactmedium" tags="decoy,light,provocative" Scale="0.5" impactsoundtag="impact_soft" sonarsize="5" hideinmenus="true">
    <Sprite texture="Mods/EK Gunnery/Items/Weapons/ekgunnery_new_loaders.png" depth="0.8" sourcerect="0,0,112,112" origin="0.5,0.5" />
    <Body width="50" height="50" density="10.5" />
	<AiTarget sightrange="6000.0" maxsoundrange="8000" minsoundrange="0" fadeouttime="15" sonardisruption="0.4"/>
    <LightComponent characterusable="false" LightColor="255,50,50,255" Flicker="0.5" range="2048" IsOn="true" shadows="false" drawbehindsubs="true">
      <StatusEffect type="OnActive" target="This" Condition="-1">
        <Conditional PhysicsBodyActive="eq true" />
        <ParticleEmitter particle="ekgunnery_hdimpactmedium" particlespersecond="2" scalemin="1.0" scalemax="1.0" velocitymin="0" velocitymax="35" distancemin="0" distancemax="32"/>
      </StatusEffect>
    </LightComponent>
    <ItemComponent>
      <StatusEffect type="OnBroken" target="This">
        <Remove />
      </StatusEffect>
    </ItemComponent>
  </Item>
  <Item name="ekgunnerydebug_impactlarge" identifier="ekgunnerydebug_impactlarge" tags="decoy,light,provocative" Scale="0.5" impactsoundtag="impact_soft" sonarsize="5" hideinmenus="true">
    <Sprite texture="Mods/EK Gunnery/Items/Weapons/ekgunnery_new_loaders.png" depth="0.8" sourcerect="0,0,112,112" origin="0.5,0.5" />
    <Body width="50" height="50" density="10.5" />
	<AiTarget sightrange="6000.0" maxsoundrange="8000" minsoundrange="0" fadeouttime="15" sonardisruption="0.4"/>
    <LightComponent characterusable="false" LightColor="255,50,50,255" Flicker="0.5" range="2048" IsOn="true" shadows="false" drawbehindsubs="true">
      <StatusEffect type="OnActive" target="This" Condition="-1">
        <Conditional PhysicsBodyActive="eq true" />
        <ParticleEmitter particle="ekgunneryimpactlarge" particlespersecond="2" scalemin="1.0" scalemax="1.0" velocitymin="0" velocitymax="35" distancemin="0" distancemax="32"/>
      </StatusEffect>
    </LightComponent>
    <ItemComponent>
      <StatusEffect type="OnBroken" target="This">
        <Remove />
      </StatusEffect>
    </ItemComponent>
  </Item>
  <Item name="ekgunnerydebug_impactfirearm" identifier="ekgunnerydebug_impactfirearm" tags="decoy,light,provocative" Scale="0.5" impactsoundtag="impact_soft" sonarsize="5" hideinmenus="true">
    <Sprite texture="Mods/EK Gunnery/Items/Weapons/ekgunnery_new_loaders.png" depth="0.8" sourcerect="0,0,112,112" origin="0.5,0.5" />
    <Body width="50" height="50" density="10.5" />
	<AiTarget sightrange="6000.0" maxsoundrange="8000" minsoundrange="0" fadeouttime="15" sonardisruption="0.4"/>
    <LightComponent characterusable="false" LightColor="255,50,50,255" Flicker="0.5" range="2048" IsOn="true" shadows="false" drawbehindsubs="true">
      <StatusEffect type="OnActive" target="This" Condition="-1">
        <Conditional PhysicsBodyActive="eq true" />
        <ParticleEmitter particle="flare" particlespersecond="5" scalemin="5" scalemax="5"/>
        <ParticleEmitter particle="ekgunneryflarelight1" particlespersecond="2" scalemin="2.0" scalemax="2.75" velocitymin="0" velocitymax="35" distancemin="0" distancemax="32"/>
      </StatusEffect>
    </LightComponent>
    <ItemComponent>
      <StatusEffect type="OnBroken" target="This">
        <Remove />
      </StatusEffect>
    </ItemComponent>
  </Item>
  -->
  <!-- Heavy Railgun Ammo -->
  <Item name="" identifier="ekgunnery_heavyrailgunshell" tags="heavyrailgunammo,ekgunnery_largeshell,largeammo,ammobox,crate" showcontentsintooltip="true" category="Misc,Weapon" sonarsize="5" scale="0.5" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="heavyrailgunammocontainer" />
    <Price baseprice="125" soldeverywhere="false">
      <Price storeidentifier="merchantoutpost" multiplier="1.5" minavailable="2" />
      <Price storeidentifier="merchantcity" multiplier="1.25" minavailable="2" />
      <Price storeidentifier="merchantresearch" multiplier="1.25" minavailable="2" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="6" />
      <Price storeidentifier="merchantmine" multiplier="1.25" sold="false" />
    </Price>
    <!--
	20
	65
	-->
    <Deconstruct time="10">
      <Item identifier="steel" mincondition="0.8" />
      <Item identifier="titanium" mincondition="0.8" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="20">
      <RequiredSkill identifier="weapons" level="25" />
      <RequiredItem identifier="steel" />
      <RequiredItem identifier="titanium" />
    </Fabricate>
    <InventoryIcon texture="%ModDir%/Items/Weapons/ekgunnery_heavyrailgunammo.png" sourcerect="416,0,32,32" />
    <Sprite texture="%ModDir%/Items/Weapons/ekgunnery_heavyrailgunammo.png" sourcerect="0,0,320,64" depth="0.55" origin="0.5,0.5" />
    <ContainedSprite allowedcontainertags="ekgunnery_heavyrailguncontainer_compact" texture="%ModDir%/Items/Weapons/ekgunnery_heavyrailgunammo.png" sourcerect="352,0,64,64" depth="0.54" origin="0.5,0.5" />
    <ContainedSprite allowedcontainertags="ammocontainer,cargocontainer,coilgunammocontainer,crateshelf,ammoboxcontainer" allowedcontaineridentifiers="crateshelf,coilgunammoshelf" texture="%ModDir%/Items/Weapons/ekgunnery_heavyrailgunammo.png" sourcerect="352,0,64,64" depth="0.54" origin="0.5,0.35" />
    <Body width="308" height="50" density="30" />
    <Holdable slots="RightHand+LeftHand" holdpos="15,-40" handle1="-25,-10" handle2="25,-5" holdangle="15" aimable="false" msg="ItemMsgPickUpSelect">
      <StatusEffect type="OnActive" target="Character" SpeedMultiplier="0.35" setvalue="true" />
    </Holdable>
    <Projectile characterusable="false" launchimpulse="80.0" maxtargetstohit="2">
      <Attack structuredamage="125" itemdamage="200" severlimbsprobability="1.9" penetration="0.8">
        <Affliction identifier="gunshotwound" strength="100" />
        <Affliction identifier="lacerations" strength="250" />
        <Affliction identifier="blunttrauma" strength="200" />
        <Affliction identifier="bleeding" strength="100" />
        <Affliction identifier="stun" strength="10" />
      </Attack>
      <StatusEffect type="OnActive" target="This" condition="-10" />
      <!-- velocity jumping fix -->
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" stackable="false" condition="-1">
        <Conditional condition="eq 100" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" stackable="false" delay="0.3" checkconditionalalways="true">
        <Conditional condition="gt 80" />
        <Use />
      </StatusEffect>
      <!-- lacerations=100 blunttrauma=100 bleeding=50 stun=10
	  <StatusEffect type="OnImpact" target="Limb" disabledeltatime="true">
        <Affliction identifier="ekgunnery_piercingeffect_heavyrailgun" amount="5000" />
      </StatusEffect>
	  -->
      <StatusEffect type="OnActive" target="This">
        <Conditional condition="gt 80" />
        <ParticleEmitter particle="bubbles" anglemin="0" anglemax="360" particleamount="2" velocitymin="0" velocitymax="200" scalemin="2" scalemax="4.5" />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This">
        <Conditional condition="gt 70" />
        <ParticleEmitter particle="ekgunneryheavyrailgunshellshockwave" copyentityangle="true" anglemin="0" anglemax="0" particlespersecond="30" velocitymin="500" velocitymax="500" scalemin="1" scalemax="1" />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This">
        <Conditional condition="lt 80" />
        <ParticleEmitter particle="bubbles" anglemin="0" anglemax="360" particleamount="1" velocitymin="0" velocitymax="50" scalemin="1" scalemax="3" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="Contained">
        <sound file="%ModDir%/Items/Weapons/ekgunnery_heavyshell_distant1.ogg" selectionmode="Random" range="25000" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_heavyshell_distant2.ogg" selectionmode="Random" range="25000" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_heavyshell_distant3.ogg" selectionmode="Random" range="25000" />
        <ParticleEmitter particle="shrapnel" copyentityangle="true" anglemin="0" anglemax="360" particleamount="30" velocitymin="100" velocitymax="2000" scalemin="1.5" scalemax="2.0" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="UseTarget">
        <Conditional entitytype="eq Structure" />
        <Conditional hastag="eq door" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_heavyshell_ap1.ogg" selectionmode="Random" range="5000" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_heavyshell_ap2.ogg" selectionmode="Random" range="5000" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_heavyshell_ap3.ogg" selectionmode="Random" range="5000" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_heavyshell_ap4.ogg" selectionmode="Random" range="5000" />
        <ParticleEmitter particle="ekgunnery_hdimpactmedium" particleamount="1" velocitymin="0" velocitymax="0" scalemin="2" scalemax="3" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-25" anglemax="25" particleamount="8" velocitymin="-100" velocitymax="-1000" scalemin="2" scalemax="4" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-30" anglemax="30" particleamount="10" velocitymin="100" velocitymax="2000" scalemin="2" scalemax="4" />
        <ParticleEmitter particle="shrapnel" copyentityangle="true" anglemin="-20" anglemax="20" particleamount="10" velocitymin="100" velocitymax="2000" scalemin="2" scalemax="4" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="This" Condition="-55.0" disabledeltatime="true">
        <Explosion range="300.0" structuredamage="75" itemdamage="150" force="50.0" severlimbsprobability="1.9" decal="explosion">
          <Affliction identifier="explosiondamage" strength="500" />
          <Affliction identifier="stun" strength="2" />
        </Explosion>
      </StatusEffect>
      <!-- Remove the item after exploding -->
      <StatusEffect type="OnBroken" target="This">
        <Remove />
      </StatusEffect>
    </Projectile>
    <ItemContainer hideitems="true" capacity="2" maxstacksize="1" canbeselected="false">
      <GuiFrame relativesize="0.2,0.25" anchor="Center" minsize="140,170" maxsize="280,280" style="ItemUI" />
      <Containable items="smallitem,ekshared_largeshellexplosive" />
    </ItemContainer>
  </Item>
  <Item name="" identifier="ekgunnery_heavyrailgunflechetteshell" tags="heavyrailgunammo,ekgunnery_largeshell,largeammo,ammobox,crate" showcontentsintooltip="true" category="Misc,Weapon" sonarsize="5" scale="0.5" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="heavyrailgunammocontainer,ekgunnery_heavyrailgunammosource" />
    <Price baseprice="160" soldeverywhere="false">
      <Price storeidentifier="merchantoutpost" multiplier="1.5" sold="false" />
      <Price storeidentifier="merchantcity" multiplier="1.25" sold="false" />
      <Price storeidentifier="merchantresearch" multiplier="1.25" sold="false" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="3" />
      <Price storeidentifier="merchantmine" multiplier="1.25" sold="false" />
    </Price>
    <!--
	20
	65
	65
	-->
    <Deconstruct time="10">
      <Item identifier="steel" mincondition="0.8" />
      <Item identifier="titanium" mincondition="0.8" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="20">
      <RequiredSkill identifier="weapons" level="25" />
      <RequiredItem identifier="steel" />
      <RequiredItem identifier="titanium" />
      <RequiredItem identifier="titanium" />
    </Fabricate>
    <InventoryIcon texture="%ModDir%/Items/Weapons/ekgunnery_heavyrailgunammo.png" sourcerect="416,125,32,32" />
    <Sprite texture="%ModDir%/Items/Weapons/ekgunnery_heavyrailgunammo.png" sourcerect="0,125,320,64" depth="0.55" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Weapons/ekgunnery_heavyrailgunammo.png" sourcerect="0,0,1,1" depth="0.55" origin="0.5,0.5" maxcondition="97" />
    <ContainedSprite allowedcontainertags="ekgunnery_heavyrailguncontainer_compact" texture="%ModDir%/Items/Weapons/ekgunnery_heavyrailgunammo.png" sourcerect="352,125,64,64" depth="0.54" origin="0.5,0.5" />
    <ContainedSprite allowedcontainertags="ammocontainer,cargocontainer,coilgunammocontainer,crateshelf,ammoboxcontainer" allowedcontaineridentifiers="crateshelf,coilgunammoshelf" texture="%ModDir%/Items/Weapons/ekgunnery_heavyrailgunammo.png" sourcerect="352,125,64,64" depth="0.54" origin="0.5,0.35" />
    <Body width="308" height="50" density="30" />
    <Holdable slots="RightHand+LeftHand" holdpos="15,-40" handle1="-25,-10" handle2="25,-5" holdangle="15" aimable="false" msg="ItemMsgPickUpSelect">
      <StatusEffect type="OnActive" target="Character" SpeedMultiplier="0.35" setvalue="true" />
    </Holdable>
    <Projectile characterusable="false" launchimpulse="80.0" maxtargetstohit="3">
      <Attack structuredamage="125" itemdamage="200" severlimbsprobability="1.9" penetration="0.75">
        <Affliction identifier="lacerations" strength="150" />
        <Affliction identifier="blunttrauma" strength="150" />
        <Affliction identifier="bleeding" strength="100" />
        <Affliction identifier="stun" strength="10" />
      </Attack>
      <StatusEffect type="OnActive" target="Contained" disabledeltatime="true" delay="0.005">
        <Use />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" condition="-4" disabledeltatime="true" delay="0.005">
        <Conditional condition="gt 0" />
        <SpawnItem identifiers="ekgunnery_heavyrailgunflechettepellet" spawnposition="ThisInventory" />
        <SpawnItem identifiers="ekgunnery_heavyrailgunflechettepellet" spawnposition="ThisInventory" />
        <SpawnItem identifiers="ekgunnery_heavyrailgunflechettepellet" spawnposition="ThisInventory" />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" condition="-100" disabledeltatime="true" delay="0.4" />
      <StatusEffect type="OnBroken" target="This">
        <Remove />
      </StatusEffect>
    </Projectile>
    <ItemContainer autofill="False" hideitems="true" capacity="2" maxstacksize="1" removecontaineditemsondeconstruct="true" drawinventory="false" canbeselected="false" ShowConditionInContainedStateIndicator="true">
      <Containable identifiers="ekgunnery_heavyrailgunflechettepellet" />
      <ContainedStateIndicator texture="Content/UI/ContainerIndicators.png" sourcerect="0,0,1,1" />
    </ItemContainer>
  </Item>
  <Item name="ekgunnery_heavyrailgunflechettepellet" identifier="ekgunnery_heavyrailgunflechettepellet" category="Misc,Weapon" scale="0.32" sonarsize="2" hideinmenus="true">
    <Sprite texture="%ModDir%/Items/Weapons/ekgunnery_heavyrailgunammo.png" sourcerect="0,0,1,1" depth="0.55" origin="0.5,0.5" />
    <Body width="40" height="40" density="15" />
    <Projectile characterusable="false" launchimpulse="100.0" impulsespread="0.25" spread="30" maxtargetstohit="2">
      <Attack structuredamage="75" itemdamage="75" severlimbsprobability="0.3" penetration="0.45">
        <!--
		<Affliction identifier="gunshotwound" strength="75" />
        <Affliction identifier="lacerations" strength="100" />
        <Affliction identifier="bleeding" strength="25" />
		-->
        <Affliction identifier="gunshotwound" strength="20" />
        <Affliction identifier="lacerations" strength="50" />
        <Affliction identifier="blunttrauma" strength="40" />
        <Affliction identifier="stun" strength="2" />
      </Attack>
      <StatusEffect type="OnActive" target="This" condition="-55">
        <ParticleEmitter particle="bubbles" anglemin="0" anglemax="360" particlespersecond="20" velocitymin="-50" velocitymax="50" scalemin="1.5" scalemax="2.0" />
      </StatusEffect>
      <!--
	  <StatusEffect type="OnActive" target="This" disabledeltatime="true" stackable="false" delay="0.3" checkconditionalalways="true" >
        <Conditional condition="gt 90"/>
        <Use />
      </StatusEffect>
	  -->
      <StatusEffect type="OnNotContained" target="This" stackable="false" delay="3.5">
        <Remove />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="This" condition="-55">
        <ParticleEmitter particle="shrapnel" copyentityangle="true" anglemin="0" anglemax="360" particleamount="30" velocitymin="100" velocitymax="1000" scalemin="1.0" scalemax="1.35" />
        <Explosion range="200.0" levelwalldamage="75" force="50.0" severlimbsprobability="1.5" shockwave="false" smoke="false" flames="false" flash="false" sparks="false" underwaterbubble="true" playtinnitus="false" applyfireeffects="false">
          <Affliction identifier="lacerations" strength="75" />
          <Affliction identifier="explosiondamage" strength="50" />
          <Affliction identifier="bleeding" strength="25" />
        </Explosion>
      </StatusEffect>
      <StatusEffect type="OnImpact" target="UseTarget">
        <Conditional entitytype="eq Structure" />
        <Conditional hastag="eq door" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_impact1.ogg" selectionmode="Random" range="4000" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_impact2.ogg" selectionmode="Random" range="4000" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_impact3.ogg" selectionmode="Random" range="4000" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_impact4.ogg" selectionmode="Random" range="4000" volume="1.0" />
        <ParticleEmitter particle="ekgunnery_hdimpactmedium" particleamount="1" velocitymin="0" velocitymax="0" scalemin="1" scalemax="1.5" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-25" anglemax="25" particleamount="4" velocitymin="-10" velocitymax="-300" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-30" anglemax="30" particleamount="3" velocitymin="10" velocitymax="300" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="shrapnel" copyentityangle="true" anglemin="-20" anglemax="20" particleamount="3" velocitymin="50" velocitymax="300" scalemin="1" scalemax="2" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This">
        <Remove />
      </StatusEffect>
    </Projectile>
  </Item>
  <Item name="ekgunnery_nuclearaftereffectemitter" identifier="ekgunnery_nuclearaftereffectemitter" Scale="0.5" tags="" sonarsize="20" hideinmenus="true">
    <AiTarget sightrange="1000.0" soundrange="1000" sonardisruption="10" static="True" />
    <Sprite texture="%ModDir%/Items/Weapons/ekgunnery_heavyrailgunammo.png" sourcerect="0,0,2,2" depth="0.55" origin="0.5,0.5" />
    <ItemComponent>
      <!-- reduce condition to remove the emitter after 10 seconds -->
      <StatusEffect type="Always" target="This" condition="-10">
        <ParticleEmitter particle="risingbubbles" anglemin="0" anglemax="360" particlespersecond="50" velocitymin="0" velocitymax="50" scalemin="1" scalemax="6" distancemin="0" distancemax="1000" />
      </StatusEffect>
      <!-- apply radiation sickness to nearby characters -->
      <StatusEffect type="Always" target="NearbyCharacters" range="3000">
        <Affliction identifier="radiationsickness" strength="1" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This">
        <Remove />
      </StatusEffect>
    </ItemComponent>
  </Item>
  <Item name="" identifier="ekgunnery_heavyrailgunshellnuclear" tags="heavyrailgunammo,ekgunnery_largeshell,largeammo,ammobox,crate" showcontentsintooltip="true" category="Misc,Weapon" sonarsize="5" scale="0.5" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="heavyrailgunammocontainer,ekgunnery_heavyrailgunammosource" />
    <Price baseprice="675" soldeverywhere="false">
      <!-- 675 -->
      <Price storeidentifier="merchantoutpost" multiplier="1.5" sold="false" />
      <Price storeidentifier="merchantcity" multiplier="1.25" sold="false" />
      <Price storeidentifier="merchantresearch" multiplier="1.25" sold="false" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="2" />
      <Price storeidentifier="merchantmine" multiplier="1.25" sold="false" />
    </Price>
    <!--
	20
	65
	50
	50
	400
	-->
    <Deconstruct time="10">
      <Item identifier="steel" mincondition="0.8" />
      <Item identifier="titanium" mincondition="0.8" />
      <Item identifier="uranium" mincondition="0.8" />
      <Item identifier="uranium" mincondition="0.8" />
      <Item identifier="ic4block" mincondition="0.8" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="35">
      <RequiredSkill identifier="weapons" level="40" />
      <RequiredItem identifier="steel" />
      <RequiredItem identifier="titanium" />
      <RequiredItem identifier="uranium" />
      <RequiredItem identifier="uranium" />
      <RequiredItem identifier="ic4block" />
    </Fabricate>
    <InventoryIcon texture="%ModDir%/Items/Weapons/ekgunnery_heavyrailgunammo.png" sourcerect="416,64,32,32" />
    <Sprite texture="%ModDir%/Items/Weapons/ekgunnery_heavyrailgunammo.png" sourcerect="0,64,320,64" depth="0.55" origin="0.5,0.5" />
    <ContainedSprite allowedcontainertags="ekgunnery_heavyrailguncontainer_compact" texture="%ModDir%/Items/Weapons/ekgunnery_heavyrailgunammo.png" sourcerect="352,64,64,64" depth="0.54" origin="0.5,0.5" />
    <ContainedSprite allowedcontainertags="ammocontainer,cargocontainer,coilgunammocontainer,crateshelf,ammoboxcontainer" allowedcontaineridentifiers="crateshelf,coilgunammoshelf" texture="%ModDir%/Items/Weapons/ekgunnery_heavyrailgunammo.png" sourcerect="352,64,64,64" depth="0.54" origin="0.5,0.35" />
    <Body width="308" height="50" density="30" />
    <Holdable slots="RightHand+LeftHand" holdpos="15,-40" handle1="-25,-10" handle2="25,-5" holdangle="15" aimable="false" msg="ItemMsgPickUpSelect">
      <StatusEffect type="OnActive" target="Character" SpeedMultiplier="0.35" setvalue="true" />
    </Holdable>
    <Projectile characterusable="false" launchimpulse="80.0" maxtargetstohit="1">
      <Attack structuredamage="140" itemdamage="200" severlimbsprobability="1.9">
        <Affliction identifier="lacerations" strength="350" />
        <Affliction identifier="blunttrauma" strength="200" />
        <Affliction identifier="bleeding" strength="100" />
        <Affliction identifier="stun" strength="10" />
      </Attack>
      <StatusEffect type="OnActive" target="This" condition="-10" />
      <!-- velocity jumping fix -->
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" stackable="false" condition="-1">
        <Conditional condition="eq 100" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" stackable="false" delay="0.3" checkconditionalalways="true">
        <Conditional condition="gt 80" />
        <Use />
      </StatusEffect>
      <!-- 
	  <StatusEffect type="OnImpact" target="Limb" disabledeltatime="true">
        <Affliction identifier="ekgunnery_piercingeffect_heavyrailgun" amount="5000" />
      </StatusEffect>
	  -->
      <StatusEffect type="OnActive" target="This">
        <Conditional condition="gt 80" />
        <ParticleEmitter particle="bubbles" anglemin="0" anglemax="360" particleamount="2" velocitymin="0" velocitymax="200" scalemin="2" scalemax="4.5" />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This">
        <Conditional condition="gt 70" />
        <ParticleEmitter particle="ekgunneryheavyrailgunshellshockwave" copyentityangle="true" anglemin="0" anglemax="0" particlespersecond="30" velocitymin="500" velocitymax="500" scalemin="1" scalemax="1" />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This">
        <Conditional condition="lt 80" />
        <ParticleEmitter particle="bubbles" anglemin="0" anglemax="360" particleamount="1" velocitymin="0" velocitymax="50" scalemin="1" scalemax="3" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="This" disabledeltatime="true">
        <ParticleEmitter particle="ekgunnerynukeflash" particleamount="2" scalemin="3.5" scalemax="3.5" velocitymin="25" velocitymax="50" />
        <ParticleEmitter particle="ekgunnerynukeshockwave" particleamount="2" velocitymin="25" velocitymax="50" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="This" Condition="-100.0" disabledeltatime="true">
        <sound file="Content/Items/Weapons/ExplosionLarge1.ogg" selectionmode="Random" range="50000" />
        <sound file="Content/Items/Weapons/ExplosionLarge2.ogg" selectionmode="Random" range="50000" />
        <Explosion range="2000.0" structuredamage="1000" itemdamage="1000" force="50.0" severlimbsprobability="2" decal="explosion" decalsize="1.0" camerashake="500" camerashakerange="50000" flashrange="10000" flashduration="5.0" screencolor="255,255,255,255" screencolorrange="5000" screencolorduration="5.0">
          <Affliction identifier="burn" strength="500" />
          <Affliction identifier="radiationsickness" strength="150" />
          <Affliction identifier="explosiondamage" strength="900" />
          <Affliction identifier="stun" strength="20" />
        </Explosion>
        <Explosion range="4000" force="0.0" smoke="false" sparks="false" empstrength="2" applyfireeffects="false" />
        <SpawnItem identifier="ekgunnery_nuclearaftereffectemitter" spawnposition="This" />
      </StatusEffect>
      <!-- Remove the item after exploding -->
      <StatusEffect type="OnBroken" target="This">
        <Remove />
      </StatusEffect>
    </Projectile>
  </Item>
  <!-- Chaigun Ammo -->
  <Item name="" identifier="ekgunnery_chaingunammo" aliases="Light Chaingun Ammo Box" scale="0.5" tags="ammobox,crate,ekgunnery_chaingunequipment,ekgunnery_chaingunammo" category="Equipment,Weapon" linkable="false" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="ekgunnery_chaingunammosource,coilgunammocontainer,ammocontainer" />
    <Price baseprice="60">
      <!-- 38 -->
      <Price storeidentifier="merchantoutpost" multiplier="1.3" minavailable="3" />
      <Price storeidentifier="merchantcity" multiplier="1.2" minavailable="6" />
      <Price storeidentifier="merchantresearch" multiplier="1.3" minavailable="2" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="10" />
      <Price storeidentifier="merchantmine" multiplier="1.2" minavailable="2" />
    </Price>
    <!--
	11
	20
	6
	-->
    <Deconstruct time="10">
      <Item identifier="copper" mincondition="0.8" outcondition="0.5" />
      <Item identifier="steel" mincondition="0.1" copycondition="true" />
      <Item identifier="tin" outcondition="0.5" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="20">
      <RequiredSkill identifier="weapons" level="25" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="steel" />
      <RequiredItem identifier="tin" mincondition="0.5" usecondition="true" />
    </Fabricate>
    <Fabricate suitablefabricators="fabricator" displayname="recycleitem" requiredtime="20">
      <RequiredSkill identifier="weapons" level="20" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="steel" />
      <RequiredItem identifier="ekgunnery_chaingunammo" mincondition="0.0" maxcondition="0.5" usecondition="false" />
    </Fabricate>
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="0,208,80,160" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="80,208,80,160" maxcondition="75" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="160,208,80,160" maxcondition="60" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="240,208,80,160" maxcondition="45" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="320,208,80,160" maxcondition="30" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="400,208,80,160" maxcondition="15" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="480,208,80,160" maxcondition="0" origin="0.5,0.5" />
    <!-- Leaving this here just in case it suddenly becomes allowed in the API. -->
    <ContainedSprite allowedcontainertags="coilgunammocontainer,crateshelf,ammoboxcontainer" allowedcontaineridentifiers="crateshelf,coilgunammoshelf" texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="560,208,112,80" origin="0.5,0.5">
      <StatusEffect type="Always" target="This" targetitemcomponent="ContainedSprite" setvalue="true" sourcerect="560,288,112,80">
        <Conditional condition="eq 0" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This" targetitemcomponent="ContainedSprite" setvalue="true" sourcerect="560,288,112,80" />
    </ContainedSprite>
    <Body width="75" height="155" density="50" />
    <Holdable slots="RightHand+LeftHand" holdpos="50,-30" handle1="-15,15" handle2="-15,15" aimable="false" msg="ItemMsgPickUpSelect" canBeCombined="true" />
    <ItemContainer autofill="False" hideitems="true" capacity="1" removecontaineditemsondeconstruct="true" drawinventory="false" canbeselected="false" ShowConditionInContainedStateIndicator="true" SpawnWithId="ekgunnery_chaingunround">
      <ContainedStateIndicator texture="Content/UI/ContainerIndicators.png" sourcerect="16,64,120,24" />
      <!--
	  <StatusEffect type="OnUse" target="This" condition="-0.332" disabledeltatime="true">
        <SpawnItem identifiers="ekgunnery_chaingunround" spawnposition="ThisInventory" />
      </StatusEffect>
	  -->
      <!-- We cannot detect when a bullet is NOT-contained. Yet bizzarely this works instead. -->
      <StatusEffect type="OnUse" target="This" condition="0.664" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <RequiredItem items="ekgunnery_chaingunround" type="Contained" />
      </StatusEffect>
      <StatusEffect type="OnUse" target="This" condition="-0.664" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <SpawnItem identifiers="ekgunnery_chaingunround" spawnposition="ThisInventory" />
      </StatusEffect>
      <Containable identifiers="ekgunnery_chaingunround" />
    </ItemContainer>
  </Item>
  <Item name="" identifier="ekgunnery_chaingunround" category="Misc,Weapon" scale="0.5" hideinmenus="true">
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" sourcerect="928,0,48,16" depth="0.55" />
    <Body width="160" height="10" density="15" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,0" handle2="10,0" aimable="false" />
    <Projectile characterusable="false" hitscan="true" removeonhit="true" spread="4">
      <ParticleEmitter particle="ekgunnery_tracerfirearm" particleamount="1" velocitymin="0" velocitymax="0" colormultiplier="255,200,50,175" scalemultiplier="1,0.5" />
      <Attack structuredamage="2.5" severlimbsprobability="0.35" targetforce="7">
        <Affliction identifier="gunshotwound" strength="12" />
        <Affliction identifier="bleeding" strength="1" />
      </Attack>
      <StatusEffect type="OnImpact" target="UseTarget">
        <ParticleEmitter particle="ekgunnery_impactfirearm" particleamount="1" velocitymin="0" velocitymax="0" />
      </StatusEffect>
      <StatusEffect type="OnImpact">
        <ParticleEmitter particle="bubbles" anglemin="-180" anglemax="180" particleamount="1" velocitymin="-10" velocitymax="-100" scalemin="0.5" scalemax="1" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="UseTarget">
        <Conditional entitytype="eq Structure" />
        <Conditional hastag="eq door" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-25" anglemax="25" particleamount="4" velocitymin="-10" velocitymax="-300" scalemin="0.5" scalemax="1" />
      </StatusEffect>
      <StatusEffect type="OnNotContained" target="This" stackable="false" delay="1">
        <Remove />
      </StatusEffect>
    </Projectile>
  </Item>
  <Item name="" identifier="ekgunnery_chaingunpiercingammo" aliases="Light Chaingun Piercing Ammunition Box,Piercing Light Chaingun Ammo Box" scale="0.5" tags="ammobox,crate,ekgunnery_chaingunequipment,ekgunnery_chaingunammo" category="Equipment,Weapon" linkable="false" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="ekgunnery_chaingunammosource,coilgunammocontainer,ammocontainer" />
    <Price baseprice="150" soldeverywhere="false">
      <!-- 80 -->
      <Price storeidentifier="merchantoutpost" multiplier="1.3" minavailable="1" />
      <Price storeidentifier="merchantcity" multiplier="1.2" minavailable="3" />
      <Price storeidentifier="merchantresearch" multiplier="1.3" sold="false" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="8" />
      <Price storeidentifier="merchantmine" multiplier="1.2" sold="false" />
    </Price>
    <!--
	11
	65
	6
	-->
    <Deconstruct time="10">
      <Item identifier="copper" mincondition="0.8" outcondition="0.5" />
      <Item identifier="titanium" mincondition="0.1" copycondition="true" />
      <Item identifier="tin" outcondition="0.5" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="25">
      <RequiredSkill identifier="weapons" level="30" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="titanium" />
      <RequiredItem identifier="tin" mincondition="0.5" usecondition="true" />
    </Fabricate>
    <Fabricate suitablefabricators="fabricator" displayname="recycleitem" requiredtime="20">
      <RequiredSkill identifier="weapons" level="20" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="titanium" />
      <RequiredItem identifier="ekgunnery_chaingunpiercingammo" mincondition="0.0" maxcondition="0.5" usecondition="false" />
    </Fabricate>
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="672,208,80,160" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="752,208,80,160" maxcondition="75" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="832,208,80,160" maxcondition="60" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="912,208,80,160" maxcondition="45" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="992,208,80,160" maxcondition="30" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1072,208,80,160" maxcondition="15" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1152,208,80,160" maxcondition="0" origin="0.5,0.5" />
    <!-- Leaving this here just in case it suddenly becomes allowed in the API. -->
    <ContainedSprite allowedcontainertags="coilgunammocontainer,crateshelf,ammoboxcontainer" allowedcontaineridentifiers="crateshelf,coilgunammoshelf" texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1232,208,112,80" origin="0.5,0.5">
      <StatusEffect type="Always" target="This" targetitemcomponent="ContainedSprite" setvalue="true" sourcerect="1232,288,112,80">
        <Conditional condition="lt 1" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This" targetitemcomponent="ContainedSprite" setvalue="true" sourcerect="1232,288,112,80" />
    </ContainedSprite>
    <Body width="75" height="155" density="50" />
    <Holdable slots="RightHand+LeftHand" holdpos="50,-30" handle1="-15,15" handle2="-15,15" aimable="false" msg="ItemMsgPickUpSelect" canBeCombined="true" />
    <ItemContainer autofill="False" hideitems="true" capacity="1" removecontaineditemsondeconstruct="true" drawinventory="false" canbeselected="false" ShowConditionInContainedStateIndicator="true" SpawnWithId="ekgunnery_chaingunpiercinground">
      <ContainedStateIndicator texture="Content/UI/ContainerIndicators.png" sourcerect="16,64,120,24" />
      <!--
	  <StatusEffect type="OnUse" target="This" condition="-0.332" disabledeltatime="true">
        <SpawnItem identifiers="ekgunnery_chaingunpiercinground" spawnposition="ThisInventory" />
      </StatusEffect>
	  -->
      <!-- We cannot detect when a bullet is NOT-contained. Yet bizzarely this works instead. -->
      <StatusEffect type="OnUse" target="This" condition="0.664" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <RequiredItem items="ekgunnery_chaingunpiercinground" type="Contained" />
      </StatusEffect>
      <StatusEffect type="OnUse" target="This" condition="-0.664" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <SpawnItem identifiers="ekgunnery_chaingunpiercinground" spawnposition="ThisInventory" />
      </StatusEffect>
      <Containable identifiers="ekgunnery_chaingunpiercinground" />
    </ItemContainer>
  </Item>
  <Item name="" identifier="ekgunnery_chaingunpiercinground" category="Misc,Weapon" scale="0.5" hideinmenus="true">
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" sourcerect="928,16,48,16" depth="0.55" />
    <Body width="160" height="10" density="15" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,0" handle2="10,0" aimable="false" />
    <Projectile characterusable="false" hitscan="true" removeonhit="true" spread="4">
      <ParticleEmitter particle="ekgunnery_tracerfirearm" particleamount="1" velocitymin="0" velocitymax="0" colormultiplier="255,200,50,175" scalemultiplier="1,0.5" penetration="0.3" />
      <Attack structuredamage="4" severlimbsprobability="0.35" targetforce="7">
        <Affliction identifier="gunshotwound" strength="15" />
        <Affliction identifier="bleeding" strength="1" />
      </Attack>
      <StatusEffect type="OnImpact" target="UseTarget">
        <ParticleEmitter particle="ekgunnery_impactfirearm" particleamount="1" velocitymin="0" velocitymax="0" />
      </StatusEffect>
      <!--
	  <StatusEffect type="OnUse" target="Limb" disabledeltatime="true">
        <Affliction identifier="ekgunnery_piercingeffect_weak" amount="100" />
      </StatusEffect>
	  -->
      <StatusEffect type="OnImpact">
        <ParticleEmitter particle="bubbles" anglemin="-180" anglemax="180" particleamount="1" velocitymin="-10" velocitymax="-100" scalemin="0.5" scalemax="1" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="UseTarget">
        <Conditional entitytype="eq Structure" />
        <Conditional hastag="eq door" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-25" anglemax="25" particleamount="4" velocitymin="-10" velocitymax="-300" scalemin="0.5" scalemax="1" />
      </StatusEffect>
      <StatusEffect type="OnNotContained" target="This" stackable="false" delay="1">
        <Remove />
      </StatusEffect>
    </Projectile>
  </Item>
  <Item name="" identifier="ekgunnery_chaingunphysicoriumammo" aliases="Light Chaingun Physicorium Ammunition Box,Physicorium Light Chaingun Ammo Box" scale="0.5" tags="ammobox,crate,ekgunnery_chaingunequipment,ekgunnery_chaingunammo" category="Equipment,Weapon" linkable="false" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="ekgunnery_chaingunammosource,coilgunammocontainer,ammocontainer" />
    <Price baseprice="300" soldeverywhere="false">
      <!-- 217 -->
      <Price storeidentifier="merchantoutpost" multiplier="1.3" sold="false" />
      <Price storeidentifier="merchantcity" multiplier="1.2" minavailable="2" />
      <Price storeidentifier="merchantresearch" multiplier="1.3" minavailable="1" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="4" />
      <Price storeidentifier="merchantmine" multiplier="1.2" sold="false" />
    </Price>
    <!--
	11
	200
	6
	-->
    <Deconstruct time="10">
      <Item identifier="copper" mincondition="0.8" outcondition="0.5" />
      <Item identifier="physicorium" mincondition="0.1" copycondition="true" />
      <Item identifier="tin" outcondition="0.5" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="25">
      <RequiredSkill identifier="weapons" level="30" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="physicorium" />
      <RequiredItem identifier="tin" mincondition="0.5" usecondition="true" />
    </Fabricate>
    <Fabricate suitablefabricators="fabricator" displayname="recycleitem" requiredtime="20">
      <RequiredSkill identifier="weapons" level="20" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="physicorium" />
      <RequiredItem identifier="ekgunnery_chaingunphysicoriumammo" mincondition="0.0" maxcondition="0.5" usecondition="false" />
    </Fabricate>
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1344,208,80,160" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1424,208,80,160" maxcondition="75" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1504,208,80,160" maxcondition="60" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1584,208,80,160" maxcondition="45" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1664,208,80,160" maxcondition="30" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1744,208,80,160" maxcondition="15" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1824,208,80,160" maxcondition="0" origin="0.5,0.5" />
    <!-- Leaving this here just in case it suddenly becomes allowed in the API. -->
    <ContainedSprite allowedcontainertags="coilgunammocontainer,crateshelf,ammoboxcontainer" allowedcontaineridentifiers="crateshelf,coilgunammoshelf" texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1904,208,112,80" origin="0.5,0.5">
      <StatusEffect type="Always" target="This" targetitemcomponent="ContainedSprite" setvalue="true" sourcerect="1904,288,112,80">
        <Conditional condition="lt 1" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This" targetitemcomponent="ContainedSprite" setvalue="true" sourcerect="1904,288,112,80" />
    </ContainedSprite>
    <Body width="75" height="155" density="50" />
    <Holdable slots="RightHand+LeftHand" holdpos="50,-30" handle1="-15,15" handle2="-15,15" aimable="false" msg="ItemMsgPickUpSelect" canBeCombined="true" />
    <ItemContainer autofill="False" hideitems="true" capacity="1" removecontaineditemsondeconstruct="true" drawinventory="false" canbeselected="false" ShowConditionInContainedStateIndicator="true" SpawnWithId="ekgunnery_chaingunphysicoriumround">
      <ContainedStateIndicator texture="Content/UI/ContainerIndicators.png" sourcerect="16,64,120,24" />
      <!--
	  <StatusEffect type="OnUse" target="This" condition="-0.332" disabledeltatime="true">
        <SpawnItem identifiers="ekgunnery_chaingunphysicoriumround" spawnposition="ThisInventory" />
      </StatusEffect>
	  -->
      <!-- We cannot detect when a bullet is NOT-contained. Yet bizzarely this works instead. -->
      <StatusEffect type="OnUse" target="This" condition="0.664" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <RequiredItem items="ekgunnery_chaingunphysicoriumround" type="Contained" />
      </StatusEffect>
      <StatusEffect type="OnUse" target="This" condition="-0.664" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <SpawnItem identifiers="ekgunnery_chaingunphysicoriumround" spawnposition="ThisInventory" />
      </StatusEffect>
      <Containable identifiers="ekgunnery_chaingunphysicoriumround" />
    </ItemContainer>
  </Item>
  <Item name="" identifier="ekgunnery_chaingunphysicoriumround" category="Misc,Weapon" scale="0.5" hideinmenus="true">
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" sourcerect="976,0,48,16" depth="0.55" />
    <Body width="160" height="10" density="15" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,0" handle2="10,0" aimable="false" />
    <Projectile characterusable="false" hitscan="true" removeonhit="true" spread="4">
      <ParticleEmitter particle="ekgunnery_tracerfirearm" particleamount="1" velocitymin="0" velocitymax="0" colormultiplier="255,150,50,175" scalemultiplier="1,0.5" penetration="0.6" />
      <Attack structuredamage="6" severlimbsprobability="0.35" targetforce="7">
        <Affliction identifier="gunshotwound" strength="18" />
        <Affliction identifier="bleeding" strength="2" />
      </Attack>
      <StatusEffect type="OnImpact" target="UseTarget">
        <ParticleEmitter particle="ekgunnery_impactfirearm" particleamount="1" velocitymin="0" velocitymax="0" />
      </StatusEffect>
      <!--
	  <StatusEffect type="OnUse" target="Limb" disabledeltatime="true">
        <Affliction identifier="ekgunnery_piercingeffect_weak" amount="100" />
      </StatusEffect>
	  -->
      <StatusEffect type="OnImpact">
        <ParticleEmitter particle="bubbles" anglemin="-180" anglemax="180" particleamount="1" velocitymin="-10" velocitymax="-100" scalemin="0.5" scalemax="1" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="UseTarget">
        <Conditional entitytype="eq Structure" />
        <Conditional hastag="eq door" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-25" anglemax="25" particleamount="4" velocitymin="-10" velocitymax="-300" scalemin="0.5" scalemax="1" />
      </StatusEffect>
      <StatusEffect type="OnNotContained" target="This" stackable="false" delay="1">
        <Remove />
      </StatusEffect>
    </Projectile>
  </Item>
  <Item name="" identifier="ekgunnery_chaingunpiercingexplosiveammo" aliases="Light Chaingun Armor-Piercing Explosive Ammunition Box,Armor-Piercing Explosive Light Chaingun Ammo Box" scale="0.5" tags="ammobox,crate,ekgunnery_chaingunequipment,ekgunnery_chaingunammo" category="Equipment,Weapon" linkable="false" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="ekgunnery_chaingunammosource,coilgunammocontainer,ammocontainer" />
    <Price baseprice="250" soldeverywhere="false">
      <!-- 160 -->
      <Price storeidentifier="merchantoutpost" multiplier="1.3" sold="false" />
      <Price storeidentifier="merchantcity" multiplier="1.2" sold="false" />
      <Price storeidentifier="merchantresearch" multiplier="1.3" sold="false" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="4" />
      <Price storeidentifier="merchantmine" multiplier="1.2" sold="false" />
    </Price>
    <!--
	11
	65
	80
	6
	-->
    <Deconstruct time="10">
      <Item identifier="copper" mincondition="0.8" outcondition="0.5" />
      <Item identifier="titanium" mincondition="0.8" outcondition="0.5" />
      <Item identifier="c4block" mincondition="0.8" outcondition="0.5" />
      <Item identifier="tin" outcondition="0.5" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="25">
      <RequiredSkill identifier="weapons" level="30" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="titanium" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="c4block" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="tin" mincondition="0.5" usecondition="true" />
    </Fabricate>
    <Fabricate suitablefabricators="fabricator" displayname="recycleitem" requiredtime="20">
      <RequiredSkill identifier="weapons" level="20" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="titanium" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="c4block" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="ekgunnery_chaingunpiercingexplosiveammo" mincondition="0.0" maxcondition="0.5" usecondition="false" />
    </Fabricate>
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers2.png" depth="0.54" sourcerect="0,208,80,160" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers2.png" depth="0.54" sourcerect="80,208,80,160" maxcondition="75" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers2.png" depth="0.54" sourcerect="160,208,80,160" maxcondition="60" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers2.png" depth="0.54" sourcerect="240,208,80,160" maxcondition="45" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers2.png" depth="0.54" sourcerect="320,208,80,160" maxcondition="30" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers2.png" depth="0.54" sourcerect="400,208,80,160" maxcondition="15" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers2.png" depth="0.54" sourcerect="480,208,80,160" maxcondition="0" origin="0.5,0.5" />
    <!-- Leaving this here just in case it suddenly becomes allowed in the API. -->
    <ContainedSprite allowedcontainertags="coilgunammocontainer,crateshelf,ammoboxcontainer" allowedcontaineridentifiers="crateshelf,coilgunammoshelf" texture="%ModDir%/Items/Containers/ekgunnery_containers2.png" depth="0.54" sourcerect="560,208,112,80" origin="0.5,0.5">
      <StatusEffect type="Always" target="This" targetitemcomponent="ContainedSprite" setvalue="true" sourcerect="560,288,112,80">
        <Conditional condition="eq 0" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This" targetitemcomponent="ContainedSprite" setvalue="true" sourcerect="560,288,112,80" />
    </ContainedSprite>
    <Body width="75" height="155" density="50" />
    <Holdable slots="RightHand+LeftHand" holdpos="50,-30" handle1="-15,15" handle2="-15,15" aimable="false" msg="ItemMsgPickUpSelect" canBeCombined="true" />
    <ItemContainer autofill="False" hideitems="true" capacity="1" removecontaineditemsondeconstruct="true" drawinventory="false" canbeselected="false" ShowConditionInContainedStateIndicator="true" SpawnWithId="ekgunnery_chaingunphysicoriumround">
      <ContainedStateIndicator texture="Content/UI/ContainerIndicators.png" sourcerect="16,64,120,24" />
      <!--
	  <StatusEffect type="OnUse" target="This" condition="-0.332" disabledeltatime="true">
        <SpawnItem identifiers="ekgunnery_chaingunpiercingexplosiveround" spawnposition="ThisInventory" />
      </StatusEffect>
	  -->
      <!-- We cannot detect when a bullet is NOT-contained. Yet bizzarely this works instead. -->
      <StatusEffect type="OnUse" target="This" condition="0.664" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <RequiredItem items="ekgunnery_chaingunpiercingexplosiveround" type="Contained" />
      </StatusEffect>
      <StatusEffect type="OnUse" target="This" condition="-0.664" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <SpawnItem identifiers="ekgunnery_chaingunpiercingexplosiveround" spawnposition="ThisInventory" />
      </StatusEffect>
      <Containable identifiers="ekgunnery_chaingunpiercingexplosiveround" />
    </ItemContainer>
  </Item>
  <Item name="" identifier="ekgunnery_chaingunpiercingexplosiveround" category="Misc,Weapon" scale="0.5" hideinmenus="true">
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers2.png" sourcerect="0,64,48,16" depth="0.55" />
    <Body width="160" height="10" density="15" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,0" handle2="10,0" aimable="false" />
    <Projectile characterusable="false" hitscan="true" removeonhit="true" spread="4">
      <ParticleEmitter particle="ekgunnery_tracerfirearm" particleamount="1" velocitymin="0" velocitymax="0" colormultiplier="255,150,50,175" scalemultiplier="1,0.5" penetration="0.6" />
      <Attack structuredamage="4" severlimbsprobability="0.35" targetforce="7">
        <Affliction identifier="gunshotwound" strength="15" />
        <Affliction identifier="lacerations" strength="8" />
        <Affliction identifier="explosiondamage" strength="8" />
        <Affliction identifier="bleeding" strength="2" />
      </Attack>
      <StatusEffect type="OnImpact" target="UseTarget">
        <ParticleEmitter particle="ekgunnery_hdimpactmedium" particleamount="1" velocitymin="0" velocitymax="0" scalemin="0.5" scalemax="1" colormultiplier="255,220,175,255" />
        <ParticleEmitter particle="ekgunnery_newautocannonsmoke" particleamount="1" velocitymin="0" velocitymax="25" anglemin="0" anglemax="360" scalemin="3" scalemax="4.5" distancemin="25" distancemax="50" />
        <Explosion range="150.0" structuredamage="4" stun="0" force="5.0" severlimbsprobability="0.25" shockwave="false" smoke="false" flames="false" flash="false" sparks="false" underwaterbubble="false" camerashake="0" playtinnitus="false">
          <Affliction identifier="lacerations" strength="4" />
          <Affliction identifier="explosiondamage" strength="2" />
          <Affliction identifier="burn" strength="4" />
          <Affliction identifier="bleeding" strength="1" />
        </Explosion>
      </StatusEffect>
      <!--
	  <StatusEffect type="OnUse" target="Limb" disabledeltatime="true">
        <Affliction identifier="ekgunnery_piercingeffect_weak" amount="100" />
      </StatusEffect>
	  -->
      <StatusEffect type="OnImpact">
        <ParticleEmitter particle="bubbles" anglemin="-180" anglemax="180" particleamount="1" velocitymin="-20" velocitymax="-200" scalemin="0.5" scalemax="1.5" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_chaingun_aphe1.ogg" selectionmode="Random" range="2500" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_chaingun_aphe2.ogg" selectionmode="Random" range="2500" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_chaingun_aphe3.ogg" selectionmode="Random" range="2500" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_chaingun_aphe4.ogg" selectionmode="Random" range="2500" volume="1.0" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="UseTarget">
        <Conditional entitytype="eq Structure" />
        <Conditional hastag="eq door" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-25" anglemax="25" particleamount="4" velocitymin="-10" velocitymax="-300" scalemin="0.5" scalemax="1" />
      </StatusEffect>
      <StatusEffect type="OnNotContained" target="This" stackable="false" delay="1">
        <Remove />
      </StatusEffect>
    </Projectile>
  </Item>
  <!-- Autocannon Ammo -->
  <Item name="" identifier="ekgunnery_autocannonammo" aliases="Autocannon Ammo Box" scale="0.5" tags="ammobox,crate,ekgunnery_autocannonequipment,ekgunnery_autocannonammo" category="Equipment,Weapon" linkable="false" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="ekgunnery_autocannonammosource,coilgunammocontainer,ammocontainer" />
    <Price baseprice="150">
      <!-- 70 -->
      <Price storeidentifier="merchantoutpost" multiplier="1.3" minavailable="2" />
      <Price storeidentifier="merchantcity" multiplier="1.2" minavailable="4" />
      <Price storeidentifier="merchantresearch" multiplier="1.3" minavailable="2" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="10" />
      <Price storeidentifier="merchantmine" multiplier="1.2" sold="false" />
    </Price>
    <!--
	22
	20
	20
	12
	-->
    <Deconstruct time="10">
      <Item identifier="copper" mincondition="0.1" copycondition="true" />
      <Item identifier="steel" mincondition="0.1" copycondition="true" />
      <Item identifier="steel" mincondition="0.1" copycondition="true" />
      <Item identifier="tin" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="20">
      <RequiredSkill identifier="weapons" level="30" />
      <RequiredItem identifier="copper" />
      <RequiredItem identifier="steel" />
      <RequiredItem identifier="steel" />
      <RequiredItem identifier="tin" />
    </Fabricate>
    <Fabricate suitablefabricators="fabricator" displayname="recycleitem" requiredtime="20">
      <RequiredSkill identifier="weapons" level="20" />
      <RequiredItem identifier="copper" />
      <RequiredItem identifier="steel" />
      <RequiredItem identifier="steel" />
      <RequiredItem identifier="ekgunnery_autocannonammo" mincondition="0.0" maxcondition="0.5" usecondition="false" />
    </Fabricate>
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="0,368,96,184" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="104,368,96,184" maxcondition="75" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="208,368,96,184" maxcondition="50" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="312,368,96,184" maxcondition="25" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="416,368,96,184" maxcondition="0" origin="0.5,0.5" />
    <!-- Leaving this here just in case it suddenly becomes allowed in the API. -->
    <ContainedSprite allowedcontainertags="coilgunammocontainer,crateshelf,ammoboxcontainer" allowedcontaineridentifiers="crateshelf,coilgunammoshelf" texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="560,368,112,80" origin="0.5,0.5">
      <StatusEffect type="Always" target="This" targetitemcomponent="ContainedSprite" setvalue="true" sourcerect="560,448,112,80">
        <Conditional condition="eq 0" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This" targetitemcomponent="ContainedSprite" setvalue="true" sourcerect="560,448,112,80" />
    </ContainedSprite>
    <Body width="96" height="180" density="50" />
    <Holdable slots="RightHand+LeftHand" holdpos="50,-30" handle1="-15,15" handle2="-15,15" aimable="false" msg="ItemMsgPickUpSelect" canBeCombined="true">
      <StatusEffect type="OnActive" target="Character" SpeedMultiplier="0.4" setvalue="true" />
    </Holdable>
    <ItemContainer autofill="False" hideitems="true" capacity="1" removecontaineditemsondeconstruct="true" drawinventory="false" canbeselected="false" ShowConditionInContainedStateIndicator="true">
      <ContainedStateIndicator texture="Content/UI/ContainerIndicators.png" sourcerect="16,64,120,24" />
      <!--
	  <StatusEffect type="OnUse" target="This" condition="-1.25" disabledeltatime="true">
        <SpawnItem identifiers="ekgunnery_autocannonround" spawnposition="ThisInventory" />
      </StatusEffect>
	  -->
      <!-- We cannot detect when a bullet is NOT-contained. Yet bizzarely this works instead. -->
      <StatusEffect type="OnUse" target="This" condition="1.25" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <RequiredItem items="ekgunnery_autocannonround" type="Contained" />
      </StatusEffect>
      <StatusEffect type="OnUse" target="This" condition="-1.25" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <SpawnItem identifiers="ekgunnery_autocannonround" spawnposition="ThisInventory" />
      </StatusEffect>
      <Containable identifiers="ekgunnery_autocannonround" />
    </ItemContainer>
  </Item>
  <Item name="Autocannon Turret Round" identifier="ekgunnery_autocannonround" category="Misc,Weapon" scale="0.5" hideinmenus="true">
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" sourcerect="928,32,48,16" depth="0.55" />
    <Body width="160" height="16" density="15" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,0" handle2="10,0" aimable="false" />
    <Projectile characterusable="false" launchimpulse="100.0" spread="0" maxtargetstohit="2">
      <Attack structuredamage="15" itemdamage="35" levelwalldamage="50" severlimbsprobability="0.35" targetforce="7" penetration="0.4">
        <Affliction identifier="lacerations" strength="24" />
        <Affliction identifier="gunshotwound" strength="12" />
        <Affliction identifier="bleeding" strength="4" />
      </Attack>
      <StatusEffect type="OnActive" target="This" condition="-28">
        <Conditional condition="gt 50" />
        <ParticleEmitter particle="ekgunneryammotrailshort" copyentityangle="true" anglemin="-5" anglemax="5" particleamount="1" velocitymin="-10" velocitymax="-100" scalemin="1" scalemax="1.5" />
        <ParticleEmitter particle="ekgunnerytraceryellow" copyentityangle="true" anglemin="0" anglemax="0" particlespersecond="60" velocitymin="500" velocitymax="500" scalemin="1" scalemax="1" />
      </StatusEffect>
      <!-- velocity jumping fix -->
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" stackable="false" condition="-1">
        <Conditional condition="eq 100" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" delay="0.25" stackable="false" checkconditionalalways="true">
        <Conditional Condition="gt 75" />
        <Use />
      </StatusEffect>
      <!--
	  <StatusEffect type="OnUse" target="Limb" disabledeltatime="true">
        <Affliction identifier="ekgunnery_piercingeffect_weak" amount="100" />
      </StatusEffect>
	  -->
      <StatusEffect type="OnImpact" target="This" condition="-75" disabledeltatime="true" />
      <StatusEffect type="OnImpact">
        <ParticleEmitter particle="bubbles" anglemin="-180" anglemax="180" particleamount="1" velocitymin="-10" velocitymax="-100" scalemin="0.5" scalemax="1" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="UseTarget">
        <Conditional entitytype="eq Structure" />
        <Conditional hastag="eq door" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_impact1.ogg" selectionmode="Random" range="3000" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_impact2.ogg" selectionmode="Random" range="3000" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_impact3.ogg" selectionmode="Random" range="3000" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_impact4.ogg" selectionmode="Random" range="3000" volume="1.0" />
        <ParticleEmitter particle="ekgunnery_hdimpactsmall" particleamount="1" velocitymin="0" velocitymax="0" scalemin="4" scalemax="6" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-25" anglemax="25" particleamount="3" velocitymin="-10" velocitymax="-300" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-30" anglemax="30" particleamount="3" velocitymin="10" velocitymax="300" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="shrapnel" copyentityangle="true" anglemin="-20" anglemax="20" particleamount="3" velocitymin="50" velocitymax="300" scalemin="1" scalemax="2" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This">
        <Remove />
      </StatusEffect>
      <StatusEffect type="OnNotContained" target="This" stackable="false" delay="4">
        <Remove />
      </StatusEffect>
    </Projectile>
  </Item>
  <Item name="" identifier="ekgunnery_autocannonexplosiveammo" aliases="Autocannon Explosive Ammo Box,Explosive Autocannon Ammunition Box" scale="0.5" tags="ammobox,crate,ekgunnery_autocannonequipment,ekgunnery_autocannonammo" category="Equipment,Weapon" linkable="false" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="ekgunnery_autocannonammosource,coilgunammocontainer,ammocontainer" />
    <Price baseprice="300">
      <!-- 170 -->
      <Price storeidentifier="merchantoutpost" multiplier="1.3" sold="false" />
      <Price storeidentifier="merchantcity" multiplier="1.2" minavailable="2" />
      <Price storeidentifier="merchantresearch" multiplier="1.3" sold="false" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="8" />
      <Price storeidentifier="merchantmine" multiplier="1.2" sold="false" />
    </Price>
    <!--
	22
	65
	75
	12
	-->
    <Deconstruct time="10">
      <Item identifier="copper" mincondition="0.1" copycondition="true" />
      <Item identifier="titanium" mincondition="0.1" copycondition="true" />
      <Item identifier="uex" mincondition="0.1" copycondition="true" />
      <Item identifier="tin" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="25">
      <RequiredSkill identifier="weapons" level="50" />
      <RequiredItem identifier="copper" />
      <RequiredItem identifier="titanium" />
      <RequiredItem identifier="uex" />
      <RequiredItem identifier="tin" />
    </Fabricate>
    <Fabricate suitablefabricators="fabricator" displayname="recycleitem" requiredtime="25">
      <RequiredSkill identifier="weapons" level="40" />
      <RequiredItem identifier="copper" />
      <RequiredItem identifier="titanium" />
      <RequiredItem identifier="uex" />
      <RequiredItem identifier="ekgunnery_autocannonexplosiveammo" mincondition="0.0" maxcondition="0.5" usecondition="false" />
    </Fabricate>
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="672,368,96,184" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="776,368,96,184" maxcondition="75" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="880,368,96,184" maxcondition="50" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="984,368,96,184" maxcondition="25" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1088,368,96,184" maxcondition="0" origin="0.5,0.5" />
    <!-- Leaving this here just in case it suddenly becomes allowed in the API. -->
    <ContainedSprite allowedcontainertags="coilgunammocontainer,crateshelf,ammoboxcontainer" allowedcontaineridentifiers="crateshelf,coilgunammoshelf" texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1232,368,112,80" origin="0.5,0.5">
      <StatusEffect type="Always" target="This" targetitemcomponent="ContainedSprite" setvalue="true" sourcerect="1232,448,112,80">
        <Conditional condition="eq 0" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This" targetitemcomponent="ContainedSprite" setvalue="true" sourcerect="1232,448,112,80" />
    </ContainedSprite>
    <Body width="96" height="180" density="50" />
    <Holdable slots="RightHand+LeftHand" holdpos="50,-30" handle1="-15,15" handle2="-15,15" aimable="false" msg="ItemMsgPickUpSelect" canBeCombined="true">
      <StatusEffect type="OnActive" target="Character" SpeedMultiplier="0.4" setvalue="true" />
    </Holdable>
    <ItemContainer autofill="False" hideitems="true" capacity="1" removecontaineditemsondeconstruct="true" drawinventory="false" canbeselected="false" ShowConditionInContainedStateIndicator="true">
      <ContainedStateIndicator texture="Content/UI/ContainerIndicators.png" sourcerect="16,64,120,24" />
      <!--
	  <StatusEffect type="OnUse" target="This" condition="-1.25" disabledeltatime="true">
        <SpawnItem identifiers="ekgunnery_autocannonexplosiveround" spawnposition="ThisInventory" />
      </StatusEffect>
	  -->
      <!-- We cannot detect when a bullet is NOT-contained. Yet bizzarely this works instead. -->
      <StatusEffect type="OnUse" target="This" condition="1.25" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <RequiredItem items="ekgunnery_autocannonexplosiveround" type="Contained" />
      </StatusEffect>
      <StatusEffect type="OnUse" target="This" condition="-1.25" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <SpawnItem identifiers="ekgunnery_autocannonexplosiveround" spawnposition="ThisInventory" />
      </StatusEffect>
      <Containable identifiers="ekgunnery_autocannonexplosiveround" />
    </ItemContainer>
  </Item>
  <Item name="" identifier="ekgunnery_autocannonexplosiveround" category="Misc,Weapon" scale="0.5" hideinmenus="true">
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" sourcerect="928,48,48,16" depth="0.55" />
    <Body width="160" height="16" density="15" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,0" handle2="10,0" aimable="false" />
    <Projectile characterusable="false" launchimpulse="100.0" spread="0">
      <Attack structuredamage="10" itemdamage="10" levelwalldamage="50" severlimbsprobability="0.35" targetforce="7" penetration="0.2">
        <Affliction identifier="lacerations" strength="28" />
        <Affliction identifier="gunshotwound" strength="18" />
        <Affliction identifier="bleeding" strength="4" />
      </Attack>
      <StatusEffect type="OnActive" target="This" condition="-28">
        <Conditional condition="gt 50" />
        <ParticleEmitter particle="ekgunneryammotrailshort" copyentityangle="true" anglemin="-5" anglemax="5" particleamount="1" velocitymin="-10" velocitymax="-100" scalemin="1" scalemax="1.5" />
        <ParticleEmitter particle="ekgunnerytraceryellow" copyentityangle="true" anglemin="0" anglemax="0" particlespersecond="60" velocitymin="500" velocitymax="500" scalemin="1" scalemax="1" />
      </StatusEffect>
      <!-- velocity jumping fix -->
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" stackable="false" condition="-1">
        <Conditional condition="eq 100" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" delay="0.25" stackable="false" checkconditionalalways="true">
        <Conditional Condition="gt 75" />
        <Use />
      </StatusEffect>
      <!--
	  <StatusEffect type="OnUse" target="Limb" disabledeltatime="true">
        <Affliction identifier="ekgunnery_piercingeffect_weak" amount="100" />
      </StatusEffect>
	  -->
      <StatusEffect type="OnImpact" target="This">
        <sound file="Content/Items/Weapons/ExplosionSmall1.ogg" selectionmode="Random" range="8000" />
        <sound file="Content/Items/Weapons/ExplosionSmall2.ogg" selectionmode="Random" range="8000" />
        <sound file="Content/Items/Weapons/ExplosionSmall3.ogg" selectionmode="Random" range="8000" />
        <Explosion range="400.0" structuredamage="7.5" itemdamage="50" force="20.0" severlimbsprobability="0.5" decal="explosion" decalsize="0.5" underwaterbubble="false">
          <Affliction identifier="bleeding" strength="2" />
          <Affliction identifier="lacerations" strength="25" />
          <Affliction identifier="explosiondamage" strength="15" />
        </Explosion>
        <ParticleEmitter particle="ekgunneryunderwaterexplosionfix" particleamount="1" scalemin="1.75" scalemax="2.25" />
        <ParticleEmitter particle="ekgunnery_hdimpactmedium" particleamount="1" velocitymin="0" velocitymax="0" scalemin="2" scalemax="3" colormultiplier="255,220,175,255" />
        <ParticleEmitter particle="shrapnel" copyentityangle="true" anglemin="0" anglemax="360" particleamount="10" velocitymin="100" velocitymax="2000" scalemin="0.25" scalemax="0.5" />
        <Remove />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This">
        <Remove />
      </StatusEffect>
      <StatusEffect type="OnNotContained" target="This" stackable="false" delay="4">
        <Remove />
      </StatusEffect>
    </Projectile>
  </Item>
  <Item name="" identifier="ekgunnery_autocannonpiercingammo" aliases="Autocannon Piercing Ammo Box" scale="0.5" tags="ammobox,crate,ekgunnery_autocannonequipment,ekgunnery_autocannonammo" category="Equipment,Weapon" linkable="false" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="ekgunnery_autocannonammosource,coilgunammocontainer,ammocontainer" />
    <Price baseprice="200">
      <!-- 120 -->
      <Price storeidentifier="merchantoutpost" multiplier="1.3" minavailable="2" />
      <Price storeidentifier="merchantcity" multiplier="1.2" minavailable="2" />
      <Price storeidentifier="merchantresearch" multiplier="1.3" sold="false" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="6" />
      <Price storeidentifier="merchantmine" multiplier="1.2" sold="false" />
    </Price>
    <!--
	22
	20
	65
	12
	-->
    <Deconstruct time="10">
      <Item identifier="copper" mincondition="0.1" copycondition="true" />
      <Item identifier="steel" mincondition="0.1" copycondition="true" />
      <Item identifier="titanium" mincondition="0.1" copycondition="true" />
      <Item identifier="tin" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="20">
      <RequiredSkill identifier="weapons" level="30" />
      <RequiredItem identifier="copper" />
      <RequiredItem identifier="steel" />
      <RequiredItem identifier="titanium" />
      <RequiredItem identifier="tin" />
    </Fabricate>
    <Fabricate suitablefabricators="fabricator" displayname="recycleitem" requiredtime="20">
      <RequiredSkill identifier="weapons" level="20" />
      <RequiredItem identifier="copper" />
      <RequiredItem identifier="steel" />
      <RequiredItem identifier="titanium" />
      <RequiredItem identifier="ekgunnery_autocannonpiercingammo" mincondition="0.0" maxcondition="0.5" usecondition="false" />
    </Fabricate>
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="672,648,96,184" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="776,648,96,184" maxcondition="75" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="880,648,96,184" maxcondition="50" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="984,648,96,184" maxcondition="25" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1088,648,96,184" maxcondition="0" origin="0.5,0.5" />
    <!-- Leaving this here just in case it suddenly becomes allowed in the API. -->
    <ContainedSprite allowedcontainertags="coilgunammocontainer,crateshelf,ammoboxcontainer" allowedcontaineridentifiers="crateshelf,coilgunammoshelf" texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1232,648,112,80" origin="0.5,0.5">
      <StatusEffect type="Always" target="This" targetitemcomponent="ContainedSprite" setvalue="true" sourcerect="1232,728,112,80">
        <Conditional condition="eq 0" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This" targetitemcomponent="ContainedSprite" setvalue="true" sourcerect="1232,728,112,80" />
    </ContainedSprite>
    <Body width="96" height="180" density="50" />
    <Holdable slots="RightHand+LeftHand" holdpos="50,-30" handle1="-15,15" handle2="-15,15" aimable="false" msg="ItemMsgPickUpSelect" canBeCombined="true">
      <StatusEffect type="OnActive" target="Character" SpeedMultiplier="0.4" setvalue="true" />
    </Holdable>
    <ItemContainer autofill="False" hideitems="true" capacity="1" removecontaineditemsondeconstruct="true" drawinventory="false" canbeselected="false" ShowConditionInContainedStateIndicator="true">
      <ContainedStateIndicator texture="Content/UI/ContainerIndicators.png" sourcerect="16,64,120,24" />
      <!--
	  <StatusEffect type="OnUse" target="This" condition="-1.25" disabledeltatime="true">
        <SpawnItem identifiers="ekgunnery_autocannonpiercinground" spawnposition="ThisInventory" />
      </StatusEffect>
	  -->
      <!-- We cannot detect when a bullet is NOT-contained. Yet bizzarely this works instead. -->
      <StatusEffect type="OnUse" target="This" condition="1.25" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <RequiredItem items="ekgunnery_autocannonpiercinground" type="Contained" />
      </StatusEffect>
      <StatusEffect type="OnUse" target="This" condition="-1.25" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <SpawnItem identifiers="ekgunnery_autocannonpiercinground" spawnposition="ThisInventory" />
      </StatusEffect>
      <Containable identifiers="ekgunnery_autocannonpiercinground" />
    </ItemContainer>
  </Item>
  <Item name="" identifier="ekgunnery_autocannonpiercinground" category="Misc,Weapon" scale="0.5" hideinmenus="true" spritecolor="180,155,205,255">
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" sourcerect="928,32,48,16" depth="0.55" />
    <Body width="160" height="16" density="15" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,0" handle2="10,0" aimable="false" />
    <Projectile characterusable="false" launchimpulse="100.0" spread="0" maxtargetstohit="2">
      <Attack structuredamage="25" itemdamage="35" levelwalldamage="50" severlimbsprobability="0.35" targetforce="7" penetration="0.6">
        <Affliction identifier="lacerations" strength="26" />
        <Affliction identifier="gunshotwound" strength="15" />
        <Affliction identifier="bleeding" strength="4" />
      </Attack>
      <StatusEffect type="OnActive" target="This" condition="-28">
        <Conditional condition="gt 50" />
        <ParticleEmitter particle="ekgunneryammotrailshort" copyentityangle="true" anglemin="-5" anglemax="5" particleamount="1" velocitymin="-10" velocitymax="-100" scalemin="1" scalemax="1.5" />
        <ParticleEmitter particle="ekgunnerytraceryellow" copyentityangle="true" anglemin="0" anglemax="0" particlespersecond="60" velocitymin="500" velocitymax="500" scalemultiplier="1.6,0.7" scalemin="1" scalemax="1" />
      </StatusEffect>
      <!-- velocity jumping fix -->
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" stackable="false" condition="-1">
        <Conditional condition="eq 100" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" delay="0.25" stackable="false" checkconditionalalways="true">
        <Conditional Condition="gt 75" />
        <Use />
      </StatusEffect>
      <!--
	  <StatusEffect type="OnUse" target="Limb" disabledeltatime="true">
        <Affliction identifier="ekgunnery_piercingeffect_weak" amount="100" />
      </StatusEffect>
	  -->
      <StatusEffect type="OnImpact" target="This" condition="-34" disabledeltatime="true" />
      <StatusEffect type="OnImpact">
        <ParticleEmitter particle="bubbles" anglemin="-180" anglemax="180" particleamount="1" velocitymin="-10" velocitymax="-100" scalemin="0.5" scalemax="1" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="UseTarget">
        <Conditional entitytype="eq Structure" />
        <Conditional hastag="eq door" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_piercing1.ogg" selectionmode="Random" range="3000" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_piercing2.ogg" selectionmode="Random" range="3000" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_piercing3.ogg" selectionmode="Random" range="3000" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_piercing4.ogg" selectionmode="Random" range="3000" volume="1.0" />
        <ParticleEmitter particle="ekgunnery_hdimpactmedium" particleamount="1" velocitymin="0" velocitymax="0" scalemin="1" scalemax="1.5" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-25" anglemax="25" particleamount="3" velocitymin="-10" velocitymax="-300" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-30" anglemax="30" particleamount="3" velocitymin="10" velocitymax="300" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="shrapnel" copyentityangle="true" anglemin="-20" anglemax="20" particleamount="3" velocitymin="50" velocitymax="300" scalemin="1" scalemax="2" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This">
        <Remove />
      </StatusEffect>
      <StatusEffect type="OnNotContained" target="This" stackable="false" delay="4">
        <Remove />
      </StatusEffect>
    </Projectile>
  </Item>
  <Item name="" identifier="ekgunnery_autocannonflechetteammo" aliases="Autocannon Flechette Ammo Box" scale="0.5" tags="ammobox,crate,ekgunnery_autocannonequipment,ekgunnery_autocannonammo" category="Equipment,Weapon" linkable="false" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="ekgunnery_autocannonammosource,coilgunammocontainer,ammocontainer" />
    <Price baseprice="200">
      <!-- 120 -->
      <Price storeidentifier="merchantoutpost" multiplier="1.3" minavailable="2" />
      <Price storeidentifier="merchantcity" multiplier="1.2" minavailable="2" />
      <Price storeidentifier="merchantresearch" multiplier="1.3" sold="false" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="6" />
      <Price storeidentifier="merchantmine" multiplier="1.2" sold="false" />
    </Price>
    <!--
	22
	20
	65
	12
	-->
    <Deconstruct time="10">
      <Item identifier="copper" mincondition="0.1" copycondition="true" />
      <Item identifier="steel" mincondition="0.1" copycondition="true" />
      <Item identifier="titanium" mincondition="0.1" copycondition="true" />
      <Item identifier="tin" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="20">
      <RequiredSkill identifier="weapons" level="30" />
      <RequiredItem identifier="copper" />
      <RequiredItem identifier="steel" />
      <RequiredItem identifier="titanium" />
      <RequiredItem identifier="tin" />
    </Fabricate>
    <Fabricate suitablefabricators="fabricator" displayname="recycleitem" requiredtime="20">
      <RequiredSkill identifier="weapons" level="20" />
      <RequiredItem identifier="copper" />
      <RequiredItem identifier="steel" />
      <RequiredItem identifier="titanium" />
      <RequiredItem identifier="ekgunnery_autocannonflechetteammo" mincondition="0.0" maxcondition="0.5" usecondition="false" />
    </Fabricate>
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="0,648,96,184" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="104,648,96,184" maxcondition="75" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="208,648,96,184" maxcondition="50" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="312,648,96,184" maxcondition="25" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="416,648,96,184" maxcondition="0" origin="0.5,0.5" />
    <!-- Leaving this here just in case it suddenly becomes allowed in the API. -->
    <ContainedSprite allowedcontainertags="coilgunammocontainer,crateshelf,ammoboxcontainer" allowedcontaineridentifiers="crateshelf,coilgunammoshelf" texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="560,648,112,80" origin="0.5,0.5">
      <StatusEffect type="Always" target="This" targetitemcomponent="ContainedSprite" setvalue="true" sourcerect="560,728,112,80">
        <Conditional condition="eq 0" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This" targetitemcomponent="ContainedSprite" setvalue="true" sourcerect="560,728,112,80" />
    </ContainedSprite>
    <Body width="96" height="180" density="50" />
    <Holdable slots="RightHand+LeftHand" holdpos="50,-30" handle1="-15,15" handle2="-15,15" aimable="false" msg="ItemMsgPickUpSelect" canBeCombined="true">
      <StatusEffect type="OnActive" target="Character" SpeedMultiplier="0.4" setvalue="true" />
    </Holdable>
    <ItemContainer autofill="False" hideitems="true" capacity="1" removecontaineditemsondeconstruct="true" drawinventory="false" canbeselected="false" ShowConditionInContainedStateIndicator="true">
      <ContainedStateIndicator texture="Content/UI/ContainerIndicators.png" sourcerect="16,64,120,24" />
      <!--
	  <StatusEffect type="OnUse" target="This" condition="-1.25" disabledeltatime="true">
        <SpawnItem identifiers="ekgunnery_autocannonflechetteround" spawnposition="ThisInventory" />
      </StatusEffect>
	  -->
      <!-- We cannot detect when a bullet is NOT-contained. Yet bizzarely this works instead. -->
      <StatusEffect type="OnUse" target="This" condition="1.25" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <RequiredItem items="ekgunnery_autocannonflechetteround" type="Contained" />
      </StatusEffect>
      <StatusEffect type="OnUse" target="This" condition="-1.25" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <SpawnItem identifiers="ekgunnery_autocannonflechetteround" spawnposition="ThisInventory" />
      </StatusEffect>
      <Containable identifiers="ekgunnery_autocannonflechetteround" />
    </ItemContainer>
  </Item>
  <Item name="" identifier="ekgunnery_autocannonflechetteround" category="Misc,Weapon" scale="0.5" hideinmenus="true">
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" sourcerect="928,64,48,16" depth="0.55" />
    <Body width="160" height="16" density="15" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,0" handle2="10,0" aimable="false" />
    <Projectile characterusable="false" launchimpulse="100.0" spread="0" maxtargetstohit="2">
      <Attack structuredamage="10" itemdamage="20" levelwalldamage="50" severlimbsprobability="0.35" targetforce="7" penetration="0.3">
        <Affliction identifier="lacerations" strength="15" />
        <Affliction identifier="gunshotwound" strength="10" />
      </Attack>
      <StatusEffect type="OnActive" target="Contained" disabledeltatime="true" delay="0.005">
        <Use />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" condition="-10" disabledeltatime="true" delay="0.005">
        <Conditional condition="gt 0" />
        <SpawnItem identifiers="ekgunnery_autocannonflechettepellet" spawnposition="ThisInventory" />
        <SpawnItem identifiers="ekgunnery_autocannonflechettepellet" spawnposition="ThisInventory" />
        <SpawnItem identifiers="ekgunnery_autocannonflechettepellet" spawnposition="ThisInventory" />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" condition="-100" disabledeltatime="true" delay="0.3" />
      <StatusEffect type="OnBroken" target="This">
        <Remove />
      </StatusEffect>
    </Projectile>
    <ItemContainer autofill="False" hideitems="true" capacity="3" maxstacksize="1" removecontaineditemsondeconstruct="true" drawinventory="false" canbeselected="false" ShowConditionInContainedStateIndicator="true">
      <Containable identifiers="ekgunnery_autocannonflechettepellet" />
      <ContainedStateIndicator texture="Content/UI/ContainerIndicators.png" sourcerect="0,0,1,1" />
    </ItemContainer>
  </Item>
  <Item name="" identifier="ekgunnery_autocannonflechettepellet" category="Misc,Weapon" scale="0.32" sonarsize="1" hideinmenus="true">
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" sourcerect="0,0,1,1" depth="0.55" origin="0.5,0.5" />
    <Body width="40" height="40" density="15" />
    <Projectile characterusable="false" launchimpulse="100.0" spread="25" impulsespread="0.25">
      <Attack structuredamage="6" itemdamage="8" severlimbsprobability="0.3" penetration="0.3">
        <Affliction identifier="lacerations" strength="8" />
        <Affliction identifier="bleeding" strength="1" />
        <Affliction identifier="stun" strength="0.1" />
      </Attack>
      <StatusEffect type="OnActive" target="This">
        <ParticleEmitter particle="ekgunneryautocannonflechette" anglemin="0" anglemax="360" particlespersecond="30" velocitymin="-50" velocitymax="50" scalemin="0.5" scalemax="1.0" />
        <!--<ParticleEmitter particle="ekgunneryammotrailshort" copyentityangle="true" anglemin="-5" anglemax="5" particlespersecond="60" velocitymin="-10" velocitymax="-100" scalemultiplier="1.6,0.7" lifetime="0.3" />-->
      </StatusEffect>
      <StatusEffect type="OnNotContained" target="This" stackable="false" delay="2">
        <Remove />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="UseTarget">
        <Conditional entitytype="eq Structure" />
        <Conditional hastag="eq door" />
        <ParticleEmitter particle="ekgunnery_hdimpactsmall" particleamount="1" velocitymin="0" velocitymax="0" scalemin="0.5" scalemax="2" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-15" anglemax="15" particleamount="4" velocitymin="-10" velocitymax="-200" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-30" anglemax="30" particleamount="3" velocitymin="10" velocitymax="300" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="shrapnel" copyentityangle="true" anglemin="-20" anglemax="20" particleamount="3" velocitymin="50" velocitymax="300" scalemin="1" scalemax="2" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This">
        <Remove />
      </StatusEffect>
    </Projectile>
  </Item>
  <Item name="" identifier="ekgunnery_autocannonflakammo" aliases="Autocannon Flak Ammo Box,ekgunnery_autocannonflakeammo" scale="0.5" tags="ammobox,crate,ekgunnery_autocannonequipment,ekgunnery_autocannonammo" category="Equipment,Weapon" linkable="false" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="ekgunnery_autocannonammosource,coilgunammocontainer,ammocontainer" />
    <Price baseprice="310">
      <!-- 192 -->
      <Price storeidentifier="merchantoutpost" multiplier="1.3" sold="false" />
      <Price storeidentifier="merchantcity" multiplier="1.2" minavailable="2" />
      <Price storeidentifier="merchantresearch" multiplier="1.3" sold="false" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="4" />
      <Price storeidentifier="merchantmine" multiplier="1.2" sold="false" />
    </Price>
    <!--
	22
	80
	160 ?
	12
	-->
    <Deconstruct time="10">
      <Item identifier="copper" mincondition="0.1" copycondition="true" />
      <!--<Item identifier="fpgacircuit" mincondition="0.1" copycondition="true" />-->
      <Item identifier="c4block" mincondition="0.1" copycondition="true" />
      <Item identifier="tin" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="25">
      <RequiredSkill identifier="weapons" level="50" />
      <RequiredItem identifier="copper" />
      <!--<RequiredItem identifier="fpgacircuit" />-->
      <RequiredItem identifier="c4block" />
      <RequiredItem identifier="tin" />
    </Fabricate>
    <Fabricate suitablefabricators="fabricator" displayname="recycleitem" requiredtime="25">
      <RequiredSkill identifier="weapons" level="40" />
      <RequiredItem identifier="copper" />
      <RequiredItem identifier="c4block" />
      <RequiredItem identifier="ekgunnery_autocannonflakammo" mincondition="0.0" maxcondition="0.5" usecondition="false" />
    </Fabricate>
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="672,1032,96,184" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="776,1032,96,184" maxcondition="75" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="880,1032,96,184" maxcondition="50" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="984,1032,96,184" maxcondition="25" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1088,1032,96,184" maxcondition="0" origin="0.5,0.5" />
    <!-- Leaving this here just in case it suddenly becomes allowed in the API. -->
    <ContainedSprite allowedcontainertags="coilgunammocontainer,crateshelf,ammoboxcontainer" allowedcontaineridentifiers="crateshelf,coilgunammoshelf" texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1232,1032,112,80" origin="0.5,0.5">
      <StatusEffect type="Always" target="This" targetitemcomponent="ContainedSprite" setvalue="true" sourcerect="1232,1112,112,80">
        <Conditional condition="eq 0" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This" targetitemcomponent="ContainedSprite" setvalue="true" sourcerect="1232,1112,112,80" />
    </ContainedSprite>
    <Body width="96" height="180" density="50" />
    <Holdable slots="RightHand+LeftHand" holdpos="50,-30" handle1="-15,15" handle2="-15,15" aimable="false" msg="ItemMsgPickUpSelect" canBeCombined="true">
      <StatusEffect type="OnActive" target="Character" SpeedMultiplier="0.4" setvalue="true" />
    </Holdable>
    <ItemContainer autofill="False" hideitems="true" capacity="1" removecontaineditemsondeconstruct="true" drawinventory="false" canbeselected="false" ShowConditionInContainedStateIndicator="true">
      <ContainedStateIndicator texture="Content/UI/ContainerIndicators.png" sourcerect="16,64,120,24" />
      <!--
	  <StatusEffect type="OnUse" target="This" condition="-1.25" disabledeltatime="true">
        <SpawnItem identifiers="ekgunnery_autocannonflakround" spawnposition="ThisInventory" />
      </StatusEffect>
	  -->
      <!-- We cannot detect when a bullet is NOT-contained. Yet bizzarely this works instead. -->
      <StatusEffect type="OnUse" target="This" condition="1.25" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <RequiredItem items="ekgunnery_autocannonflakround" type="Contained" />
      </StatusEffect>
      <StatusEffect type="OnUse" target="This" condition="-1.25" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <SpawnItem identifiers="ekgunnery_autocannonflakround" spawnposition="ThisInventory" />
      </StatusEffect>
      <Containable identifiers="ekgunnery_autocannonflakround" />
    </ItemContainer>
  </Item>
  <Item name="" identifier="ekgunnery_autocannonflakround" category="Misc,Weapon" scale="0.5" hideinmenus="true">
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" sourcerect="1024,48,48,16" depth="0.55" />
    <Body width="160" height="16" density="15" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,0" handle2="10,0" aimable="false" />
    <Projectile characterusable="false" launchimpulse="100.0" spread="10" impulsespread="0.3" maxtargetstohit="2">
      <Attack structuredamage="7.5" itemdamage="10" levelwalldamage="50" severlimbsprobability="0.35" targetforce="7" penetration="0.2">
        <Affliction identifier="lacerations" strength="28" />
        <Affliction identifier="gunshotwound" strength="18" />
        <Affliction identifier="bleeding" strength="4" />
      </Attack>
      <StatusEffect type="OnActive" target="This" condition="-200">
        <ParticleEmitter particle="ekgunneryammotrailshort" copyentityangle="true" anglemin="-5" anglemax="5" particleamount="1" velocitymin="-10" velocitymax="-100" scalemin="1" scalemax="1.5" />
        <ParticleEmitter particle="ekgunnerytraceryellow" copyentityangle="true" anglemin="0" anglemax="0" particlespersecond="60" velocitymin="500" velocitymax="500" scalemin="1" scalemax="1" />
      </StatusEffect>
      <!--
	  <StatusEffect type="OnActive" target="This" disabledeltatime="true" delay="0.25" stackable="false" checkconditionalalways="true">
        <Conditional Condition="gt 75" />
        <Use />
      </StatusEffect>
	  -->
      <StatusEffect type="OnActive" target="This" condition="-100" disabledeltatime="true" stackable="false" delay="0.5" />
      <StatusEffect type="OnImpact" target="This" condition="-55" disabledeltatime="true" delay="0.07" />
      <StatusEffect type="OnImpact">
        <ParticleEmitter particle="bubbles" anglemin="-180" anglemax="180" particleamount="1" velocitymin="-10" velocitymax="-100" scalemin="0.5" scalemax="1" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="UseTarget">
        <Conditional entitytype="eq Structure" />
        <Conditional hastag="eq door" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_impact1.ogg" selectionmode="Random" range="3000" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_impact2.ogg" selectionmode="Random" range="3000" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_impact3.ogg" selectionmode="Random" range="3000" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_impact4.ogg" selectionmode="Random" range="3000" volume="1.0" />
        <ParticleEmitter particle="ekgunnery_hdimpactsmall" particleamount="1" velocitymin="0" velocitymax="0" scalemin="4" scalemax="6" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-25" anglemax="25" particleamount="3" velocitymin="-10" velocitymax="-300" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-30" anglemax="30" particleamount="3" velocitymin="10" velocitymax="300" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="shrapnel" copyentityangle="true" anglemin="-20" anglemax="20" particleamount="3" velocitymin="50" velocitymax="300" scalemin="1" scalemax="2" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This">
        <!--
		<sound file="Content/Items/Weapons/ExplosionSmall1.ogg" selectionmode="Random" range="10000"/>
        <sound file="Content/Items/Weapons/ExplosionSmall2.ogg" selectionmode="Random" range="10000"/>
        <sound file="Content/Items/Weapons/ExplosionSmall3.ogg" selectionmode="Random" range="10000"/>
		-->
        <sound file="%ModDir%/Items/Weapons/flak_explode1.ogg" selectionmode="Random" range="7500" />
        <sound file="%ModDir%/Items/Weapons/flak_explode2.ogg" selectionmode="Random" range="7500" />
        <sound file="%ModDir%/Items/Weapons/flak_explode3.ogg" selectionmode="Random" range="7500" />
        <sound file="%ModDir%/Items/Weapons/flak_explode4.ogg" selectionmode="Random" range="7500" />
        <ParticleEmitter particle="ekgunneryunderwaterexplosionfix" particleamount="1" scalemin="1.75" scalemax="2.25" />
        <ParticleEmitter particle="ekgunneryflakburstmedium" particleamount="1" scalemin="3.5" scalemax="4.0" startdelaymin="0.3" startdelaymax="0.35" />
        <Explosion range="950.0" structuredamage="5" itemdamage="40" stun="1" force="10.0" severlimbsprobability="0.1" underwaterbubble="false" onlyoutside="true">
          <Affliction identifier="burn" strength="10" />
          <Affliction identifier="explosiondamage" strength="15" />
          <Affliction identifier="lacerations" strength="20" />
          <Affliction identifier="bleeding" strength="7.5" />
        </Explosion>
        <!-- Short range fragmentation if shell penetrates hull -->
        <Explosion range="175.0" structuredamage="5" itemdamage="40" stun="2" force="10.0" severlimbsprobability="0.1" underwaterbubble="false" flames="false" onlyinside="true">
          <Affliction identifier="burn" strength="5" />
          <Affliction identifier="explosiondamage" strength="7.5" />
          <Affliction identifier="lacerations" strength="10" />
          <Affliction identifier="bleeding" strength="5" />
        </Explosion>
        <Remove />
      </StatusEffect>
      <StatusEffect type="OnNotContained" target="This" stackable="false" delay="4">
        <Remove />
      </StatusEffect>
    </Projectile>
  </Item>
  <Item name="" identifier="ekgunnery_autocannonflakammo_smartfuse" aliases="Autocannon Flak Proximity Ammo Box" scale="0.5" tags="ammobox,crate,ekgunnery_autocannonequipment,ekgunnery_autocannonammo" category="Equipment,Weapon" linkable="false" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="ekgunnery_autocannonammosource,coilgunammocontainer,ammocontainer" />
    <Price baseprice="350">
      <!-- 232 -->
      <Price storeidentifier="merchantoutpost" multiplier="1.3" sold="false" />
      <Price storeidentifier="merchantcity" multiplier="1.2" sold="false" />
      <Price storeidentifier="merchantresearch" multiplier="1.3" sold="false" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="4" />
      <Price storeidentifier="merchantmine" multiplier="1.2" sold="false" />
    </Price>
    <!--
	22
	40
	160 ?
	12
	-->
    <Deconstruct time="10">
      <Item identifier="copper" mincondition="0.1" copycondition="true" />
      <Item identifier="fpgacircuit" mincondition="0.1" copycondition="true" />
      <Item identifier="c4block" mincondition="0.1" copycondition="true" />
      <Item identifier="tin" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="25">
      <RequiredSkill identifier="weapons" level="50" />
      <RequiredItem identifier="copper" />
      <RequiredItem identifier="fpgacircuit" />
      <RequiredItem identifier="c4block" />
      <RequiredItem identifier="tin" />
    </Fabricate>
    <Fabricate suitablefabricators="fabricator" displayname="recycleitem" requiredtime="25">
      <RequiredSkill identifier="weapons" level="40" />
      <RequiredItem identifier="copper" />
      <RequiredItem identifier="fpgacircuit" />
      <RequiredItem identifier="c4block" />
      <RequiredItem identifier="ekgunnery_autocannonflakammo_smartfuse" mincondition="0.0" maxcondition="0.5" usecondition="false" />
    </Fabricate>
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1344,1032,96,184" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1448,1032,96,184" maxcondition="75" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1552,1032,96,184" maxcondition="50" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1656,1032,96,184" maxcondition="25" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1760,1032,96,184" maxcondition="0" origin="0.5,0.5" />
    <!-- Leaving this here just in case it suddenly becomes allowed in the API. -->
    <ContainedSprite allowedcontainertags="coilgunammocontainer,crateshelf,ammoboxcontainer" allowedcontaineridentifiers="crateshelf,coilgunammoshelf" texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1904,1032,112,80" origin="0.5,0.5">
      <StatusEffect type="Always" target="This" targetitemcomponent="ContainedSprite" setvalue="true" sourcerect="1904,1112,112,80">
        <Conditional condition="eq 0" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This" targetitemcomponent="ContainedSprite" setvalue="true" sourcerect="1904,1112,112,80" />
    </ContainedSprite>
    <Body width="96" height="180" density="50" />
    <Holdable slots="RightHand+LeftHand" holdpos="50,-30" handle1="-15,15" handle2="-15,15" aimable="false" msg="ItemMsgPickUpSelect" canBeCombined="true">
      <StatusEffect type="OnActive" target="Character" SpeedMultiplier="0.4" setvalue="true" />
    </Holdable>
    <ItemContainer autofill="False" hideitems="true" capacity="1" removecontaineditemsondeconstruct="true" drawinventory="false" canbeselected="false" ShowConditionInContainedStateIndicator="true">
      <ContainedStateIndicator texture="Content/UI/ContainerIndicators.png" sourcerect="16,64,120,24" />
      <!--
	  <StatusEffect type="OnUse" target="This" condition="-1.25" disabledeltatime="true">
        <SpawnItem identifiers="ekgunnery_autocannonflakround_smartfuse" spawnposition="ThisInventory" />
      </StatusEffect>
	  -->
      <!-- We cannot detect when a bullet is NOT-contained. Yet bizzarely this works instead. -->
      <StatusEffect type="OnUse" target="This" condition="1.25" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <RequiredItem items="ekgunnery_autocannonflakround_smartfuse" type="Contained" />
      </StatusEffect>
      <StatusEffect type="OnUse" target="This" condition="-1.25" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <SpawnItem identifiers="ekgunnery_autocannonflakround_smartfuse" spawnposition="ThisInventory" />
      </StatusEffect>
      <Containable identifiers="ekgunnery_autocannonflakround_smartfuse" />
    </ItemContainer>
  </Item>
  <Item name="" identifier="ekgunnery_autocannonflakround_smartfuse" category="Misc,Weapon" scale="0.5" hideinmenus="true">
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" sourcerect="1024,48,48,16" depth="0.55" />
    <Body width="160" height="16" density="15" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,0" handle2="10,0" aimable="false" />
    <Projectile characterusable="false" launchimpulse="100.0" spread="0" maxtargetstohit="2">
      <Attack structuredamage="7.5" itemdamage="10" levelwalldamage="50" severlimbsprobability="0.35" targetforce="7" penetration="0.2">
        <Affliction identifier="lacerations" strength="28" />
        <Affliction identifier="gunshotwound" strength="18" />
        <Affliction identifier="bleeding" strength="4" />
      </Attack>
      <StatusEffect type="OnActive" target="This" condition="-28">
        <Conditional condition="gt 50" />
        <ParticleEmitter particle="ekgunneryammotrailshort" copyentityangle="true" anglemin="-5" anglemax="5" particleamount="1" velocitymin="-10" velocitymax="-100" scalemin="1" scalemax="1.5" />
        <ParticleEmitter particle="ekgunnerytraceryellow" copyentityangle="true" anglemin="0" anglemax="0" particlespersecond="60" velocitymin="500" velocitymax="500" scalemultiplier="1.6,0.7" scalemin="1" scalemax="1" />
      </StatusEffect>
      <!-- velocity jumping fix -->
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" stackable="false" condition="-1">
        <Conditional condition="eq 100" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" delay="0.25" stackable="false" checkconditionalalways="true">
        <Conditional Condition="gt 75" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="This" condition="-55" disabledeltatime="true" delay="0.07" />
      <StatusEffect type="OnImpact">
        <ParticleEmitter particle="bubbles" anglemin="-180" anglemax="180" particleamount="1" velocitymin="-10" velocitymax="-100" scalemin="0.5" scalemax="1" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="UseTarget">
        <Conditional entitytype="eq Structure" />
        <Conditional hastag="eq door" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_impact1.ogg" selectionmode="Random" range="3000" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_impact2.ogg" selectionmode="Random" range="3000" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_impact3.ogg" selectionmode="Random" range="3000" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_impact4.ogg" selectionmode="Random" range="3000" volume="1.0" />
        <ParticleEmitter particle="ekgunnery_hdimpactsmall" particleamount="1" velocitymin="0" velocitymax="0" scalemin="4" scalemax="6" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-25" anglemax="25" particleamount="3" velocitymin="-10" velocitymax="-300" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-30" anglemax="30" particleamount="3" velocitymin="10" velocitymax="300" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="shrapnel" copyentityangle="true" anglemin="-20" anglemax="20" particleamount="3" velocitymin="50" velocitymax="300" scalemin="1" scalemax="2" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This">
        <sound file="%ModDir%/Items/Weapons/flak_explode1.ogg" selectionmode="Random" range="7500" />
        <sound file="%ModDir%/Items/Weapons/flak_explode2.ogg" selectionmode="Random" range="7500" />
        <sound file="%ModDir%/Items/Weapons/flak_explode3.ogg" selectionmode="Random" range="7500" />
        <sound file="%ModDir%/Items/Weapons/flak_explode4.ogg" selectionmode="Random" range="7500" />
        <ParticleEmitter particle="ekgunneryunderwaterexplosionfix" particleamount="1" scalemin="1.75" scalemax="2.25" />
        <ParticleEmitter particle="ekgunneryflakburstmedium" particleamount="1" scalemin="3.5" scalemax="4.0" startdelaymin="0.3" startdelaymax="0.35" />
        <Explosion range="950.0" structuredamage="5" itemdamage="40" stun="1" force="10.0" severlimbsprobability="0.1" underwaterbubble="false" onlyoutside="true">
          <Affliction identifier="burn" strength="10" />
          <Affliction identifier="explosiondamage" strength="15" />
          <Affliction identifier="lacerations" strength="20" />
          <Affliction identifier="bleeding" strength="7.5" />
        </Explosion>
        <!-- Short range fragmentation if shell penetrates hull -->
        <Explosion range="175.0" structuredamage="5" itemdamage="40" stun="2" force="10.0" severlimbsprobability="0.1" underwaterbubble="false" flames="false" onlyinside="true">
          <Affliction identifier="burn" strength="5" />
          <Affliction identifier="explosiondamage" strength="7.5" />
          <Affliction identifier="lacerations" strength="10" />
          <Affliction identifier="bleeding" strength="5" />
        </Explosion>
        <Remove />
      </StatusEffect>
      <StatusEffect type="OnNotContained" target="This" stackable="false" delay="4">
        <Remove />
      </StatusEffect>
    </Projectile>
    <MotionSensor range="750" canbeselected="false" IgnoreDead="true" minimumvelocity="0" updateinterval="0.025" target="Monster" DetectOwnMotion="false">
      <!-- Proximity Fuse Detonation -->
      <StatusEffect type="Always" target="This" condition="-100" disabledeltatime="true" delay="0.15" stackable="false" checkconditionalalways="true" comparison="And">
        <Conditional targetitemcomponent="MotionSensor" MotionDetected="eq true" />
        <Conditional Condition="lt 90" />
      </StatusEffect>
    </MotionSensor>
  </Item>
  <Item name="" identifier="ekgunnery_autocannonphysicoriumammo" aliases="Autocannon Physicorium Ammo Box" scale="0.5" tags="ammobox,crate,ekgunnery_autocannonequipment,ekgunnery_autocannonammo" category="Equipment,Weapon" linkable="false" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="ekgunnery_autocannonammosource,coilgunammocontainer,ammocontainer" />
    <Price baseprice="350">
      <!-- 250 -->
      <Price storeidentifier="merchantoutpost" multiplier="1.3" sold="false" />
      <Price storeidentifier="merchantcity" multiplier="1.2" minavailable="2" />
      <Price storeidentifier="merchantresearch" multiplier="1.3" minavailable="1" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="3" />
      <Price storeidentifier="merchantmine" multiplier="1.2" sold="false" />
    </Price>
    <!--
	22
	200
	20
	12
	-->
    <Deconstruct time="10">
      <Item identifier="copper" mincondition="0.1" copycondition="true" />
      <Item identifier="physicorium" mincondition="0.1" copycondition="true" />
      <Item identifier="steel" mincondition="0.1" copycondition="true" />
      <Item identifier="tin" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="20">
      <RequiredSkill identifier="weapons" level="30" />
      <RequiredItem identifier="copper" />
      <RequiredItem identifier="physicorium" />
      <RequiredItem identifier="steel" />
      <RequiredItem identifier="tin" />
    </Fabricate>
    <Fabricate suitablefabricators="fabricator" displayname="recycleitem" requiredtime="20">
      <RequiredSkill identifier="weapons" level="20" />
      <RequiredItem identifier="copper" />
      <RequiredItem identifier="physicorium" />
      <RequiredItem identifier="steel" />
      <RequiredItem identifier="ekgunnery_autocannonphysicoriumammo" mincondition="0.0" maxcondition="0.5" usecondition="false" />
    </Fabricate>
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1344,368,96,184" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1448,368,96,184" maxcondition="75" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1552,368,96,184" maxcondition="50" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1656,368,96,184" maxcondition="25" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1760,368,96,184" maxcondition="0" origin="0.5,0.5" />
    <!-- Leaving this here just in case it suddenly becomes allowed in the API. -->
    <ContainedSprite allowedcontainertags="coilgunammocontainer,crateshelf,ammoboxcontainer" allowedcontaineridentifiers="crateshelf,coilgunammoshelf" texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1904,368,112,80" origin="0.5,0.5">
      <StatusEffect type="Always" target="This" targetitemcomponent="ContainedSprite" setvalue="true" sourcerect="1904,448,112,80">
        <Conditional condition="eq 0" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This" targetitemcomponent="ContainedSprite" setvalue="true" sourcerect="1904,448,112,80" />
    </ContainedSprite>
    <Body width="96" height="180" density="50" />
    <Holdable slots="RightHand+LeftHand" holdpos="50,-30" handle1="-15,15" handle2="-15,15" aimable="false" msg="ItemMsgPickUpSelect" canBeCombined="true">
      <StatusEffect type="OnActive" target="Character" SpeedMultiplier="0.4" setvalue="true" />
    </Holdable>
    <ItemContainer autofill="False" hideitems="true" capacity="1" removecontaineditemsondeconstruct="true" drawinventory="false" canbeselected="false" ShowConditionInContainedStateIndicator="true">
      <ContainedStateIndicator texture="Content/UI/ContainerIndicators.png" sourcerect="16,64,120,24" />
      <!--
	  <StatusEffect type="OnUse" target="This" condition="-1.25" disabledeltatime="true">
        <SpawnItem identifiers="ekgunnery_autocannonphysicoriumround" spawnposition="ThisInventory" />
      </StatusEffect>
	  -->
      <!-- We cannot detect when a bullet is NOT-contained. Yet bizzarely this works instead. -->
      <StatusEffect type="OnUse" target="This" condition="1.25" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <RequiredItem items="ekgunnery_autocannonphysicoriumround" type="Contained" />
      </StatusEffect>
      <StatusEffect type="OnUse" target="This" condition="-1.25" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <SpawnItem identifiers="ekgunnery_autocannonphysicoriumround" spawnposition="ThisInventory" />
      </StatusEffect>
      <Containable identifiers="ekgunnery_autocannonphysicoriumround" />
    </ItemContainer>
  </Item>
  <Item name="" identifier="ekgunnery_autocannonphysicoriumround" category="Misc,Weapon" scale="0.5" hideinmenus="true">
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" sourcerect="976,32,48,16" depth="0.55" />
    <Body width="160" height="16" density="15" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,0" handle2="10,0" aimable="false" />
    <Projectile characterusable="false" launchimpulse="100.0" spread="0" maxtargetstohit="2">
      <Attack structuredamage="35" itemdamage="40" levelwalldamage="50" severlimbsprobability="0.35" targetforce="7" penetration="0.8">
        <Affliction identifier="lacerations" strength="28" />
        <Affliction identifier="gunshotwound" strength="18" />
        <Affliction identifier="bleeding" strength="4" />
      </Attack>
      <StatusEffect type="OnActive" target="This" condition="-28">
        <Conditional condition="gt 50" />
        <ParticleEmitter particle="ekgunneryammotrailshort" copyentityangle="true" anglemin="-5" anglemax="5" particleamount="1" velocitymin="-10" velocitymax="-100" scalemin="1" scalemax="1.5" />
        <ParticleEmitter particle="ekgunnerytraceryellow" copyentityangle="true" anglemin="0" anglemax="0" particlespersecond="60" velocitymin="500" velocitymax="500" scalemultiplier="1.6,0.7" scalemin="1" scalemax="1" />
      </StatusEffect>
      <!-- velocity jumping fix -->
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" stackable="false" condition="-1">
        <Conditional condition="eq 100" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" delay="0.25" stackable="false" checkconditionalalways="true">
        <Conditional Condition="gt 75" />
        <Use />
      </StatusEffect>
      <!--
	  <StatusEffect type="OnUse" target="Limb" disabledeltatime="true">
        <Affliction identifier="ekgunnery_piercingeffect_weak" amount="100" />
      </StatusEffect>
	  -->
      <StatusEffect type="OnImpact" target="This" condition="-55" disabledeltatime="true" />
      <StatusEffect type="OnImpact">
        <ParticleEmitter particle="bubbles" anglemin="-180" anglemax="180" particleamount="1" velocitymin="-10" velocitymax="-100" scalemin="0.5" scalemax="1" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="UseTarget">
        <Conditional entitytype="eq Structure" />
        <Conditional hastag="eq door" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_piercing1.ogg" selectionmode="Random" range="3000" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_piercing2.ogg" selectionmode="Random" range="3000" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_piercing3.ogg" selectionmode="Random" range="3000" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_piercing4.ogg" selectionmode="Random" range="3000" volume="1.0" />
        <ParticleEmitter particle="ekgunnery_hdimpactmedium" particleamount="1" velocitymin="0" velocitymax="0" scalemin="1" scalemax="1.5" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-25" anglemax="25" particleamount="3" velocitymin="-10" velocitymax="-300" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-30" anglemax="30" particleamount="3" velocitymin="10" velocitymax="300" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="shrapnel" copyentityangle="true" anglemin="-20" anglemax="20" particleamount="3" velocitymin="50" velocitymax="300" scalemin="1" scalemax="2" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This">
        <Remove />
      </StatusEffect>
      <StatusEffect type="OnNotContained" target="This" stackable="false" delay="4">
        <Remove />
      </StatusEffect>
    </Projectile>
  </Item>
  <Item name="" identifier="ekgunnery_autocannonarmorpiercingammo" aliases="Autocannon Armor Piercing Explosive Ammo Box" scale="0.5" tags="ammobox,crate,ekgunnery_autocannonequipment,ekgunnery_autocannonammo" category="Equipment,Weapon" linkable="false" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="ekgunnery_autocannonammosource,coilgunammocontainer,ammocontainer" />
    <Price baseprice="425">
      <!-- 250 -->
      <Price storeidentifier="merchantoutpost" multiplier="1.3" sold="false" />
      <Price storeidentifier="merchantcity" multiplier="1.2" sold="false" />
      <Price storeidentifier="merchantresearch" multiplier="1.3" sold="false" />
      <Price storeidentifier="merchantmilitary" multiplier="1.0" minavailable="4" />
      <Price storeidentifier="merchantmine" multiplier="1.2" sold="false" />
    </Price>
    <!--
	22
	42
	65
	160?
	12
	-->
    <Deconstruct time="10">
      <Item identifier="copper" mincondition="0.1" copycondition="true" />
      <Item identifier="aluminium" mincondition="0.1" copycondition="true" />
      <Item identifier="titanium" mincondition="0.1" copycondition="true" />
      <Item identifier="c4block" mincondition="0.1" copycondition="true" />
      <Item identifier="tin" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="20">
      <RequiredSkill identifier="weapons" level="30" />
      <RequiredItem identifier="copper" />
      <RequiredItem identifier="aluminium" />
      <RequiredItem identifier="titanium" />
      <RequiredItem identifier="c4block" />
      <RequiredItem identifier="tin" />
    </Fabricate>
    <Fabricate suitablefabricators="fabricator" displayname="recycleitem" requiredtime="20">
      <RequiredSkill identifier="weapons" level="20" />
      <RequiredItem identifier="copper" />
      <RequiredItem identifier="aluminium" />
      <RequiredItem identifier="titanium" />
      <RequiredItem identifier="c4block" />
      <RequiredItem identifier="ekgunnery_autocannonarmorpiercingammo" mincondition="0.0" maxcondition="0.5" usecondition="false" />
    </Fabricate>
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1344,648,96,184" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1448,648,96,184" maxcondition="75" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1552,648,96,184" maxcondition="50" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1656,648,96,184" maxcondition="25" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1760,648,96,184" maxcondition="0" origin="0.5,0.5" />
    <!-- Leaving this here just in case it suddenly becomes allowed in the API. -->
    <ContainedSprite allowedcontainertags="coilgunammocontainer,crateshelf,ammoboxcontainer" allowedcontaineridentifiers="crateshelf,coilgunammoshelf" texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1904,648,112,80" origin="0.5,0.5">
      <StatusEffect type="Always" target="This" targetitemcomponent="ContainedSprite" setvalue="true" sourcerect="1904,728,112,80">
        <Conditional condition="eq 0" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This" targetitemcomponent="ContainedSprite" setvalue="true" sourcerect="1904,728,112,80" />
    </ContainedSprite>
    <Body width="96" height="180" density="50" />
    <Holdable slots="RightHand+LeftHand" holdpos="50,-30" handle1="-15,15" handle2="-15,15" aimable="false" msg="ItemMsgPickUpSelect" canBeCombined="true">
      <StatusEffect type="OnActive" target="Character" SpeedMultiplier="0.4" setvalue="true" />
    </Holdable>
    <ItemContainer autofill="False" hideitems="true" capacity="1" removecontaineditemsondeconstruct="true" drawinventory="false" canbeselected="false" ShowConditionInContainedStateIndicator="true">
      <ContainedStateIndicator texture="Content/UI/ContainerIndicators.png" sourcerect="16,64,120,24" />
      <!--
	  <StatusEffect type="OnUse" target="This" condition="-1.25" disabledeltatime="true">
        <SpawnItem identifiers="ekgunnery_autocannonarmorpiercinground" spawnposition="ThisInventory" />
      </StatusEffect>
	  -->
      <!-- We cannot detect when a bullet is NOT-contained. Yet bizzarely this works instead. -->
      <StatusEffect type="OnUse" target="This" condition="1.25" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <RequiredItem items="ekgunnery_autocannonarmorpiercinground" type="Contained" />
      </StatusEffect>
      <StatusEffect type="OnUse" target="This" condition="-1.25" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <SpawnItem identifiers="ekgunnery_autocannonarmorpiercinground" spawnposition="ThisInventory" />
      </StatusEffect>
      <Containable identifiers="ekgunnery_autocannonarmorpiercinground" />
    </ItemContainer>
  </Item>
  <Item name="" identifier="ekgunnery_autocannonarmorpiercinground" category="Misc,Weapon" scale="0.5" hideinmenus="true">
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" sourcerect="976,48,48,16" depth="0.55" />
    <Body width="160" height="16" density="15" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,0" handle2="10,0" aimable="false" />
    <Projectile characterusable="false" launchimpulse="100.0" spread="0" maxtargetstohit="2">
      <Attack structuredamage="30" itemdamage="40" levelwalldamage="50" severlimbsprobability="0.35" targetforce="15" penetration="0.8">
        <Affliction identifier="gunshotwound" strength="17.5" />
        <Affliction identifier="lacerations" strength="20" />
        <Affliction identifier="internaldamage" strength="15" />
        <Affliction identifier="bleeding" strength="4" />
      </Attack>
      <StatusEffect type="OnActive" target="This" condition="-28">
        <Conditional condition="gt 50" />
        <ParticleEmitter particle="ekgunneryammotrailshort" copyentityangle="true" anglemin="-5" anglemax="5" particleamount="1" velocitymin="-10" velocitymax="-100" scalemin="1" scalemax="1.5" />
        <ParticleEmitter particle="ekgunnerytraceryellow" copyentityangle="true" anglemin="0" anglemax="0" particlespersecond="60" velocitymin="500" velocitymax="500" scalemultiplier="1.6,0.7" scalemin="1" scalemax="1" />
      </StatusEffect>
      <!-- velocity jumping fix -->
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" stackable="false" condition="-1">
        <Conditional condition="eq 100" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" delay="0.25" stackable="false" checkconditionalalways="true">
        <Conditional Condition="gt 75" />
        <Use />
      </StatusEffect>
      <!--
	  <StatusEffect type="OnUse" target="Limb" disabledeltatime="true">
        <Affliction identifier="ekgunnery_piercingeffect_weak" amount="100" />
      </StatusEffect>
	  -->
      <StatusEffect type="OnImpact" target="This" condition="-100" disabledeltatime="true" delay="0.06" stackable="false" />
      <StatusEffect type="OnImpact">
        <ParticleEmitter particle="ekgunnery_hdimpactmedium" particleamount="1" velocitymin="0" velocitymax="0" scalemin="1.5" scalemax="2.5" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_aphe1.ogg" selectionmode="Random" range="5000" volume="0.65" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_aphe2.ogg" selectionmode="Random" range="5000" volume="0.65" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_aphe3.ogg" selectionmode="Random" range="5000" volume="0.65" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_aphe4.ogg" selectionmode="Random" range="5000" volume="0.65" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_aphe5.ogg" selectionmode="Random" range="5000" volume="0.65" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_aphe6.ogg" selectionmode="Random" range="5000" volume="0.65" />
        <Explosion range="150.0" structuredamage="25" itemdamage="25" force="10.0" severlimbsprobability="0.35" underwaterbubble="false">
          <Affliction identifier="bleeding" strength="2" />
          <Affliction identifier="lacerations" strength="20" />
          <Affliction identifier="explosiondamage" strength="15" />
        </Explosion>
      </StatusEffect>
      <StatusEffect type="OnImpact" target="UseTarget">
        <Conditional entitytype="eq Structure" />
        <Conditional hastag="eq door" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-25" anglemax="25" particleamount="3" velocitymin="-10" velocitymax="-300" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-30" anglemax="30" particleamount="4" velocitymin="10" velocitymax="300" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="shrapnel" copyentityangle="true" anglemin="-60" anglemax="60" particleamount="3" velocitymin="50" velocitymax="300" scalemin="1" scalemax="2" />
        <ParticleEmitter particle="shrapnel" copyentityangle="true" anglemin="-25" anglemax="25" particleamount="4" velocitymin="-900" velocitymax="-50" scalemin="1" scalemax="2" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This">
        <Remove />
      </StatusEffect>
      <StatusEffect type="OnNotContained" target="This" stackable="false" delay="4">
        <Remove />
      </StatusEffect>
    </Projectile>
  </Item>
  <Item name="" identifier="ekgunnery_autocannonflareammo" aliases="Autocannon Flare Ammo Box" scale="0.5" tags="ammobox,crate,ekgunnery_autocannonequipment,ekgunnery_autocannonammo" category="Equipment,Weapon" linkable="false" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="ekgunnery_autocannonammosource,coilgunammocontainer,ammocontainer" />
    <Price baseprice="100">
      <!-- 124 -->
      <Price storeidentifier="merchantoutpost" multiplier="1.3" minavailable="2" />
      <Price storeidentifier="merchantcity" multiplier="1.2" minavailable="2" />
      <Price storeidentifier="merchantresearch" multiplier="1.3" sold="false" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="6" />
      <Price storeidentifier="merchantmine" multiplier="1.2" sold="false" />
    </Price>
    <!--
	22
	90
	10
	12
	-->
    <Deconstruct time="10">
      <Item identifier="copper" mincondition="0.1" copycondition="true" />
      <Item identifier="flashpowder" mincondition="0.1" copycondition="true" />
      <Item identifier="carbon" mincondition="0.1" copycondition="true" />
      <Item identifier="tin" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="20">
      <RequiredSkill identifier="weapons" level="30" />
      <RequiredItem identifier="copper" />
      <RequiredItem identifier="flashpowder" />
      <RequiredItem identifier="carbon" />
      <RequiredItem identifier="tin" />
    </Fabricate>
    <Fabricate suitablefabricators="fabricator" displayname="recycleitem" requiredtime="20">
      <RequiredSkill identifier="weapons" level="20" />
      <RequiredItem identifier="copper" />
      <RequiredItem identifier="flashpowder" />
      <RequiredItem identifier="carbon" />
      <RequiredItem identifier="ekgunnery_autocannonflareammo" mincondition="0.0" maxcondition="0.5" usecondition="false" />
    </Fabricate>
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="0,1032,96,184" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="104,1032,96,184" maxcondition="75" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="208,1032,96,184" maxcondition="50" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="312,1032,96,184" maxcondition="25" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="416,1032,96,184" maxcondition="0" origin="0.5,0.5" />
    <!-- Leaving this here just in case it suddenly becomes allowed in the API. -->
    <ContainedSprite allowedcontainertags="coilgunammocontainer,crateshelf,ammoboxcontainer" allowedcontaineridentifiers="crateshelf,coilgunammoshelf" texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="560,1032,112,80" origin="0.5,0.5">
      <StatusEffect type="Always" target="This" targetitemcomponent="ContainedSprite" setvalue="true" sourcerect="560,1112,112,80">
        <Conditional condition="eq 0" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This" targetitemcomponent="ContainedSprite" setvalue="true" sourcerect="560,1112,112,80" />
    </ContainedSprite>
    <Body width="96" height="180" density="50" />
    <Holdable slots="RightHand+LeftHand" holdpos="50,-30" handle1="-15,15" handle2="-15,15" aimable="false" msg="ItemMsgPickUpSelect" canBeCombined="true">
      <StatusEffect type="OnActive" target="Character" SpeedMultiplier="0.4" setvalue="true" />
    </Holdable>
    <ItemContainer autofill="False" hideitems="true" capacity="1" removecontaineditemsondeconstruct="true" drawinventory="false" canbeselected="false" ShowConditionInContainedStateIndicator="true" SpawnWithId="ekgunnery_autocannonflareround">
      <ContainedStateIndicator texture="Content/UI/ContainerIndicators.png" sourcerect="16,64,120,24" />
      <!--
	  <StatusEffect type="OnUse" target="This" condition="-10" disabledeltatime="true" stackable="false" >
        <RequiredItem items="ekgunnery_autocannonflareround" type="Contained" />
      </StatusEffect>
      <StatusEffect type="OnUse" target="This" disabledeltatime="true" stackable="false" delay="1.1">
        <SpawnItem identifiers="ekgunnery_autocannonflareround" spawnposition="ThisInventory" />
      </StatusEffect>
	  -->
      <!-- We cannot detect when a bullet is NOT-contained. Yet bizzarely this works instead. -->
      <StatusEffect type="Always" target="This" condition="10" disabledeltatime="true" stackable="false" delay="1.1">
        <Conditional condition="gt 0" />
        <RequiredItem items="ekgunnery_autocannonflareround" type="Contained" />
      </StatusEffect>
      <StatusEffect type="Always" target="This" condition="-10" disabledeltatime="true" stackable="false" delay="1.1">
        <Conditional condition="gt 0" />
        <SpawnItem identifiers="ekgunnery_autocannonflareround" spawnposition="ThisInventory" />
      </StatusEffect>
      <Containable identifiers="ekgunnery_autocannonflareround" />
    </ItemContainer>
  </Item>
  <Item name="" identifier="ekgunnery_autocannonflareround" category="Misc,Weapon" scale="0.5" hideinmenus="true">
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" sourcerect="976,64,48,16" depth="0.55" />
    <Body width="160" height="16" density="15" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,0" handle2="10,0" aimable="false" />
    <Projectile characterusable="false" launchimpulse="100.0" spread="0">
      <Attack structuredamage="10" itemdamage="10" levelwalldamage="50" severlimbsprobability="0.35" targetforce="7">
        <Affliction identifier="lacerations" strength="18" />
        <Affliction identifier="gunshotwound" strength="14" />
        <Affliction identifier="burn" strength="12" />
        <Affliction identifier="bleeding" strength="4" />
      </Attack>
      <StatusEffect type="OnActive" target="This" condition="-50">
        <ParticleEmitter particle="flare" particlespersecond="40" scalemin="2" scalemax="3.5" />
      </StatusEffect>
      <!-- velocity jumping fix -->
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" stackable="false" condition="-1">
        <Conditional condition="eq 100" />
        <Use />
      </StatusEffect>
      <!--
	  <StatusEffect type="OnActive" target="This" disabledeltatime="true" delay="0.25" stackable="false" checkconditionalalways="true">
        <Conditional Condition="gt 75" />
        <Use />
      </StatusEffect>
	  -->
      <StatusEffect type="OnImpact" target="This" condition="-50" disabledeltatime="true" />
      <StatusEffect type="OnBroken" target="This" disabledeltatime="true" stackable="false">
        <Explosion range="500.0" structuredamage="10" itemdamage="150" stun="2" force="10.0" severlimbsprobability="0.1" underwaterbubble="false">
          <Affliction identifier="burn" strength="35" />
        </Explosion>
        <sound file="%ModDir%/Items/Weapons/ek_flareshell_burst.ogg" range="7500" />
        <SpawnItem identifier="ekgunnery_smallflare_effect" spawnposition="This" />
        <Remove />
      </StatusEffect>
      <StatusEffect type="OnNotContained" target="This" stackable="false" delay="4">
        <Remove />
      </StatusEffect>
    </Projectile>
  </Item>
  <!-- Mortar Ammo -->
  <!-- Micro SSL Ammo -->
  <Item name="" identifier="ekgunnery_mircosslammo" aliases="Micro SSL Ammo Box" scale="0.5" tags="ammobox,crate,ekgunnery_microsslequipment,ekgunnery_microsslammo" category="Equipment,Weapon" linkable="false" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="ekgunnery_microsslammosource,coilgunammocontainer,ammocontainer" />
    <Price baseprice="110">
      <!-- 113 -->
      <Price storeidentifier="merchantoutpost" multiplier="1.3" minavailable="3" />
      <Price storeidentifier="merchantcity" multiplier="1.2" minavailable="4" />
      <Price storeidentifier="merchantresearch" multiplier="1.3" minavailable="2" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="8" />
      <Price storeidentifier="merchantmine" multiplier="1.2" sold="false" />
    </Price>
    <!--
	11
	20
	42
	40
	-->
    <Deconstruct time="10">
      <Item identifier="copper" mincondition="0.8" outcondition="0.5" />
      <Item identifier="steel" mincondition="0.1" copycondition="true" />
      <Item identifier="aluminium" />
      <Item identifier="fpgacircuit" outcondition="0.5" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="20">
      <RequiredSkill identifier="mechanical" level="30" />
      <RequiredSkill identifier="weapons" level="25" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="steel" />
      <RequiredItem identifier="aluminium" />
      <RequiredItem identifier="fpgacircuit" mincondition="0.5" usecondition="true" />
    </Fabricate>
    <Fabricate suitablefabricators="fabricator" displayname="recycleitem" requiredtime="20">
      <RequiredSkill identifier="mechanical" level="20" />
      <RequiredSkill identifier="weapons" level="20" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="steel" />
      <RequiredItem identifier="ekgunnery_mircosslammo" mincondition="0.0" maxcondition="0.5" usecondition="false" />
    </Fabricate>
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="0,552,104,88" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="104,552,104,88" maxcondition="75" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="208,552,104,88" maxcondition="50" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="312,552,104,88" maxcondition="25" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="416,552,104,88" maxcondition="0" origin="0.5,0.5" />
    <Body width="115" height="88" density="50" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-80" handle1="-40,30" handle2="40,30" aimable="false" msg="ItemMsgPickUpSelect" canBeCombined="true" />
    <ItemContainer autofill="False" hideitems="true" capacity="1" removecontaineditemsondeconstruct="true" drawinventory="false" canbeselected="false" ShowConditionInContainedStateIndicator="true">
      <ContainedStateIndicator texture="Content/UI/ContainerIndicators.png" sourcerect="16,64,120,24" />
      <!--
	  <StatusEffect type="OnUse" target="This" condition="-0.5" disabledeltatime="true">
        <SpawnItem identifiers="ekgunnery_mircosslround" spawnposition="ThisInventory" />
      </StatusEffect>
	  -->
      <!-- We cannot detect when a bullet is NOT-contained. Yet bizzarely this works instead. -->
      <StatusEffect type="OnUse" target="This" condition="1.0" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <RequiredItem items="ekgunnery_mircosslround" type="Contained" />
      </StatusEffect>
      <StatusEffect type="OnUse" target="This" condition="-1.0" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <SpawnItem identifiers="ekgunnery_mircosslround" spawnposition="ThisInventory" />
      </StatusEffect>
      <Containable identifiers="ekgunnery_mircosslround" />
    </ItemContainer>
  </Item>
  <Item name="" identifier="ekgunnery_mircosslround" category="Misc,Weapon" scale="0.5" hideinmenus="true">
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" sourcerect="928,0,48,16" depth="0.55" />
    <Body width="160" height="10" density="15" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,0" handle2="10,0" aimable="false" />
    <Projectile characterusable="false" hitscan="true" removeonhit="true" spread="4">
      <ParticleEmitter particle="ekgunnery_tracerfirearm" particleamount="1" velocitymin="0" velocitymax="0" colormultiplier="255,50,50,175" scalemultiplier="1,0.5" />
      <Attack structuredamage="5" severlimbsprobability="0.35" targetforce="7">
        <Affliction identifier="gunshotwound" strength="14" />
        <Affliction identifier="bleeding" strength="2" />
      </Attack>
      <StatusEffect type="OnImpact" target="UseTarget">
        <ParticleEmitter particle="ekgunnery_impactfirearm" particleamount="1" velocitymin="0" velocitymax="0" />
      </StatusEffect>
      <StatusEffect type="OnImpact">
        <ParticleEmitter particle="bubbles" anglemin="-180" anglemax="180" particleamount="1" velocitymin="-10" velocitymax="-100" scalemin="0.5" scalemax="1" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="UseTarget">
        <Conditional entitytype="eq Structure" />
        <Conditional hastag="eq door" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-25" anglemax="25" particleamount="3" velocitymin="-10" velocitymax="-300" scalemin="0.5" scalemax="1" />
      </StatusEffect>
      <StatusEffect type="OnNotContained" target="This" stackable="false" delay="1">
        <Remove />
      </StatusEffect>
    </Projectile>
  </Item>
  <Item name="" identifier="ekgunnery_mircosslpiercingammo" aliases="Micro SSL Piercing Ammo Box" scale="0.5" tags="ammobox,crate,ekgunnery_microsslequipment,ekgunnery_microsslammo" category="Equipment,Weapon" linkable="false" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="ekgunnery_microsslammosource,coilgunammocontainer,ammocontainer" />
    <Price baseprice="165">
      <!-- 158 -->
      <Price storeidentifier="merchantoutpost" multiplier="1.3" minavailable="3" />
      <Price storeidentifier="merchantcity" multiplier="1.2" minavailable="4" />
      <Price storeidentifier="merchantresearch" multiplier="1.3" minavailable="2" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="8" />
      <Price storeidentifier="merchantmine" multiplier="1.2" sold="false" />
    </Price>
    <!--
	11
	65
	42
	40
	-->
    <Deconstruct time="10">
      <Item identifier="copper" mincondition="0.8" outcondition="0.5" />
      <Item identifier="titanium" mincondition="0.1" copycondition="true" />
      <Item identifier="aluminium" />
      <Item identifier="fpgacircuit" outcondition="0.5" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="20">
      <RequiredSkill identifier="mechanical" level="30" />
      <RequiredSkill identifier="weapons" level="30" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="titanium" />
      <RequiredItem identifier="aluminium" />
      <RequiredItem identifier="fpgacircuit" mincondition="0.5" usecondition="true" />
    </Fabricate>
    <Fabricate suitablefabricators="fabricator" displayname="recycleitem" requiredtime="20">
      <RequiredSkill identifier="mechanical" level="20" />
      <RequiredSkill identifier="weapons" level="20" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="titanium" />
      <RequiredItem identifier="ekgunnery_mircosslpiercingammo" mincondition="0.0" maxcondition="0.5" usecondition="false" />
    </Fabricate>
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="520,552,104,88" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="624,552,104,88" maxcondition="75" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="728,552,104,88" maxcondition="50" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="832,552,104,88" maxcondition="25" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="936,552,104,88" maxcondition="0" origin="0.5,0.5" />
    <Body width="115" height="88" density="50" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-80" handle1="-40,30" handle2="40,30" aimable="false" msg="ItemMsgPickUpSelect" canBeCombined="true" />
    <ItemContainer autofill="False" hideitems="true" capacity="1" removecontaineditemsondeconstruct="true" drawinventory="false" canbeselected="false" ShowConditionInContainedStateIndicator="true">
      <ContainedStateIndicator texture="Content/UI/ContainerIndicators.png" sourcerect="16,64,120,24" />
      <!--
	  <StatusEffect type="OnUse" target="This" condition="-0.5" disabledeltatime="true">
        <SpawnItem identifiers="ekgunnery_mircosslpiercinground" spawnposition="ThisInventory" />
      </StatusEffect>
	  -->
      <!-- We cannot detect when a bullet is NOT-contained. Yet bizzarely this works instead. -->
      <StatusEffect type="OnUse" target="This" condition="1.0" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <RequiredItem items="ekgunnery_mircosslpiercinground" type="Contained" />
      </StatusEffect>
      <StatusEffect type="OnUse" target="This" condition="-1.0" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <SpawnItem identifiers="ekgunnery_mircosslpiercinground" spawnposition="ThisInventory" />
      </StatusEffect>
      <Containable identifiers="ekgunnery_mircosslpiercinground" />
    </ItemContainer>
  </Item>
  <Item name="" identifier="ekgunnery_mircosslpiercinground" category="Misc,Weapon" scale="0.5" hideinmenus="true">
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" sourcerect="928,16,48,16" depth="0.55" />
    <Body width="160" height="10" density="15" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,0" handle2="10,0" aimable="false" />
    <Projectile characterusable="false" hitscan="true" removeonhit="true" spread="4">
      <ParticleEmitter particle="ekgunnery_tracerfirearm" particleamount="1" velocitymin="0" velocitymax="0" colormultiplier="255,50,50,175" scalemultiplier="1,0.5" penetration="0.4" />
      <Attack structuredamage="8" severlimbsprobability="0.35" targetforce="7">
        <Affliction identifier="gunshotwound" strength="16" />
        <Affliction identifier="bleeding" strength="1" />
      </Attack>
      <StatusEffect type="OnImpact" target="UseTarget">
        <ParticleEmitter particle="ekgunnery_impactfirearm" particleamount="1" velocitymin="0" velocitymax="0" />
      </StatusEffect>
      <!--
	  <StatusEffect type="OnUse" target="Limb" disabledeltatime="true">
        <Affliction identifier="ekgunnery_piercingeffect_weak" amount="100" />
      </StatusEffect>
	  -->
      <StatusEffect type="OnImpact">
        <ParticleEmitter particle="bubbles" anglemin="-180" anglemax="180" particleamount="1" velocitymin="-10" velocitymax="-100" scalemin="0.5" scalemax="1" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="UseTarget">
        <Conditional entitytype="eq Structure" />
        <Conditional hastag="eq door" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-25" anglemax="25" particleamount="3" velocitymin="-10" velocitymax="-300" scalemin="0.5" scalemax="1" />
      </StatusEffect>
      <StatusEffect type="OnNotContained" target="This" stackable="false" delay="1">
        <Remove />
      </StatusEffect>
    </Projectile>
  </Item>
  <Item name="" identifier="ekgunnery_mircosslphysicoriumammo" aliases="Micro SSL Physicorium Ammo Box" scale="0.5" tags="ammobox,crate,ekgunnery_microsslequipment,ekgunnery_microsslammo" category="Equipment,Weapon" linkable="false" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="ekgunnery_microsslammosource,coilgunammocontainer,ammocontainer" />
    <Price baseprice="300">
      <!-- 293 -->
      <Price storeidentifier="merchantoutpost" multiplier="1.3" sold="false" />
      <Price storeidentifier="merchantcity" multiplier="1.2" sold="false" />
      <Price storeidentifier="merchantresearch" multiplier="1.3" minavailable="1" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="4" />
      <Price storeidentifier="merchantmine" multiplier="1.2" sold="false" />
    </Price>
    <!--
	11
	200
	42
	40
	-->
    <Deconstruct time="10">
      <Item identifier="copper" mincondition="0.8" outcondition="0.5" />
      <Item identifier="physicorium" mincondition="0.1" copycondition="true" />
      <Item identifier="aluminium" />
      <Item identifier="fpgacircuit" outcondition="0.5" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="20">
      <RequiredSkill identifier="mechanical" level="30" />
      <RequiredSkill identifier="weapons" level="30" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="physicorium" />
      <RequiredItem identifier="aluminium" />
      <RequiredItem identifier="fpgacircuit" mincondition="0.5" usecondition="true" />
    </Fabricate>
    <Fabricate suitablefabricators="fabricator" displayname="recycleitem" requiredtime="20">
      <RequiredSkill identifier="mechanical" level="20" />
      <RequiredSkill identifier="weapons" level="20" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="physicorium" />
      <RequiredItem identifier="ekgunnery_mircosslphysicoriumammo" mincondition="0.0" maxcondition="0.5" usecondition="false" />
    </Fabricate>
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1040,552,104,88" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1144,552,104,88" maxcondition="75" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1248,552,104,88" maxcondition="50" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1352,552,104,88" maxcondition="25" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1456,552,104,88" maxcondition="0" origin="0.5,0.5" />
    <Body width="115" height="88" density="50" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-80" handle1="-40,30" handle2="40,30" aimable="false" msg="ItemMsgPickUpSelect" canBeCombined="true" />
    <ItemContainer autofill="False" hideitems="true" capacity="1" removecontaineditemsondeconstruct="true" drawinventory="false" canbeselected="false" ShowConditionInContainedStateIndicator="true">
      <ContainedStateIndicator texture="Content/UI/ContainerIndicators.png" sourcerect="16,64,120,24" />
      <!--
	  <StatusEffect type="OnUse" target="This" condition="-0.5" disabledeltatime="true">
        <SpawnItem identifiers="ekgunnery_mircosslphysicoriumround" spawnposition="ThisInventory" />
      </StatusEffect>
	  -->
      <!-- We cannot detect when a bullet is NOT-contained. Yet bizzarely this works instead. -->
      <StatusEffect type="OnUse" target="This" condition="1.0" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <RequiredItem items="ekgunnery_mircosslphysicoriumround" type="Contained" />
      </StatusEffect>
      <StatusEffect type="OnUse" target="This" condition="-1.0" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <SpawnItem identifiers="ekgunnery_mircosslphysicoriumround" spawnposition="ThisInventory" />
      </StatusEffect>
      <Containable identifiers="ekgunnery_mircosslphysicoriumround" />
    </ItemContainer>
  </Item>
  <Item name="" identifier="ekgunnery_mircosslphysicoriumround" category="Misc,Weapon" scale="0.5" hideinmenus="true">
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" sourcerect="976,16,48,16" depth="0.55" />
    <Body width="160" height="10" density="15" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,0" handle2="10,0" aimable="false" />
    <Projectile characterusable="false" hitscan="true" removeonhit="true" spread="4">
      <ParticleEmitter particle="ekgunnery_tracerfirearm" particleamount="1" velocitymin="0" velocitymax="0" colormultiplier="255,50,50,175" scalemultiplier="1,0.5" penetration="0.6" />
      <Attack structuredamage="8" severlimbsprobability="0.35" targetforce="7">
        <Affliction identifier="gunshotwound" strength="18" />
        <Affliction identifier="bleeding" strength="2" />
      </Attack>
      <StatusEffect type="OnImpact" target="UseTarget">
        <ParticleEmitter particle="ekgunnery_impactfirearm" particleamount="1" velocitymin="0" velocitymax="0" />
      </StatusEffect>
      <!--
	  <StatusEffect type="OnUse" target="Limb" disabledeltatime="true">
        <Affliction identifier="ekgunnery_piercingeffect_weak" amount="100" />
      </StatusEffect>
	  -->
      <StatusEffect type="OnImpact">
        <ParticleEmitter particle="bubbles" anglemin="-180" anglemax="180" particleamount="1" velocitymin="-10" velocitymax="-100" scalemin="0.5" scalemax="1" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="UseTarget">
        <Conditional entitytype="eq Structure" />
        <Conditional hastag="eq door" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-25" anglemax="25" particleamount="3" velocitymin="-10" velocitymax="-300" scalemin="0.5" scalemax="1" />
      </StatusEffect>
      <StatusEffect type="OnNotContained" target="This" stackable="false" delay="1">
        <Remove />
      </StatusEffect>
    </Projectile>
  </Item>
  <Item name="" identifier="ekgunnery_mircosslpiercingexplosiveammo" aliases="Micro SSL Armor-Piercing Explosive Ammo Box" scale="0.5" tags="ammobox,crate,ekgunnery_microsslequipment,ekgunnery_microsslammo" category="Equipment,Weapon" linkable="false" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="ekgunnery_microsslammosource,coilgunammocontainer,ammocontainer" />
    <Price baseprice="275">
      <!-- 238 -->
      <Price storeidentifier="merchantoutpost" multiplier="1.3" sold="false" />
      <Price storeidentifier="merchantcity" multiplier="1.2" sold="false" />
      <Price storeidentifier="merchantresearch" multiplier="1.3" sold="false" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="2" />
      <Price storeidentifier="merchantmine" multiplier="1.2" sold="false" />
    </Price>
    <!--
	11
	65
	80
	42
	40
	-->
    <Deconstruct time="10">
      <Item identifier="copper" mincondition="0.8" outcondition="0.5" />
      <Item identifier="titanium" mincondition="0.8" outcondition="0.5" />
      <Item identifier="c4block" mincondition="0.8" outcondition="0.5" />
      <Item identifier="aluminium" />
      <Item identifier="fpgacircuit" outcondition="0.5" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="20">
      <RequiredSkill identifier="mechanical" level="30" />
      <RequiredSkill identifier="weapons" level="30" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="titanium" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="c4block" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="aluminium" />
      <RequiredItem identifier="fpgacircuit" mincondition="0.5" usecondition="true" />
    </Fabricate>
    <Fabricate suitablefabricators="fabricator" displayname="recycleitem" requiredtime="20">
      <RequiredSkill identifier="mechanical" level="20" />
      <RequiredSkill identifier="weapons" level="20" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="titanium" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="c4block" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="ekgunnery_mircosslpiercingexplosiveammo" mincondition="0.0" maxcondition="0.5" usecondition="false" />
    </Fabricate>
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers2.png" depth="0.54" sourcerect="0,384,104,88" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers2.png" depth="0.54" sourcerect="104,384,104,88" maxcondition="75" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers2.png" depth="0.54" sourcerect="208,384,104,88" maxcondition="50" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers2.png" depth="0.54" sourcerect="312,384,104,88" maxcondition="25" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers2.png" depth="0.54" sourcerect="416,384,104,88" maxcondition="0" origin="0.5,0.5" />
    <Body width="115" height="88" density="50" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-80" handle1="-40,30" handle2="40,30" aimable="false" msg="ItemMsgPickUpSelect" canBeCombined="true" />
    <ItemContainer autofill="False" hideitems="true" capacity="1" removecontaineditemsondeconstruct="true" drawinventory="false" canbeselected="false" ShowConditionInContainedStateIndicator="true">
      <ContainedStateIndicator texture="Content/UI/ContainerIndicators.png" sourcerect="16,64,120,24" />
      <!--
	  <StatusEffect type="OnUse" target="This" condition="-0.5" disabledeltatime="true">
        <SpawnItem identifiers="ekgunnery_chaingunpiercingexplosiveround" spawnposition="ThisInventory" />
      </StatusEffect>
	  -->
      <!-- We cannot detect when a bullet is NOT-contained. Yet bizzarely this works instead. -->
      <StatusEffect type="OnUse" target="This" condition="1.0" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <RequiredItem items="ekgunnery_chaingunpiercingexplosiveround" type="Contained" />
      </StatusEffect>
      <StatusEffect type="OnUse" target="This" condition="-1.0" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <SpawnItem identifiers="ekgunnery_chaingunpiercingexplosiveround" spawnposition="ThisInventory" />
      </StatusEffect>
      <Containable identifiers="ekgunnery_chaingunpiercingexplosiveround" />
    </ItemContainer>
  </Item>
  <!-- Small SSL Ammo -->
  <Item name="" identifier="ekgunnery_smallsslammo" aliases="Small SSL Ammo Box" scale="0.5" tags="ammobox,crate,ekgunnery_smallsslequipment,ekgunnery_smallsslammo" category="Equipment,Weapon" linkable="false" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="ekgunnery_smallsslammosource,coilgunammocontainer,ammocontainer" />
    <Price baseprice="120">
      <Price storeidentifier="merchantoutpost" multiplier="1.3" minavailable="3" />
      <Price storeidentifier="merchantcity" multiplier="1.2" minavailable="4" />
      <Price storeidentifier="merchantresearch" multiplier="1.3" minavailable="2" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="8" />
      <Price storeidentifier="merchantmine" multiplier="1.2" sold="false" />
    </Price>
    <!--
	11
	20
	42
	40
	-->
    <Deconstruct time="10">
      <Item identifier="copper" mincondition="0.8" outcondition="0.5" />
      <Item identifier="steel" mincondition="0.1" copycondition="true" />
      <Item identifier="aluminium" />
      <Item identifier="fpgacircuit" outcondition="0.5" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="20">
      <RequiredSkill identifier="mechanical" level="35" />
      <RequiredSkill identifier="weapons" level="30" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="steel" />
      <RequiredItem identifier="aluminium" />
      <RequiredItem identifier="fpgacircuit" mincondition="0.5" usecondition="true" />
    </Fabricate>
    <Fabricate suitablefabricators="fabricator" displayname="recycleitem" requiredtime="20">
      <RequiredSkill identifier="mechanical" level="25" />
      <RequiredSkill identifier="weapons" level="20" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="steel" />
      <RequiredItem identifier="ekgunnery_smallsslammo" mincondition="0.0" maxcondition="0.5" usecondition="false" />
    </Fabricate>
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="0,840,104,88" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="104,840,104,88" maxcondition="75" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="208,840,104,88" maxcondition="50" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="312,840,104,88" maxcondition="25" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="416,840,104,88" maxcondition="0" origin="0.5,0.5" />
    <Body width="115" height="88" density="50" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-80" handle1="-40,30" handle2="40,30" aimable="false" msg="ItemMsgPickUpSelect" canBeCombined="true" />
    <ItemContainer autofill="False" hideitems="true" capacity="1" removecontaineditemsondeconstruct="true" drawinventory="false" canbeselected="false" ShowConditionInContainedStateIndicator="true">
      <ContainedStateIndicator texture="Content/UI/ContainerIndicators.png" sourcerect="16,64,120,24" />
      <!--
	  <StatusEffect type="OnUse" target="This" condition="-1.5" disabledeltatime="true">
        <SpawnItem identifiers="ekgunnery_smallsslround" spawnposition="ThisInventory" />
      </StatusEffect>
	  -->
      <!-- We cannot detect when a bullet is NOT-contained. Yet bizzarely this works instead. -->
      <StatusEffect type="OnUse" target="This" condition="2.0" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <RequiredItem items="ekgunnery_smallsslround" type="Contained" />
      </StatusEffect>
      <StatusEffect type="OnUse" target="This" condition="-2.0" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <SpawnItem identifiers="ekgunnery_smallsslround" spawnposition="ThisInventory" />
      </StatusEffect>
      <Containable identifiers="ekgunnery_smallsslround" />
    </ItemContainer>
  </Item>
  <Item name="" identifier="ekgunnery_smallsslround" category="Misc,Weapon" scale="0.75" hideinmenus="true">
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" sourcerect="928,0,48,16" depth="0.55" />
    <Body width="160" height="16" density="15" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,0" handle2="10,0" aimable="false" />
    <Projectile characterusable="false" launchimpulse="100.0" spread="4" maxtargetstohit="1">
      <Attack structuredamage="10" itemdamage="30" levelwalldamage="35" severlimbsprobability="0.25" targetforce="7" penetration="0.1">
        <Affliction identifier="lacerations" strength="14" />
        <Affliction identifier="gunshotwound" strength="12" />
        <Affliction identifier="bleeding" strength="2" />
      </Attack>
      <StatusEffect type="OnActive" target="This" condition="-28">
        <Conditional condition="gt 50" />
        <ParticleEmitter particle="ekgunneryammotrailshort" copyentityangle="true" anglemin="-5" anglemax="5" particleamount="1" velocitymin="-10" velocitymax="-100" scalemin="1" scalemax="1.5" />
        <ParticleEmitter particle="ekgunnerytracerred" copyentityangle="true" anglemin="0" anglemax="0" particlespersecond="60" velocitymin="500" velocitymax="500" scalemin="0.65" scalemax="0.65" />
      </StatusEffect>
      <!-- velocity jumping fix -->
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" stackable="false" condition="-1">
        <Conditional condition="eq 100" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" delay="0.25" stackable="false" checkconditionalalways="true">
        <Conditional Condition="gt 75" />
        <Use />
      </StatusEffect>
      <!--
	  <StatusEffect type="OnUse" target="Limb" disabledeltatime="true">
        <Affliction identifier="ekgunnery_piercingeffect_weak" amount="100" />
      </StatusEffect>
	  -->
      <StatusEffect type="OnImpact" target="This" condition="-75" disabledeltatime="true" />
      <StatusEffect type="OnImpact">
        <ParticleEmitter particle="bubbles" anglemin="-180" anglemax="180" particleamount="1" velocitymin="-10" velocitymax="-100" scalemin="0.5" scalemax="1" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="UseTarget">
        <Conditional entitytype="eq Structure" />
        <Conditional hastag="eq door" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_impact1.ogg" selectionmode="Random" range="3000" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_impact2.ogg" selectionmode="Random" range="3000" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_impact3.ogg" selectionmode="Random" range="3000" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_impact4.ogg" selectionmode="Random" range="3000" volume="1.0" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-25" anglemax="25" particleamount="4" velocitymin="-10" velocitymax="-300" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="ekgunnery_hdimpactsmall" particleamount="1" velocitymin="0" velocitymax="0" scalemin="4" scalemax="6" />
        <ParticleEmitter particle="shrapnel" copyentityangle="true" anglemin="-20" anglemax="20" particleamount="3" velocitymin="50" velocitymax="300" scalemin="1" scalemax="2" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This">
        <Remove />
      </StatusEffect>
      <StatusEffect type="OnNotContained" target="This" stackable="false" delay="4">
        <Remove />
      </StatusEffect>
    </Projectile>
  </Item>
  <Item name="" identifier="ekgunnery_smallsslpiercingammo" aliases="Small SSL Piercing Ammo Box" scale="0.5" tags="ammobox,crate,ekgunnery_smallsslequipment,ekgunnery_smallsslammo" category="Equipment,Weapon" linkable="false" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="ekgunnery_smallsslammosource,coilgunammocontainer,ammocontainer" />
    <Price baseprice="175">
      <!-- 38 -->
      <Price storeidentifier="merchantoutpost" multiplier="1.3" minavailable="3" />
      <Price storeidentifier="merchantcity" multiplier="1.2" minavailable="4" />
      <Price storeidentifier="merchantresearch" multiplier="1.3" minavailable="2" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="8" />
      <Price storeidentifier="merchantmine" multiplier="1.2" sold="false" />
    </Price>
    <!--
	11
	65
	42
	40
	-->
    <Deconstruct time="10">
      <Item identifier="copper" mincondition="0.8" outcondition="0.5" />
      <Item identifier="titanium" mincondition="0.1" copycondition="true" />
      <Item identifier="aluminium" />
      <Item identifier="fpgacircuit" outcondition="0.5" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="20">
      <RequiredSkill identifier="mechanical" level="35" />
      <RequiredSkill identifier="weapons" level="35" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="titanium" />
      <RequiredItem identifier="aluminium" />
      <RequiredItem identifier="fpgacircuit" mincondition="0.5" usecondition="true" />
    </Fabricate>
    <Fabricate suitablefabricators="fabricator" displayname="recycleitem" requiredtime="20">
      <RequiredSkill identifier="mechanical" level="25" />
      <RequiredSkill identifier="weapons" level="20" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="titanium" />
      <RequiredItem identifier="ekgunnery_smallsslpiercingammo" mincondition="0.0" maxcondition="0.5" usecondition="false" />
    </Fabricate>
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="520,840,104,88" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="624,840,104,88" maxcondition="75" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="728,840,104,88" maxcondition="50" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="832,840,104,88" maxcondition="25" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="936,840,104,88" maxcondition="0" origin="0.5,0.5" />
    <Body width="115" height="88" density="50" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-80" handle1="-40,30" handle2="40,30" aimable="false" msg="ItemMsgPickUpSelect" canBeCombined="true" />
    <ItemContainer autofill="False" hideitems="true" capacity="1" removecontaineditemsondeconstruct="true" drawinventory="false" canbeselected="false" ShowConditionInContainedStateIndicator="true">
      <ContainedStateIndicator texture="Content/UI/ContainerIndicators.png" sourcerect="16,64,120,24" />
      <!--
	  <StatusEffect type="OnUse" target="This" condition="-1.5" disabledeltatime="true">
        <SpawnItem identifiers="ekgunnery_smallsslpiercinground" spawnposition="ThisInventory" />
      </StatusEffect>
	  -->
      <!-- We cannot detect when a bullet is NOT-contained. Yet bizzarely this works instead. -->
      <StatusEffect type="OnUse" target="This" condition="2.0" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <RequiredItem items="ekgunnery_smallsslpiercinground" type="Contained" />
      </StatusEffect>
      <StatusEffect type="OnUse" target="This" condition="-2.0" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <SpawnItem identifiers="ekgunnery_smallsslpiercinground" spawnposition="ThisInventory" />
      </StatusEffect>
      <Containable identifiers="ekgunnery_smallsslpiercinground" />
    </ItemContainer>
  </Item>
  <Item name="" identifier="ekgunnery_smallsslpiercinground" category="Misc,Weapon" scale="0.75" hideinmenus="true">
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" sourcerect="928,16,48,16" depth="0.55" />
    <Body width="160" height="16" density="15" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,0" handle2="10,0" aimable="false" />
    <Projectile characterusable="false" launchimpulse="100.0" spread="4" maxtargetstohit="2">
      <Attack structuredamage="15" itemdamage="30" levelwalldamage="35" severlimbsprobability="0.3" targetforce="7" penetration="0.4">
        <Affliction identifier="lacerations" strength="16" />
        <Affliction identifier="gunshotwound" strength="14" />
        <Affliction identifier="bleeding" strength="3" />
      </Attack>
      <StatusEffect type="OnActive" target="This" condition="-28">
        <Conditional condition="gt 50" />
        <ParticleEmitter particle="ekgunneryammotrailshort" copyentityangle="true" anglemin="-5" anglemax="5" particleamount="1" velocitymin="-10" velocitymax="-100" scalemin="1" scalemax="1.5" />
        <ParticleEmitter particle="ekgunnerytracerred" copyentityangle="true" anglemin="0" anglemax="0" particlespersecond="60" velocitymin="500" velocitymax="500" scalemin="0.65" scalemax="0.65" />
      </StatusEffect>
      <!-- velocity jumping fix -->
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" stackable="false" condition="-1">
        <Conditional condition="eq 100" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" delay="0.25" stackable="false" checkconditionalalways="true">
        <Conditional Condition="gt 75" />
        <Use />
      </StatusEffect>
      <!--
	  <StatusEffect type="OnUse" target="Limb" disabledeltatime="true">
        <Affliction identifier="ekgunnery_piercingeffect_weak" amount="100" />
      </StatusEffect>
	  -->
      <StatusEffect type="OnImpact" target="This" condition="-34" disabledeltatime="true" />
      <StatusEffect type="OnImpact">
        <ParticleEmitter particle="bubbles" anglemin="-180" anglemax="180" particleamount="1" velocitymin="-10" velocitymax="-100" scalemin="0.5" scalemax="1" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="UseTarget">
        <Conditional entitytype="eq Structure" />
        <Conditional hastag="eq door" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_piercing1.ogg" selectionmode="Random" range="3500" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_piercing2.ogg" selectionmode="Random" range="3500" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_piercing3.ogg" selectionmode="Random" range="3500" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_piercing4.ogg" selectionmode="Random" range="3500" volume="1.0" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-25" anglemax="25" particleamount="4" velocitymin="-10" velocitymax="-300" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="ekgunnery_hdimpactsmall" particleamount="1" velocitymin="0" velocitymax="0" scalemin="4" scalemax="6" />
        <ParticleEmitter particle="shrapnel" copyentityangle="true" anglemin="-20" anglemax="20" particleamount="3" velocitymin="50" velocitymax="300" scalemin="1" scalemax="2" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This">
        <Remove />
      </StatusEffect>
      <StatusEffect type="OnNotContained" target="This" stackable="false" delay="4">
        <Remove />
      </StatusEffect>
    </Projectile>
  </Item>
  <Item name="" identifier="ekgunnery_smallsslexplosiveammo" aliases="Small SSL Explosive Ammo Box" scale="0.5" tags="ammobox,crate,ekgunnery_smallsslequipment,ekgunnery_smallsslammo" category="Equipment,Weapon" linkable="false" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="ekgunnery_smallsslammosource,coilgunammocontainer,ammocontainer" />
    <Price baseprice="200">
      <Price storeidentifier="merchantoutpost" multiplier="1.3" sold="false" />
      <Price storeidentifier="merchantcity" multiplier="1.2" minavailable="2" />
      <Price storeidentifier="merchantresearch" multiplier="1.3" sold="false" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="4" />
      <Price storeidentifier="merchantmine" multiplier="1.2" sold="false" />
    </Price>
    <!--
	11
	20
	75
	42
	40
	-->
    <Deconstruct time="10">
      <Item identifier="copper" mincondition="0.8" outcondition="0.5" />
      <Item identifier="steel" mincondition="0.1" copycondition="true" />
      <Item identifier="uex" mincondition="0.1" copycondition="true" />
      <Item identifier="aluminium" />
      <Item identifier="fpgacircuit" outcondition="0.5" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="20">
      <RequiredSkill identifier="mechanical" level="35" />
      <RequiredSkill identifier="weapons" level="30" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="steel" />
      <RequiredItem identifier="uex" />
      <RequiredItem identifier="aluminium" />
      <RequiredItem identifier="fpgacircuit" mincondition="0.5" usecondition="true" />
    </Fabricate>
    <Fabricate suitablefabricators="fabricator" displayname="recycleitem" requiredtime="20">
      <RequiredSkill identifier="mechanical" level="25" />
      <RequiredSkill identifier="weapons" level="20" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="uex" />
      <RequiredItem identifier="steel" />
      <RequiredItem identifier="ekgunnery_smallsslexplosiveammo" mincondition="0.0" maxcondition="0.5" usecondition="false" />
    </Fabricate>
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="0,936,104,88" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="104,936,104,88" maxcondition="75" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="208,936,104,88" maxcondition="50" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="312,936,104,88" maxcondition="25" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="416,936,104,88" maxcondition="0" origin="0.5,0.5" />
    <Body width="115" height="88" density="50" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-80" handle1="-40,30" handle2="40,30" aimable="false" msg="ItemMsgPickUpSelect" canBeCombined="true" />
    <ItemContainer autofill="False" hideitems="true" capacity="1" removecontaineditemsondeconstruct="true" drawinventory="false" canbeselected="false" ShowConditionInContainedStateIndicator="true">
      <ContainedStateIndicator texture="Content/UI/ContainerIndicators.png" sourcerect="16,64,120,24" />
      <!--
	  <StatusEffect type="OnUse" target="This" condition="-1.5" disabledeltatime="true">
        <SpawnItem identifiers="ekgunnery_smallsslexplosiveround" spawnposition="ThisInventory" />
      </StatusEffect>
	  -->
      <!-- We cannot detect when a bullet is NOT-contained. Yet bizzarely this works instead. -->
      <StatusEffect type="OnUse" target="This" condition="2.0" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <RequiredItem items="ekgunnery_smallsslexplosiveround" type="Contained" />
      </StatusEffect>
      <StatusEffect type="OnUse" target="This" condition="-2.0" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <SpawnItem identifiers="ekgunnery_smallsslexplosiveround" spawnposition="ThisInventory" />
      </StatusEffect>
      <Containable identifiers="ekgunnery_smallsslexplosiveround" />
    </ItemContainer>
  </Item>
  <Item name="" identifier="ekgunnery_smallsslexplosiveround" category="Misc,Weapon" scale="0.75" hideinmenus="true">
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" sourcerect="928,48,48,16" depth="0.55" />
    <Body width="160" height="16" density="15" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,0" handle2="10,0" aimable="false" />
    <Projectile characterusable="false" launchimpulse="100.0" spread="4" maxtargetstohit="1">
      <Attack structuredamage="10" itemdamage="30" levelwalldamage="35" severlimbsprobability="0.25" targetforce="7" penetration="0.1">
        <Affliction identifier="lacerations" strength="14" />
        <Affliction identifier="gunshotwound" strength="12" />
        <Affliction identifier="bleeding" strength="2" />
      </Attack>
      <StatusEffect type="OnActive" target="This" condition="-28">
        <Conditional condition="gt 50" />
        <ParticleEmitter particle="ekgunneryammotrailshort" copyentityangle="true" anglemin="-5" anglemax="5" particleamount="1" velocitymin="-10" velocitymax="-100" scalemin="1" scalemax="1.5" />
        <ParticleEmitter particle="ekgunnerytracerred" copyentityangle="true" anglemin="0" anglemax="0" particlespersecond="60" velocitymin="500" velocitymax="500" scalemin="0.65" scalemax="0.65" />
      </StatusEffect>
      <!-- velocity jumping fix -->
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" stackable="false" condition="-1">
        <Conditional condition="eq 100" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" delay="0.25" stackable="false" checkconditionalalways="true">
        <Conditional Condition="gt 75" />
        <Use />
      </StatusEffect>
      <!--
	  <StatusEffect type="OnUse" target="Limb" disabledeltatime="true">
        <Affliction identifier="ekgunnery_piercingeffect_weak" amount="100" />
      </StatusEffect>
	  -->
      <StatusEffect type="OnImpact" target="This">
        <sound file="Content/Items/Weapons/ExplosionSmall1.ogg" selectionmode="Random" range="7500" />
        <sound file="Content/Items/Weapons/ExplosionSmall2.ogg" selectionmode="Random" range="7500" />
        <sound file="Content/Items/Weapons/ExplosionSmall3.ogg" selectionmode="Random" range="7500" />
        <Explosion range="400.0" structuredamage="7.5" itemdamage="50" force="20.0" severlimbsprobability="0.5" decal="explosion" decalsize="0.5" underwaterbubble="false">
          <Affliction identifier="bleeding" strength="2" />
          <Affliction identifier="lacerations" strength="25" />
          <Affliction identifier="explosiondamage" strength="15" />
        </Explosion>
        <ParticleEmitter particle="ekgunneryunderwaterexplosionfix" particleamount="1" scalemin="1.75" scalemax="2.25" />
        <ParticleEmitter particle="ekgunnery_hdimpactmedium" particleamount="1" velocitymin="0" velocitymax="0" scalemin="2" scalemax="3" colormultiplier="255,220,175,255" />
        <ParticleEmitter particle="shrapnel" copyentityangle="true" anglemin="0" anglemax="360" particleamount="10" velocitymin="100" velocitymax="2000" scalemin="0.25" scalemax="0.5" />
        <Remove />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This">
        <Remove />
      </StatusEffect>
      <StatusEffect type="OnNotContained" target="This" stackable="false" delay="4">
        <Remove />
      </StatusEffect>
    </Projectile>
  </Item>
  <Item name="" identifier="ekgunnery_smallsslphysicoriumammo" aliases="Small SSL Physicorium Ammo Box" scale="0.5" tags="ammobox,crate,ekgunnery_smallsslequipment,ekgunnery_smallsslammo" category="Equipment,Weapon" linkable="false" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="ekgunnery_smallsslammosource,coilgunammocontainer,ammocontainer" />
    <Price baseprice="335">
      <!-- 293 -->
      <Price storeidentifier="merchantoutpost" multiplier="1.3" sold="false" />
      <Price storeidentifier="merchantcity" multiplier="1.2" sold="false" />
      <Price storeidentifier="merchantresearch" multiplier="1.3" minavailable="1" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="4" />
      <Price storeidentifier="merchantmine" multiplier="1.2" sold="false" />
    </Price>
    <!--
	11
	200
	42
	40
	-->
    <Deconstruct time="10">
      <Item identifier="copper" mincondition="0.8" outcondition="0.5" />
      <Item identifier="physicorium" mincondition="0.1" copycondition="true" />
      <Item identifier="aluminium" />
      <Item identifier="fpgacircuit" outcondition="0.5" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="20">
      <RequiredSkill identifier="mechanical" level="35" />
      <RequiredSkill identifier="weapons" level="35" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="physicorium" />
      <RequiredItem identifier="aluminium" />
      <RequiredItem identifier="fpgacircuit" mincondition="0.5" usecondition="true" />
    </Fabricate>
    <Fabricate suitablefabricators="fabricator" displayname="recycleitem" requiredtime="20">
      <RequiredSkill identifier="mechanical" level="25" />
      <RequiredSkill identifier="weapons" level="20" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="physicorium" />
      <RequiredItem identifier="ekgunnery_smallsslphysicoriumammo" mincondition="0.0" maxcondition="0.5" usecondition="false" />
    </Fabricate>
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1040,840,104,88" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1144,840,104,88" maxcondition="75" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1248,840,104,88" maxcondition="50" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1352,840,104,88" maxcondition="25" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="1456,840,104,88" maxcondition="0" origin="0.5,0.5" />
    <Body width="115" height="88" density="50" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-80" handle1="-40,30" handle2="40,30" aimable="false" msg="ItemMsgPickUpSelect" canBeCombined="true" />
    <ItemContainer autofill="False" hideitems="true" capacity="1" removecontaineditemsondeconstruct="true" drawinventory="false" canbeselected="false" ShowConditionInContainedStateIndicator="true">
      <ContainedStateIndicator texture="Content/UI/ContainerIndicators.png" sourcerect="16,64,120,24" />
      <!--
	  <StatusEffect type="OnUse" target="This" condition="-1.5" disabledeltatime="true">
        <SpawnItem identifiers="ekgunnery_smallsslphysicoriumround" spawnposition="ThisInventory" />
      </StatusEffect>
	  -->
      <!-- We cannot detect when a bullet is NOT-contained. Yet bizzarely this works instead. -->
      <StatusEffect type="OnUse" target="This" condition="2.0" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <RequiredItem items="ekgunnery_smallsslphysicoriumround" type="Contained" />
      </StatusEffect>
      <StatusEffect type="OnUse" target="This" condition="-2.0" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <SpawnItem identifiers="ekgunnery_smallsslphysicoriumround" spawnposition="ThisInventory" />
      </StatusEffect>
      <Containable identifiers="ekgunnery_smallsslphysicoriumround" />
    </ItemContainer>
  </Item>
  <Item name="" identifier="ekgunnery_smallsslphysicoriumround" category="Misc,Weapon" scale="0.75" hideinmenus="true">
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" sourcerect="976,0,48,16" depth="0.55" />
    <Body width="160" height="16" density="15" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,0" handle2="10,0" aimable="false" />
    <Projectile characterusable="false" launchimpulse="100.0" spread="4" maxtargetstohit="2">
      <Attack structuredamage="20" itemdamage="35" levelwalldamage="35" severlimbsprobability="0.35" targetforce="7" penetration="0.6">
        <Affliction identifier="lacerations" strength="18" />
        <Affliction identifier="gunshotwound" strength="16" />
        <Affliction identifier="bleeding" strength="4" />
      </Attack>
      <StatusEffect type="OnActive" target="This" condition="-28">
        <Conditional condition="gt 50" />
        <ParticleEmitter particle="ekgunneryammotrailshort" copyentityangle="true" anglemin="-5" anglemax="5" particleamount="1" velocitymin="-10" velocitymax="-100" scalemin="1" scalemax="1.5" />
        <ParticleEmitter particle="ekgunnerytracerred" copyentityangle="true" anglemin="0" anglemax="0" particlespersecond="60" velocitymin="500" velocitymax="500" scalemin="0.65" scalemax="0.65" />
      </StatusEffect>
      <!-- velocity jumping fix -->
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" stackable="false" condition="-1">
        <Conditional condition="eq 100" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" delay="0.25" stackable="false" checkconditionalalways="true">
        <Conditional Condition="gt 75" />
        <Use />
      </StatusEffect>
      <!--
	  <StatusEffect type="OnUse" target="Limb" disabledeltatime="true">
        <Affliction identifier="ekgunnery_piercingeffect_weak" amount="100" />
      </StatusEffect>
	  -->
      <StatusEffect type="OnImpact" target="This" condition="-55" disabledeltatime="true" />
      <StatusEffect type="OnImpact">
        <ParticleEmitter particle="bubbles" anglemin="-180" anglemax="180" particleamount="1" velocitymin="-10" velocitymax="-100" scalemin="0.5" scalemax="1" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="UseTarget">
        <Conditional entitytype="eq Structure" />
        <Conditional hastag="eq door" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_piercing1.ogg" selectionmode="Random" range="3500" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_piercing2.ogg" selectionmode="Random" range="3500" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_piercing3.ogg" selectionmode="Random" range="3500" volume="1.0" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_piercing4.ogg" selectionmode="Random" range="3500" volume="1.0" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-25" anglemax="25" particleamount="4" velocitymin="-10" velocitymax="-300" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="ekgunnery_hdimpactsmall" particleamount="1" velocitymin="0" velocitymax="0" scalemin="4" scalemax="6" />
        <ParticleEmitter particle="shrapnel" copyentityangle="true" anglemin="-20" anglemax="20" particleamount="3" velocitymin="50" velocitymax="300" scalemin="1" scalemax="2" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This">
        <Remove />
      </StatusEffect>
      <StatusEffect type="OnNotContained" target="This" stackable="false" delay="4">
        <Remove />
      </StatusEffect>
    </Projectile>
  </Item>
  <Item name="" identifier="ekgunnery_smallsslarmorpiercingammo" aliases="Small SSL Armor Piercing Explosive Ammo Box" scale="0.5" tags="ammobox,crate,ekgunnery_smallsslequipment,ekgunnery_smallsslammo" category="Equipment,Weapon" linkable="false" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="ekgunnery_smallsslammosource,coilgunammocontainer,ammocontainer" />
    <Price baseprice="450">
      <!-- 285 -->
      <Price storeidentifier="merchantoutpost" multiplier="1.3" sold="false" />
      <Price storeidentifier="merchantcity" multiplier="1.2" sold="false" />
      <Price storeidentifier="merchantresearch" multiplier="1.3" sold="false" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="4" />
      <Price storeidentifier="merchantmine" multiplier="1.2" sold="false" />
    </Price>
    <!--
	11
	42
	160
	42
	40
	-->
    <Deconstruct time="10">
      <Item identifier="copper" mincondition="0.8" outcondition="0.5" />
      <Item identifier="titanium" mincondition="0.1" copycondition="true" />
      <Item identifier="c4block" mincondition="0.1" copycondition="true" />
      <Item identifier="aluminium" />
      <Item identifier="fpgacircuit" outcondition="0.5" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="20">
      <RequiredSkill identifier="mechanical" level="35" />
      <RequiredSkill identifier="weapons" level="30" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="titanium" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="c4block" />
      <RequiredItem identifier="aluminium" />
      <RequiredItem identifier="fpgacircuit" mincondition="0.5" usecondition="true" />
    </Fabricate>
    <Fabricate suitablefabricators="fabricator" displayname="recycleitem" requiredtime="20">
      <RequiredSkill identifier="mechanical" level="25" />
      <RequiredSkill identifier="weapons" level="20" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="titanium" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="c4block" />
      <RequiredItem identifier="ekgunnery_smallsslarmorpiercingammo" mincondition="0.0" maxcondition="0.5" usecondition="false" />
    </Fabricate>
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers2.png" depth="0.54" sourcerect="520,384,104,88" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers2.png" depth="0.54" sourcerect="624,384,104,88" maxcondition="75" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers2.png" depth="0.54" sourcerect="728,384,104,88" maxcondition="50" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers2.png" depth="0.54" sourcerect="832,384,104,88" maxcondition="25" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers2.png" depth="0.54" sourcerect="936,384,104,88" maxcondition="0" origin="0.5,0.5" />
    <Body width="115" height="88" density="50" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-80" handle1="-40,30" handle2="40,30" aimable="false" msg="ItemMsgPickUpSelect" canBeCombined="true" />
    <ItemContainer autofill="False" hideitems="true" capacity="1" removecontaineditemsondeconstruct="true" drawinventory="false" canbeselected="false" ShowConditionInContainedStateIndicator="true">
      <ContainedStateIndicator texture="Content/UI/ContainerIndicators.png" sourcerect="16,64,120,24" />
      <!--
	  <StatusEffect type="OnUse" target="This" condition="-1.5" disabledeltatime="true">
        <SpawnItem identifiers="ekgunnery_smallsslarmorpiercinground" spawnposition="ThisInventory" />
      </StatusEffect>
	  -->
      <!-- We cannot detect when a bullet is NOT-contained. Yet bizzarely this works instead. -->
      <StatusEffect type="OnUse" target="This" condition="2.0" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <RequiredItem items="ekgunnery_smallsslarmorpiercinground" type="Contained" />
      </StatusEffect>
      <StatusEffect type="OnUse" target="This" condition="-2.0" disabledeltatime="true" stackable="false">
        <Conditional condition="gt 0" />
        <SpawnItem identifiers="ekgunnery_smallsslarmorpiercinground" spawnposition="ThisInventory" />
      </StatusEffect>
      <Containable identifiers="ekgunnery_smallsslarmorpiercinground" />
    </ItemContainer>
  </Item>
  <Item name="" identifier="ekgunnery_smallsslarmorpiercinground" category="Misc,Weapon" scale="0.75" hideinmenus="true">
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" sourcerect="976,48,48,16" depth="0.55" />
    <Body width="160" height="16" density="15" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,0" handle2="10,0" aimable="false" />
    <Projectile characterusable="false" launchimpulse="100.0" spread="4" maxtargetstohit="2">
      <Attack structuredamage="30" itemdamage="40" levelwalldamage="35" severlimbsprobability="0.25" targetforce="7" penetration="0.8">
        <Affliction identifier="gunshotwound" strength="17.5" />
        <Affliction identifier="lacerations" strength="20" />
        <Affliction identifier="internaldamage" strength="15" />
        <Affliction identifier="bleeding" strength="4" />
      </Attack>
      <StatusEffect type="OnActive" target="This" condition="-28">
        <Conditional condition="gt 50" />
        <ParticleEmitter particle="ekgunneryammotrailshort" copyentityangle="true" anglemin="-5" anglemax="5" particleamount="1" velocitymin="-10" velocitymax="-100" scalemin="1" scalemax="1.5" />
        <ParticleEmitter particle="ekgunnerytracerred" copyentityangle="true" anglemin="0" anglemax="0" particlespersecond="60" velocitymin="500" velocitymax="500" scalemin="0.65" scalemax="0.65" />
      </StatusEffect>
      <!-- velocity jumping fix -->
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" stackable="false" condition="-1">
        <Conditional condition="eq 100" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" delay="0.25" stackable="false" checkconditionalalways="true">
        <Conditional Condition="gt 75" />
        <Use />
      </StatusEffect>
      <!--
	  <StatusEffect type="OnUse" target="Limb" disabledeltatime="true">
        <Affliction identifier="ekgunnery_piercingeffect_weak" amount="100" />
      </StatusEffect>
	  -->
      <StatusEffect type="OnImpact" target="This" condition="-100" disabledeltatime="true" delay="0.06" stackable="false" />
      <StatusEffect type="OnImpact">
        <ParticleEmitter particle="ekgunnery_hdimpactmedium" particleamount="1" velocitymin="0" velocitymax="0" scalemin="1.5" scalemax="2.5" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_aphe1.ogg" selectionmode="Random" range="4000" volume="0.65" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_aphe2.ogg" selectionmode="Random" range="4000" volume="0.65" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_aphe3.ogg" selectionmode="Random" range="4000" volume="0.65" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_aphe4.ogg" selectionmode="Random" range="4000" volume="0.65" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_aphe5.ogg" selectionmode="Random" range="4000" volume="0.65" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_aphe6.ogg" selectionmode="Random" range="4000" volume="0.65" />
        <Explosion range="150.0" structuredamage="25" itemdamage="25" force="10.0" severlimbsprobability="0.35" underwaterbubble="false">
          <Affliction identifier="bleeding" strength="2" />
          <Affliction identifier="lacerations" strength="20" />
          <Affliction identifier="explosiondamage" strength="15" />
        </Explosion>
      </StatusEffect>
      <StatusEffect type="OnImpact" target="UseTarget">
        <Conditional entitytype="eq Structure" />
        <Conditional hastag="eq door" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-25" anglemax="25" particleamount="3" velocitymin="-10" velocitymax="-300" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-30" anglemax="30" particleamount="4" velocitymin="10" velocitymax="300" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="shrapnel" copyentityangle="true" anglemin="-60" anglemax="60" particleamount="3" velocitymin="50" velocitymax="300" scalemin="1" scalemax="2" />
        <ParticleEmitter particle="shrapnel" copyentityangle="true" anglemin="-25" anglemax="25" particleamount="4" velocitymin="-900" velocitymax="-50" scalemin="1" scalemax="2" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This">
        <Remove />
      </StatusEffect>
      <StatusEffect type="OnNotContained" target="This" stackable="false" delay="4">
        <Remove />
      </StatusEffect>
    </Projectile>
  </Item>
  <!-- Medium SSL Ammo -->
  <Item name="" identifier="ekgunnery_mediumsslrocket_he" tags="ekgunnery_mediumsslammo,railgunshell,railgunammo,ekgunnery_tagsmallshell" cargocontaineridentifier="ekgunnery_mediumsslrocket_cargocontainer" category="Misc,Weapon" sonarsize="5" scale="0.4" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="ekgunnery_mediumsslammosource,railgunammocontainer" />
    <Price baseprice="65" soldeverywhere="false">
      <Price storeidentifier="merchantoutpost" multiplier="1.5" minavailable="6" />
      <Price storeidentifier="merchantcity" multiplier="1.25" minavailable="8" />
      <Price storeidentifier="merchantresearch" multiplier="1.25" minavailable="4" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="16" />
      <Price storeidentifier="merchantmine" multiplier="1.25" sold="false" />
    </Price>
    <!--
	10
	37
	2.5
	-->
    <Deconstruct time="10">
      <Item identifier="steel" outcondition="0.5" />
      <Item identifier="uex" outcondition="0.5" />
      <Item identifier="potassium" outcondition="0.25" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="18" amount="2">
      <RequiredSkill identifier="mechanical" level="40" />
      <RequiredItem identifier="steel" />
      <RequiredItem identifier="uex" />
      <RequiredItem identifier="potassium" mincondition="0.5" usecondition="true" />
    </Fabricate>
    <Fabricate suitablefabricators="fabricator" requiredtime="10">
      <RequiredSkill identifier="mechanical" level="40" />
      <RequiredItem identifier="steel" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="uex" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="potassium" mincondition="0.25" usecondition="true" />
    </Fabricate>
    <InventoryIcon texture="%ModDir%/Items/Weapons/ekgunnery_launcherammo.png" sourcerect="272,0,32,32" />
    <Sprite texture="%ModDir%/Items/Weapons/ekgunnery_launcherammo.png" sourcerect="0,0,224,32" depth="0.55" origin="0.5,0.5" />
    <ContainedSprite allowedcontainertags="mediumsslcontainer_compact" texture="%ModDir%/Items/Weapons/ekgunnery_launcherammo.png" sourcerect="224,0,48,32" depth="0.54" origin="0.5,0.5" />
    <Body width="215" height="30" density="30" />
    <Holdable slots="RightHand,LeftHand" holdpos="0,-50" handle1="0,0" aimable="false" msg="ItemMsgPickUpSelect" />
    <Projectile characterusable="false" launchimpulse="80.0">
      <Attack structuredamage="30" severlimbsprobability="1.0" maxtargetstohit="2">
        <Affliction identifier="lacerations" strength="40" />
        <Affliction identifier="bleeding" strength="6" />
        <Affliction identifier="stun" strength="0.5" />
      </Attack>
      <!-- velocity jumping fix -->
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" stackable="false" condition="-1">
        <Conditional condition="eq 100" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" delay="0.25" stackable="false" checkconditionalalways="true">
        <Conditional Condition="gt 80" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" condition="-10">
        <ParticleEmitter particle="ekgunneryrockettrailmedium" colormultiplier="255,125,100,255" copyentityangle="true" anglemin="0" anglemax="360" particlespersecond="60" velocitymin="0" velocitymax="400" scalemin="0.5" scalemax="1.1" />
        <ParticleEmitter particle="ekgunnery_hdimpactsmall" colormultiplier="255,175,125,150" particlespersecond="60" velocitymin="0" velocitymax="0" scalemin="4" scalemax="6" />
        <Conditional Condition="gt 70" />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" condition="-20">
        <ParticleEmitter particle="ekgunnerybubblesshort" anglemin="0" anglemax="360" particlespersecond="30" velocitymin="0" velocitymax="50" scalemin="1" scalemax="2" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="This" condition="-100" disabledeltatime="true" delay="0.02" stackable="false" />
      <StatusEffect type="OnActive" target="This" condition="-100" disabledeltatime="true" delay="4.5" stackable="false" />
      <!-- Prevent deflection -->
      <StatusEffect type="OnImpact" target="This" condition="-35" disabledeltatime="true">
        <Conditional Condition="gt 70" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="UseTarget">
        <Conditional entitytype="eq Structure" />
        <Conditional hastag="eq door" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-15" anglemax="15" particleamount="4" velocitymin="-10" velocitymax="-200" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-30" anglemax="30" particleamount="3" velocitymin="10" velocitymax="300" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="shrapnel" copyentityangle="true" anglemin="-20" anglemax="20" particleamount="3" velocitymin="50" velocitymax="300" scalemin="1" scalemax="2" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This">
        <sound file="Content/Items/Weapons/ExplosionSmall1.ogg" selectionmode="Random" range="8000" />
        <sound file="Content/Items/Weapons/ExplosionSmall2.ogg" selectionmode="Random" range="8000" />
        <sound file="Content/Items/Weapons/ExplosionSmall3.ogg" selectionmode="Random" range="8000" />
        <ParticleEmitter particle="ekgunneryunderwaterexplosionfix" copyentityangle="true" anglemin="0" anglemax="360" particleamount="1" scalemin="3.0" scalemax="3.0" />
        <ParticleEmitter particle="ekgunnery_hdimpactlarge" particleamount="1" velocitymin="0" velocitymax="0" scalemin="4" scalemax="5" />
        <ParticleEmitter particle="shrapnel" copyentityangle="true" anglemin="0" anglemax="360" particleamount="50" velocitymin="100" velocitymax="2000" scalemin="1.0" scalemax="1.0" />
        <Explosion range="350.0" structuredamage="30" itemdamage="400" stun="0.5" force="25.0" severlimbsprobability="0.5" decal="explosion" decalsize="0.5">
          <Affliction identifier="bleeding" strength="30" />
          <Affliction identifier="burn" strength="50" />
          <Affliction identifier="lacerations" strength="80" />
          <Affliction identifier="explosiondamage" strength="20" />
        </Explosion>
        <Remove />
      </StatusEffect>
    </Projectile>
  </Item>
  <Item name="" identifier="ekgunnery_mediumsslrocket_ap" tags="ekgunnery_mediumsslammo,railgunshell,railgunammo,ekgunnery_tagsmallshell" cargocontaineridentifier="ekgunnery_mediumsslrocket_cargocontainer" category="Misc,Weapon" sonarsize="5" scale="0.4" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="ekgunnery_mediumsslammosource,railgunammocontainer" />
    <Price baseprice="90" soldeverywhere="false">
      <Price storeidentifier="merchantoutpost" multiplier="1.5" minavailable="4" />
      <Price storeidentifier="merchantcity" multiplier="1.25" minavailable="6" />
      <Price storeidentifier="merchantresearch" multiplier="1.25" sold="false" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="12" />
      <Price storeidentifier="merchantmine" multiplier="1.25" sold="false" />
    </Price>
    <!--
	10
	40
	6
	16
	2.5
	-->
    <Deconstruct time="10">
      <Item identifier="steel" outcondition="0.5" />
      <Item identifier="c4block" outcondition="0.25" />
      <Item identifier="copper" outcondition="0.25" />
      <Item identifier="titanium" outcondition="0.25" />
      <Item identifier="potassium" outcondition="0.25" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="18" amount="2">
      <RequiredSkill identifier="mechanical" level="40" />
      <RequiredItem identifier="steel" />
      <RequiredItem identifier="c4block" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="titanium" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="potassium" mincondition="0.5" usecondition="true" />
    </Fabricate>
    <Fabricate suitablefabricators="fabricator" requiredtime="10">
      <RequiredSkill identifier="mechanical" level="40" />
      <RequiredItem identifier="steel" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="c4block" mincondition="0.25" usecondition="true" />
      <RequiredItem identifier="copper" mincondition="0.25" usecondition="true" />
      <RequiredItem identifier="titanium" mincondition="0.25" usecondition="true" />
      <RequiredItem identifier="potassium" mincondition="0.25" usecondition="true" />
    </Fabricate>
    <InventoryIcon texture="%ModDir%/Items/Weapons/ekgunnery_launcherammo.png" sourcerect="272,48,32,32" />
    <Sprite texture="%ModDir%/Items/Weapons/ekgunnery_launcherammo.png" sourcerect="0,48,224,32" depth="0.55" origin="0.5,0.5" />
    <ContainedSprite allowedcontainertags="mediumsslcontainer_compact" texture="%ModDir%/Items/Weapons/ekgunnery_launcherammo.png" sourcerect="224,48,48,32" depth="0.54" origin="0.5,0.5" />
    <Body width="215" height="30" density="30" />
    <Holdable slots="RightHand,LeftHand" holdpos="0,-50" handle1="0,0" aimable="false" msg="ItemMsgPickUpSelect" />
    <Projectile characterusable="false" launchimpulse="80.0">
      <Attack structuredamage="75" severlimbsprobability="1.5" maxtargetstohit="2" penetration="0.8">
        <!--
		<Affliction identifier="gunshotwound" strength="30" />
        <Affliction identifier="lacerations" strength="55" />
        <Affliction identifier="internaldamage" amount="20" />
        <Affliction identifier="bleeding" strength="25" />
        <Affliction identifier="stun" strength="2" />
		
        <Affliction identifier="lacerations" strength="140" />
        <Affliction identifier="gunshotwound" strength="80" />
        <Affliction identifier="internaldamage" strength="40" />
        <Affliction identifier="bleeding" strength="25" />
        <Affliction identifier="burn" strength="25" />
        <Affliction identifier="stun" strength="2" />
		-->
        <Affliction identifier="burn" strength="50" />
        <Affliction identifier="gunshotwound" strength="125" />
        <Affliction identifier="lacerations" strength="175" />
        <Affliction identifier="explosiondamage" strength="100" />
        <Affliction identifier="bleeding" strength="40" />
        <Affliction identifier="stun" strength="2" />
      </Attack>
      <!-- gunshotwound=20 lacerations=20 internaldamage=15 bleeding=15
      <StatusEffect type="OnUse" target="Limb" disabledeltatime="true">
		<Conditional ishuman="false" />
        <Affliction identifier="ekgunnery_piercingeffect_mediumssl" amount="100" />
      </StatusEffect>
	  -->
      <!-- velocity jumping fix -->
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" stackable="false" condition="-1">
        <Conditional condition="eq 100" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" delay="0.25" stackable="false" checkconditionalalways="true">
        <Conditional Condition="gt 80" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" condition="-10">
        <ParticleEmitter particle="ekgunneryrockettrailmedium" colormultiplier="255,125,100,255" copyentityangle="true" anglemin="0" anglemax="360" particlespersecond="60" velocitymin="0" velocitymax="400" scalemin="0.5" scalemax="1.1" />
        <ParticleEmitter particle="ekgunnery_hdimpactsmall" colormultiplier="255,175,125,150" particlespersecond="60" velocitymin="0" velocitymax="0" scalemin="4" scalemax="6" />
        <Conditional Condition="gt 70" />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" condition="-20">
        <ParticleEmitter particle="ekgunnerybubblesshort" anglemin="0" anglemax="360" particlespersecond="30" velocitymin="0" velocitymax="50" scalemin="1" scalemax="2" velocitychangewater="0,0.5" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="This" condition="-100" disabledeltatime="true" delay="0.15" stackable="false" />
      <StatusEffect type="OnImpact" target="This" disabledeltatime="true">
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_aphe1.ogg" selectionmode="Random" range="8000" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_aphe2.ogg" selectionmode="Random" range="8000" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_aphe3.ogg" selectionmode="Random" range="8000" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_aphe4.ogg" selectionmode="Random" range="8000" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_aphe5.ogg" selectionmode="Random" range="8000" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_autocannon_aphe6.ogg" selectionmode="Random" range="8000" />
        <ParticleEmitter particle="ekgunneryunderwaterexplosionfix" copyentityangle="true" anglemin="0" anglemax="360" particleamount="1" scalemin="1.5" scalemax="1.5" />
        <ParticleEmitter particle="ekgunnery_hdimpactlarge" particleamount="2" velocitymin="0" velocitymax="0" scalemin="3" scalemax="4" />
        <Explosion range="225.0" structuredamage="50" itemdamage="400" stun="0.5" force="25.0" severlimbsprobability="0.5" decal="explosion" decalsize="0.5" underwaterbubble="false">
          <Affliction identifier="bleeding" strength="30" />
          <Affliction identifier="burn" strength="40" />
          <Affliction identifier="lacerations" strength="80" />
          <Affliction identifier="explosiondamage" strength="50" />
        </Explosion>
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" condition="-100" disabledeltatime="true" delay="4.5" stackable="false" />
      <!-- Prevent deflection -->
      <StatusEffect type="OnImpact" target="This" condition="-35" disabledeltatime="true">
        <Conditional Condition="gt 70" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="UseTarget">
        <Conditional entitytype="eq Structure" />
        <Conditional hastag="eq door" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-15" anglemax="15" particleamount="4" velocitymin="-10" velocitymax="-200" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-30" anglemax="30" particleamount="3" velocitymin="10" velocitymax="300" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="shrapnel" copyentityangle="true" anglemin="-20" anglemax="20" particleamount="3" velocitymin="50" velocitymax="300" scalemin="1" scalemax="2" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This">
        <Remove />
      </StatusEffect>
    </Projectile>
  </Item>
  <!--
  <Item name="Medium SSL Shell (FLAK)" identifier="ekgunnery_mediumsslrocket_flak" tags="ekgunnery_mediumsslammo,railgunshell,railgunammo,ekgunnery_tagsmallshell" 
  description="Rocket-propelled 100x800mm SSL shell equipped with a small flak warhead." cargocontaineridentifier="ekgunnery_mediumsslrocket_cargocontainer"
  category="Misc,Weapon" sonarsize="5" scale="0.4" impactsoundtag="impact_metal_heavy" hideinmenus="false" >
	<PreferredContainer primary="ekgunnery_mediumsslammosource,railgunammocontainer" />

    <Price baseprice="75" soldeverywhere="false">
      <Price storeidentifier="merchantoutpost" multiplier="1.5" minavailable="6" />
      <Price storeidentifier="merchantcity" multiplier="1.25" minavailable="8" />
      <Price storeidentifier="merchantresearch" multiplier="1.25" minavailable="4" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="16" />
      <Price storeidentifier="merchantmine" multiplier="1.25" sold="false" />
    </Price>
	
    <Deconstruct time="10">
      <Item identifier="steel" outcondition="0.5"/>
      <Item identifier="c4block" outcondition="0.5"/>
      <Item identifier="aluminium" outcondition="0.5"/>
      <Item identifier="potassium" outcondition="0.25"/>
    </Deconstruct>

    <Fabricate suitablefabricators="fabricator" requiredtime="20">
      <RequiredSkill identifier="mechanical" level="40" />
      <RequiredItem identifier="steel" mincondition="0.5" usecondition="true"/>
      <RequiredItem identifier="c4block" mincondition="0.5" usecondition="true"/>
      <RequiredItem identifier="aluminium" mincondition="0.5" usecondition="true"/>
      <RequiredItem identifier="potassium" mincondition="0.25" usecondition="true"/>
    </Fabricate>

    <InventoryIcon texture="Mods/EK Gunnery/Items/Weapons/ekgunnery_launcherammo.png" sourcerect="272,96,32,32" />
    <Sprite texture="Mods/EK Gunnery/Items/Weapons/ekgunnery_launcherammo.png" sourcerect="0,96,224,32" depth="0.55" origin="0.5,0.5" />
    <ContainedSprite allowedcontainertags="mediumsslcontainer_compact" texture="Mods/EK Gunnery/Items/Weapons/ekgunnery_launcherammo.png" sourcerect="224,96,48,32" depth="0.54" origin="0.5,0.5" />
    <Body width="215" height="30" density="30" />
    <Holdable slots="RightHand,LeftHand" holdpos="0,-50" handle1="0,0" aimable="false" msg="ItemMsgPickUpSelect" />
    <Projectile characterusable="false" launchimpulse="80.0">
      <Attack structuredamage="30" severlimbsprobability="1.0" maxtargetstohit="2">
        <Affliction identifier="lacerations" strength="40" />
        <Affliction identifier="bleeding" strength="6" />
        <Affliction identifier="stun" strength="0.5" />
      </Attack>
	  
	  <StatusEffect type="OnActive" target="This" IsOn="true" disabledeltatime="true" stackable="false">
        <Conditional Condition="lt 90" />
      </StatusEffect>
	  
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" delay="0.25" stackable="false" checkconditionalalways="true">
        <Conditional Condition="gt 80" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" condition="-10">
        <ParticleEmitter particle="ekgunneryrockettrailmedium" colormultiplier="255,125,100,255" anglemin="0" anglemax="360" particlespersecond="60" velocitymin="0" velocitymax="400" scalemin="0.5" scalemax="1.1" />
        <Conditional Condition="gt 70" />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" condition="-20">
        <ParticleEmitter particle="ekgunnerybubblesshort" anglemin="0" anglemax="360" particlespersecond="30" velocitymin="0" velocitymax="50" scalemin="1" scalemax="2" velocitychangewater="0,0.5" />
      </StatusEffect>
	  
      <StatusEffect type="OnImpact" target="This" condition="-100" disabledeltatime="true" delay="0.02" stackable="false" />
	  
      <StatusEffect type="OnImpact" target="This" condition="-35" disabledeltatime="true" >
        <Conditional Condition="gt 70" />
	  </StatusEffect>
	  
      <StatusEffect type="OnImpact" target="UseTarget">
        <Conditional entitytype="eq Structure"/>
        <Conditional hastag="eq door"/>
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-15" anglemax="15" particleamount="4" velocitymin="-10" velocitymax="-200" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-30" anglemax="30" particleamount="3" velocitymin="10" velocitymax="300" scalemin="1.5" scalemax="2" />
		<ParticleEmitter particle="shrapnel" copyentityangle="true" anglemin="-20" anglemax="20" particleamount="3" velocitymin="50" velocitymax="300" scalemin="1" scalemax="2" />
      </StatusEffect>
	  
      <StatusEffect type="OnBroken" target="This">
        <sound file="Content/Items/Weapons/ExplosionSmall1.ogg" selectionmode="Random" range="20000"/>
        <sound file="Content/Items/Weapons/ExplosionSmall2.ogg" selectionmode="Random" range="20000"/>
        <sound file="Content/Items/Weapons/ExplosionSmall3.ogg" selectionmode="Random" range="20000"/>
        <ParticleEmitter particle="ekgunneryunderwaterexplosionfix" copyentityangle="true" anglemin="0" anglemax="360" particleamount="1" scalemin="3.0" scalemax="3.0" />
        <ParticleEmitter particle="shrapnel" copyentityangle="true" anglemin="0" anglemax="360" particleamount="50" velocitymin="100" velocitymax="2000" scalemin="1.0" scalemax="1.0" />
        <Explosion range="350.0" structuredamage="30" itemdamage="400" stun="0.5" force="25.0" severlimbsprobability="0.5" decal="explosion" decalsize="0.5">
          <Affliction identifier="bleeding" strength="30" />
          <Affliction identifier="burn" strength="50" />
          <Affliction identifier="lacerations" strength="80" />
          <Affliction identifier="explosiondamage" strength="20" />
        </Explosion>
        <Remove />
      </StatusEffect>
	  
    </Projectile>
	
    <LightComponent characterusable="false" LightColor="255,200,45,60" range="100" IsOn="false">
	  
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" stackable="false" Condition="-200.0" Comparison="and">
        <Conditional MotionDetected="true" />
	  </StatusEffect>
	  
      <StatusEffect type="OnBroken" target="This" disabledeltatime="true">
        <sound file="Content/Items/Weapons/ExplosionMedium1.ogg" range="10000" selectionmode="All" />
        <sound file="Content/Items/Weapons/ExplosionDebris1.ogg" range="10000" />
        <Explosion range="300.0" structuredamage="20" stun="3" force="20.0" severlimbsprobability="0.5" decal="explosion" decalsize="0.5" >
          <Affliction identifier="burn" strength="75" />
          <Affliction identifier="internaldamage" strength="140" />
        </Explosion>
	  </StatusEffect>
      <StatusEffect type="OnBroken" target="This" disabledeltatime="true">
        <Remove />
      </StatusEffect>
    </LightComponent>
	
    <MotionSensor range="400" canbeselected="false" IgnoreDead="true" />
  
  </Item>
  -->
  <!-- Wait for MotionDetected serializable property to actually work consistently -->
  <Item name="ekgunnery_mediumsslrocket_flak_debug" identifier="ekgunnery_mediumsslrocket_flak_debug" tags="ekgunnery_mediumsslammo,railgunshell,railgunammo,ekgunnery_tagsmallshell" cargocontaineridentifier="ekgunnery_mediumsslrocket_cargocontainer" category="Misc,Weapon" sonarsize="5" scale="0.4" impactsoundtag="impact_metal_heavy" hideinmenus="true">
    <PreferredContainer primary="ekgunnery_mediumsslammosource,railgunammocontainer" />
    <!--
    <Price baseprice="75" soldeverywhere="false">
      <Price storeidentifier="merchantoutpost" multiplier="1.5" minavailable="6" />
      <Price storeidentifier="merchantcity" multiplier="1.25" minavailable="8" />
      <Price storeidentifier="merchantresearch" multiplier="1.25" minavailable="4" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="16" />
      <Price storeidentifier="merchantmine" multiplier="1.25" sold="false" />
    </Price>
	-->
    <!--
	10
	37
	5
	-->
    <Deconstruct time="10">
      <Item identifier="steel" outcondition="0.5" />
      <Item identifier="c4block" outcondition="0.5" />
      <Item identifier="aluminium" outcondition="0.5" />
      <Item identifier="potassium" outcondition="0.25" />
    </Deconstruct>
    <!--
    <Fabricate suitablefabricators="fabricator" requiredtime="20">
      <RequiredSkill identifier="mechanical" level="40" />
      <RequiredItem identifier="steel" mincondition="0.5" usecondition="true"/>
      <RequiredItem identifier="c4block" mincondition="0.5" usecondition="true"/>
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true"/>
      <RequiredItem identifier="potassium" mincondition="0.25" usecondition="true"/>
    </Fabricate>
	-->
    <InventoryIcon texture="%ModDir%/Items/Weapons/ekgunnery_launcherammo.png" sourcerect="272,96,32,32" />
    <Sprite texture="%ModDir%/Items/Weapons/ekgunnery_launcherammo.png" sourcerect="0,96,224,32" depth="0.55" origin="0.5,0.5" />
    <ContainedSprite allowedcontainertags="mediumsslcontainer_compact" texture="%ModDir%/Items/Weapons/ekgunnery_launcherammo.png" sourcerect="224,96,48,32" depth="0.54" origin="0.5,0.5" />
    <Body width="215" height="30" density="30">
      <!-- Debug event to determine why the MotionDetected="true" is triggering despite there being nothing around -->
      <StatusEffect type="Always" target="This" disabledeltatime="true" stackable="false" checkconditionalalways="true" Comparison="And">
        <Conditional MotionDetected="eq true" targetitemcomponent="MotionSensor" />
        <Conditional IsOn="eq true" targetitemcomponent="LightComponent" />
        <ParticleEmitter particle="flare" copyentityangle="true" anglemin="-360" anglemax="360" particleamount="3" velocitymin="50" velocitymax="150" scalemin="2" scalemax="3" />
        <sound file="Content/Items/Weapons/ExplosionSmall1.ogg" selectionmode="Random" range="10000" />
        <sound file="Content/Items/Weapons/ExplosionSmall2.ogg" selectionmode="Random" range="10000" />
        <sound file="Content/Items/Weapons/ExplosionSmall3.ogg" selectionmode="Random" range="10000" />
      </StatusEffect>
    </Body>
    <Holdable slots="RightHand,LeftHand" holdpos="0,-50" handle1="0,0" aimable="false" msg="ItemMsgPickUpSelect" />
    <Projectile characterusable="false" launchimpulse="80.0">
      <Attack structuredamage="30" severlimbsprobability="1.0" maxtargetstohit="2">
        <Affliction identifier="lacerations" strength="40" />
        <Affliction identifier="bleeding" strength="6" />
        <Affliction identifier="stun" strength="0.5" />
      </Attack>
      <!-- arm proximity fuse -->
      <StatusEffect type="OnActive" target="This" targetitemcomponent="LightComponent" IsOn="true" disabledeltatime="true" delay="0.6" stackable="false">
        <Conditional Condition="gt 90" />
      </StatusEffect>
      <!-- velocity jumping fix -->
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" stackable="false" condition="-1">
        <Conditional condition="eq 100" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" delay="0.25" stackable="false" checkconditionalalways="true">
        <Conditional Condition="gt 80" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" condition="-10">
        <ParticleEmitter particle="ekgunneryrockettrailmedium" colormultiplier="255,125,100,255" copyentityangle="true" anglemin="0" anglemax="360" particlespersecond="60" velocitymin="0" velocitymax="400" scalemin="0.5" scalemax="1.1" />
        <ParticleEmitter particle="ekgunnery_hdimpactsmall" colormultiplier="255,175,125,150" particlespersecond="60" velocitymin="0" velocitymax="0" scalemin="4" scalemax="6" />
        <Conditional Condition="gt 70" />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" condition="-20">
        <ParticleEmitter particle="ekgunnerybubblesshort" anglemin="0" anglemax="360" particlespersecond="30" velocitymin="0" velocitymax="50" scalemin="1" scalemax="2" velocitychangewater="0,0.5" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="This" condition="-100" disabledeltatime="true" delay="0.02" stackable="false" />
      <!-- Prevent deflection -->
      <StatusEffect type="OnImpact" target="This" condition="-35" disabledeltatime="true">
        <Conditional Condition="gt 70" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="UseTarget">
        <Conditional entitytype="eq Structure" />
        <Conditional hastag="eq door" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-15" anglemax="15" particleamount="4" velocitymin="-10" velocitymax="-200" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-30" anglemax="30" particleamount="3" velocitymin="10" velocitymax="300" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="shrapnel" copyentityangle="true" anglemin="-20" anglemax="20" particleamount="3" velocitymin="50" velocitymax="300" scalemin="1" scalemax="2" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This">
        <sound file="Content/Items/Weapons/ExplosionSmall1.ogg" selectionmode="Random" range="10000" />
        <sound file="Content/Items/Weapons/ExplosionSmall2.ogg" selectionmode="Random" range="10000" />
        <sound file="Content/Items/Weapons/ExplosionSmall3.ogg" selectionmode="Random" range="10000" />
        <sound file="Content/Items/Weapons/ExplosionSmall1.ogg" selectionmode="Random" range="10000" />
        <sound file="Content/Items/Weapons/ExplosionSmall2.ogg" selectionmode="Random" range="10000" />
        <sound file="Content/Items/Weapons/ExplosionSmall3.ogg" selectionmode="Random" range="10000" />
        <ParticleEmitter particle="ekgunneryunderwaterexplosionfix" copyentityangle="true" anglemin="0" anglemax="360" particleamount="1" scalemin="3.0" scalemax="3.0" />
        <ParticleEmitter particle="shrapnel" copyentityangle="true" anglemin="0" anglemax="360" particleamount="50" velocitymin="100" velocitymax="2000" scalemin="1.0" scalemax="1.0" />
        <Explosion range="350.0" structuredamage="30" itemdamage="400" stun="0.5" force="25.0" severlimbsprobability="0.5" decal="explosion" decalsize="0.5">
          <Affliction identifier="bleeding" strength="30" />
          <Affliction identifier="burn" strength="50" />
          <Affliction identifier="lacerations" strength="80" />
          <Affliction identifier="explosiondamage" strength="20" />
        </Explosion>
        <Remove />
      </StatusEffect>
    </Projectile>
    <LightComponent characterusable="false" LightColor="255,0,0,255" range="400" blinkfrequency="10" IsOn="false">
      <!--
	  <StatusEffect type="OnActive" target="This" disabledeltatime="true" stackable="false" Condition="-2.5" checkconditionalalways="true" Comparison="And">
        <Conditional targetitemcomponent="MotionSensor" MotionDetected="eq true" />
		<Conditional Condition="lt 90" />
        <sound file="Content/Items/Weapons/ExplosionSmall1.ogg" selectionmode="Random" range="20000"/>
        <sound file="Content/Items/Weapons/ExplosionSmall2.ogg" selectionmode="Random" range="20000"/>
        <sound file="Content/Items/Weapons/ExplosionSmall3.ogg" selectionmode="Random" range="20000"/>
        <sound file="Content/Items/Weapons/ExplosionSmall1.ogg" selectionmode="Random" range="20000"/>
        <sound file="Content/Items/Weapons/ExplosionSmall2.ogg" selectionmode="Random" range="20000"/>
        <sound file="Content/Items/Weapons/ExplosionSmall3.ogg" selectionmode="Random" range="20000"/>
	  </StatusEffect>
	  -->
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" stackable="false" checkconditionalalways="true">
        <!--<Conditional Condition="lt 80" />-->
        <Conditional targetitemcomponent="MotionSensor" MotionDetected="eq true" />
        <ParticleEmitter particle="flare" copyentityangle="true" anglemin="-360" anglemax="360" particleamount="3" velocitymin="50" velocitymax="250" scalemin="5" scalemax="10" />
      </StatusEffect>
    </LightComponent>
    <MotionSensor range="550" canbeselected="false" IgnoreDead="true" minimumvelocity="0" updateinterval="0.025" target="Monster" DetectOwnMotion="false">
      <StatusEffect type="Always" target="This" disabledeltatime="true" stackable="false" checkconditionalalways="true">
        <Conditional targetitemcomponent="MotionSensor" MotionDetected="eq true" />
        <!-- <ParticleEmitter particle="flare" copyentityangle="true" anglemin="-360" anglemax="360" particleamount="3" velocitymin="50" velocitymax="250" scalemin="5" scalemax="10" /> -->
      </StatusEffect>
    </MotionSensor>
  </Item>
  <Item name="" identifier="ekgunnery_mediumsslrocket_flak" tags="ekgunnery_mediumsslammo,railgunshell,railgunammo,ekgunnery_tagsmallshell" cargocontaineridentifier="ekgunnery_mediumsslrocket_cargocontainer" category="Misc,Weapon" sonarsize="5" scale="0.4" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="ekgunnery_mediumsslammosource,railgunammocontainer" />
    <Price baseprice="75" soldeverywhere="false">
      <!-- 73.5 -->
      <Price storeidentifier="merchantoutpost" multiplier="1.5" sold="false" />
      <Price storeidentifier="merchantcity" multiplier="1.25" minavailable="6" />
      <Price storeidentifier="merchantresearch" multiplier="1.25" sold="false" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="10" />
      <Price storeidentifier="merchantmine" multiplier="1.25" sold="false" />
    </Price>
    <!--
	20 10
	80 40
	42 21
	10 2.5
	-->
    <Deconstruct time="10">
      <Item identifier="steel" outcondition="0.5" />
      <Item identifier="c4block" outcondition="0.5" />
      <Item identifier="copper" outcondition="0.5" />
      <Item identifier="potassium" outcondition="0.25" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="35" amount="2">
      <RequiredSkill identifier="mechanical" level="40" />
      <RequiredItem identifier="steel" />
      <RequiredItem identifier="c4block" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="potassium" mincondition="0.5" usecondition="true" />
    </Fabricate>
    <Fabricate suitablefabricators="fabricator" requiredtime="20">
      <RequiredSkill identifier="mechanical" level="40" />
      <RequiredItem identifier="steel" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="c4block" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="potassium" mincondition="0.25" usecondition="true" />
    </Fabricate>
    <InventoryIcon texture="%ModDir%/Items/Weapons/ekgunnery_launcherammo.png" sourcerect="272,96,32,32" />
    <Sprite texture="%ModDir%/Items/Weapons/ekgunnery_launcherammo.png" sourcerect="0,96,224,32" depth="0.55" origin="0.5,0.5" />
    <ContainedSprite allowedcontainertags="mediumsslcontainer_compact" texture="%ModDir%/Items/Weapons/ekgunnery_launcherammo.png" sourcerect="224,96,48,32" depth="0.54" origin="0.5,0.5" />
    <Body width="215" height="30" density="30" />
    <Holdable slots="RightHand,LeftHand" holdpos="0,-50" handle1="0,0" aimable="false" msg="ItemMsgPickUpSelect" />
    <Projectile characterusable="false" launchimpulse="80.0" impulsespread="0.3">
      <Attack structuredamage="30" severlimbsprobability="1.0" maxtargetstohit="2">
        <Affliction identifier="lacerations" strength="40" />
        <Affliction identifier="bleeding" strength="6" />
        <Affliction identifier="stun" strength="0.5" />
      </Attack>
      <!-- velocity jumping fix -->
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" stackable="false" condition="-1">
        <Conditional condition="eq 100" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" delay="0.25" stackable="false" checkconditionalalways="true">
        <Conditional Condition="gt 70" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" condition="-90">
        <ParticleEmitter particle="ekgunneryrockettrailmedium" colormultiplier="255,125,100,255" copyentityangle="true" anglemin="0" anglemax="360" particlespersecond="60" velocitymin="0" velocitymax="400" scalemin="0.5" scalemax="1.1" />
        <ParticleEmitter particle="ekgunnery_hdimpactsmall" colormultiplier="255,175,125,150" particlespersecond="60" velocitymin="0" velocitymax="0" scalemin="4" scalemax="6" />
        <ParticleEmitter particle="ekgunnerybubblesshort" anglemin="0" anglemax="360" particlespersecond="30" velocitymin="0" velocitymax="50" scalemin="1" scalemax="2" velocitychangewater="0,0.5" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="This" condition="-100" disabledeltatime="true" delay="0.02" stackable="false" />
      <StatusEffect type="OnActive" target="This" condition="-100" disabledeltatime="true" delay="4.5" stackable="false" />
      <!-- Prevent deflection -->
      <StatusEffect type="OnImpact" target="This" condition="-45" disabledeltatime="true">
        <Conditional Condition="gt 60" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="UseTarget">
        <Conditional entitytype="eq Structure" />
        <Conditional hastag="eq door" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-15" anglemax="15" particleamount="4" velocitymin="-10" velocitymax="-200" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-30" anglemax="30" particleamount="3" velocitymin="10" velocitymax="300" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="shrapnel" copyentityangle="true" anglemin="-20" anglemax="20" particleamount="3" velocitymin="50" velocitymax="300" scalemin="1" scalemax="2" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This">
        <!--
		<sound file="Content/Items/Weapons/ExplosionSmall1.ogg" selectionmode="Random" range="10000"/>
        <sound file="Content/Items/Weapons/ExplosionSmall2.ogg" selectionmode="Random" range="10000"/>
        <sound file="Content/Items/Weapons/ExplosionSmall3.ogg" selectionmode="Random" range="10000"/>
		-->
        <sound file="%ModDir%/Items/Weapons/ekgunnery_bigflakexplode1.ogg" selectionmode="Random" range="7500" volume="0.75" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_bigflakexplode2.ogg" selectionmode="Random" range="7500" volume="0.75" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_bigflakexplode3.ogg" selectionmode="Random" range="7500" volume="0.75" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_bigflakexplode4.ogg" selectionmode="Random" range="7500" volume="0.75" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_bigflakexplode5.ogg" selectionmode="Random" range="7500" volume="0.75" />
        <ParticleEmitter particle="ekgunneryunderwaterexplosionfix" particleamount="1" scalemin="2.5" scalemax="3.0" />
        <ParticleEmitter particle="ekgunneryflakburstmedium" particleamount="1" scalemin="4" scalemax="4.5" startdelaymin="0.3" startdelaymax="0.35" />
        <Explosion range="1750.0" structuredamage="10" itemdamage="80" stun="2" force="10.0" severlimbsprobability="0.1" underwaterbubble="false" onlyoutside="true">
          <Affliction identifier="burn" strength="35" />
          <Affliction identifier="lacerations" strength="40" />
          <Affliction identifier="explosiondamage" strength="45" />
          <Affliction identifier="bleeding" strength="25" />
        </Explosion>
        <!-- Short range fragmentation if shell penetrates hull -->
        <Explosion range="300.0" structuredamage="10" itemdamage="60" stun="2" force="10.0" severlimbsprobability="0.1" underwaterbubble="false" flames="false" onlyinside="true">
          <Affliction identifier="burn" strength="17.5" />
          <Affliction identifier="explosiondamage" strength="15" />
          <Affliction identifier="lacerations" strength="15" />
          <Affliction identifier="bleeding" strength="12.5" />
        </Explosion>
        <Remove />
      </StatusEffect>
    </Projectile>
  </Item>
  <Item name="" identifier="ekgunnery_mediumsslrocket_flak_smartfuse" tags="ekgunnery_mediumsslammo,railgunshell,railgunammo,ekgunnery_tagsmallshell" cargocontaineridentifier="ekgunnery_mediumsslrocket_cargocontainer" category="Misc,Weapon" sonarsize="5" scale="0.4" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="ekgunnery_mediumsslammosource,railgunammocontainer" />
    <Price baseprice="95" soldeverywhere="false">
      <!-- 93.5 -->
      <Price storeidentifier="merchantoutpost" multiplier="1.5" sold="false" />
      <Price storeidentifier="merchantcity" multiplier="1.25" sold="false" />
      <Price storeidentifier="merchantresearch" multiplier="1.25" sold="false" />
      <Price storeidentifier="merchantmilitary" multiplier="0.9" minavailable="6" />
      <Price storeidentifier="merchantmine" multiplier="1.25" sold="false" />
    </Price>
    <!--
	20 10
	80 40
	42 21
	10 2.5
	80 20
	-->
    <Deconstruct time="10">
      <Item identifier="steel" outcondition="0.5" />
      <Item identifier="c4block" outcondition="0.5" />
      <Item identifier="aluminium" outcondition="0.5" />
      <Item identifier="potassium" outcondition="0.25" />
      <Item identifier="fpgacircuit" outcondition="0.25" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="35" amount="2">
      <RequiredSkill identifier="mechanical" level="40" />
      <RequiredItem identifier="steel" />
      <RequiredItem identifier="c4block" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="potassium" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="fpgacircuit" mincondition="0.5" usecondition="true" />
    </Fabricate>
    <Fabricate suitablefabricators="fabricator" requiredtime="20">
      <RequiredSkill identifier="mechanical" level="40" />
      <RequiredItem identifier="steel" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="c4block" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="copper" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="potassium" mincondition="0.25" usecondition="true" />
      <RequiredItem identifier="fpgacircuit" mincondition="0.25" usecondition="true" />
    </Fabricate>
    <InventoryIcon texture="%ModDir%/Items/Weapons/ekgunnery_launcherammo.png" sourcerect="272,144,32,32" />
    <Sprite texture="%ModDir%/Items/Weapons/ekgunnery_launcherammo.png" sourcerect="0,144,224,32" depth="0.55" origin="0.5,0.5" />
    <ContainedSprite allowedcontainertags="mediumsslcontainer_compact" texture="%ModDir%/Items/Weapons/ekgunnery_launcherammo.png" sourcerect="224,144,48,32" depth="0.54" origin="0.5,0.5" />
    <Body width="215" height="30" density="30" />
    <Holdable slots="RightHand,LeftHand" holdpos="0,-50" handle1="0,0" aimable="false" msg="ItemMsgPickUpSelect" />
    <Projectile characterusable="false" launchimpulse="80.0" impulsespread="0.3">
      <Attack structuredamage="30" severlimbsprobability="1.0" maxtargetstohit="2">
        <Affliction identifier="lacerations" strength="40" />
        <Affliction identifier="bleeding" strength="6" />
        <Affliction identifier="stun" strength="0.5" />
      </Attack>
      <!-- velocity jumping fix -->
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" stackable="false" condition="-1">
        <Conditional condition="eq 100" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" delay="0.25" stackable="false" checkconditionalalways="true">
        <Conditional Condition="gt 70" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" condition="-10">
        <ParticleEmitter particle="ekgunneryrockettrailmedium" colormultiplier="255,125,100,255" copyentityangle="true" anglemin="0" anglemax="360" particlespersecond="60" velocitymin="0" velocitymax="400" scalemin="0.5" scalemax="1.1" />
        <ParticleEmitter particle="ekgunnery_hdimpactsmall" colormultiplier="255,175,125,150" particlespersecond="60" velocitymin="0" velocitymax="0" scalemin="4" scalemax="6" />
        <Conditional Condition="gt 70" />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" condition="-20">
        <ParticleEmitter particle="ekgunnerybubblesshort" anglemin="0" anglemax="360" particlespersecond="30" velocitymin="0" velocitymax="50" scalemin="1" scalemax="2" velocitychangewater="0,0.5" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="This" condition="-100" disabledeltatime="true" delay="0.02" stackable="false" />
      <StatusEffect type="OnActive" target="This" condition="-100" disabledeltatime="true" delay="4.5" stackable="false" />
      <!-- Prevent deflection -->
      <StatusEffect type="OnImpact" target="This" condition="-45" disabledeltatime="true">
        <Conditional Condition="gt 60" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="UseTarget">
        <Conditional entitytype="eq Structure" />
        <Conditional hastag="eq door" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-15" anglemax="15" particleamount="4" velocitymin="-10" velocitymax="-200" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-30" anglemax="30" particleamount="3" velocitymin="10" velocitymax="300" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="shrapnel" copyentityangle="true" anglemin="-20" anglemax="20" particleamount="3" velocitymin="50" velocitymax="300" scalemin="1" scalemax="2" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This">
        <!--
		<sound file="Content/Items/Weapons/ExplosionSmall1.ogg" selectionmode="Random" range="10000"/>
        <sound file="Content/Items/Weapons/ExplosionSmall2.ogg" selectionmode="Random" range="10000"/>
        <sound file="Content/Items/Weapons/ExplosionSmall3.ogg" selectionmode="Random" range="10000"/>
		-->
        <sound file="%ModDir%/Items/Weapons/ekgunnery_bigflakexplode1.ogg" selectionmode="Random" range="7500" volume="0.75" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_bigflakexplode2.ogg" selectionmode="Random" range="7500" volume="0.75" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_bigflakexplode3.ogg" selectionmode="Random" range="7500" volume="0.75" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_bigflakexplode4.ogg" selectionmode="Random" range="7500" volume="0.75" />
        <sound file="%ModDir%/Items/Weapons/ekgunnery_bigflakexplode5.ogg" selectionmode="Random" range="7500" volume="0.75" />
        <ParticleEmitter particle="ekgunneryunderwaterexplosionfix" particleamount="1" scalemin="2.5" scalemax="3.0" />
        <ParticleEmitter particle="ekgunneryflakburstmedium" particleamount="1" scalemin="4" scalemax="4.5" startdelaymin="0.3" startdelaymax="0.35" />
        <Explosion range="1750.0" structuredamage="10" itemdamage="80" stun="2" force="10.0" severlimbsprobability="0.1" underwaterbubble="false" onlyoutside="true">
          <Affliction identifier="burn" strength="35" />
          <Affliction identifier="lacerations" strength="40" />
          <Affliction identifier="explosiondamage" strength="45" />
          <Affliction identifier="bleeding" strength="25" />
        </Explosion>
        <!-- Short range fragmentation if shell penetrates hull -->
        <Explosion range="300.0" structuredamage="10" itemdamage="60" stun="2" force="10.0" severlimbsprobability="0.1" underwaterbubble="false" flames="false" onlyinside="true">
          <Affliction identifier="burn" strength="17.5" />
          <Affliction identifier="explosiondamage" strength="15" />
          <Affliction identifier="lacerations" strength="15" />
          <Affliction identifier="bleeding" strength="12.5" />
        </Explosion>
        <Remove />
      </StatusEffect>
    </Projectile>
    <MotionSensor range="750" canbeselected="false" IgnoreDead="true" minimumvelocity="0" updateinterval="0.025" target="Monster" DetectOwnMotion="false">
      <!-- Proximity Fuse Detonation -->
      <StatusEffect type="Always" target="This" condition="-100" disabledeltatime="true" delay="0.1" stackable="false" checkconditionalalways="true" comparison="And">
        <Conditional targetitemcomponent="MotionSensor" MotionDetected="eq true" />
        <Conditional Condition="lt 90" />
      </StatusEffect>
    </MotionSensor>
  </Item>
  <!-- Vortex-Ring Cannon Ammo -->
  <Item name="ekgunnery_vortexringpellet" identifier="ekgunnery_vortexringpellet" category="Misc,Weapon" scale="1" sonarsize="2.5" hideinmenus="true">
    <Sprite texture="%ModDir%/Items/Weapons/ekgunnery_vortexringcannon.png" sourcerect="0,0,1,1" depth="0.55" />
    <Body radius="160" density="75" />
    <AiTarget sightrange="0.0" maxsoundrange="500" minsoundrange="0" fadeouttime="2" sonardisruption="0.25" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,0" handle2="10,0" aimable="false" />
    <Projectile characterusable="false" launchimpulse="75.0" spread="30" maxtargetstohit="4">
      <Attack structuredamage="0" itemdamage="15" severlimbsprobability="1.0" penetration="0.5">
        <!--
		  <Affliction identifier="bleeding" strength="15" />
          <Affliction identifier="internaldamage" strength="20" />
          <Affliction identifier="organdamage" strength="10" />
          <Affliction identifier="lacerations" strength="15" />
          <Affliction identifier="nausea" strength="30" />
          <Affliction identifier="explosiondamage" strength="20" />
		  -->
      </Attack>
      <StatusEffect type="OnActive" target="This" condition="-50">
        <ParticleEmitter particle="ekgunnery_newvortexringtrail" anglemin="0" anglemax="360" particleamount="1" velocitymin="0" velocitymax="100" scalemin="2" scalemax="4" distancemin="0" distancemax="400" />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" stackable="false" condition="-1">
        <Conditional condition="gt 99" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnActive" target="This" disabledeltatime="true" delay="0.2" stackable="false" checkconditionalalways="true">
        <Conditional Condition="gt 70" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnNotContained" target="This" stackable="false" delay="1.75">
        <Remove />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="This" condition="-30" disabledeltatime="true">
        <Explosion range="500.0" stun="0.25" force="12.5" shockwave="false" smoke="false" flames="false" flash="false" sparks="false" underwaterbubble="false" applyfireeffects="false" severlimbsprobability="0.1" onlyoutside="true">
          <Affliction identifier="bleeding" strength="3.75" />
          <Affliction identifier="internaldamage" strength="5" />
          <Affliction identifier="organdamage" strength="2.5" />
          <Affliction identifier="lacerations" strength="3.75" />
          <Affliction identifier="nausea" strength="7.5" />
          <Affliction identifier="explosiondamage" strength="5" />
        </Explosion>
      </StatusEffect>
      <!-- Break immedeately if hit structure -->
      <StatusEffect type="OnImpact" target="UseTarget,This" condition="-100" disabledeltatime="true">
        <Conditional entitytype="eq Structure" />
        <Conditional hastag="eq door" />
      </StatusEffect>
      <StatusEffect type="OnBroken" target="This">
        <Remove />
      </StatusEffect>
    </Projectile>
  </Item>
  <Item name="ekgunnery_vortexringprojectile" identifier="ekgunnery_vortexringprojectile" tags="provocative" category="Equipment,Weapon" linkable="true" scale="0.5" impactsoundtag="impact_metal_heavy" hideinmenus="true">
    <Deconstruct time="5">
      <Item identifier="aluminium" copycondition="true" /> /&gt;
    </Deconstruct>
    <Sprite texture="Content/Items/Containers/containers2.png" sourcerect="799,708,216,34" depth="0.55" origin="0.5,0.5" />
    <BrokenSprite texture="Content/Items/Containers/containers2.png" sourcerect="799,744,216,34" depth="0.55" origin="0.5,0.5" maxcondition="0" />
    <InventoryIcon texture="Content/Items/InventoryIconAtlas2.png" sourcerect="0,447,64,64" origin="0.5,0.5" />
    <Body width="215" height="30" density="35" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,0" handle2="10,0" aimable="false" msg="ItemMsgPickUpSelect">
      <StatusEffect type="OnNotContained" target="This" disabledeltatime="true" stackable="false" delay="0.1">
        <Remove />
      </StatusEffect>
    </Holdable>
    <ItemContainer hideitems="true" capacity="10" drawinventory="false" canbeselected="false" canbecombined="true" ShowConditionInContainedStateIndicator="true" removecontaineditemsondeconstruct="true" containedstateindicatorstyle="tank" spawnwithid="ekgunnery_vortexringpellet,ekgunnery_vortexringpellet,ekgunnery_vortexringpellet,ekgunnery_vortexringpellet,ekgunnery_vortexringpellet,ekgunnery_vortexringpellet,ekgunnery_vortexringpellet,ekgunnery_vortexringpellet,ekgunnery_vortexringpellet,ekgunnery_vortexringpellet">
      <StatusEffect type="Always" target="This">
        <SpawnItem identifiers="ekgunnery_vortexringpellet" spawnposition="ThisInventory" />
      </StatusEffect>
      <Containable items="ekgunnery_vortexringpellet" />
    </ItemContainer>
  </Item>
  <!-- Auxiliary Unique Ammo -->
  <!--
  <Item name="ekgunnery_debugminerammo" identifier="ekgunnery_debugminerammo" scale="0.5" tags="ammobox,crate,ekgunnery_chaingunequipment,ekgunnery_chaingunammo" 
  description="Conventional ammunition for a chaingun turret." category="Equipment,Weapon" hideinmenus="true" linkable="false" impactsoundtag="impact_metal_heavy" >
	<PreferredContainer primary="coilgunammocontainer,ammocontainer" />
	
    <Sprite texture="Mods/EK Gunnery/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="0,208,80,160" origin="0.5,0.5" />
    <BrokenSprite texture="Mods/EK Gunnery/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="80,208,80,160" maxcondition="75" origin="0.5,0.5"/>
    <BrokenSprite texture="Mods/EK Gunnery/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="160,208,80,160" maxcondition="60" origin="0.5,0.5"/>
    <BrokenSprite texture="Mods/EK Gunnery/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="240,208,80,160" maxcondition="45" origin="0.5,0.5"/>
    <BrokenSprite texture="Mods/EK Gunnery/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="320,208,80,160" maxcondition="30" origin="0.5,0.5"/>
    <BrokenSprite texture="Mods/EK Gunnery/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="400,208,80,160" maxcondition="15" origin="0.5,0.5"/>
    <BrokenSprite texture="Mods/EK Gunnery/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="480,208,80,160" maxcondition="0" origin="0.5,0.5"/>
	
    <ContainedSprite allowedcontainertags="coilgunammocontainer,crateshelf,ammoboxcontainer" allowedcontaineridentifiers="crateshelf,coilgunammoshelf" texture="Mods/EK Gunnery/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="560,208,112,80" origin="0.5,0.5" >
      <StatusEffect type="Always" target="This" targetitemcomponent="ContainedSprite" setvalue="true" sourcerect="560,288,112,80" >
        <Conditional condition="eq 0"/>
	  </StatusEffect>
      <StatusEffect type="OnBroken" target="This" targetitemcomponent="ContainedSprite" setvalue="true" sourcerect="560,288,112,80" />
    </ContainedSprite>
	
    <Body width="75" height="155" density="50" />
    <Holdable slots="RightHand+LeftHand" holdpos="50,-30" handle1="-15,15" handle2="-15,15" aimable="false" msg="ItemMsgPickUpSelect" canBeCombined="true" />
    <ItemContainer autofill="False" hideitems="true" capacity="1" removecontaineditemsondeconstruct="true" drawinventory="false" canbeselected="false" ShowConditionInContainedStateIndicator="true">
      <ContainedStateIndicator texture="Content/UI/ContainerIndicators.png" sourcerect="16,64,120,24" />
      <StatusEffect type="OnUse" target="This" condition="-0.332" disabledeltatime="true">
        <SpawnItem identifiers="ekgunnery_debugminerround" spawnposition="ThisInventory" />
      </StatusEffect>
      <Containable identifiers="ekgunnery_debugminerround" />
    </ItemContainer>
  </Item>
  
  <Item name="ekgunnery_debugminerround" identifier="ekgunnery_debugminerround" category="Misc,Weapon" scale="0.5" hideinmenus="true" >
    <Sprite texture="Mods/EK Gunnery/Items/Containers/ekgunnery_containers.png" sourcerect="928,0,48,16" depth="0.55" />
    <Body width="160" height="10" density="15" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,0" handle2="10,0" aimable="false" />
    <Projectile characterusable="false" hitscan="true" removeonhit="true" spread="4" >
      <ParticleEmitter particle="ekgunnery_tracerfirearm" particleamount="1" velocitymin="0" velocitymax="0" colormultiplier="0,200,255,175" scalemultiplier="1,1"/>
      <Attack structuredamage="5" severlimbsprobability="0.35" targetforce="7" >
        <Affliction identifier="gunshotwound" strength="12" />
        <Affliction identifier="bleeding" strength="1" />
      </Attack>
      <StatusEffect type="OnImpact" target="UseTarget">
        <ParticleEmitter particle="ekgunnery_impactfirearm" particleamount="1" velocitymin="0" velocitymax="0" />
      </StatusEffect>
	  <StatusEffect type="OnImpact" target="NearbyItems" targettags="ore" range="150.0" stackable="false" DeattachTimer="0.1" />
      <StatusEffect type="OnImpact">
        <ParticleEmitter particle="ekgunnerybubblesshort" anglemin="-180" anglemax="180" particleamount="1" velocitymin="-10" velocitymax="-100" scalemin="0.5" scalemax="1" velocitychangewater="0,0.5" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="UseTarget">
        <Conditional entitytype="eq Structure"/>
        <Conditional hastag="eq door"/>
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-25" anglemax="25" particleamount="4" velocitymin="-10" velocitymax="-300" scalemin="0.5" scalemax="1" />
      </StatusEffect>
      <StatusEffect type="OnNotContained" target="This" stackable="false" delay="1">
        <Remove />
      </StatusEffect>
    </Projectile>
  </Item>
-->
  <Item name="Mining Laser Cell" identifier="ekgunnery_mininglaserammo" scale="0.5" tags="ammobox,crate,ekgunnery_mininglaserammo" description="Heavy non-rechargable capacitor which supplies the isolated power modulation needed to drive an acoustic laser system. The casing includes large heatsinks to accommodate the unit's tendancy to heat up during extended use." category="Equipment,Weapon" linkable="false" impactsoundtag="impact_metal_heavy">
    <PreferredContainer primary="ekgunnery_mininglaserammosource,coilgunammocontainer,ammocontainer" />
    <Price baseprice="190" soldeverywhere="false">
      <Price storeidentifier="merchantoutpost" multiplier="1.25" minavailable="3" />
      <Price storeidentifier="merchantcity" multiplier="1.0" minavailable="4" />
      <Price storeidentifier="merchantresearch" multiplier="1.2" minavailable="2" />
      <Price storeidentifier="merchantmilitary" multiplier="0.8" sold="false" />
      <Price storeidentifier="merchantmine" multiplier="1.5" minavailable="2" />
    </Price>
    <!-- 194
	20
	26
	10
	88
	50
	-->
    <Deconstruct time="10">
      <Item identifier="steel" />
      <Item identifier="zinc" />
      <Item identifier="potassium" mincondition="0.8" />
      <Item identifier="lithium" mincondition="0.8" />
      <Item identifier="antibloodloss1" mincondition="0.8" />
      <!-- Deconstructing yields degraded components -->
      <Item identifier="potassium" maxcondition="0.8" outcondition="0.5" />
      <Item identifier="lithium" maxcondition="0.8" outcondition="0.5" />
      <Item identifier="chlorine" maxcondition="0.8" />
    </Deconstruct>
    <Fabricate suitablefabricators="fabricator" requiredtime="20">
      <RequiredSkill identifier="electrical" level="25" />
      <RequiredItem identifier="steel" />
      <RequiredItem identifier="zinc" />
      <RequiredItem identifier="potassium" />
      <RequiredItem identifier="lithium" />
      <RequiredItem identifier="antibloodloss1" />
    </Fabricate>
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="928,96,128,112" origin="0.5,0.5" />
    <ContainedSprite allowedcontainertags="coilgunammocontainer,crateshelf,ammoboxcontainer" allowedcontaineridentifiers="crateshelf,coilgunammoshelf" texture="%ModDir%/Items/Containers/ekgunnery_containers.png" depth="0.54" sourcerect="936,123,112,80" origin="0.5,0.5" />
    <Body width="75" height="155" density="50" />
    <Holdable slots="RightHand+LeftHand" holdpos="50,-30" handle1="-15,15" handle2="-15,15" aimable="false" msg="ItemMsgPickUpSelect" canBeCombined="false" />
    <ItemContainer autofill="False" hideitems="true" capacity="1" removecontaineditemsondeconstruct="true" drawinventory="false" canbeselected="false" ShowConditionInContainedStateIndicator="true">
      <ContainedStateIndicator texture="Content/UI/ContainerIndicators.png" sourcerect="16,64,120,24" />
      <StatusEffect type="OnUse" target="This" condition="-0.15" disabledeltatime="true">
        <SpawnItem identifiers="ekgunnery_mininglaserround" spawnposition="ThisInventory" />
      </StatusEffect>
      <Containable identifiers="ekgunnery_mininglaserround" />
    </ItemContainer>
  </Item>
  <Item name="Mining Laser Bolt" identifier="ekgunnery_mininglaserround" category="Misc,Weapon" scale="0.5" hideinmenus="true">
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" sourcerect="928,0,48,16" depth="0.55" />
    <Body width="160" height="10" density="15" />
    <Holdable slots="RightHand+LeftHand" holdpos="0,-50" handle1="-10,0" handle2="10,0" aimable="false" />
    <Projectile characterusable="false" hitscan="true" removeonhit="true" spread="1">
      <ParticleEmitter particle="ekgunnery_tracermininglaser" particleamount="1" velocitymin="0" velocitymax="0" colormultiplier="255,255,255,175" scalemultiplier="1,3" />
      <Attack structuredamage="0" itemdamage="1.5" levelwalldamage="0" severlimbsprobability="0" targetforce="2.5" penetration="0.4">
        <!--
		<Affliction identifier="bleeding" strength="0.3" />
        <Affliction identifier="explosiondamage" strength="1.3" />
        <Affliction identifier="internaldamage" strength="1.0" />
        <Affliction identifier="organdamage" strength="0.8" />
        <Affliction identifier="nausea" strength="0.6" />
		-->
        <Affliction identifier="bleeding" strength="0.6" />
        <Affliction identifier="explosiondamage" strength="2.6" />
        <Affliction identifier="internaldamage" strength="2.0" />
        <Affliction identifier="organdamage" strength="1.6" />
        <Affliction identifier="nausea" strength="1.2" />
      </Attack>
      <StatusEffect type="OnImpact" target="UseTarget">
        <ParticleEmitter particle="ekgunnery_impactmininglaser" anglemin="0" anglemax="360" particleamount="2" velocitymin="0" scalemin="0.5" scalemax="0.8" />
        <ParticleEmitter particle="FlareBubbles" particleamount="1" anglemin="0" anglemax="360" velocitymin="0" velocitymax="250" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="NearbyItems" targettags="ore" range="150.0" stackable="false" DeattachTimer="0.1" />
      <StatusEffect type="OnImpact">
        <ParticleEmitter particle="bubbles" anglemin="-180" anglemax="180" particleamount="1" velocitymin="-50" velocitymax="-250" scalemin="0.5" scalemax="1" />
        <!-- That bug where projectiles can't damage level walls if their structuredamage is 0 still affects hitscan, so use explosions as a workaroud for now -->
        <Explosion range="100.0" levelwalldamage="3" force="0" severlimbsprobability="0" camerashake="0" camerashakerange="0" shockwave="false" smoke="false" flames="false" flash="false" sparks="false" underwaterbubble="false" ignorecover="true" playtinnitus="false" applyfireeffects="false"></Explosion>
      </StatusEffect>
      <StatusEffect type="OnNotContained" target="This" stackable="false" delay="1">
        <Remove />
      </StatusEffect>
    </Projectile>
  </Item>
  <!-- Todo: The game doesn't like trying to solve the physics of a submarine being attached to another submarine -->
  <Item name="ekgunnery_grapplinghookammo" identifier="ekgunnery_grapplinghookammo" tags="grapplinghookprojectile,provocative" health="100" hideinmenus="true" category="Equipment,Weapon" sonarsize="5" scale="1" damagedbyexplosions="true" damagedbyprojectiles="true" damagedbyrepairtools="true" damagedbymeleeweapons="true" impactsoundtag="impact_metal_light">
    <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" sourcerect="560,560,88,64" depth="0.56" origin="0.5,0.5" />
    <BrokenSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" sourcerect="656,560,48,96" depth="0.56" origin="0.5,0.5" maxcondition="90" />
    <Body width="215" height="30" density="30" />
    <!--<Rope targetpullforce="300" SourcePullForce="150" projectilepullforce="25"  maxlength="10000" snaponcollision="false" spritewidth="30" tile="true" >-->
    <Rope targetpullforce="40000" SourcePullForce="40000" projectilepullforce="25" maxlength="10000" snaponcollision="false" spritewidth="30" tile="true">
      <Sprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" sourcerect="537,576,14,32" depth="0.57" origin="0.5,0.5" />
      <EndSprite texture="%ModDir%/Items/Containers/ekgunnery_containers.png" sourcerect="0,0,1,1" depth="0.56" origin="0.5,0.5" />
      <StatusEffect type="OnUse" target="This" Snapped="true" delay="9" />
      <StatusEffect type="Always" target="This" delay="0.5" checkconditionalalways="true">
        <Conditional Snapped="true" />
        <Remove />
      </StatusEffect>
      <StatusEffect type="OnUse" target="This" Snapped="true" delay="4" checkconditionalalways="true">
        <Conditional targetitemcomponent="Projectile" IsStuckToTarget="eq false" />
      </StatusEffect>
    </Rope>
    <Projectile characterusable="false" launchimpulse="80.0" sticktostructures="true" sticktocharacters="true" stickpermanently="true" maxtargetstohit="2">
      <Attack structuredamage="0">
        <Affliction identifier="blunttrauma" strength="15" />
        <Affliction identifier="stun" strength="0.3" />
      </Attack>
      <StatusEffect type="OnUse" target="This" delay="0.1" condition="-5" checkconditionalalways="true" disabledeltatime="true" stackable="false">
        <Conditional Condition="eq 100" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnUse" target="This" delay="0.5" condition="-5" checkconditionalalways="true" disabledeltatime="true" stackable="false">
        <Conditional Condition="eq 95" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnUse" target="This" delay="0.5" checkconditionalalways="true" disabledeltatime="true" stackable="false">
        <Conditional Condition="eq 90" />
        <Use />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="This" condition="-20">
        <Conditional Condition="gt 80" />
      </StatusEffect>
      <StatusEffect type="OnImpact" target="UseTarget">
        <Conditional entitytype="eq Structure" />
        <Conditional hastag="eq door" />
        <!-- <Sound file="Mods/EK Utilities/Items/Tools/grapplinghookimpact.ogg" range="2000" /> -->
        <ParticleEmitter particle="weldspark" anglemin="0" anglemax="360" particleamount="10" velocitymin="100" velocitymax="750" scalemin="1.0" scalemax="2.0" />
      </StatusEffect>
      <StatusEffect type="Always" target="This" targetitemcomponent="Rope" setvalue="true" SourcePullForce="40000" targetpullforce="40000" projectilepullforce="40000" disabledeltatime="true" stackable="false">
        <Conditional targetitemcomponent="Projectile" IsStuckToTarget="eq true" />
      </StatusEffect>
      <StatusEffect type="OnDeath" target="This" Snapped="true">
        <Sound file="Content/Sounds/Damage/StructureBlunt1.ogg" range="2000" selectionmode="Random" />
        <Sound file="Content/Sounds/Damage/StructureBlunt2.ogg" range="2000" />
        <Sound file="Content/Sounds/Damage/StructureBlunt3.ogg" range="2000" />
        <Sound file="Content/Sounds/Damage/StructureBlunt4.ogg" range="2000" />
        <Sound file="Content/Sounds/Damage/StructureBlunt5.ogg" range="2000" />
        <ParticleEmitter particle="spark" copyentityangle="true" anglemin="-30" anglemax="30" particleamount="3" velocitymin="10" velocitymax="300" scalemin="1.5" scalemax="2" />
        <ParticleEmitter particle="shrapnel" copyentityangle="true" anglemin="-20" anglemax="20" particleamount="3" velocitymin="50" velocitymax="300" scalemin="1" scalemax="2" />
      </StatusEffect>
    </Projectile>
  </Item>
</Items>