Skip to content

Commit

Permalink
underbarrel
Browse files Browse the repository at this point in the history
  • Loading branch information
SaltyKarl committed Sep 16, 2024
1 parent ecbe1da commit 63f9193
Show file tree
Hide file tree
Showing 2 changed files with 154 additions and 62 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<Defs>

<!-- ==================== AmmoSet ========================== -->

<CombatExtended.AmmoSetDef>
<defName>AmmoSet_DisruptorFlare</defName>
<label>disruptor flare shell</label>
<ammoTypes>
<Ammo_DisruptorFlare>Grenade_DisruptorFlare</Ammo_DisruptorFlare>
</ammoTypes>
</CombatExtended.AmmoSetDef>

<!-- ==================== Ammo ========================== -->

<ThingDef Class="CombatExtended.AmmoDef" Name="FlareBase" ParentName="SmallAmmoBase" Abstract="True">
<description>A capsule of bioferrite incaseed in shotgunshell, on impact creates a bright flash and a local psychic disruption. This stuns psychically sensitive creatures, revealing those that are invisible, and reducing their consciousness and movement speed for a short while. Afterwards, the flare continues to burn, lighting up a wide area for some time.</description>
<statBases>
<Mass>0.023</Mass>
<Bulk>0.06</Bulk>
</statBases>
<tradeTags>
<li>CE_AutoEnableTrade</li>
<li>CE_AutoEnableCrafting</li>
</tradeTags>
<thingCategories>
<li>AmmoFlare</li>
</thingCategories>
<stackLimit>200</stackLimit>
</ThingDef>

<ThingDef Class="CombatExtended.AmmoDef" ParentName="FlareBase">
<defName>Ammo_DisruptorFlare</defName>
<label>Disruptorflare round</label>
<graphicData>
<texPath>Things/Ammo/Flare</texPath>
<graphicClass>Graphic_StackCount</graphicClass>
<drawSize>0.5</drawSize>
</graphicData>
<statBases>
<Mass>0.048</Mass>
<MarketValue>0.2</MarketValue>
</statBases>
<ammoClass>Flare</ammoClass>
<cookOffProjectile>Grenade_DisruptorFlare</cookOffProjectile>
</ThingDef>

<!-- ==================== Recipes ========================== -->

<RecipeDef ParentName="AmmoRecipeBase">
<defName>MakeAmmo_DisruptorFlare</defName>
<label>make disruptorflare x4</label>
<description>Craft 4 disruptorflare shells.</description>
<jobString>Making disruptorflare shells.</jobString>
<ingredients>
<li>
<filter>
<thingDefs>
<li>Bioferrite</li>
</thingDefs>
</filter>
<count>20</count>
</li>
<li>
<filter>
<thingDefs>
<li>Prometheum</li>
</thingDefs>
</filter>
<count>3</count>
</li>
</ingredients>
<fixedIngredientFilter>
<thingDefs>
<li>Bioferrite</li>
<li>Prometheum</li>
</thingDefs>
</fixedIngredientFilter>
<products>
<Ammo_DisruptorFlare>4</Ammo_DisruptorFlare>
</products>
<workAmount>500</workAmount>
</RecipeDef>

</Defs>
Original file line number Diff line number Diff line change
Expand Up @@ -169,30 +169,42 @@
</Operation>

<Operation Class="PatchOperationReplace">
<xpath>Defs/AbilityDef[defName="VWEB_FlarestrikeFlare"]/verbProperties</xpath>
<xpath>Defs/ThingDef[defName="VWEB_Gun_FlarestrikeRifle"]/comps/li[@Class="CompProperties_EquippableAbilityReloadable"]</xpath>
<value>
<verbProperties>
<verbClass>CombatExtended.Verb_LaunchProjectileStaticCE</verbClass>
<defaultProjectile>Grenade_DisruptorFlare</defaultProjectile>
<label>launch flare</label>
<warmupTime>0.5</warmupTime>
<range>40</range>
<burstShotCount>1</burstShotCount>
<onlyManualCast>true</onlyManualCast>
<hasStandardCommand>true</hasStandardCommand>
<targetable>true</targetable>
<violent>false</violent>
<targetParams>
<canTargetPawns>false</canTargetPawns>
<canTargetBuildings>false</canTargetBuildings>
<canTargetLocations>true</canTargetLocations>
</targetParams>
<soundCast>FlareLaunch</soundCast>
<rangedFireRulepack>Combat_RangedFire_Thrown</rangedFireRulepack>
<canGoWild>false</canGoWild>
<explosionRadiusRingColor>(0.8, 0.8, 0.4, 1)</explosionRadiusRingColor><!-- Keep in sync with PlaceWorker_GlowRadius.RingColor -->
<drawHighlightWithLineOfSight>true</drawHighlightWithLineOfSight>
</verbProperties>
<li Class="CombatExtended.CompProperties_UnderBarrel">
<standardLabel>switch to rifle</standardLabel>
<underBarrelLabel>switch to flaregun</underBarrelLabel>
<propsUnderBarrel>
<magazineSize>1</magazineSize>
<reloadTime>3</reloadTime>
<ammoSet>AmmoSet_DisruptorFlare</ammoSet>
</propsUnderBarrel>
<verbPropsUnderBarrel>
<recoilAmount>0.35</recoilAmount>
<verbClass>CombatExtended.Verb_ShootCE</verbClass>
<hasStandardCommand>true</hasStandardCommand>
<defaultProjectile>Grenade_DisruptorFlare</defaultProjectile>
<ai_AvoidFriendlyFireRadius>3</ai_AvoidFriendlyFireRadius>
<warmupTime>0.5</warmupTime>
<range>40</range>
<minRange>1</minRange>
<burstShotCount>1</burstShotCount>
<soundCast>FlareLaunch</soundCast>
<muzzleFlashScale>0</muzzleFlashScale>
<targetParams>
<canTargetLocations>true</canTargetLocations>
</targetParams>
</verbPropsUnderBarrel>
<propsFireModesUnderBarrel>
<aiUseBurstMode>FALSE</aiUseBurstMode>
<aiAimMode>AimedShot</aiAimMode>
<aimedBurstShotCount>5</aimedBurstShotCount>
<noSingleShot>true</noSingleShot>
</propsFireModesUnderBarrel>
</li>
<li>
<compClass>CompEquippable</compClass>
</li>
</value>
</Operation>

Expand Down Expand Up @@ -299,9 +311,9 @@
<WorkToMake>60000</WorkToMake>
</statBases>
<costList>
<Steel>150</Steel>
<ComponentIndustrial>20</ComponentIndustrial>
<Bioferrite>40</Bioferrite>
<Steel>200</Steel>
<ComponentIndustrial>25</ComponentIndustrial>
<Bioferrite>25</Bioferrite>
</costList>
<Properties>
<recoilAmount>0.97</recoilAmount>
Expand Down Expand Up @@ -331,42 +343,38 @@
</Operation>

<Operation Class="PatchOperationReplace">
<xpath>Defs/ThingDef[defName="VWEB_Gun_CycloneMinigun"]/comps/li[@Class="CompProperties_EquippableAbilityReloadable"]/ammoDef</xpath>
<value>
<ammoDef>Ammo_762x51mmNATO_FMJ</ammoDef>
</value>
</Operation>

<Operation Class="PatchOperationReplace">
<xpath>Defs/ThingDef[defName="VWEB_Gun_CycloneMinigun"]/comps/li[@Class="CompProperties_EquippableAbilityReloadable"]/ammoCountPerCharge</xpath>
<xpath>Defs/ThingDef[defName="VWEB_Gun_CycloneMinigun"]/comps/li[@Class="CompProperties_EquippableAbilityReloadable"]</xpath>
<value>
<ammoCountPerCharge>50</ammoCountPerCharge>
</value>
</Operation>

<Operation Class="PatchOperationReplace">
<xpath>Defs/AbilityDef[defName="VWEB_CycloneRapidBurst"]/verbProperties</xpath>
<value>
<verbProperties>
<verbClass>CombatExtended.Verb_LaunchProjectileStaticCE</verbClass>
<defaultProjectile>Bullet_762x51mmNATO_FMJ</defaultProjectile>
<warmupTime>0.5</warmupTime>
<range>62</range>
<burstShotCount>50</burstShotCount>
<ticksBetweenBurstShots>1</ticksBetweenBurstShots>
<onlyManualCast>true</onlyManualCast>
<hasStandardCommand>true</hasStandardCommand>
<targetable>true</targetable>
<violent>true</violent>
<targetParams>
<canTargetPawns>true</canTargetPawns>
<canTargetBuildings>true</canTargetBuildings>
<canTargetLocations>false</canTargetLocations>
</targetParams>
<soundCast>Shot_Minigun</soundCast>
<soundCastTail>GunTail_Medium</soundCastTail>
<muzzleFlashScale>9</muzzleFlashScale>
</verbProperties>
<li Class="CombatExtended.CompProperties_UnderBarrel">
<standardLabel>switch to normalfire</standardLabel>
<underBarrelLabel>switch to cyclone engine</underBarrelLabel>
<propsUnderBarrel>
<magazineSize>250</magazineSize>
<reloadTime>9.2</reloadTime>
<ammoSet>AmmoSet_762x51mmNATO</ammoSet>
</propsUnderBarrel>
<verbPropsUnderBarrel>
<recoilAmount>0.49</recoilAmount>
<verbClass>CombatExtended.Verb_ShootCE</verbClass>
<hasStandardCommand>true</hasStandardCommand>
<defaultProjectile>Bullet_762x51mmNATO_FMJ</defaultProjectile>
<warmupTime>2.1</warmupTime>
<range>62</range>
<burstShotCount>100</burstShotCount>
<ticksBetweenBurstShots>1</ticksBetweenBurstShots>
<soundCast>Shot_Minigun</soundCast>
<muzzleFlashScale>9</muzzleFlashScale>
</verbPropsUnderBarrel>
<propsFireModesUnderBarrel>
<aiUseBurstMode>FALSE</aiUseBurstMode>
<aiAimMode>AimedShot</aiAimMode>
<aimedBurstShotCount>50</aimedBurstShotCount>
<noSingleShot>true</noSingleShot>
</propsFireModesUnderBarrel>
</li>
<li>
<compClass>CompEquippable</compClass>
</li>
</value>
</Operation>

Expand Down Expand Up @@ -412,7 +420,6 @@
<li>SimpleGun</li>
<li>CE_AI_SR</li>
</weaponTags>
<researchPrerequisite>Gunsmithing</researchPrerequisite>
<AllowWithRunAndGun>false</AllowWithRunAndGun>
</Operation>

Expand Down

0 comments on commit 63f9193

Please sign in to comment.