Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diverse Mechanoid War Procedure patch #3502

Merged
Merged
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
2 changes: 1 addition & 1 deletion Defs/Ammo/Advanced/70mmMechanoidGrenade.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<CombatExtended.AmmoSetDef>
<defName>AmmoSet_70mmMechanoidGrenade</defName>
<label>70mmMechanoid Grenades</label>
<label>70mm Mechanoid Grenades</label>
<ammoTypes>
<Ammo_70mmMechanoidGrenade_HE>Bullet_70mmMechanoidGrenade_HE</Ammo_70mmMechanoidGrenade_HE>
<Ammo_70mmMechanoidGrenade_EMP>Bullet_70mmMechanoidGrenade_EMP</Ammo_70mmMechanoidGrenade_EMP>
Expand Down
1 change: 1 addition & 0 deletions LoadFolders.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
<li IfModActive="ATK.DevilstrandAnimals">ModPatches/Devilstrand Animals</li>
<li IfModActive="GarbageDayIsHereToStay.DevilstrandColourBundle.GDIHTSDSCB">ModPatches/Devilstrand Colour Bundle</li>
<li IfModActive="spincrus.dinosauria">ModPatches/Dinosauria</li>
<li IfModActive="AmethystTheOtter.DiverseMechanoidWarProcedure">ModPatches/Diverse Mechanoid War Procedure</li>
<li IfModActive="BotchJob.divineorder">ModPatches/Divine Order</li>
<li IfModActive="Mlie.DoomFactions">ModPatches/Doom Factions</li>
<li IfModActive="onyxae.dragonsdescent">ModPatches/Dragons Descent</li>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<Defs>

<ThingDef Class="CombatExtended.AmmoDef" ParentName="70mmMechanoidGrenadeBase">
<defName>Ammo_70mmMechanoidGrenade_Tox</defName>
<label>70mm mechanoid grenade (Tox)</label>
<graphicData>
<texPath>Things/Ammo/GrenadeLauncher/Tox</texPath>
<graphicClass>Graphic_StackCount</graphicClass>
</graphicData>
<statBases>
<MarketValue>18.34</MarketValue><!-- value intentionally decreased to help reduce wealth bloat/free silver -->
</statBases>
<ammoClass>Toxic</ammoClass>
<detonateProjectile>Bullet_70mmMechanoidGrenade_Tox</detonateProjectile>
</ThingDef>

<ThingDef ParentName="Base40x46mmGrenadeBullet" MayRequire="Ludeon.RimWorld.Biotech">
<defName>Bullet_70mmMechanoidGrenade_Tox</defName>
<label>70mm mechanoid grenade (Tox)</label>
<projectile Class="CombatExtended.ProjectilePropertiesCE">
<damageDef>ToxGas</damageDef>
<explosionRadius>6.5</explosionRadius>
<postExplosionGasType>ToxGas</postExplosionGasType>
<preExplosionSpawnChance>1</preExplosionSpawnChance>
</projectile>
</ThingDef>

<RecipeDef ParentName="ChargeAmmoRecipeBase" MayRequire="Ludeon.RimWorld.Biotech">
<defName>MakeAmmo_70mmMechanoidGrenade_Tox</defName>
<label>make 70mm Mechanoid Tox Grenade x5</label>
<description>Craft 5 70mm Mechanoid Tox Grenades.</description>
<jobString>Making 70mm Mechanoid Tox Grenades.</jobString>
<ingredients>
<li>
<filter>
<thingDefs>
<li>Steel</li>
</thingDefs>
</filter>
<count>18</count>
</li>
<li>
<filter>
<thingDefs>
<li>Prometheum</li>
</thingDefs>
</filter>
<count>3</count>
</li>
<li>
<filter>
<thingDefs>
<li>ComponentIndustrial</li>
</thingDefs>
</filter>
<count>2</count>
</li>
</ingredients>
<fixedIngredientFilter>
<thingDefs>
<li>Steel</li>
<li>ComponentIndustrial</li>
<li>Prometheum</li>
</thingDefs>
</fixedIngredientFilter>
<products>
<Ammo_70mmMechanoidGrenade_Tox>5</Ammo_70mmMechanoidGrenade_Tox>
</products>
<skillRequirements>
<Crafting>8</Crafting>
</skillRequirements>
<workAmount>9240</workAmount><!-- 10% more work -->
</RecipeDef>

</Defs>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Patch>

<!-- Add the tox grenades to the 70mm grenade ammoset -->

<Operation Class="PatchOperationAdd">
<xpath>Defs/CombatExtended.AmmoSetDef[defName="AmmoSet_70mmMechanoidGrenade"]/ammoTypes</xpath>
<value>
<Ammo_70mmMechanoidGrenade_Tox>Bullet_70mmMechanoidGrenade_Tox</Ammo_70mmMechanoidGrenade_Tox>
</value>
</Operation>

</Patch>
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
<?xml version="1.0" encoding="utf-8"?>
<Patch>

<!-- ==================== Knight ==================== -->

<!-- ========== Add groups entry if it doesn't exist already ========== -->

<Operation Class="PatchOperationConditional">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/groups</xpath>
<nomatch Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Knight"]/corePart</xpath>
<value>
<groups />
</value>
</nomatch>
</Operation>

<Operation Class="PatchOperationConditional">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/parts/li[def="MechanicalNeck"]/groups</xpath>
<nomatch Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/parts/li[def="MechanicalNeck"]</xpath>
<value>
<groups />
</value>
</nomatch>
</Operation>

<Operation Class="PatchOperationConditional">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/parts/li[def="MechanicalNeck"]/parts/li[def="MechanicalHead"]/groups</xpath>
<nomatch Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/parts/li[def="MechanicalNeck"]/parts/li[def="MechanicalHead"]</xpath>
<value>
<groups />
</value>
</nomatch>
</Operation>

<Operation Class="PatchOperationConditional">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/parts/li[def="MechanicalShoulder"]/groups</xpath>
<nomatch Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/parts/li[def="MechanicalShoulder"]</xpath>
<value>
<groups />
</value>
</nomatch>
</Operation>

<Operation Class="PatchOperationConditional">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/parts/li[def="MechanicalShoulder"]/parts/li[def="MechanicalArm"]/groups</xpath>
<nomatch Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/parts/li[def="MechanicalShoulder"]/parts/li[def="MechanicalArm"]</xpath>
<value>
<groups />
</value>
</nomatch>
</Operation>

<Operation Class="PatchOperationConditional">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/parts/li[def="MechanicalShoulder"]/parts/li[def="MechanicalArm"]/parts/li[def="MechanicalHand"]/groups</xpath>
<nomatch Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/parts/li[def="MechanicalShoulder"]/parts/li[def="MechanicalArm"]/parts/li[def="MechanicalHand"]</xpath>
<value>
<groups />
</value>
</nomatch>
</Operation>

<Operation Class="PatchOperationConditional">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/parts/li[def="MechanicalLeg"]/groups</xpath>
<nomatch Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/parts/li[def="MechanicalLeg"]</xpath>
<value>
<groups />
</value>
</nomatch>
</Operation>

<Operation Class="PatchOperationConditional">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/parts/li[def="MechanicalLeg"]/parts/li[def="MechanicalFoot"]/groups</xpath>
<nomatch Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/parts/li[def="MechanicalLeg"]/parts/li[def="MechanicalFoot"]</xpath>
<value>
<groups />
</value>
</nomatch>
</Operation>

<!-- ========== Add armor coverage ========== -->

<Operation Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/groups</xpath>
<value>
<li>CoveredByNaturalArmor</li>
</value>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/parts/li[def="MechanicalNeck"]/groups</xpath>
<value>
<li>CoveredByNaturalArmor</li>
</value>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/parts/li[def="MechanicalNeck"]/parts/li[def="MechanicalHead"]/groups</xpath>
<value>
<li>CoveredByNaturalArmor</li>
</value>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/parts/li[def="MechanicalShoulder"]/groups</xpath>
<value>
<li>CoveredByNaturalArmor</li>
</value>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/parts/li[def="MechanicalShoulder"]/parts/li[def="MechanicalArm"]/groups</xpath>
<value>
<li>CoveredByNaturalArmor</li>
</value>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/parts/li[def="MechanicalShoulder"]/parts/li[def="MechanicalArm"]/parts/li[def="MechanicalHand"]/groups</xpath>
<value>
<li>CoveredByNaturalArmor</li>
</value>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/parts/li[def="MechanicalShoulder"]/parts/li[def="MechanicalArm"]/parts/li[def="Blade"]/groups</xpath>
<value>
<li>CoveredByNaturalArmor</li>
</value>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/parts/li[def="MechanicalShoulder"]/parts/li[def="MechanicalArm"]/parts/li[def="Shield"]/groups</xpath>
<value>
<li>CoveredByNaturalArmor</li>
</value>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/parts/li[def="MechanicalShoulder"]/parts/li[def="MechanicalArm"]/parts/li[def="MechanicalHand"]/parts/li[def="MechanicalFinger"]/groups</xpath>
<value>
<li>CoveredByNaturalArmor</li>
</value>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/parts/li[def="MechanicalLeg"]/groups</xpath>
<value>
<li>CoveredByNaturalArmor</li>
</value>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/parts/li[def="MechanicalLeg"]/parts/li[def="MechanicalFoot"]/groups</xpath>
<value>
<li>CoveredByNaturalArmor</li>
</value>
</Operation>

<!-- ========== Modify coverage ========== -->

<Operation Class="PatchOperationReplace">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/parts/li[def="MechanicalShoulder"]/coverage</xpath>
<value>
<coverage>0.15</coverage>
</value>
</Operation>

<Operation Class="PatchOperationReplace">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/parts/li[def="MechanicalShoulder"]/parts/li[def="MechanicalArm"]/parts/li[def="Blade"]/coverage</xpath>
<value>
<coverage>0.2</coverage>
</value>
</Operation>

<Operation Class="PatchOperationReplace">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/parts/li[def="MechanicalShoulder"]/parts/li[def="MechanicalArm"]/parts/li[def="Shield"]/coverage</xpath>
<value>
<coverage>0.7</coverage>
</value>
</Operation>

<Operation Class="PatchOperationReplace">
<xpath>Defs/BodyDef[defName="Knight"]/corePart/parts/li[def="FluidReprocessor"]/coverage</xpath>
<value>
<coverage>0.05</coverage>
</value>
</Operation>

</Patch>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8" ?>
<Patch>

<Operation Class="PatchOperationReplace">
<xpath>Defs/HediffDef[defName="AM_MechanoidCommandBuffPikeman"]/stages/li/statOffsets/ShootingAccuracyPawn</xpath>
<value>
<ShootingAccuracyPawn>0.3</ShootingAccuracyPawn>
</value>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>Defs/HediffDef[defName="AM_MechanoidCommandBuffPikeman"]/stages/li/statOffsets</xpath>
<value>
<AimingAccuracy>0.3</AimingAccuracy>
</value>
</Operation>

<Operation Class="PatchOperationReplace">
<xpath>Defs/HediffDef[defName="AM_MechanoidCommandBuffPraetorian"]/stages/li/statOffsets/ArmorRating_Sharp</xpath>
<value>
<ArmorRating_Sharp>3</ArmorRating_Sharp>
</value>
</Operation>

</Patch>
Loading