I require patching assistance ;-;

Started by DanteAyagawe, November 05, 2021, 03:28:03 PM

Previous topic - Next topic

DanteAyagawe

I'm new to modding and just wanted to patch the shark pets I have on Biomes! Islands to CE so they can at least do damage to other pawns

But it keeps giving me the error:
[Combat Extended] Patch operation Verse.PatchOperationFindMod(Biomes! Islands) failed
file: D:\Games\RimWorld\Mods\1631756268_combat_extended\Patches\Biomes Islands\Biomes_Islands_CE.xml
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.PatchOperation:Complete (string)
Verse.LoadedModManager:ClearCachedPatches ()
Verse.LoadedModManager:LoadAllActiveMods ()
Verse.PlayDataLoader:DoPlayLoad ()
Verse.PlayDataLoader:LoadAllPlayData (bool)
Verse.Root/<>c:<Start>b__6_1 ()
Verse.LongEventHandler:RunEventFromAnotherThread (System.Action)
Verse.LongEventHandler/<>c:<UpdateCurrentAsynchronousEvent>b__27_0 ()
System.Threading.ThreadHelper:ThreadStart_Context (object)
System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object)
System.Threading.ThreadHelper:ThreadStart ()


Here's the patch I made for Biomes! Islands
<?xml version="1.0" encoding="utf-8" ?>

<Patch>
<Operation Class="PatchOperationFindMod">
    <mods>
        <li>Biomes! Islands</li>
    </mods>
<match Class="PatchOperationSequence">
<operations>

<!-- === Great WhiteShark Stats === -->

<li Class="PatchOperationAddModExtension">
<xpath>/Defs/ThingDef[defName="BiomesIslands_WhiteShark"]</xpath>
<value>
<li Class="CombatExtended.RacePropertiesExtensionCE">
<bodyShape>QuadrupedLow</bodyShape>
</li>
</value>
</li>

<li Class="PatchOperationReplace">
<xpath>/Defs/ThingDef[defName="BiomesIslands_WhiteShark"]/statBases/ArmorRating_Blunt</xpath>
<value>
<ArmorRating_Blunt>1</ArmorRating_Blunt>
</value>
</li>

<li Class="PatchOperationReplace">
<xpath>/Defs/ThingDef[defName="BiomesIslands_WhiteShark"]/statBases/ArmorRating_Sharp</xpath>
<value>
<ArmorRating_Sharp>0.5</ArmorRating_Sharp>
</value>
</li>


<li Class="PatchOperationAdd">
<xpath>/Defs/ThingDef[defName="BiomesIslands_WhiteShark"]/statBases</xpath>
<value>
<MeleeDodgeChance>0.6</MeleeDodgeChance>
<MeleeCritChance>0.3</MeleeCritChance>
<MeleeParryChance>0.1</MeleeParryChance>
</value>
</li>

<li Class="PatchOperationReplace">
<xpath>/Defs/ThingDef[defName="BiomesIslands_WhiteShark"]/tools</xpath>
<value>
<tools>
<li Class="CombatExtended.ToolCE">
<label>teeth</label>
<capacities>
<li>Bite</li>
</capacities>
<power>22</power>
<cooldownTime>2</cooldownTime>
<linkedBodyPartsGroup>Teeth</linkedBodyPartsGroup>
<armorPenetrationSharp>3</armorPenetrationSharp>
<armorPenetrationBlunt>4</armorPenetrationBlunt>
<surpriseAttack>
<extraMeleeDamages>
<li>
<def>Stun</def>
<amount>32</amount>
</li>
</extraMeleeDamages>
</surpriseAttack>
</li>
<li Class="CombatExtended.ToolCE">
<label>head</label>
<capacities>
<li>Blunt</li>
</capacities>
<power>18</power>
<cooldownTime>2</cooldownTime>
<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
<ensureLinkedBodyPartsGroupAlwaysUsable>true</ensureLinkedBodyPartsGroupAlwaysUsable>
<armorPenetrationSharp>0.25</armorPenetrationSharp>
<armorPenetrationBlunt>2</armorPenetrationBlunt>
</li>
</tools>
</value>
</li>
</operations>
</match>
</Operation>
</Patch>

DanteAyagawe

 8) Update: Upon checking the biomes! islands, the shark has no blunt and sharp armor rating, thus creating an issue with the code patch I have for the shark, I guess the mod itself was the issue ;w;