Skip to content

Commit

Permalink
Merge pull request #2734 from ViralReaction/Rim-Gnoblins-Patch
Browse files Browse the repository at this point in the history
Rim-Gnoblins Patch
  • Loading branch information
N7Huntsman authored Sep 21, 2023
2 parents afc2198 + 97edaef commit 7620871
Show file tree
Hide file tree
Showing 6 changed files with 452 additions and 0 deletions.
48 changes: 48 additions & 0 deletions Patches/Rim Gnoblins/Gnoblins_Drugs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<Patch>

<Operation Class="PatchOperationFindMod">
<mods>
<li>Rim-Gnoblins</li>
</mods>

<match Class="PatchOperationSequence">
<operations>

<!-- ========== Patch statOffsets ========== -->
<li Class="PatchOperationAdd">
<xpath>Defs/HediffDef[defName="ShardHigh"]/stages/li/statOffsets</xpath>
<value>
<Suppressability>-0.5</Suppressability>
</value>
</li>

<li Class="PatchOperationAdd">
<xpath>Defs/HediffDef[defName="DregHigh"]/stages/li</xpath>
<value>
<statFactors>
<Suppressability>0.75</Suppressability>
</statFactors>
</value>
</li>

<!-- ========== Patch item bulk ========== -->
<li Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="ShardMethamphetamine"]/statBases</xpath>
<value>
<Bulk>0.05</Bulk>
</value>
</li>

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

</operations>
</match>
</Operation>

</Patch>
171 changes: 171 additions & 0 deletions Patches/Rim Gnoblins/Gnoblins_Grenade.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
<?xml version="1.0" encoding="utf-8"?>
<Patch>

<Operation Class="PatchOperationFindMod">
<mods>
<li>Rim-Gnoblins</li>
</mods>

<match Class="PatchOperationSequence">
<operations>

<!-- ========== Kill recipe maker ========== -->
<li Class="PatchOperationAttributeSet">
<xpath>Defs/ThingDef[defName="RGWeapon_Toxpot"]</xpath>
<attribute>ParentName</attribute>
<value>BaseWeapon</value>
</li>

<li Class="PatchOperationRemove">
<xpath>Defs/ThingDef[defName="RGWeapon_Toxpot"]/recipeMaker</xpath>
</li>

<!-- ========== Melee tools ========== -->
<li Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="RGWeapon_Toxpot"]</xpath>
<value>
<tools>
<li Class="CombatExtended.ToolCE">
<label>Body</label>
<capacities>
<li>Blunt</li>
</capacities>
<power>2</power>
<cooldownTime>1.75</cooldownTime>
<armorPenetrationBlunt>1.0</armorPenetrationBlunt>
<linkedBodyPartsGroup>Base</linkedBodyPartsGroup>
</li>
</tools>
</value>
</li>

<!-- Projectile -->
<li Class="PatchOperationReplace">
<xpath>Defs/ThingDef[defName="RGProj_ToxPot"]/thingClass</xpath>
<value>
<thingClass>CombatExtended.ProjectileCE_Explosive</thingClass>
</value>
</li>

<li Class="PatchOperationReplace">
<xpath>Defs/ThingDef[defName="RGProj_ToxPot"]/projectile</xpath>
<value>
<projectile Class="CombatExtended.ProjectilePropertiesCE">
<explosionRadius>1.9</explosionRadius>
<damageDef>ToxGas</damageDef>
<explosionDelay>100</explosionDelay>
<postExplosionGasType>ToxGas</postExplosionGasType>
<applyDamageToExplosionCellsNeighbors>true</applyDamageToExplosionCellsNeighbors>
<speed>12</speed>
<suppressionFactor>3.0</suppressionFactor>
<dangerFactor>2.0</dangerFactor>
<airborneSuppressionFactor>0.25</airborneSuppressionFactor>
</projectile>
</value>
</li>

<!-- Grenade -->
<li Class="PatchOperationRemove">
<xpath>Defs/ThingDef[defName="RGWeapon_Toxpot"]/costList</xpath>
</li>

<li Class="PatchOperationReplace">
<xpath>Defs/ThingDef[defName="RGWeapon_Toxpot"]/graphicData/texPath</xpath>
<value>
<texPath>Items/Weapons/Toxpots/Toxpot_Flying</texPath>
</value>
</li>

<li Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="RGWeapon_Toxpot"]</xpath>
<value>
<thingClass>CombatExtended.AmmoThing</thingClass>
<stackLimit>50</stackLimit>
<resourceReadoutPriority>First</resourceReadoutPriority>
</value>
</li>

<li Class="PatchOperationAttributeSet">
<xpath>Defs/ThingDef[defName="RGWeapon_Toxpot"]</xpath>
<attribute>Class</attribute>
<value>CombatExtended.AmmoDef</value>
</li>

<li Class="CombatExtended.PatchOperationMakeGunCECompatible">
<defName>RGWeapon_Toxpot</defName>
<statBases>
<Mass>0.7</Mass>
<Bulk>1.05</Bulk>
<MarketValue>7.05</MarketValue>
<RangedWeapon_Cooldown>1</RangedWeapon_Cooldown>
<SightsEfficiency>0.65</SightsEfficiency>
</statBases>
<Properties>
<label>throw grenade</label>
<verbClass>CombatExtended.Verb_ShootCEOneUse</verbClass>
<hasStandardCommand>true</hasStandardCommand>
<range>10</range>
<minRange>1.9</minRange>
<warmupTime>0.8</warmupTime>
<noiseRadius>4</noiseRadius>
<ai_IsBuildingDestroyer>true</ai_IsBuildingDestroyer>
<soundCast>ThrowMolotovCocktail</soundCast>
<targetParams>
<canTargetLocations>true</canTargetLocations>
</targetParams>
<defaultProjectile>RGProj_ToxPot</defaultProjectile>
<onlyManualCast>true</onlyManualCast>
<ignorePartialLoSBlocker>true</ignorePartialLoSBlocker>
<ai_AvoidFriendlyFireRadius>2</ai_AvoidFriendlyFireRadius>
</Properties>
<weaponTags>
<li>CE_AI_Grenade</li>
<li>CE_AI_AOE</li>
<li>CE_OneHandedWeapon</li>
</weaponTags>
</li>

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

<RecipeDef ParentName="GrenadeRecipeBase">
<defName>MakeToxPot</defName>
<label>make toxic grenade x10</label>
<description>Craft 10 toxic grenade.</description>
<jobString>Making toxic grenade.</jobString>
<researchPrerequisite>RG_ShardDistilleryAndWeaponry</researchPrerequisite>
<workAmount>4400</workAmount>
<recipeUsers>
<li>ElectricSmithy</li>
<li>FueledSmithy</li>
<li>CraftingSpot</li>
</recipeUsers>
<ingredients>
<li>
<filter>
<thingDefs>
<li>DregMethamphetamine</li>
</thingDefs>
</filter>
<count>20</count>
</li>
</ingredients>
<fixedIngredientFilter>
<thingDefs>
<li>DregMethamphetamine</li>
</thingDefs>
</fixedIngredientFilter>
<products>
<RGWeapon_Toxpot>10</RGWeapon_Toxpot>
</products>
</RecipeDef>

</value>
</li>

</operations>
</match>
</Operation>

</Patch>
77 changes: 77 additions & 0 deletions Patches/Rim Gnoblins/Gnoblins_Melee.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8"?>
<Patch>

<Operation Class="PatchOperationFindMod">
<mods>
<li>Rim-Gnoblins</li>
</mods>

<match Class="PatchOperationSequence">
<operations>

<!-- Patch stats -->
<li Class="PatchOperationReplace">
<xpath>Defs/ThingDef[defName="RG_MeleeWeapon_ToxSpear"]/tools</xpath>
<value>
<tools>
<li Class="CombatExtended.ToolCE">
<label>shaft</label>
<capacities>
<li>Blunt</li>
</capacities>
<power>7</power>
<cooldownTime>1.35</cooldownTime>
<chanceFactor>0.15</chanceFactor>
<armorPenetrationBlunt>2.25</armorPenetrationBlunt>
<linkedBodyPartsGroup>Shaft</linkedBodyPartsGroup>
</li>
<li Class="CombatExtended.ToolCE">
<label>shaft</label>
<capacities>
<li>Poke</li>
</capacities>
<power>4</power>
<cooldownTime>1.78</cooldownTime>
<chanceFactor>0.05</chanceFactor>
<armorPenetrationBlunt>1</armorPenetrationBlunt>
<linkedBodyPartsGroup>Point</linkedBodyPartsGroup>
</li>
<li Class="CombatExtended.ToolCE">
<label>head</label>
<capacities>
<li>ScratchToxic</li>
</capacities>
<power>18</power>
<cooldownTime>1.19</cooldownTime>
<armorPenetrationBlunt>2.25</armorPenetrationBlunt>
<armorPenetrationSharp>2.25</armorPenetrationSharp>
<linkedBodyPartsGroup>Head</linkedBodyPartsGroup>
</li>
</tools>
</value>
</li>

<li Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="RG_MeleeWeapon_ToxSpear"]/statBases</xpath>
<value>
<Bulk>10</Bulk>
<MeleeCounterParryBonus>1.68</MeleeCounterParryBonus>
</value>
</li>

<li Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="RG_MeleeWeapon_ToxSpear"]</xpath>
<value>
<equippedStatOffsets>
<MeleeCritChance>0.17</MeleeCritChance>
<MeleeParryChance>1.45</MeleeParryChance>
<MeleeDodgeChance>0.9</MeleeDodgeChance>
</equippedStatOffsets>
</value>
</li>

</operations>
</match>
</Operation>

</Patch>
Loading

0 comments on commit 7620871

Please sign in to comment.