Skip to content
This repository has been archived by the owner on Apr 14, 2020. It is now read-only.

Add Forsakens patches #1208

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions Patches/Forsakens/Forsakens_CE_Patch_Ammo_ForsakensArrows.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="UTF-8"?>
<Patch>
<Operation Class="PatchOperationFindMod">
<mods>
<li>Forsakens</li>
</mods>
<match Class="PatchOperationSequence">
<operations>

<li Class="PatchOperationAdd">
<xpath>Defs</xpath>
<value>

<!-- There is only one type of Forsaken arrow, no subcategory for variants required -->

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

<CombatExtended.AmmoSetDef>
<defName>AmmoSet_ForsakensArrows</defName>
<label>forsakens arrows</label>
<ammoTypes>
<Ammo_ForsakensArrows>Projectile_ForsakensArrows</Ammo_ForsakensArrows>
</ammoTypes>
</CombatExtended.AmmoSetDef>

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

<ThingDef Class="CombatExtended.AmmoDef" ParentName="AmmoGreatArrowBase">
<defName>Ammo_ForsakensArrows</defName>
<label>forsakens arrow</label>
<description>Heavy arrow designed to be fired from a forsaken bow.</description>
<graphicData>
<texPath>ThirdParty/Forsakens/FAmmoArrow</texPath>
<graphicClass>Graphic_StackCount</graphicClass>
</graphicData>
<statBases>
<Mass>0.115</Mass>
<MarketValue>0.66</MarketValue>
<Flammability>0</Flammability>
</statBases>
<ammoClass>ForsakenArrow</ammoClass>
</ThingDef>

<!-- ================== Projectiles ================== -->

<!-- Workaround for conditionally-patched projectiles: use an existing abstract class from the generic ammo library (In this case, BaseGreatArrowProjectile) -->

<ThingDef Class="CombatExtended.AmmoDef" ParentName="BaseGreatArrowProjectile">
<defName>Projectile_ForsakensArrows</defName>
<label>forsakens arrow</label>
<graphicData>
<texPath>Weapons/FArrow</texPath>
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<projectile Class="CombatExtended.ProjectilePropertiesCE">
<damageAmountBase>7</damageAmountBase>
<armorPenetrationBlunt>2.340</armorPenetrationBlunt>
<armorPenetrationSharp>2</armorPenetrationSharp>
<preExplosionSpawnChance>0.6</preExplosionSpawnChance>
<!-- 25 arrows per resource -->
<preExplosionSpawnThingDef>Ammo_ForsakensArrows</preExplosionSpawnThingDef>
</projectile>
</ThingDef>

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

<RecipeDef ParentName="AmmoRecipeNeolithicBase">
<defName>MakeAmmo_ForsakensArrows</defName>
<label>make forsakens arrows x10</label>
<description>Craft 10 forsakens arrows.</description>
<jobString>Making forsaken arrows.</jobString>
<workAmount>400</workAmount>
<ingredients>
<!-- Stats manually specified due to alien nature of ammo -->
<li>
<filter>
<thingDefs>
<li>Steel</li>
</thingDefs>
</filter>
<count>4</count>
</li>
</ingredients>
<fixedIngredientFilter>
<thingDefs>
<li>Steel</li>
</thingDefs>
</fixedIngredientFilter>
<products>
<Ammo_ForsakensArrows>10</Ammo_ForsakensArrows>
</products>
</RecipeDef>

</value>
</li>

</operations>
</match>
</Operation>
</Patch>
116 changes: 116 additions & 0 deletions Patches/Forsakens/Forsakens_CE_Patch_Ammo_ProjReskin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<?xml version="1.0" encoding="UTF-8"?>
<Patch>
<Operation Class="PatchOperationFindMod">
<mods>
<li>Forsakens</li>
</mods>
<match Class="PatchOperationSequence">
<operations>

<!-- Custom ammoset and projectile definitions for Forsaken ranged weapons, allowing them to use existing generic CE charged ammo while firing mod-unique projectiles -->

<li Class="PatchOperationAdd">
<xpath>Defs</xpath>
<value>

<!-- ========== 8x35mm Charged cartridge for Forsaken Sniping Rifle ========== -->

<CombatExtended.AmmoSetDef>
<defName>AmmoSet_8x35mmCharged_ForsakenSniper</defName>
<label>8x35mm Charged</label>
<ammoTypes>
<Ammo_8x35mmCharged>Bullet_8x35mmCharged_ForsakenSniper</Ammo_8x35mmCharged>
</ammoTypes>
</CombatExtended.AmmoSetDef>

<ThingDef Class="CombatExtended.AmmoDef" ParentName="Base8x35mmChargedBullet">
<defName>Bullet_8x35mmCharged_ForsakenSniper</defName>
<label>8x35mm Charged bullet</label>
<graphicData>
<texPath>Weapons/SnipPulse</texPath>
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<projectile Class="CombatExtended.ProjectilePropertiesCE">
<damageAmountBase>19</damageAmountBase>
<secondaryDamage>
<li>
<def>Bomb_Secondary</def>
<amount>6</amount>
</li>
</secondaryDamage>
<armorPenetrationSharp>14</armorPenetrationSharp>
<armorPenetrationBlunt>57.6</armorPenetrationBlunt>
</projectile>
</ThingDef>

<!-- ========== 12 Gauge Charged shotgun cartridge for Forsaken ShotGun ========== -->

<CombatExtended.AmmoSetDef>
<defName>AmmoSet_12GaugeCharged_ForsakenShotGun</defName>
<label>12 Gauge Charged</label>
<ammoTypes>
<Ammo_12GaugeCharged>Bullet_12GaugeCharged_ForsakenShotGun</Ammo_12GaugeCharged>
</ammoTypes>
</CombatExtended.AmmoSetDef>

<ThingDef Class="CombatExtended.AmmoDef" ParentName="Base12GaugeChargedBullet">
<defName>Bullet_12GaugeCharged_ForsakenShotGun</defName>
<label>charge shot pellet</label>
<graphicData>
<texPath>Weapons/ShotPulse</texPath>
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<!-- Original mod implemented the shotgun blast as a slug -->
<projectile Class="CombatExtended.ProjectilePropertiesCE">
<damageAmountBase>15</damageAmountBase>
<secondaryDamage>
<li>
<def>Bomb_Secondary</def>
<amount>5</amount>
</li>
</secondaryDamage>
<armorPenetrationSharp>8</armorPenetrationSharp>
<armorPenetrationBlunt>32.4</armorPenetrationBlunt>
</projectile>
</ThingDef>

<!-- ========== 5x35mm Charged cartridge for Forsaken Assault Rifle ========== -->

<CombatExtended.AmmoSetDef>
<defName>AmmoSet_5x35mmCharged_ForsakenAR</defName>
<label>5x35mm Charged</label>
<ammoTypes>
<Ammo_5x35mmCharged>Bullet_5x35mmCharged_ForsakenAR</Ammo_5x35mmCharged>
</ammoTypes>
</CombatExtended.AmmoSetDef>

<!-- Workaround for conditionally-patched projectiles: use an existing abstract class from the generic ammo library (In this case, Base8x35mmChargedBullet) -->
<ThingDef Class="CombatExtended.AmmoDef" ParentName="Base8x35mmChargedBullet">
<defName>Bullet_5x35mmCharged_ForsakenAR</defName>
<label>5x35mm Charged bullet</label>
<graphicData>
<texPath>Weapons/SmolPulse</texPath>
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<projectile Class="CombatExtended.ProjectilePropertiesCE">
<damageDef>Bullet</damageDef>
<damageAmountBase>11</damageAmountBase>
<speed>200</speed>
<secondaryDamage>
<li>
<def>Bomb_Secondary</def>
<amount>2</amount>
</li>
</secondaryDamage>
<armorPenetrationSharp>30</armorPenetrationSharp>
<armorPenetrationBlunt>40</armorPenetrationBlunt>
</projectile>
</ThingDef>

</value>
</li>

</operations>
</match>
</Operation>
</Patch>
115 changes: 115 additions & 0 deletions Patches/Forsakens/Forsakens_CE_Patch_ApparelDefs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
<?xml version="1.0" encoding="UTF-8"?>
<Patch>
<Operation Class="PatchOperationFindMod">
<mods>
<li>Forsakens</li>
</mods>
<match Class="PatchOperationSequence">
<operations>

<!-- ========== Forsaken Hood and Cloak ========== -->

<!-- Note: Forsaken fabric apparel are only craftable from Synthread -->

<li Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="Forsaken_Hood"]/statBases</xpath>
<value>
<Bulk>1</Bulk>
</value>
</li>

<li Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="Forsaken_Cloak"]/statBases</xpath>
<value>
<Bulk>7.5</Bulk>
<WornBulk>1</WornBulk>
</value>
</li>

<li Class="PatchOperationReplace">
<xpath>Defs/ThingDef[
defName="Forsaken_Hood" or
defName="Forsaken_Cloak"
]/statBases/ArmorRating_Sharp</xpath>
<value>
<!-- Equvalent to vanilla Synthread duster at normal quality -->
<ArmorRating_Sharp>1</ArmorRating_Sharp>
</value>
</li>

<li Class="PatchOperationReplace">
<xpath>Defs/ThingDef[
defName="Forsaken_Hood" or
defName="Forsaken_Cloak"
]/statBases/ArmorRating_Blunt</xpath>
<value>
<!-- Equvalent to vanilla Synthread duster at normal quality -->
<ArmorRating_Blunt>0.25</ArmorRating_Blunt>
</value>
</li>

<!-- ========== Forsaken Helmet ========== -->

<li Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="TForsakenH"]/statBases</xpath>
<value>
<!-- Slightly larger item bulk than vanilla Power armor helmet, to account for horns on Forsaken helmet -->
<Bulk>6</Bulk>
<WornBulk>1.5</WornBulk>
</value>
</li>

<li Class="PatchOperationReplace">
<xpath>Defs/ThingDef[defName="TForsakenH"]/statBases/ArmorRating_Sharp</xpath>
<value>
<!-- Equvalent to vanilla Power armor helmet at normal quality -->
<ArmorRating_Sharp>16</ArmorRating_Sharp>
</value>
</li>

<li Class="PatchOperationReplace">
<xpath>Defs/ThingDef[defName="TForsakenH"]/statBases/ArmorRating_Blunt</xpath>
<value>
<!-- Equvalent to vanilla Power armor helmet at normal quality -->
<ArmorRating_Blunt>36</ArmorRating_Blunt>
</value>
</li>

<!-- ========== Forsaken Armor ========== -->

<li Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="TForsakenA"]/statBases</xpath>
<value>
<Bulk>100</Bulk>
<WornBulk>15</WornBulk>
</value>
</li>

<li Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="TForsakenA"]/equippedStatOffsets</xpath>
<value>
<CarryBulk>10</CarryBulk>
<CarryWeight>80</CarryWeight>
</value>
</li>

<li Class="PatchOperationReplace">
<xpath>Defs/ThingDef[defName="TForsakenA"]/statBases/ArmorRating_Sharp</xpath>
<value>
<!-- Equvalent to vanilla Power armor at normal quality -->
<ArmorRating_Sharp>20</ArmorRating_Sharp>
</value>
</li>

<li Class="PatchOperationReplace">
<xpath>Defs/ThingDef[defName="TForsakenA"]/statBases/ArmorRating_Blunt</xpath>
<value>
<!-- Equvalent to vanilla Power armor at normal quality -->
<ArmorRating_Blunt>45</ArmorRating_Blunt>
</value>
</li>

</operations>
</match>
</Operation>
</Patch>
39 changes: 39 additions & 0 deletions Patches/Forsakens/Forsakens_CE_Patch_Drugs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<Patch>
<Operation Class="PatchOperationFindMod">
<mods>
<li>Forsakens</li>
</mods>
<match Class="PatchOperationSequence">
<operations>

<!-- ========== Patch item bulk ========== -->

<li Class="PatchOperationAdd">
<xpath>Defs/ThingDef[
defName="Razor" or
defName="Vitaminf"
]/statBases</xpath>
<value>
<!-- Equivalent to vanilla pill drugs -->
<Bulk>0.01</Bulk>
</value>
</li>

<!-- ========== Patch item mass ========== -->

<li Class="PatchOperationReplace">
<xpath>Defs/ThingDef[
defName="Razor" or
defName="Vitaminf"
]/statBases/Mass</xpath>
<value>
<!-- Equivalent to vanilla pill drugs -->
<Mass>0.005</Mass>
</value>
</li>

</operations>
</match>
</Operation>
</Patch>
Loading